// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: keyapis/rfidregistry/v1/keyapis_rfidregistry_record_v1.proto

#include "keyapis/rfidregistry/v1/keyapis_rfidregistry_record_v1.pb.h"

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

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace rfidregistry {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Record_DataCell::Record_DataCell(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.section_)*/ 0

  , /*decltype(_impl_.block_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_DataCellDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_DataCellDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_DataCellDefaultTypeInternal() {}
  union {
    Record_DataCell _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_DataCellDefaultTypeInternal _Record_DataCell_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_AesKeyConfiguration::Record_AesKeyConfiguration(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.address_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.data_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_AesKeyConfigurationDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_AesKeyConfigurationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_AesKeyConfigurationDefaultTypeInternal() {}
  union {
    Record_AesKeyConfiguration _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_AesKeyConfigurationDefaultTypeInternal _Record_AesKeyConfiguration_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_Trailer::Record_Trailer(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.key_a_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.key_b_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.access_mask_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.sector_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_TrailerDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_TrailerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_TrailerDefaultTypeInternal() {}
  union {
    Record_Trailer _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_TrailerDefaultTypeInternal _Record_Trailer_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError_StatusTypeRestricted::Record_SavingError_StatusTypeRestricted(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_SavingError_StatusTypeRestrictedDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingError_StatusTypeRestrictedDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingError_StatusTypeRestrictedDefaultTypeInternal() {}
  union {
    Record_SavingError_StatusTypeRestricted _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingError_StatusTypeRestrictedDefaultTypeInternal _Record_SavingError_StatusTypeRestricted_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError_UidExist::Record_SavingError_UidExist(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_SavingError_UidExistDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingError_UidExistDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingError_UidExistDefaultTypeInternal() {}
  union {
    Record_SavingError_UidExist _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingError_UidExistDefaultTypeInternal _Record_SavingError_UidExist_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError_OwnedByAnotherUser::Record_SavingError_OwnedByAnotherUser(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_SavingError_OwnedByAnotherUserDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingError_OwnedByAnotherUserDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingError_OwnedByAnotherUserDefaultTypeInternal() {}
  union {
    Record_SavingError_OwnedByAnotherUser _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingError_OwnedByAnotherUserDefaultTypeInternal _Record_SavingError_OwnedByAnotherUser_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError_AlreadyLinked::Record_SavingError_AlreadyLinked(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_SavingError_AlreadyLinkedDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingError_AlreadyLinkedDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingError_AlreadyLinkedDefaultTypeInternal() {}
  union {
    Record_SavingError_AlreadyLinked _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingError_AlreadyLinkedDefaultTypeInternal _Record_SavingError_AlreadyLinked_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError_Conflict::Record_SavingError_Conflict(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Record_SavingError_ConflictDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingError_ConflictDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingError_ConflictDefaultTypeInternal() {}
  union {
    Record_SavingError_Conflict _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingError_ConflictDefaultTypeInternal _Record_SavingError_Conflict_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record_SavingError::Record_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct Record_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Record_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Record_SavingErrorDefaultTypeInternal() {}
  union {
    Record_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Record_SavingErrorDefaultTypeInternal _Record_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Record::Record(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_cells_)*/{}
  , /*decltype(_impl_.aes_key_configurations_)*/{}
  , /*decltype(_impl_.trailers_)*/{}
  , /*decltype(_impl_.id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.uid_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.resource_owner_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.order_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.new_at_)*/nullptr
  , /*decltype(_impl_.shipped_at_)*/nullptr
  , /*decltype(_impl_.defect_at_)*/nullptr
  , /*decltype(_impl_.in_use_at_)*/nullptr
  , /*decltype(_impl_.in_use_rfid_id_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.order_at_)*/nullptr
  , /*decltype(_impl_.in_use_resource_owner_id_)*/nullptr
  , /*decltype(_impl_.deleted_at_)*/nullptr
  , /*decltype(_impl_.vendor_name_)*/nullptr
  , /*decltype(_impl_.rfid_type_)*/ 0

  , /*decltype(_impl_.encryption_type_)*/ 0

  , /*decltype(_impl_.status_type_)*/ 0

  , /*decltype(_impl_.package_info_box_)*/ 0

  , /*decltype(_impl_.package_info_place_)*/ 0

  , /*decltype(_impl_.is_deleted_)*/ false

  , /*decltype(_impl_.identification_method_type_)*/ 0
} {}
struct RecordDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RecordDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~RecordDefaultTypeInternal() {}
  union {
    Record _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordDefaultTypeInternal _Record_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RecordFilter::RecordFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.rfid_types_)*/ {}
  , /*decltype(_impl_._rfid_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.encryption_types_)*/ {}
  , /*decltype(_impl_._encryption_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.uids_)*/{}
  , /*decltype(_impl_.status_types_)*/ {}
  , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.in_use_rfid_ids_)*/{}
  , /*decltype(_impl_.resource_owner_ids_)*/{}
  , /*decltype(_impl_.order_numbers_)*/{}
  , /*decltype(_impl_.in_use_resource_owner_ids_)*/{}
  , /*decltype(_impl_.package_info_boxes_)*/ {}
  ,/* _impl_._package_info_boxes_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.package_info_places_)*/ {}
  ,/* _impl_._package_info_places_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.identification_method_types_)*/ {}
  , /*decltype(_impl_._identification_method_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.is_deleted_)*/nullptr
  , /*decltype(_impl_.text_)*/nullptr
  , /*decltype(_impl_.start_shipped_at_)*/nullptr
  , /*decltype(_impl_.end_shipped_at_)*/nullptr} {}
struct RecordFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RecordFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~RecordFilterDefaultTypeInternal() {}
  union {
    RecordFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordFilterDefaultTypeInternal _RecordFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RecordPaging::RecordPaging(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.order_by_type_)*/ 0

  , /*decltype(_impl_.direction_type_)*/ 0

  , /*decltype(_impl_.limit_)*/ 0

  , /*decltype(_impl_.offset_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RecordPagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RecordPagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~RecordPagingDefaultTypeInternal() {}
  union {
    RecordPaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordPagingDefaultTypeInternal _RecordPaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRecordRequest::PostRecordRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PostRecordRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRecordRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRecordRequestDefaultTypeInternal() {}
  union {
    PostRecordRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRecordRequestDefaultTypeInternal _PostRecordRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRecordResponse_Error::PostRecordResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRecordResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRecordResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRecordResponse_ErrorDefaultTypeInternal() {}
  union {
    PostRecordResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRecordResponse_ErrorDefaultTypeInternal _PostRecordResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRecordResponse::PostRecordResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRecordResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRecordResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRecordResponseDefaultTypeInternal() {}
  union {
    PostRecordResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRecordResponseDefaultTypeInternal _PostRecordResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordRequest::GetRecordRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRecordRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordRequestDefaultTypeInternal() {}
  union {
    GetRecordRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordRequestDefaultTypeInternal _GetRecordRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordResponse::GetRecordResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordResponseDefaultTypeInternal() {}
  union {
    GetRecordResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordResponseDefaultTypeInternal _GetRecordResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordCountRequest::GetRecordCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetRecordCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordCountRequestDefaultTypeInternal() {}
  union {
    GetRecordCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordCountRequestDefaultTypeInternal _GetRecordCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordCountResponse_Error::GetRecordCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetRecordCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordCountResponse_ErrorDefaultTypeInternal _GetRecordCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordCountResponse::GetRecordCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordCountResponseDefaultTypeInternal() {}
  union {
    GetRecordCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordCountResponseDefaultTypeInternal _GetRecordCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordListRequest::GetRecordListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr
  , /*decltype(_impl_.pagination_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordListRequestDefaultTypeInternal() {}
  union {
    GetRecordListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordListRequestDefaultTypeInternal _GetRecordListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordListResponse_Error::GetRecordListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetRecordListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordListResponse_ErrorDefaultTypeInternal _GetRecordListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRecordListResponse::GetRecordListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRecordListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRecordListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRecordListResponseDefaultTypeInternal() {}
  union {
    GetRecordListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRecordListResponseDefaultTypeInternal _GetRecordListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteRecordRequest::DeleteRecordRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct DeleteRecordRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteRecordRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteRecordRequestDefaultTypeInternal() {}
  union {
    DeleteRecordRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRecordRequestDefaultTypeInternal _DeleteRecordRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteRecordResponse_Error::DeleteRecordResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteRecordResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteRecordResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteRecordResponse_ErrorDefaultTypeInternal() {}
  union {
    DeleteRecordResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRecordResponse_ErrorDefaultTypeInternal _DeleteRecordResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteRecordResponse::DeleteRecordResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteRecordResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteRecordResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteRecordResponseDefaultTypeInternal() {}
  union {
    DeleteRecordResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRecordResponseDefaultTypeInternal _DeleteRecordResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR ValidationError::ValidationError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.path_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.message_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ValidationErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ValidationErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~ValidationErrorDefaultTypeInternal() {}
  union {
    ValidationError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValidationErrorDefaultTypeInternal _ValidationError_default_instance_;
}  // namespace v1
}  // namespace rfidregistry
}  // namespace keyapis
namespace keyapis {
namespace rfidregistry {
namespace v1 {
bool Record_RfidType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Record_RfidType_strings[6] = {};

static const char Record_RfidType_names[] = {
    "ACTIVE_TAG"
    "BAND"
    "CARD"
    "FOB"
    "RFID_TYPE_UNKNOWN"
    "STICKER"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Record_RfidType_entries[] =
    {
        {{&Record_RfidType_names[0], 10}, 5},
        {{&Record_RfidType_names[10], 4}, 3},
        {{&Record_RfidType_names[14], 4}, 2},
        {{&Record_RfidType_names[18], 3}, 1},
        {{&Record_RfidType_names[21], 17}, 0},
        {{&Record_RfidType_names[38], 7}, 4},
};

static const int Record_RfidType_entries_by_number[] = {
    4,  // 0 -> RFID_TYPE_UNKNOWN
    3,  // 1 -> FOB
    2,  // 2 -> CARD
    1,  // 3 -> BAND
    5,  // 4 -> STICKER
    0,  // 5 -> ACTIVE_TAG
};

const std::string& Record_RfidType_Name(Record_RfidType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Record_RfidType_entries, Record_RfidType_entries_by_number,
          6, Record_RfidType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Record_RfidType_entries, Record_RfidType_entries_by_number, 6,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Record_RfidType_strings[idx].get();
}

bool Record_RfidType_Parse(absl::string_view name, Record_RfidType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Record_RfidType_entries, 6, name, &int_value);
  if (success) {
    *value = static_cast<Record_RfidType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Record_RfidType Record::RFID_TYPE_UNKNOWN;
constexpr Record_RfidType Record::FOB;
constexpr Record_RfidType Record::CARD;
constexpr Record_RfidType Record::BAND;
constexpr Record_RfidType Record::STICKER;
constexpr Record_RfidType Record::ACTIVE_TAG;
constexpr Record_RfidType Record::RfidType_MIN;
constexpr Record_RfidType Record::RfidType_MAX;
constexpr int Record::RfidType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Record_EncryptionType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Record_EncryptionType_strings[4] = {};

static const char Record_EncryptionType_names[] = {
    "ENCRYPTION_TYPE_UNKNOWN"
    "SL0"
    "SL1"
    "SL3"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Record_EncryptionType_entries[] =
    {
        {{&Record_EncryptionType_names[0], 23}, 0},
        {{&Record_EncryptionType_names[23], 3}, 1},
        {{&Record_EncryptionType_names[26], 3}, 2},
        {{&Record_EncryptionType_names[29], 3}, 3},
};

static const int Record_EncryptionType_entries_by_number[] = {
    0,  // 0 -> ENCRYPTION_TYPE_UNKNOWN
    1,  // 1 -> SL0
    2,  // 2 -> SL1
    3,  // 3 -> SL3
};

const std::string& Record_EncryptionType_Name(Record_EncryptionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Record_EncryptionType_entries, Record_EncryptionType_entries_by_number,
          4, Record_EncryptionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Record_EncryptionType_entries, Record_EncryptionType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Record_EncryptionType_strings[idx].get();
}

bool Record_EncryptionType_Parse(absl::string_view name, Record_EncryptionType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Record_EncryptionType_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<Record_EncryptionType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Record_EncryptionType Record::ENCRYPTION_TYPE_UNKNOWN;
constexpr Record_EncryptionType Record::SL0;
constexpr Record_EncryptionType Record::SL1;
constexpr Record_EncryptionType Record::SL3;
constexpr Record_EncryptionType Record::EncryptionType_MIN;
constexpr Record_EncryptionType Record::EncryptionType_MAX;
constexpr int Record::EncryptionType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Record_StatusType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Record_StatusType_strings[5] = {};

static const char Record_StatusType_names[] = {
    "DEFECT"
    "IN_USE"
    "NEW"
    "SHIPPED"
    "STATUS_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Record_StatusType_entries[] =
    {
        {{&Record_StatusType_names[0], 6}, 3},
        {{&Record_StatusType_names[6], 6}, 4},
        {{&Record_StatusType_names[12], 3}, 1},
        {{&Record_StatusType_names[15], 7}, 2},
        {{&Record_StatusType_names[22], 19}, 0},
};

static const int Record_StatusType_entries_by_number[] = {
    4,  // 0 -> STATUS_TYPE_UNKNOWN
    2,  // 1 -> NEW
    3,  // 2 -> SHIPPED
    0,  // 3 -> DEFECT
    1,  // 4 -> IN_USE
};

const std::string& Record_StatusType_Name(Record_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Record_StatusType_entries, Record_StatusType_entries_by_number,
          5, Record_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Record_StatusType_entries, Record_StatusType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Record_StatusType_strings[idx].get();
}

bool Record_StatusType_Parse(absl::string_view name, Record_StatusType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Record_StatusType_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<Record_StatusType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Record_StatusType Record::STATUS_TYPE_UNKNOWN;
constexpr Record_StatusType Record::NEW;
constexpr Record_StatusType Record::SHIPPED;
constexpr Record_StatusType Record::DEFECT;
constexpr Record_StatusType Record::IN_USE;
constexpr Record_StatusType Record::StatusType_MIN;
constexpr Record_StatusType Record::StatusType_MAX;
constexpr int Record::StatusType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Record_IdentificationMethodType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Record_IdentificationMethodType_strings[5] = {};

static const char Record_IdentificationMethodType_names[] = {
    "BLE"
    "EM_MARINE"
    "IDENTIFICATION_METHOD_TYPE_UNKNOWN"
    "MIFARE"
    "UHF"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Record_IdentificationMethodType_entries[] =
    {
        {{&Record_IdentificationMethodType_names[0], 3}, 2},
        {{&Record_IdentificationMethodType_names[3], 9}, 4},
        {{&Record_IdentificationMethodType_names[12], 34}, 0},
        {{&Record_IdentificationMethodType_names[46], 6}, 1},
        {{&Record_IdentificationMethodType_names[52], 3}, 3},
};

static const int Record_IdentificationMethodType_entries_by_number[] = {
    2,  // 0 -> IDENTIFICATION_METHOD_TYPE_UNKNOWN
    3,  // 1 -> MIFARE
    0,  // 2 -> BLE
    4,  // 3 -> UHF
    1,  // 4 -> EM_MARINE
};

const std::string& Record_IdentificationMethodType_Name(Record_IdentificationMethodType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Record_IdentificationMethodType_entries, Record_IdentificationMethodType_entries_by_number,
          5, Record_IdentificationMethodType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Record_IdentificationMethodType_entries, Record_IdentificationMethodType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Record_IdentificationMethodType_strings[idx].get();
}

bool Record_IdentificationMethodType_Parse(absl::string_view name, Record_IdentificationMethodType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Record_IdentificationMethodType_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<Record_IdentificationMethodType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Record_IdentificationMethodType Record::IDENTIFICATION_METHOD_TYPE_UNKNOWN;
constexpr Record_IdentificationMethodType Record::MIFARE;
constexpr Record_IdentificationMethodType Record::BLE;
constexpr Record_IdentificationMethodType Record::UHF;
constexpr Record_IdentificationMethodType Record::EM_MARINE;
constexpr Record_IdentificationMethodType Record::IdentificationMethodType_MIN;
constexpr Record_IdentificationMethodType Record::IdentificationMethodType_MAX;
constexpr int Record::IdentificationMethodType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool RecordPaging_OrderByType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    RecordPaging_OrderByType_strings[6] = {};

static const char RecordPaging_OrderByType_names[] = {
    "CHANGED_AT"
    "NEW_AT"
    "ORDER_AT"
    "ORDER_BY_TYPE_UNKNOWN"
    "ORDER_NUMBER"
    "RANK"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry RecordPaging_OrderByType_entries[] =
    {
        {{&RecordPaging_OrderByType_names[0], 10}, 2},
        {{&RecordPaging_OrderByType_names[10], 6}, 1},
        {{&RecordPaging_OrderByType_names[16], 8}, 3},
        {{&RecordPaging_OrderByType_names[24], 21}, 0},
        {{&RecordPaging_OrderByType_names[45], 12}, 4},
        {{&RecordPaging_OrderByType_names[57], 4}, 5},
};

static const int RecordPaging_OrderByType_entries_by_number[] = {
    3,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    1,  // 1 -> NEW_AT
    0,  // 2 -> CHANGED_AT
    2,  // 3 -> ORDER_AT
    4,  // 4 -> ORDER_NUMBER
    5,  // 5 -> RANK
};

const std::string& RecordPaging_OrderByType_Name(RecordPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RecordPaging_OrderByType_entries, RecordPaging_OrderByType_entries_by_number,
          6, RecordPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RecordPaging_OrderByType_entries, RecordPaging_OrderByType_entries_by_number, 6,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RecordPaging_OrderByType_strings[idx].get();
}

bool RecordPaging_OrderByType_Parse(absl::string_view name, RecordPaging_OrderByType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      RecordPaging_OrderByType_entries, 6, name, &int_value);
  if (success) {
    *value = static_cast<RecordPaging_OrderByType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr RecordPaging_OrderByType RecordPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr RecordPaging_OrderByType RecordPaging::NEW_AT;
constexpr RecordPaging_OrderByType RecordPaging::CHANGED_AT;
constexpr RecordPaging_OrderByType RecordPaging::ORDER_AT;
constexpr RecordPaging_OrderByType RecordPaging::ORDER_NUMBER;
constexpr RecordPaging_OrderByType RecordPaging::RANK;
constexpr RecordPaging_OrderByType RecordPaging::OrderByType_MIN;
constexpr RecordPaging_OrderByType RecordPaging::OrderByType_MAX;
constexpr int RecordPaging::OrderByType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool RecordPaging_DirectionType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    RecordPaging_DirectionType_strings[3] = {};

static const char RecordPaging_DirectionType_names[] = {
    "ASC"
    "DESC"
    "DIRECTION_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry RecordPaging_DirectionType_entries[] =
    {
        {{&RecordPaging_DirectionType_names[0], 3}, 2},
        {{&RecordPaging_DirectionType_names[3], 4}, 1},
        {{&RecordPaging_DirectionType_names[7], 22}, 0},
};

static const int RecordPaging_DirectionType_entries_by_number[] = {
    2,  // 0 -> DIRECTION_TYPE_UNKNOWN
    1,  // 1 -> DESC
    0,  // 2 -> ASC
};

const std::string& RecordPaging_DirectionType_Name(RecordPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RecordPaging_DirectionType_entries, RecordPaging_DirectionType_entries_by_number,
          3, RecordPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RecordPaging_DirectionType_entries, RecordPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RecordPaging_DirectionType_strings[idx].get();
}

bool RecordPaging_DirectionType_Parse(absl::string_view name, RecordPaging_DirectionType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      RecordPaging_DirectionType_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<RecordPaging_DirectionType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr RecordPaging_DirectionType RecordPaging::DIRECTION_TYPE_UNKNOWN;
constexpr RecordPaging_DirectionType RecordPaging::DESC;
constexpr RecordPaging_DirectionType RecordPaging::ASC;
constexpr RecordPaging_DirectionType RecordPaging::DirectionType_MIN;
constexpr RecordPaging_DirectionType RecordPaging::DirectionType_MAX;
constexpr int RecordPaging::DirectionType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
// ===================================================================

class Record_DataCell::_Internal {
 public:
};

Record_DataCell::Record_DataCell(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.DataCell)
}
Record_DataCell::Record_DataCell(const Record_DataCell& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Record_DataCell* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_) {}

    , decltype(_impl_.section_) {}

    , decltype(_impl_.block_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.data_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_data().empty()) {
    _this->_impl_.data_.Set(from._internal_data(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.section_, &from._impl_.section_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.block_) -
    reinterpret_cast<char*>(&_impl_.section_)) + sizeof(_impl_.block_));
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.DataCell)
}

inline void Record_DataCell::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.data_) {}

    , decltype(_impl_.section_) { 0 }

    , decltype(_impl_.block_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.data_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Record_DataCell::~Record_DataCell() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.DataCell)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_DataCell::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.data_.Destroy();
}

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

void Record_DataCell::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.DataCell)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.data_.ClearToEmpty();
  ::memset(&_impl_.section_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.block_) -
      reinterpret_cast<char*>(&_impl_.section_)) + sizeof(_impl_.block_));
  _internal_metadata_.Clear<std::string>();
}

const char* Record_DataCell::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 section = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.section_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 block = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.block_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string data = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_DataCell::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.DataCell)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 section = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_section() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_section(), target);
  }

  // int32 block = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_block() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_block(), target);
  }

  // string data = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_data().empty()) {
    const std::string& _s = this->_internal_data();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.DataCell.data");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

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

::size_t Record_DataCell::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.DataCell)
  ::size_t total_size = 0;

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

  // string data = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_data().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_data());
  }

  // int32 section = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_section() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_section());
  }

  // int32 block = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_block() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_block());
  }

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

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

void Record_DataCell::MergeFrom(const Record_DataCell& from) {
  Record_DataCell* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.DataCell)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_data().empty()) {
    _this->_internal_set_data(from._internal_data());
  }
  if (from._internal_section() != 0) {
    _this->_internal_set_section(from._internal_section());
  }
  if (from._internal_block() != 0) {
    _this->_internal_set_block(from._internal_block());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_DataCell::CopyFrom(const Record_DataCell& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.DataCell)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_DataCell::InternalSwap(Record_DataCell* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, lhs_arena,
                                       &other->_impl_.data_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Record_DataCell, _impl_.block_)
      + sizeof(Record_DataCell::_impl_.block_)
      - PROTOBUF_FIELD_OFFSET(Record_DataCell, _impl_.section_)>(
          reinterpret_cast<char*>(&_impl_.section_),
          reinterpret_cast<char*>(&other->_impl_.section_));
}

std::string Record_DataCell::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.DataCell";
}

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

class Record_AesKeyConfiguration::_Internal {
 public:
};

Record_AesKeyConfiguration::Record_AesKeyConfiguration(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
}
Record_AesKeyConfiguration::Record_AesKeyConfiguration(const Record_AesKeyConfiguration& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Record_AesKeyConfiguration* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.address_) {}

    , decltype(_impl_.data_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_address().empty()) {
    _this->_impl_.address_.Set(from._internal_address(), _this->GetArenaForAllocation());
  }
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.data_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_data().empty()) {
    _this->_impl_.data_.Set(from._internal_data(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
}

inline void Record_AesKeyConfiguration::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.address_) {}

    , decltype(_impl_.data_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.data_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Record_AesKeyConfiguration::~Record_AesKeyConfiguration() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_AesKeyConfiguration::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.address_.Destroy();
  _impl_.data_.Destroy();
}

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

void Record_AesKeyConfiguration::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.address_.ClearToEmpty();
  _impl_.data_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* Record_AesKeyConfiguration::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string address = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_address();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string data = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_AesKeyConfiguration::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string address = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_address().empty()) {
    const std::string& _s = this->_internal_address();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.AesKeyConfiguration.address");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string data = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_data().empty()) {
    const std::string& _s = this->_internal_data();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.AesKeyConfiguration.data");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

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

::size_t Record_AesKeyConfiguration::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  ::size_t total_size = 0;

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

  // string address = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_address().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_address());
  }

  // string data = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_data().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_data());
  }

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

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

void Record_AesKeyConfiguration::MergeFrom(const Record_AesKeyConfiguration& from) {
  Record_AesKeyConfiguration* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_address().empty()) {
    _this->_internal_set_address(from._internal_address());
  }
  if (!from._internal_data().empty()) {
    _this->_internal_set_data(from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_AesKeyConfiguration::CopyFrom(const Record_AesKeyConfiguration& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.AesKeyConfiguration)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_AesKeyConfiguration::InternalSwap(Record_AesKeyConfiguration* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.address_, lhs_arena,
                                       &other->_impl_.address_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, lhs_arena,
                                       &other->_impl_.data_, rhs_arena);
}

std::string Record_AesKeyConfiguration::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.AesKeyConfiguration";
}

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

class Record_Trailer::_Internal {
 public:
};

Record_Trailer::Record_Trailer(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.Trailer)
}
Record_Trailer::Record_Trailer(const Record_Trailer& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Record_Trailer* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.key_a_) {}

    , decltype(_impl_.key_b_) {}

    , decltype(_impl_.access_mask_) {}

    , decltype(_impl_.sector_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.key_a_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.key_a_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_key_a().empty()) {
    _this->_impl_.key_a_.Set(from._internal_key_a(), _this->GetArenaForAllocation());
  }
  _impl_.key_b_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.key_b_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_key_b().empty()) {
    _this->_impl_.key_b_.Set(from._internal_key_b(), _this->GetArenaForAllocation());
  }
  _impl_.access_mask_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.access_mask_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_access_mask().empty()) {
    _this->_impl_.access_mask_.Set(from._internal_access_mask(), _this->GetArenaForAllocation());
  }
  _this->_impl_.sector_ = from._impl_.sector_;
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.Trailer)
}

inline void Record_Trailer::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.key_a_) {}

    , decltype(_impl_.key_b_) {}

    , decltype(_impl_.access_mask_) {}

    , decltype(_impl_.sector_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.key_a_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.key_a_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.key_b_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.key_b_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.access_mask_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.access_mask_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Record_Trailer::~Record_Trailer() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.Trailer)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_Trailer::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.key_a_.Destroy();
  _impl_.key_b_.Destroy();
  _impl_.access_mask_.Destroy();
}

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

void Record_Trailer::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.Trailer)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.key_a_.ClearToEmpty();
  _impl_.key_b_.ClearToEmpty();
  _impl_.access_mask_.ClearToEmpty();
  _impl_.sector_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Record_Trailer::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 sector = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.sector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string key_a = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_key_a();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string key_b = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_key_b();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string access_mask = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_access_mask();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_Trailer::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.Trailer)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 sector = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_sector() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_sector(), target);
  }

  // string key_a = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_key_a().empty()) {
    const std::string& _s = this->_internal_key_a();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.Trailer.key_a");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // string key_b = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_key_b().empty()) {
    const std::string& _s = this->_internal_key_b();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.Trailer.key_b");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // string access_mask = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_access_mask().empty()) {
    const std::string& _s = this->_internal_access_mask();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.Trailer.access_mask");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

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

::size_t Record_Trailer::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.Trailer)
  ::size_t total_size = 0;

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

  // string key_a = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_key_a().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_key_a());
  }

  // string key_b = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_key_b().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_key_b());
  }

  // string access_mask = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_access_mask().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_access_mask());
  }

  // int32 sector = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_sector() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_sector());
  }

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

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

void Record_Trailer::MergeFrom(const Record_Trailer& from) {
  Record_Trailer* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.Trailer)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_key_a().empty()) {
    _this->_internal_set_key_a(from._internal_key_a());
  }
  if (!from._internal_key_b().empty()) {
    _this->_internal_set_key_b(from._internal_key_b());
  }
  if (!from._internal_access_mask().empty()) {
    _this->_internal_set_access_mask(from._internal_access_mask());
  }
  if (from._internal_sector() != 0) {
    _this->_internal_set_sector(from._internal_sector());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_Trailer::CopyFrom(const Record_Trailer& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.Trailer)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_Trailer::InternalSwap(Record_Trailer* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_a_, lhs_arena,
                                       &other->_impl_.key_a_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_b_, lhs_arena,
                                       &other->_impl_.key_b_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.access_mask_, lhs_arena,
                                       &other->_impl_.access_mask_, rhs_arena);

  swap(_impl_.sector_, other->_impl_.sector_);
}

std::string Record_Trailer::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.Trailer";
}

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

class Record_SavingError_StatusTypeRestricted::_Internal {
 public:
};

Record_SavingError_StatusTypeRestricted::Record_SavingError_StatusTypeRestricted(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
}
Record_SavingError_StatusTypeRestricted::Record_SavingError_StatusTypeRestricted(const Record_SavingError_StatusTypeRestricted& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
}

inline void Record_SavingError_StatusTypeRestricted::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Record_SavingError_StatusTypeRestricted::~Record_SavingError_StatusTypeRestricted() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError_StatusTypeRestricted::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void Record_SavingError_StatusTypeRestricted::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError_StatusTypeRestricted::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError_StatusTypeRestricted::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t Record_SavingError_StatusTypeRestricted::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  ::size_t total_size = 0;

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

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

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

void Record_SavingError_StatusTypeRestricted::MergeFrom(const Record_SavingError_StatusTypeRestricted& from) {
  Record_SavingError_StatusTypeRestricted* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError_StatusTypeRestricted::CopyFrom(const Record_SavingError_StatusTypeRestricted& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_SavingError_StatusTypeRestricted::InternalSwap(Record_SavingError_StatusTypeRestricted* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Record_SavingError_StatusTypeRestricted::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted";
}

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

class Record_SavingError_UidExist::_Internal {
 public:
};

Record_SavingError_UidExist::Record_SavingError_UidExist(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
}
Record_SavingError_UidExist::Record_SavingError_UidExist(const Record_SavingError_UidExist& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
}

inline void Record_SavingError_UidExist::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Record_SavingError_UidExist::~Record_SavingError_UidExist() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError_UidExist::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void Record_SavingError_UidExist::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError_UidExist::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError_UidExist::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t Record_SavingError_UidExist::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  ::size_t total_size = 0;

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

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

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

void Record_SavingError_UidExist::MergeFrom(const Record_SavingError_UidExist& from) {
  Record_SavingError_UidExist* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError_UidExist::CopyFrom(const Record_SavingError_UidExist& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError.UidExist)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_SavingError_UidExist::InternalSwap(Record_SavingError_UidExist* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Record_SavingError_UidExist::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError.UidExist";
}

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

class Record_SavingError_OwnedByAnotherUser::_Internal {
 public:
};

Record_SavingError_OwnedByAnotherUser::Record_SavingError_OwnedByAnotherUser(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
}
Record_SavingError_OwnedByAnotherUser::Record_SavingError_OwnedByAnotherUser(const Record_SavingError_OwnedByAnotherUser& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
}

inline void Record_SavingError_OwnedByAnotherUser::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Record_SavingError_OwnedByAnotherUser::~Record_SavingError_OwnedByAnotherUser() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError_OwnedByAnotherUser::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void Record_SavingError_OwnedByAnotherUser::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError_OwnedByAnotherUser::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError_OwnedByAnotherUser::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t Record_SavingError_OwnedByAnotherUser::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  ::size_t total_size = 0;

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

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

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

void Record_SavingError_OwnedByAnotherUser::MergeFrom(const Record_SavingError_OwnedByAnotherUser& from) {
  Record_SavingError_OwnedByAnotherUser* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError_OwnedByAnotherUser::CopyFrom(const Record_SavingError_OwnedByAnotherUser& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_SavingError_OwnedByAnotherUser::InternalSwap(Record_SavingError_OwnedByAnotherUser* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Record_SavingError_OwnedByAnotherUser::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser";
}

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

class Record_SavingError_AlreadyLinked::_Internal {
 public:
};

Record_SavingError_AlreadyLinked::Record_SavingError_AlreadyLinked(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
}
Record_SavingError_AlreadyLinked::Record_SavingError_AlreadyLinked(const Record_SavingError_AlreadyLinked& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
}

inline void Record_SavingError_AlreadyLinked::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Record_SavingError_AlreadyLinked::~Record_SavingError_AlreadyLinked() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError_AlreadyLinked::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void Record_SavingError_AlreadyLinked::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError_AlreadyLinked::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError_AlreadyLinked::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t Record_SavingError_AlreadyLinked::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  ::size_t total_size = 0;

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

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

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

void Record_SavingError_AlreadyLinked::MergeFrom(const Record_SavingError_AlreadyLinked& from) {
  Record_SavingError_AlreadyLinked* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError_AlreadyLinked::CopyFrom(const Record_SavingError_AlreadyLinked& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_SavingError_AlreadyLinked::InternalSwap(Record_SavingError_AlreadyLinked* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Record_SavingError_AlreadyLinked::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked";
}

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

class Record_SavingError_Conflict::_Internal {
 public:
};

Record_SavingError_Conflict::Record_SavingError_Conflict(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
}
Record_SavingError_Conflict::Record_SavingError_Conflict(const Record_SavingError_Conflict& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
}

inline void Record_SavingError_Conflict::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Record_SavingError_Conflict::~Record_SavingError_Conflict() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError_Conflict::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void Record_SavingError_Conflict::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError_Conflict::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError_Conflict::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t Record_SavingError_Conflict::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  ::size_t total_size = 0;

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

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

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

void Record_SavingError_Conflict::MergeFrom(const Record_SavingError_Conflict& from) {
  Record_SavingError_Conflict* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError_Conflict::CopyFrom(const Record_SavingError_Conflict& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError.Conflict)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record_SavingError_Conflict::InternalSwap(Record_SavingError_Conflict* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Record_SavingError_Conflict::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError.Conflict";
}

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

class Record_SavingError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::Record_SavingError, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted& status_type_restricted(const Record_SavingError* msg);
  static const ::keyapis::rfidregistry::v1::Record_SavingError_UidExist& uid_exist(const Record_SavingError* msg);
  static const ::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser& owned_by_another_user(const Record_SavingError* msg);
  static const ::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked& already_linked(const Record_SavingError* msg);
  static const ::keyapis::rfidregistry::v1::Record_SavingError_Conflict& conflict(const Record_SavingError* msg);
};

const ::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted&
Record_SavingError::_Internal::status_type_restricted(const Record_SavingError* msg) {
  return *msg->_impl_.reason_.status_type_restricted_;
}
const ::keyapis::rfidregistry::v1::Record_SavingError_UidExist&
Record_SavingError::_Internal::uid_exist(const Record_SavingError* msg) {
  return *msg->_impl_.reason_.uid_exist_;
}
const ::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser&
Record_SavingError::_Internal::owned_by_another_user(const Record_SavingError* msg) {
  return *msg->_impl_.reason_.owned_by_another_user_;
}
const ::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked&
Record_SavingError::_Internal::already_linked(const Record_SavingError* msg) {
  return *msg->_impl_.reason_.already_linked_;
}
const ::keyapis::rfidregistry::v1::Record_SavingError_Conflict&
Record_SavingError::_Internal::conflict(const Record_SavingError* msg) {
  return *msg->_impl_.reason_.conflict_;
}
void Record_SavingError::set_allocated_status_type_restricted(::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted* status_type_restricted) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (status_type_restricted) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(status_type_restricted);
    if (message_arena != submessage_arena) {
      status_type_restricted = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, status_type_restricted, submessage_arena);
    }
    set_has_status_type_restricted();
    _impl_.reason_.status_type_restricted_ = status_type_restricted;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.Record.SavingError.status_type_restricted)
}
void Record_SavingError::set_allocated_uid_exist(::keyapis::rfidregistry::v1::Record_SavingError_UidExist* uid_exist) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (uid_exist) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(uid_exist);
    if (message_arena != submessage_arena) {
      uid_exist = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, uid_exist, submessage_arena);
    }
    set_has_uid_exist();
    _impl_.reason_.uid_exist_ = uid_exist;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.Record.SavingError.uid_exist)
}
void Record_SavingError::set_allocated_owned_by_another_user(::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser* owned_by_another_user) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (owned_by_another_user) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(owned_by_another_user);
    if (message_arena != submessage_arena) {
      owned_by_another_user = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, owned_by_another_user, submessage_arena);
    }
    set_has_owned_by_another_user();
    _impl_.reason_.owned_by_another_user_ = owned_by_another_user;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.Record.SavingError.owned_by_another_user)
}
void Record_SavingError::set_allocated_already_linked(::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked* already_linked) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (already_linked) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(already_linked);
    if (message_arena != submessage_arena) {
      already_linked = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, already_linked, submessage_arena);
    }
    set_has_already_linked();
    _impl_.reason_.already_linked_ = already_linked;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.Record.SavingError.already_linked)
}
void Record_SavingError::set_allocated_conflict(::keyapis::rfidregistry::v1::Record_SavingError_Conflict* conflict) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (conflict) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(conflict);
    if (message_arena != submessage_arena) {
      conflict = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, conflict, submessage_arena);
    }
    set_has_conflict();
    _impl_.reason_.conflict_ = conflict;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.Record.SavingError.conflict)
}
Record_SavingError::Record_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record.SavingError)
}
Record_SavingError::Record_SavingError(const Record_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Record_SavingError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kStatusTypeRestricted: {
      _this->_internal_mutable_status_type_restricted()->::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted::MergeFrom(
          from._internal_status_type_restricted());
      break;
    }
    case kUidExist: {
      _this->_internal_mutable_uid_exist()->::keyapis::rfidregistry::v1::Record_SavingError_UidExist::MergeFrom(
          from._internal_uid_exist());
      break;
    }
    case kOwnedByAnotherUser: {
      _this->_internal_mutable_owned_by_another_user()->::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser::MergeFrom(
          from._internal_owned_by_another_user());
      break;
    }
    case kAlreadyLinked: {
      _this->_internal_mutable_already_linked()->::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked::MergeFrom(
          from._internal_already_linked());
      break;
    }
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::rfidregistry::v1::Record_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record.SavingError)
}

inline void Record_SavingError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

Record_SavingError::~Record_SavingError() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.Record.SavingError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Record_SavingError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void Record_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.Record.SavingError)
  switch (reason_case()) {
    case kStatusTypeRestricted: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.status_type_restricted_;
      }
      break;
    }
    case kUidExist: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.uid_exist_;
      }
      break;
    }
    case kOwnedByAnotherUser: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.owned_by_another_user_;
      }
      break;
    }
    case kAlreadyLinked: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.already_linked_;
      }
      break;
    }
    case kConflict: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.conflict_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void Record_SavingError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record.SavingError)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Record_SavingError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted status_type_restricted = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_status_type_restricted(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.SavingError.UidExist uid_exist = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_uid_exist(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser owned_by_another_user = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_owned_by_another_user(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked already_linked = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_already_linked(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.SavingError.Conflict conflict = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_conflict(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kStatusTypeRestricted: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::status_type_restricted(this),
          _Internal::status_type_restricted(this).GetCachedSize(), target, stream);
      break;
    }
    case kUidExist: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::uid_exist(this),
          _Internal::uid_exist(this).GetCachedSize(), target, stream);
      break;
    }
    case kOwnedByAnotherUser: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::owned_by_another_user(this),
          _Internal::owned_by_another_user(this).GetCachedSize(), target, stream);
      break;
    }
    case kAlreadyLinked: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::already_linked(this),
          _Internal::already_linked(this).GetCachedSize(), target, stream);
      break;
    }
    case kConflict: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, _Internal::conflict(this),
          _Internal::conflict(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.rfidregistry.v1.Record.SavingError)
  return target;
}

::size_t Record_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record.SavingError)
  ::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 (reason_case()) {
    // .keyapis.rfidregistry.v1.Record.SavingError.StatusTypeRestricted status_type_restricted = 1;
    case kStatusTypeRestricted: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.status_type_restricted_);
      break;
    }
    // .keyapis.rfidregistry.v1.Record.SavingError.UidExist uid_exist = 2;
    case kUidExist: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.uid_exist_);
      break;
    }
    // .keyapis.rfidregistry.v1.Record.SavingError.OwnedByAnotherUser owned_by_another_user = 3;
    case kOwnedByAnotherUser: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.owned_by_another_user_);
      break;
    }
    // .keyapis.rfidregistry.v1.Record.SavingError.AlreadyLinked already_linked = 4;
    case kAlreadyLinked: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.already_linked_);
      break;
    }
    // .keyapis.rfidregistry.v1.Record.SavingError.Conflict conflict = 5;
    case kConflict: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.conflict_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void Record_SavingError::MergeFrom(const Record_SavingError& from) {
  Record_SavingError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record.SavingError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kStatusTypeRestricted: {
      _this->_internal_mutable_status_type_restricted()->::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted::MergeFrom(
          from._internal_status_type_restricted());
      break;
    }
    case kUidExist: {
      _this->_internal_mutable_uid_exist()->::keyapis::rfidregistry::v1::Record_SavingError_UidExist::MergeFrom(
          from._internal_uid_exist());
      break;
    }
    case kOwnedByAnotherUser: {
      _this->_internal_mutable_owned_by_another_user()->::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser::MergeFrom(
          from._internal_owned_by_another_user());
      break;
    }
    case kAlreadyLinked: {
      _this->_internal_mutable_already_linked()->::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked::MergeFrom(
          from._internal_already_linked());
      break;
    }
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::rfidregistry::v1::Record_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record_SavingError::CopyFrom(const Record_SavingError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record.SavingError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string Record_SavingError::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record.SavingError";
}

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

class Record::_Internal {
 public:
  using HasBits = decltype(std::declval<Record>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Record, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& new_at(const Record* msg);
  static void set_has_new_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& shipped_at(const Record* msg);
  static void set_has_shipped_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& defect_at(const Record* msg);
  static void set_has_defect_at(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& in_use_at(const Record* msg);
  static void set_has_in_use_at(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& in_use_rfid_id(const Record* msg);
  static void set_has_in_use_rfid_id(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const Record* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& order_at(const Record* msg);
  static void set_has_order_at(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& in_use_resource_owner_id(const Record* msg);
  static void set_has_in_use_resource_owner_id(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& deleted_at(const Record* msg);
  static void set_has_deleted_at(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& vendor_name(const Record* msg);
  static void set_has_vendor_name(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::new_at(const Record* msg) {
  return *msg->_impl_.new_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::shipped_at(const Record* msg) {
  return *msg->_impl_.shipped_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::defect_at(const Record* msg) {
  return *msg->_impl_.defect_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::in_use_at(const Record* msg) {
  return *msg->_impl_.in_use_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Record::_Internal::in_use_rfid_id(const Record* msg) {
  return *msg->_impl_.in_use_rfid_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::changed_at(const Record* msg) {
  return *msg->_impl_.changed_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::order_at(const Record* msg) {
  return *msg->_impl_.order_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Record::_Internal::in_use_resource_owner_id(const Record* msg) {
  return *msg->_impl_.in_use_resource_owner_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Record::_Internal::deleted_at(const Record* msg) {
  return *msg->_impl_.deleted_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Record::_Internal::vendor_name(const Record* msg) {
  return *msg->_impl_.vendor_name_;
}
void Record::clear_new_at() {
  if (_impl_.new_at_ != nullptr) _impl_.new_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Record::clear_shipped_at() {
  if (_impl_.shipped_at_ != nullptr) _impl_.shipped_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Record::clear_defect_at() {
  if (_impl_.defect_at_ != nullptr) _impl_.defect_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void Record::clear_in_use_at() {
  if (_impl_.in_use_at_ != nullptr) _impl_.in_use_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
void Record::clear_in_use_rfid_id() {
  if (_impl_.in_use_rfid_id_ != nullptr) _impl_.in_use_rfid_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
void Record::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void Record::clear_order_at() {
  if (_impl_.order_at_ != nullptr) _impl_.order_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000040u;
}
void Record::clear_in_use_resource_owner_id() {
  if (_impl_.in_use_resource_owner_id_ != nullptr) _impl_.in_use_resource_owner_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000080u;
}
void Record::clear_deleted_at() {
  if (_impl_.deleted_at_ != nullptr) _impl_.deleted_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000100u;
}
void Record::clear_vendor_name() {
  if (_impl_.vendor_name_ != nullptr) _impl_.vendor_name_->Clear();
  _impl_._has_bits_[0] &= ~0x00000200u;
}
Record::Record(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.Record)
}
Record::Record(const Record& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Record* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_cells_){from._impl_.data_cells_}
    , decltype(_impl_.aes_key_configurations_){from._impl_.aes_key_configurations_}
    , decltype(_impl_.trailers_){from._impl_.trailers_}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.uid_) {}

    , decltype(_impl_.resource_owner_id_) {}

    , decltype(_impl_.order_number_) {}

    , decltype(_impl_.new_at_){nullptr}
    , decltype(_impl_.shipped_at_){nullptr}
    , decltype(_impl_.defect_at_){nullptr}
    , decltype(_impl_.in_use_at_){nullptr}
    , decltype(_impl_.in_use_rfid_id_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.order_at_){nullptr}
    , decltype(_impl_.in_use_resource_owner_id_){nullptr}
    , decltype(_impl_.deleted_at_){nullptr}
    , decltype(_impl_.vendor_name_){nullptr}
    , decltype(_impl_.rfid_type_) {}

    , decltype(_impl_.encryption_type_) {}

    , decltype(_impl_.status_type_) {}

    , decltype(_impl_.package_info_box_) {}

    , decltype(_impl_.package_info_place_) {}

    , decltype(_impl_.is_deleted_) {}

    , decltype(_impl_.identification_method_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_id().empty()) {
    _this->_impl_.id_.Set(from._internal_id(), _this->GetArenaForAllocation());
  }
  _impl_.uid_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.uid_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_uid().empty()) {
    _this->_impl_.uid_.Set(from._internal_uid(), _this->GetArenaForAllocation());
  }
  _impl_.resource_owner_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.resource_owner_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_resource_owner_id().empty()) {
    _this->_impl_.resource_owner_id_.Set(from._internal_resource_owner_id(), _this->GetArenaForAllocation());
  }
  _impl_.order_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.order_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_order_number().empty()) {
    _this->_impl_.order_number_.Set(from._internal_order_number(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.new_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.new_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.shipped_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.shipped_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.defect_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.defect_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.in_use_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.in_use_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.in_use_rfid_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.in_use_rfid_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.order_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.order_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.in_use_resource_owner_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.in_use_resource_owner_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.deleted_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.deleted_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.vendor_name_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.vendor_name_);
  }
  ::memcpy(&_impl_.rfid_type_, &from._impl_.rfid_type_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.identification_method_type_) -
    reinterpret_cast<char*>(&_impl_.rfid_type_)) + sizeof(_impl_.identification_method_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.Record)
}

inline void Record::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_cells_){arena}
    , decltype(_impl_.aes_key_configurations_){arena}
    , decltype(_impl_.trailers_){arena}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.uid_) {}

    , decltype(_impl_.resource_owner_id_) {}

    , decltype(_impl_.order_number_) {}

    , decltype(_impl_.new_at_){nullptr}
    , decltype(_impl_.shipped_at_){nullptr}
    , decltype(_impl_.defect_at_){nullptr}
    , decltype(_impl_.in_use_at_){nullptr}
    , decltype(_impl_.in_use_rfid_id_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.order_at_){nullptr}
    , decltype(_impl_.in_use_resource_owner_id_){nullptr}
    , decltype(_impl_.deleted_at_){nullptr}
    , decltype(_impl_.vendor_name_){nullptr}
    , decltype(_impl_.rfid_type_) { 0 }

    , decltype(_impl_.encryption_type_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

    , decltype(_impl_.package_info_box_) { 0 }

    , decltype(_impl_.package_info_place_) { 0 }

    , decltype(_impl_.is_deleted_) { false }

    , decltype(_impl_.identification_method_type_) { 0 }

  };
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.uid_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.uid_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.resource_owner_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.resource_owner_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.order_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.order_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Record::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_data_cells()->~RepeatedPtrField();
  _internal_mutable_aes_key_configurations()->~RepeatedPtrField();
  _internal_mutable_trailers()->~RepeatedPtrField();
  _impl_.id_.Destroy();
  _impl_.uid_.Destroy();
  _impl_.resource_owner_id_.Destroy();
  _impl_.order_number_.Destroy();
  if (this != internal_default_instance()) delete _impl_.new_at_;
  if (this != internal_default_instance()) delete _impl_.shipped_at_;
  if (this != internal_default_instance()) delete _impl_.defect_at_;
  if (this != internal_default_instance()) delete _impl_.in_use_at_;
  if (this != internal_default_instance()) delete _impl_.in_use_rfid_id_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
  if (this != internal_default_instance()) delete _impl_.order_at_;
  if (this != internal_default_instance()) delete _impl_.in_use_resource_owner_id_;
  if (this != internal_default_instance()) delete _impl_.deleted_at_;
  if (this != internal_default_instance()) delete _impl_.vendor_name_;
}

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

void Record::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.Record)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_data_cells()->Clear();
  _internal_mutable_aes_key_configurations()->Clear();
  _internal_mutable_trailers()->Clear();
  _impl_.id_.ClearToEmpty();
  _impl_.uid_.ClearToEmpty();
  _impl_.resource_owner_id_.ClearToEmpty();
  _impl_.order_number_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.new_at_ != nullptr);
      _impl_.new_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.shipped_at_ != nullptr);
      _impl_.shipped_at_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.defect_at_ != nullptr);
      _impl_.defect_at_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.in_use_at_ != nullptr);
      _impl_.in_use_at_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.in_use_rfid_id_ != nullptr);
      _impl_.in_use_rfid_id_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.order_at_ != nullptr);
      _impl_.order_at_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.in_use_resource_owner_id_ != nullptr);
      _impl_.in_use_resource_owner_id_->Clear();
    }
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.deleted_at_ != nullptr);
      _impl_.deleted_at_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.vendor_name_ != nullptr);
      _impl_.vendor_name_->Clear();
    }
  }
  ::memset(&_impl_.rfid_type_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.identification_method_type_) -
      reinterpret_cast<char*>(&_impl_.rfid_type_)) + sizeof(_impl_.identification_method_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Record::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_rfid_type(static_cast<::keyapis::rfidregistry::v1::Record_RfidType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_encryption_type(static_cast<::keyapis::rfidregistry::v1::Record_EncryptionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string uid = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_uid();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::rfidregistry::v1::Record_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_new_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_shipped_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_defect_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_in_use_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue in_use_rfid_id = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_in_use_rfid_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data_cells(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          auto str = _internal_mutable_resource_owner_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 package_info_box = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
          _impl_.package_info_box_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 package_info_place = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
          _impl_.package_info_place_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_aes_key_configurations(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_trailers(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<138>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string order_number = 18 [(.google.api.field_behavior) = REQUIRED];
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
          auto str = _internal_mutable_order_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_order_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_in_use_resource_owner_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
          _impl_.is_deleted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_deleted_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue vendor_name = 23;
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 186)) {
          ptr = ctx->ParseMessage(_internal_mutable_vendor_name(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 192)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_identification_method_type(static_cast<::keyapis::rfidregistry::v1::Record_IdentificationMethodType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Record::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.Record)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string id = 1;
  if (!this->_internal_id().empty()) {
    const std::string& _s = this->_internal_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // .keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_rfid_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_rfid_type(), target);
  }

  // .keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_encryption_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_encryption_type(), target);
  }

  // string uid = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_uid().empty()) {
    const std::string& _s = this->_internal_uid();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.uid");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // .keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this->_internal_status_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::new_at(this),
        _Internal::new_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::shipped_at(this),
        _Internal::shipped_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::defect_at(this),
        _Internal::defect_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::in_use_at(this),
        _Internal::in_use_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue in_use_rfid_id = 10;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::in_use_rfid_id(this),
        _Internal::in_use_rfid_id(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_cells_size()); i < n; i++) {
    const auto& repfield = this->_internal_data_cells(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
  }

  // string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_resource_owner_id().empty()) {
    const std::string& _s = this->_internal_resource_owner_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.resource_owner_id");
    target = stream->WriteStringMaybeAliased(12, _s, target);
  }

  // int32 package_info_box = 13;
  if (this->_internal_package_info_box() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        13, this->_internal_package_info_box(), target);
  }

  // int32 package_info_place = 14;
  if (this->_internal_package_info_place() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        14, this->_internal_package_info_place(), target);
  }

  // .google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::changed_at(this),
        _Internal::changed_at(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_aes_key_configurations_size()); i < n; i++) {
    const auto& repfield = this->_internal_aes_key_configurations(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(16, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_trailers_size()); i < n; i++) {
    const auto& repfield = this->_internal_trailers(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(17, repfield, repfield.GetCachedSize(), target, stream);
  }

  // string order_number = 18 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_order_number().empty()) {
    const std::string& _s = this->_internal_order_number();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.Record.order_number");
    target = stream->WriteStringMaybeAliased(18, _s, target);
  }

  // .google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(19, _Internal::order_at(this),
        _Internal::order_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, _Internal::in_use_resource_owner_id(this),
        _Internal::in_use_resource_owner_id(this).GetCachedSize(), target, stream);
  }

  // bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_is_deleted() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        21, this->_internal_is_deleted(), target);
  }

  // .google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(22, _Internal::deleted_at(this),
        _Internal::deleted_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue vendor_name = 23;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(23, _Internal::vendor_name(this),
        _Internal::vendor_name(this).GetCachedSize(), target, stream);
  }

  // .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;
  if (this->_internal_identification_method_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        24, this->_internal_identification_method_type(), target);
  }

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

::size_t Record::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.Record)
  ::size_t total_size = 0;

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

  // repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;
  total_size += 1UL * this->_internal_data_cells_size();
  for (const auto& msg : this->_internal_data_cells()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;
  total_size += 2UL * this->_internal_aes_key_configurations_size();
  for (const auto& msg : this->_internal_aes_key_configurations()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;
  total_size += 2UL * this->_internal_trailers_size();
  for (const auto& msg : this->_internal_trailers()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string id = 1;
  if (!this->_internal_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_id());
  }

  // string uid = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_uid().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_uid());
  }

  // string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_resource_owner_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_resource_owner_id());
  }

  // string order_number = 18 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_order_number().empty()) {
    total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_order_number());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.new_at_);
    }

    // .google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.shipped_at_);
    }

    // .google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.defect_at_);
    }

    // .google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.in_use_at_);
    }

    // .google.protobuf.StringValue in_use_rfid_id = 10;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.in_use_rfid_id_);
    }

    // .google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.changed_at_);
    }

    // .google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.order_at_);
    }

    // .google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.in_use_resource_owner_id_);
    }

  }
  if (cached_has_bits & 0x00000300u) {
    // .google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.deleted_at_);
    }

    // .google.protobuf.StringValue vendor_name = 23;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.vendor_name_);
    }

  }
  // .keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_rfid_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_rfid_type());
  }

  // .keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_encryption_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_encryption_type());
  }

  // .keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_status_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_status_type());
  }

  // int32 package_info_box = 13;
  if (this->_internal_package_info_box() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_package_info_box());
  }

  // int32 package_info_place = 14;
  if (this->_internal_package_info_place() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_package_info_place());
  }

  // bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_is_deleted() != 0) {
    total_size += 3;
  }

  // .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;
  if (this->_internal_identification_method_type() != 0) {
    total_size += 2 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_identification_method_type());
  }

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

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

void Record::MergeFrom(const Record& from) {
  Record* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.Record)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_mutable_data_cells()->MergeFrom(from._internal_data_cells());
  _this->_internal_mutable_aes_key_configurations()->MergeFrom(from._internal_aes_key_configurations());
  _this->_internal_mutable_trailers()->MergeFrom(from._internal_trailers());
  if (!from._internal_id().empty()) {
    _this->_internal_set_id(from._internal_id());
  }
  if (!from._internal_uid().empty()) {
    _this->_internal_set_uid(from._internal_uid());
  }
  if (!from._internal_resource_owner_id().empty()) {
    _this->_internal_set_resource_owner_id(from._internal_resource_owner_id());
  }
  if (!from._internal_order_number().empty()) {
    _this->_internal_set_order_number(from._internal_order_number());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_new_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_new_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_shipped_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_shipped_at());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_defect_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_defect_at());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_in_use_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_in_use_at());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_in_use_rfid_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_in_use_rfid_id());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_order_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_order_at());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_in_use_resource_owner_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_in_use_resource_owner_id());
    }
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_deleted_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_deleted_at());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_vendor_name()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_vendor_name());
    }
  }
  if (from._internal_rfid_type() != 0) {
    _this->_internal_set_rfid_type(from._internal_rfid_type());
  }
  if (from._internal_encryption_type() != 0) {
    _this->_internal_set_encryption_type(from._internal_encryption_type());
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  if (from._internal_package_info_box() != 0) {
    _this->_internal_set_package_info_box(from._internal_package_info_box());
  }
  if (from._internal_package_info_place() != 0) {
    _this->_internal_set_package_info_place(from._internal_package_info_place());
  }
  if (from._internal_is_deleted() != 0) {
    _this->_internal_set_is_deleted(from._internal_is_deleted());
  }
  if (from._internal_identification_method_type() != 0) {
    _this->_internal_set_identification_method_type(from._internal_identification_method_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Record::CopyFrom(const Record& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.Record)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Record::InternalSwap(Record* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _internal_mutable_data_cells()->InternalSwap(other->_internal_mutable_data_cells());
  _internal_mutable_aes_key_configurations()->InternalSwap(other->_internal_mutable_aes_key_configurations());
  _internal_mutable_trailers()->InternalSwap(other->_internal_mutable_trailers());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena,
                                       &other->_impl_.id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.uid_, lhs_arena,
                                       &other->_impl_.uid_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.resource_owner_id_, lhs_arena,
                                       &other->_impl_.resource_owner_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.order_number_, lhs_arena,
                                       &other->_impl_.order_number_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Record, _impl_.identification_method_type_)
      + sizeof(Record::_impl_.identification_method_type_)
      - PROTOBUF_FIELD_OFFSET(Record, _impl_.new_at_)>(
          reinterpret_cast<char*>(&_impl_.new_at_),
          reinterpret_cast<char*>(&other->_impl_.new_at_));
}

std::string Record::GetTypeName() const {
  return "keyapis.rfidregistry.v1.Record";
}

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

class RecordFilter::_Internal {
 public:
  using HasBits = decltype(std::declval<RecordFilter>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(RecordFilter, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::BoolValue& is_deleted(const RecordFilter* msg);
  static void set_has_is_deleted(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& text(const RecordFilter* msg);
  static void set_has_text(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& start_shipped_at(const RecordFilter* msg);
  static void set_has_start_shipped_at(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& end_shipped_at(const RecordFilter* msg);
  static void set_has_end_shipped_at(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::BoolValue&
RecordFilter::_Internal::is_deleted(const RecordFilter* msg) {
  return *msg->_impl_.is_deleted_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
RecordFilter::_Internal::text(const RecordFilter* msg) {
  return *msg->_impl_.text_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
RecordFilter::_Internal::start_shipped_at(const RecordFilter* msg) {
  return *msg->_impl_.start_shipped_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
RecordFilter::_Internal::end_shipped_at(const RecordFilter* msg) {
  return *msg->_impl_.end_shipped_at_;
}
void RecordFilter::clear_is_deleted() {
  if (_impl_.is_deleted_ != nullptr) _impl_.is_deleted_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void RecordFilter::clear_text() {
  if (_impl_.text_ != nullptr) _impl_.text_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void RecordFilter::clear_start_shipped_at() {
  if (_impl_.start_shipped_at_ != nullptr) _impl_.start_shipped_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void RecordFilter::clear_end_shipped_at() {
  if (_impl_.end_shipped_at_ != nullptr) _impl_.end_shipped_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
RecordFilter::RecordFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.RecordFilter)
}
RecordFilter::RecordFilter(const RecordFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  RecordFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rfid_types_) { from._internal_rfid_types() }
    , /*decltype(_impl_._rfid_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.encryption_types_) { from._internal_encryption_types() }
    , /*decltype(_impl_._encryption_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.uids_){from._impl_.uids_}
    , decltype(_impl_.status_types_) { from._internal_status_types() }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.in_use_rfid_ids_){from._impl_.in_use_rfid_ids_}
    , decltype(_impl_.resource_owner_ids_){from._impl_.resource_owner_ids_}
    , decltype(_impl_.order_numbers_){from._impl_.order_numbers_}
    , decltype(_impl_.in_use_resource_owner_ids_){from._impl_.in_use_resource_owner_ids_}
    , decltype(_impl_.package_info_boxes_) { from._impl_.package_info_boxes_ }
    ,/* _impl_._package_info_boxes_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.package_info_places_) { from._impl_.package_info_places_ }
    ,/* _impl_._package_info_places_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.identification_method_types_) { from._internal_identification_method_types() }
    , /*decltype(_impl_._identification_method_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.is_deleted_){nullptr}
    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.start_shipped_at_){nullptr}
    , decltype(_impl_.end_shipped_at_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.is_deleted_ = new ::PROTOBUF_NAMESPACE_ID::BoolValue(*from._impl_.is_deleted_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.text_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.text_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.start_shipped_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.start_shipped_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.end_shipped_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.end_shipped_at_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.RecordFilter)
}

inline void RecordFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rfid_types_) { arena }
    , /*decltype(_impl_._rfid_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.encryption_types_) { arena }
    , /*decltype(_impl_._encryption_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.uids_){arena}
    , decltype(_impl_.status_types_) { arena }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.in_use_rfid_ids_){arena}
    , decltype(_impl_.resource_owner_ids_){arena}
    , decltype(_impl_.order_numbers_){arena}
    , decltype(_impl_.in_use_resource_owner_ids_){arena}
    , decltype(_impl_.package_info_boxes_) { arena }
    ,/* _impl_._package_info_boxes_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.package_info_places_) { arena }
    ,/* _impl_._package_info_places_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.identification_method_types_) { arena }
    , /*decltype(_impl_._identification_method_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.is_deleted_){nullptr}
    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.start_shipped_at_){nullptr}
    , decltype(_impl_.end_shipped_at_){nullptr}
  };
}

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

inline void RecordFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_rfid_types()->~RepeatedField();
  _internal_mutable_encryption_types()->~RepeatedField();
  _internal_mutable_uids()->~RepeatedPtrField();
  _internal_mutable_status_types()->~RepeatedField();
  _internal_mutable_in_use_rfid_ids()->~RepeatedPtrField();
  _internal_mutable_resource_owner_ids()->~RepeatedPtrField();
  _internal_mutable_order_numbers()->~RepeatedPtrField();
  _internal_mutable_in_use_resource_owner_ids()->~RepeatedPtrField();
  _impl_.package_info_boxes_.~RepeatedField();
  _impl_.package_info_places_.~RepeatedField();
  _internal_mutable_identification_method_types()->~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.is_deleted_;
  if (this != internal_default_instance()) delete _impl_.text_;
  if (this != internal_default_instance()) delete _impl_.start_shipped_at_;
  if (this != internal_default_instance()) delete _impl_.end_shipped_at_;
}

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

void RecordFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.RecordFilter)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_rfid_types()->Clear();
  _internal_mutable_encryption_types()->Clear();
  _internal_mutable_uids()->Clear();
  _internal_mutable_status_types()->Clear();
  _internal_mutable_in_use_rfid_ids()->Clear();
  _internal_mutable_resource_owner_ids()->Clear();
  _internal_mutable_order_numbers()->Clear();
  _internal_mutable_in_use_resource_owner_ids()->Clear();
  _internal_mutable_package_info_boxes()->Clear();
  _internal_mutable_package_info_places()->Clear();
  _internal_mutable_identification_method_types()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.is_deleted_ != nullptr);
      _impl_.is_deleted_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.text_ != nullptr);
      _impl_.text_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.start_shipped_at_ != nullptr);
      _impl_.start_shipped_at_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.end_shipped_at_ != nullptr);
      _impl_.end_shipped_at_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* RecordFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .keyapis.rfidregistry.v1.Record.RfidType rfid_types = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_rfid_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_rfid_types(static_cast<::keyapis::rfidregistry::v1::Record_RfidType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.EncryptionType encryption_types = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_encryption_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_encryption_types(static_cast<::keyapis::rfidregistry::v1::Record_EncryptionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string uids = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_uids();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.StatusType status_types = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 32) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_status_types(static_cast<::keyapis::rfidregistry::v1::Record_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string in_use_rfid_ids = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_in_use_rfid_ids();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string resource_owner_ids = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_resource_owner_ids();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string order_numbers = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_order_numbers();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string in_use_resource_owner_ids = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_in_use_resource_owner_ids();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.BoolValue is_deleted = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_is_deleted(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue text = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp start_shipped_at = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_start_shipped_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp end_shipped_at = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_end_shipped_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 package_info_boxes = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_package_info_boxes(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 104) {
          _internal_add_package_info_boxes(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 package_info_places = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_package_info_places(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 112) {
          _internal_add_package_info_places(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_types = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_identification_method_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 120) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_identification_method_types(static_cast<::keyapis::rfidregistry::v1::Record_IdentificationMethodType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* RecordFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.RecordFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .keyapis.rfidregistry.v1.Record.RfidType rfid_types = 1;
  {
    int byte_size = _impl_._rfid_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(1, _internal_rfid_types(),
                                       byte_size, target);
    }
  }

  // repeated .keyapis.rfidregistry.v1.Record.EncryptionType encryption_types = 2;
  {
    int byte_size = _impl_._encryption_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(2, _internal_encryption_types(),
                                       byte_size, target);
    }
  }

  // repeated string uids = 3;
  for (int i = 0, n = this->_internal_uids_size(); i < n; ++i) {
    const auto& s = this->_internal_uids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.RecordFilter.uids");
    target = stream->WriteString(3, s, target);
  }

  // repeated .keyapis.rfidregistry.v1.Record.StatusType status_types = 4;
  {
    int byte_size = _impl_._status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(4, _internal_status_types(),
                                       byte_size, target);
    }
  }

  // repeated string in_use_rfid_ids = 5;
  for (int i = 0, n = this->_internal_in_use_rfid_ids_size(); i < n; ++i) {
    const auto& s = this->_internal_in_use_rfid_ids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.RecordFilter.in_use_rfid_ids");
    target = stream->WriteString(5, s, target);
  }

  // repeated string resource_owner_ids = 6;
  for (int i = 0, n = this->_internal_resource_owner_ids_size(); i < n; ++i) {
    const auto& s = this->_internal_resource_owner_ids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.RecordFilter.resource_owner_ids");
    target = stream->WriteString(6, s, target);
  }

  // repeated string order_numbers = 7;
  for (int i = 0, n = this->_internal_order_numbers_size(); i < n; ++i) {
    const auto& s = this->_internal_order_numbers(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.RecordFilter.order_numbers");
    target = stream->WriteString(7, s, target);
  }

  // repeated string in_use_resource_owner_ids = 8;
  for (int i = 0, n = this->_internal_in_use_resource_owner_ids_size(); i < n; ++i) {
    const auto& s = this->_internal_in_use_resource_owner_ids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.RecordFilter.in_use_resource_owner_ids");
    target = stream->WriteString(8, s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.BoolValue is_deleted = 9;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::is_deleted(this),
        _Internal::is_deleted(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue text = 10;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::text(this),
        _Internal::text(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp start_shipped_at = 11;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::start_shipped_at(this),
        _Internal::start_shipped_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp end_shipped_at = 12;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::end_shipped_at(this),
        _Internal::end_shipped_at(this).GetCachedSize(), target, stream);
  }

  // repeated int32 package_info_boxes = 13;
  {
    int byte_size = _impl_._package_info_boxes_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(13, _internal_package_info_boxes(),
                                                 byte_size, target);
    }
  }

  // repeated int32 package_info_places = 14;
  {
    int byte_size = _impl_._package_info_places_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(14, _internal_package_info_places(),
                                                 byte_size, target);
    }
  }

  // repeated .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_types = 15;
  {
    int byte_size = _impl_._identification_method_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(15, _internal_identification_method_types(),
                                       byte_size, target);
    }
  }

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

::size_t RecordFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.RecordFilter)
  ::size_t total_size = 0;

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

  // repeated .keyapis.rfidregistry.v1.Record.RfidType rfid_types = 1;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_rfid_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_rfid_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._rfid_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated .keyapis.rfidregistry.v1.Record.EncryptionType encryption_types = 2;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_encryption_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_encryption_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._encryption_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated string uids = 3;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_uids().size());
  for (int i = 0, n = _internal_uids().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_uids().Get(i));
  }

  // repeated .keyapis.rfidregistry.v1.Record.StatusType status_types = 4;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_status_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_status_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._status_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated string in_use_rfid_ids = 5;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_in_use_rfid_ids().size());
  for (int i = 0, n = _internal_in_use_rfid_ids().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_in_use_rfid_ids().Get(i));
  }

  // repeated string resource_owner_ids = 6;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_resource_owner_ids().size());
  for (int i = 0, n = _internal_resource_owner_ids().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_resource_owner_ids().Get(i));
  }

  // repeated string order_numbers = 7;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_order_numbers().size());
  for (int i = 0, n = _internal_order_numbers().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_order_numbers().Get(i));
  }

  // repeated string in_use_resource_owner_ids = 8;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_in_use_resource_owner_ids().size());
  for (int i = 0, n = _internal_in_use_resource_owner_ids().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_in_use_resource_owner_ids().Get(i));
  }

  // repeated int32 package_info_boxes = 13;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_package_info_boxes())
    ;
    _impl_._package_info_boxes_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 package_info_places = 14;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_package_info_places())
    ;
    _impl_._package_info_places_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated .keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_types = 15;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_identification_method_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_identification_method_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._identification_method_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // .google.protobuf.BoolValue is_deleted = 9;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.is_deleted_);
    }

    // .google.protobuf.StringValue text = 10;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.text_);
    }

    // .google.protobuf.Timestamp start_shipped_at = 11;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.start_shipped_at_);
    }

    // .google.protobuf.Timestamp end_shipped_at = 12;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.end_shipped_at_);
    }

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

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

void RecordFilter::MergeFrom(const RecordFilter& from) {
  RecordFilter* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.RecordFilter)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_mutable_rfid_types()->MergeFrom(from._internal_rfid_types());
  _this->_internal_mutable_encryption_types()->MergeFrom(from._internal_encryption_types());
  _this->_internal_mutable_uids()->MergeFrom(from._internal_uids());
  _this->_internal_mutable_status_types()->MergeFrom(from._internal_status_types());
  _this->_internal_mutable_in_use_rfid_ids()->MergeFrom(from._internal_in_use_rfid_ids());
  _this->_internal_mutable_resource_owner_ids()->MergeFrom(from._internal_resource_owner_ids());
  _this->_internal_mutable_order_numbers()->MergeFrom(from._internal_order_numbers());
  _this->_internal_mutable_in_use_resource_owner_ids()->MergeFrom(from._internal_in_use_resource_owner_ids());
  _this->_impl_.package_info_boxes_.MergeFrom(from._impl_.package_info_boxes_);
  _this->_impl_.package_info_places_.MergeFrom(from._impl_.package_info_places_);
  _this->_internal_mutable_identification_method_types()->MergeFrom(from._internal_identification_method_types());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_is_deleted()->::PROTOBUF_NAMESPACE_ID::BoolValue::MergeFrom(
          from._internal_is_deleted());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_text()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_text());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_start_shipped_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_start_shipped_at());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_end_shipped_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_end_shipped_at());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void RecordFilter::CopyFrom(const RecordFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.RecordFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RecordFilter::InternalSwap(RecordFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _internal_mutable_rfid_types()->InternalSwap(
      other->_internal_mutable_rfid_types());
  _internal_mutable_encryption_types()->InternalSwap(
      other->_internal_mutable_encryption_types());
  _internal_mutable_uids()->InternalSwap(
      other->_internal_mutable_uids());
  _internal_mutable_status_types()->InternalSwap(
      other->_internal_mutable_status_types());
  _internal_mutable_in_use_rfid_ids()->InternalSwap(
      other->_internal_mutable_in_use_rfid_ids());
  _internal_mutable_resource_owner_ids()->InternalSwap(
      other->_internal_mutable_resource_owner_ids());
  _internal_mutable_order_numbers()->InternalSwap(
      other->_internal_mutable_order_numbers());
  _internal_mutable_in_use_resource_owner_ids()->InternalSwap(
      other->_internal_mutable_in_use_resource_owner_ids());
  _impl_.package_info_boxes_.InternalSwap(&other->_impl_.package_info_boxes_);
  _impl_.package_info_places_.InternalSwap(&other->_impl_.package_info_places_);
  _internal_mutable_identification_method_types()->InternalSwap(
      other->_internal_mutable_identification_method_types());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RecordFilter, _impl_.end_shipped_at_)
      + sizeof(RecordFilter::_impl_.end_shipped_at_)
      - PROTOBUF_FIELD_OFFSET(RecordFilter, _impl_.is_deleted_)>(
          reinterpret_cast<char*>(&_impl_.is_deleted_),
          reinterpret_cast<char*>(&other->_impl_.is_deleted_));
}

std::string RecordFilter::GetTypeName() const {
  return "keyapis.rfidregistry.v1.RecordFilter";
}

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

class RecordPaging::_Internal {
 public:
};

RecordPaging::RecordPaging(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.RecordPaging)
}
RecordPaging::RecordPaging(const RecordPaging& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.RecordPaging)
}

inline void RecordPaging::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.order_by_type_) { 0 }

    , decltype(_impl_.direction_type_) { 0 }

    , decltype(_impl_.limit_) { 0 }

    , decltype(_impl_.offset_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void RecordPaging::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

void RecordPaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.RecordPaging)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.order_by_type_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.offset_) -
      reinterpret_cast<char*>(&_impl_.order_by_type_)) + sizeof(_impl_.offset_));
  _internal_metadata_.Clear<std::string>();
}

const char* RecordPaging::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.RecordPaging.OrderByType order_by_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_order_by_type(static_cast<::keyapis::rfidregistry::v1::RecordPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.RecordPaging.DirectionType direction_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_direction_type(static_cast<::keyapis::rfidregistry::v1::RecordPaging_DirectionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 limit = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 offset = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* RecordPaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.RecordPaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.RecordPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_order_by_type(), target);
  }

  // .keyapis.rfidregistry.v1.RecordPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_direction_type(), target);
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_limit(), target);
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_offset(), target);
  }

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

::size_t RecordPaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.RecordPaging)
  ::size_t total_size = 0;

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

  // .keyapis.rfidregistry.v1.RecordPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_order_by_type());
  }

  // .keyapis.rfidregistry.v1.RecordPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_direction_type());
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_limit());
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_offset());
  }

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

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

void RecordPaging::MergeFrom(const RecordPaging& from) {
  RecordPaging* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.RecordPaging)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_order_by_type() != 0) {
    _this->_internal_set_order_by_type(from._internal_order_by_type());
  }
  if (from._internal_direction_type() != 0) {
    _this->_internal_set_direction_type(from._internal_direction_type());
  }
  if (from._internal_limit() != 0) {
    _this->_internal_set_limit(from._internal_limit());
  }
  if (from._internal_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void RecordPaging::CopyFrom(const RecordPaging& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.RecordPaging)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RecordPaging::InternalSwap(RecordPaging* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RecordPaging, _impl_.offset_)
      + sizeof(RecordPaging::_impl_.offset_)
      - PROTOBUF_FIELD_OFFSET(RecordPaging, _impl_.order_by_type_)>(
          reinterpret_cast<char*>(&_impl_.order_by_type_),
          reinterpret_cast<char*>(&other->_impl_.order_by_type_));
}

std::string RecordPaging::GetTypeName() const {
  return "keyapis.rfidregistry.v1.RecordPaging";
}

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

class PostRecordRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<PostRecordRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PostRecordRequest, _impl_._has_bits_);
  static const ::keyapis::rfidregistry::v1::Record& data(const PostRecordRequest* msg);
  static void set_has_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::rfidregistry::v1::Record&
PostRecordRequest::_Internal::data(const PostRecordRequest* msg) {
  return *msg->_impl_.data_;
}
PostRecordRequest::PostRecordRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.PostRecordRequest)
}
PostRecordRequest::PostRecordRequest(const PostRecordRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRecordRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.data_ = new ::keyapis::rfidregistry::v1::Record(*from._impl_.data_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.PostRecordRequest)
}

inline void PostRecordRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}
  };
}

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

inline void PostRecordRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.data_;
}

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

void PostRecordRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.PostRecordRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.data_ != nullptr);
    _impl_.data_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PostRecordRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.Record data = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostRecordRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.PostRecordRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.rfidregistry.v1.Record data = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

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

::size_t PostRecordRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.PostRecordRequest)
  ::size_t total_size = 0;

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

  // .keyapis.rfidregistry.v1.Record data = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.data_);
  }

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

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

void PostRecordRequest::MergeFrom(const PostRecordRequest& from) {
  PostRecordRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.PostRecordRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostRecordRequest::CopyFrom(const PostRecordRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.PostRecordRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string PostRecordRequest::GetTypeName() const {
  return "keyapis.rfidregistry.v1.PostRecordRequest";
}

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

class PostRecordResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::PostRecordResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::ValidationError& validation(const PostRecordResponse_Error* msg);
  static const ::keyapis::rfidregistry::v1::Record_SavingError& saving(const PostRecordResponse_Error* msg);
};

const ::keyapis::rfidregistry::v1::ValidationError&
PostRecordResponse_Error::_Internal::validation(const PostRecordResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::rfidregistry::v1::Record_SavingError&
PostRecordResponse_Error::_Internal::saving(const PostRecordResponse_Error* msg) {
  return *msg->_impl_.reason_.saving_;
}
void PostRecordResponse_Error::set_allocated_validation(::keyapis::rfidregistry::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.PostRecordResponse.Error.validation)
}
void PostRecordResponse_Error::set_allocated_saving(::keyapis::rfidregistry::v1::Record_SavingError* saving) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (saving) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(saving);
    if (message_arena != submessage_arena) {
      saving = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, saving, submessage_arena);
    }
    set_has_saving();
    _impl_.reason_.saving_ = saving;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.PostRecordResponse.Error.saving)
}
PostRecordResponse_Error::PostRecordResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.PostRecordResponse.Error)
}
PostRecordResponse_Error::PostRecordResponse_Error(const PostRecordResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRecordResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::rfidregistry::v1::Record_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.PostRecordResponse.Error)
}

inline void PostRecordResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PostRecordResponse_Error::~PostRecordResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostRecordResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void PostRecordResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case kSaving: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.saving_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostRecordResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* PostRecordResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.Record.SavingError saving = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostRecordResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::saving(this),
          _Internal::saving(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  return target;
}

::size_t PostRecordResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  ::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 (reason_case()) {
    // .keyapis.rfidregistry.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.rfidregistry.v1.Record.SavingError saving = 2;
    case kSaving: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.saving_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void PostRecordResponse_Error::MergeFrom(const PostRecordResponse_Error& from) {
  PostRecordResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::rfidregistry::v1::Record_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostRecordResponse_Error::CopyFrom(const PostRecordResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.PostRecordResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string PostRecordResponse_Error::GetTypeName() const {
  return "keyapis.rfidregistry.v1.PostRecordResponse.Error";
}

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

class PostRecordResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::PostRecordResponse, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::Record& data(const PostRecordResponse* msg);
  static const ::keyapis::rfidregistry::v1::PostRecordResponse_Error& error(const PostRecordResponse* msg);
};

const ::keyapis::rfidregistry::v1::Record&
PostRecordResponse::_Internal::data(const PostRecordResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::rfidregistry::v1::PostRecordResponse_Error&
PostRecordResponse::_Internal::error(const PostRecordResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostRecordResponse::set_allocated_data(::keyapis::rfidregistry::v1::Record* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.PostRecordResponse.data)
}
void PostRecordResponse::set_allocated_error(::keyapis::rfidregistry::v1::PostRecordResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.PostRecordResponse.error)
}
PostRecordResponse::PostRecordResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.PostRecordResponse)
}
PostRecordResponse::PostRecordResponse(const PostRecordResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRecordResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::PostRecordResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.PostRecordResponse)
}

inline void PostRecordResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void PostRecordResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void PostRecordResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.PostRecordResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void PostRecordResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.PostRecordResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* PostRecordResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.Record data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.PostRecordResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostRecordResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.PostRecordResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.rfidregistry.v1.PostRecordResponse)
  return target;
}

::size_t PostRecordResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.PostRecordResponse)
  ::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 (type_case()) {
    // .keyapis.rfidregistry.v1.Record data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.rfidregistry.v1.PostRecordResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void PostRecordResponse::MergeFrom(const PostRecordResponse& from) {
  PostRecordResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.PostRecordResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::PostRecordResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostRecordResponse::CopyFrom(const PostRecordResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.PostRecordResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string PostRecordResponse::GetTypeName() const {
  return "keyapis.rfidregistry.v1.PostRecordResponse";
}

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

class GetRecordRequest::_Internal {
 public:
};

GetRecordRequest::GetRecordRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordRequest)
}
GetRecordRequest::GetRecordRequest(const GetRecordRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_id().empty()) {
    _this->_impl_.id_.Set(from._internal_id(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordRequest)
}

inline void GetRecordRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void GetRecordRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.id_.Destroy();
}

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

void GetRecordRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.id_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* GetRecordRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_id().empty()) {
    const std::string& _s = this->_internal_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.GetRecordRequest.id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

::size_t GetRecordRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordRequest)
  ::size_t total_size = 0;

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

  // string id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_id());
  }

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

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

void GetRecordRequest::MergeFrom(const GetRecordRequest& from) {
  GetRecordRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_id().empty()) {
    _this->_internal_set_id(from._internal_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordRequest::CopyFrom(const GetRecordRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GetRecordRequest::InternalSwap(GetRecordRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena,
                                       &other->_impl_.id_, rhs_arena);
}

std::string GetRecordRequest::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordRequest";
}

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

class GetRecordResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordResponse, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::Record& data(const GetRecordResponse* msg);
};

const ::keyapis::rfidregistry::v1::Record&
GetRecordResponse::_Internal::data(const GetRecordResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetRecordResponse::set_allocated_data(::keyapis::rfidregistry::v1::Record* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordResponse.data)
}
GetRecordResponse::GetRecordResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordResponse)
}
GetRecordResponse::GetRecordResponse(const GetRecordResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordResponse)
}

inline void GetRecordResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetRecordResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetRecordResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetRecordResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GetRecordResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.Record data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.Record data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

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

::size_t GetRecordResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordResponse)
  ::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 (type_case()) {
    // .keyapis.rfidregistry.v1.Record data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordResponse::MergeFrom(const GetRecordResponse& from) {
  GetRecordResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordResponse::CopyFrom(const GetRecordResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordResponse::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordResponse";
}

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

class GetRecordCountRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetRecordCountRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetRecordCountRequest, _impl_._has_bits_);
  static const ::keyapis::rfidregistry::v1::RecordFilter& filter(const GetRecordCountRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::rfidregistry::v1::RecordFilter&
GetRecordCountRequest::_Internal::filter(const GetRecordCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetRecordCountRequest::GetRecordCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordCountRequest)
}
GetRecordCountRequest::GetRecordCountRequest(const GetRecordCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordCountRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::rfidregistry::v1::RecordFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordCountRequest)
}

inline void GetRecordCountRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
  };
}

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

inline void GetRecordCountRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
}

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

void GetRecordCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordCountRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetRecordCountRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(this).GetCachedSize(), target, stream);
  }

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

::size_t GetRecordCountRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordCountRequest)
  ::size_t total_size = 0;

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

  // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

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

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

void GetRecordCountRequest::MergeFrom(const GetRecordCountRequest& from) {
  GetRecordCountRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordCountRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::rfidregistry::v1::RecordFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordCountRequest::CopyFrom(const GetRecordCountRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordCountRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordCountRequest::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordCountRequest";
}

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

class GetRecordCountResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordCountResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::ValidationError& validation(const GetRecordCountResponse_Error* msg);
};

const ::keyapis::rfidregistry::v1::ValidationError&
GetRecordCountResponse_Error::_Internal::validation(const GetRecordCountResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetRecordCountResponse_Error::set_allocated_validation(::keyapis::rfidregistry::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordCountResponse.Error.validation)
}
GetRecordCountResponse_Error::GetRecordCountResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
}
GetRecordCountResponse_Error::GetRecordCountResponse_Error(const GetRecordCountResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordCountResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
}

inline void GetRecordCountResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetRecordCountResponse_Error::~GetRecordCountResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetRecordCountResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetRecordCountResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void GetRecordCountResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GetRecordCountResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(this).GetCachedSize(), target, stream);
  }

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

::size_t GetRecordCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  ::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 (reason_case()) {
    // .keyapis.rfidregistry.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordCountResponse_Error::MergeFrom(const GetRecordCountResponse_Error& from) {
  GetRecordCountResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordCountResponse_Error::CopyFrom(const GetRecordCountResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordCountResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordCountResponse_Error::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordCountResponse.Error";
}

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

class GetRecordCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordCountResponse, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::GetRecordCountResponse_Error& error(const GetRecordCountResponse* msg);
};

const ::keyapis::rfidregistry::v1::GetRecordCountResponse_Error&
GetRecordCountResponse::_Internal::error(const GetRecordCountResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetRecordCountResponse::set_allocated_error(::keyapis::rfidregistry::v1::GetRecordCountResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordCountResponse.error)
}
GetRecordCountResponse::GetRecordCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordCountResponse)
}
GetRecordCountResponse::GetRecordCountResponse(const GetRecordCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordCountResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::GetRecordCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordCountResponse)
}

inline void GetRecordCountResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetRecordCountResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetRecordCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetRecordCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GetRecordCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.GetRecordCountResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteInt32ToArray(
          1, this->_internal_data(), target);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.rfidregistry.v1.GetRecordCountResponse)
  return target;
}

::size_t GetRecordCountResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  ::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 (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    // .keyapis.rfidregistry.v1.GetRecordCountResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordCountResponse::MergeFrom(const GetRecordCountResponse& from) {
  GetRecordCountResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::GetRecordCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordCountResponse::CopyFrom(const GetRecordCountResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordCountResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordCountResponse::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordCountResponse";
}

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

class GetRecordListRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetRecordListRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetRecordListRequest, _impl_._has_bits_);
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordListRequest, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::RecordFilter& filter(const GetRecordListRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::rfidregistry::v1::RecordPaging& paging(const GetRecordListRequest* msg);
};

const ::keyapis::rfidregistry::v1::RecordFilter&
GetRecordListRequest::_Internal::filter(const GetRecordListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::rfidregistry::v1::RecordPaging&
GetRecordListRequest::_Internal::paging(const GetRecordListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetRecordListRequest::set_allocated_paging(::keyapis::rfidregistry::v1::RecordPaging* paging) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_pagination();
  if (paging) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(paging);
    if (message_arena != submessage_arena) {
      paging = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, paging, submessage_arena);
    }
    set_has_paging();
    _impl_.pagination_.paging_ = paging;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordListRequest.paging)
}
GetRecordListRequest::GetRecordListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordListRequest)
}
GetRecordListRequest::GetRecordListRequest(const GetRecordListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordListRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::rfidregistry::v1::RecordFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::rfidregistry::v1::RecordPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordListRequest)
}

inline void GetRecordListRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_pagination();
}

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

inline void GetRecordListRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
  if (has_pagination()) {
    clear_pagination();
  }
}

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

void GetRecordListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  switch (pagination_case()) {
    case kPaging: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.pagination_.paging_;
      }
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = PAGINATION_NOT_SET;
}


void GetRecordListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  clear_pagination();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetRecordListRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.RecordPaging paging = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_paging(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(this).GetCachedSize(), target, stream);
  }

  // .keyapis.rfidregistry.v1.RecordPaging paging = 2;
  if (pagination_case() == kPaging) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::paging(this),
        _Internal::paging(this).GetCachedSize(), target, stream);
  }

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

::size_t GetRecordListRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  ::size_t total_size = 0;

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

  // .keyapis.rfidregistry.v1.RecordFilter filter = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

  switch (pagination_case()) {
    // .keyapis.rfidregistry.v1.RecordPaging paging = 2;
    case kPaging: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pagination_.paging_);
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordListRequest::MergeFrom(const GetRecordListRequest& from) {
  GetRecordListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::rfidregistry::v1::RecordFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::rfidregistry::v1::RecordPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordListRequest::CopyFrom(const GetRecordListRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordListRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GetRecordListRequest::InternalSwap(GetRecordListRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.filter_, other->_impl_.filter_);
  swap(_impl_.pagination_, other->_impl_.pagination_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetRecordListRequest::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordListRequest";
}

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

class GetRecordListResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordListResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::ValidationError& validation(const GetRecordListResponse_Error* msg);
};

const ::keyapis::rfidregistry::v1::ValidationError&
GetRecordListResponse_Error::_Internal::validation(const GetRecordListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetRecordListResponse_Error::set_allocated_validation(::keyapis::rfidregistry::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordListResponse.Error.validation)
}
GetRecordListResponse_Error::GetRecordListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
}
GetRecordListResponse_Error::GetRecordListResponse_Error(const GetRecordListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordListResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
}

inline void GetRecordListResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetRecordListResponse_Error::~GetRecordListResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetRecordListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetRecordListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void GetRecordListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GetRecordListResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(this).GetCachedSize(), target, stream);
  }

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

::size_t GetRecordListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  ::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 (reason_case()) {
    // .keyapis.rfidregistry.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordListResponse_Error::MergeFrom(const GetRecordListResponse_Error& from) {
  GetRecordListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordListResponse_Error::CopyFrom(const GetRecordListResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordListResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordListResponse_Error::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordListResponse.Error";
}

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

class GetRecordListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::GetRecordListResponse, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::Record& data(const GetRecordListResponse* msg);
  static const ::keyapis::rfidregistry::v1::GetRecordListResponse_Error& error(const GetRecordListResponse* msg);
};

const ::keyapis::rfidregistry::v1::Record&
GetRecordListResponse::_Internal::data(const GetRecordListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::rfidregistry::v1::GetRecordListResponse_Error&
GetRecordListResponse::_Internal::error(const GetRecordListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetRecordListResponse::set_allocated_data(::keyapis::rfidregistry::v1::Record* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordListResponse.data)
}
void GetRecordListResponse::set_allocated_error(::keyapis::rfidregistry::v1::GetRecordListResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.GetRecordListResponse.error)
}
GetRecordListResponse::GetRecordListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.GetRecordListResponse)
}
GetRecordListResponse::GetRecordListResponse(const GetRecordListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRecordListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::GetRecordListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.GetRecordListResponse)
}

inline void GetRecordListResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetRecordListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetRecordListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetRecordListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GetRecordListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.Record data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.rfidregistry.v1.GetRecordListResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetRecordListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.rfidregistry.v1.GetRecordListResponse)
  return target;
}

::size_t GetRecordListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  ::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 (type_case()) {
    // .keyapis.rfidregistry.v1.Record data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.rfidregistry.v1.GetRecordListResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void GetRecordListResponse::MergeFrom(const GetRecordListResponse& from) {
  GetRecordListResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::rfidregistry::v1::Record::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::GetRecordListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetRecordListResponse::CopyFrom(const GetRecordListResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.GetRecordListResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetRecordListResponse::GetTypeName() const {
  return "keyapis.rfidregistry.v1.GetRecordListResponse";
}

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

class DeleteRecordRequest::_Internal {
 public:
};

DeleteRecordRequest::DeleteRecordRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.DeleteRecordRequest)
}
DeleteRecordRequest::DeleteRecordRequest(const DeleteRecordRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeleteRecordRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_id().empty()) {
    _this->_impl_.id_.Set(from._internal_id(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.DeleteRecordRequest)
}

inline void DeleteRecordRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void DeleteRecordRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.id_.Destroy();
}

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

void DeleteRecordRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.DeleteRecordRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.id_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* DeleteRecordRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* DeleteRecordRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.DeleteRecordRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_id().empty()) {
    const std::string& _s = this->_internal_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.DeleteRecordRequest.id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

::size_t DeleteRecordRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.DeleteRecordRequest)
  ::size_t total_size = 0;

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

  // string id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_id());
  }

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

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

void DeleteRecordRequest::MergeFrom(const DeleteRecordRequest& from) {
  DeleteRecordRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.DeleteRecordRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_id().empty()) {
    _this->_internal_set_id(from._internal_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void DeleteRecordRequest::CopyFrom(const DeleteRecordRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.DeleteRecordRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DeleteRecordRequest::InternalSwap(DeleteRecordRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena,
                                       &other->_impl_.id_, rhs_arena);
}

std::string DeleteRecordRequest::GetTypeName() const {
  return "keyapis.rfidregistry.v1.DeleteRecordRequest";
}

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

class DeleteRecordResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::DeleteRecordResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::ValidationError& validation(const DeleteRecordResponse_Error* msg);
};

const ::keyapis::rfidregistry::v1::ValidationError&
DeleteRecordResponse_Error::_Internal::validation(const DeleteRecordResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void DeleteRecordResponse_Error::set_allocated_validation(::keyapis::rfidregistry::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.DeleteRecordResponse.Error.validation)
}
DeleteRecordResponse_Error::DeleteRecordResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
}
DeleteRecordResponse_Error::DeleteRecordResponse_Error(const DeleteRecordResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeleteRecordResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
}

inline void DeleteRecordResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

DeleteRecordResponse_Error::~DeleteRecordResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeleteRecordResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void DeleteRecordResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void DeleteRecordResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* DeleteRecordResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* DeleteRecordResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(this).GetCachedSize(), target, stream);
  }

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

::size_t DeleteRecordResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  ::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 (reason_case()) {
    // .keyapis.rfidregistry.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void DeleteRecordResponse_Error::MergeFrom(const DeleteRecordResponse_Error& from) {
  DeleteRecordResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::rfidregistry::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void DeleteRecordResponse_Error::CopyFrom(const DeleteRecordResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.DeleteRecordResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string DeleteRecordResponse_Error::GetTypeName() const {
  return "keyapis.rfidregistry.v1.DeleteRecordResponse.Error";
}

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

class DeleteRecordResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::rfidregistry::v1::DeleteRecordResponse, _impl_._oneof_case_);
  static const ::keyapis::rfidregistry::v1::DeleteRecordResponse_Error& error(const DeleteRecordResponse* msg);
};

const ::keyapis::rfidregistry::v1::DeleteRecordResponse_Error&
DeleteRecordResponse::_Internal::error(const DeleteRecordResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void DeleteRecordResponse::set_allocated_error(::keyapis::rfidregistry::v1::DeleteRecordResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.rfidregistry.v1.DeleteRecordResponse.error)
}
DeleteRecordResponse::DeleteRecordResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.DeleteRecordResponse)
}
DeleteRecordResponse::DeleteRecordResponse(const DeleteRecordResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeleteRecordResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::DeleteRecordResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.DeleteRecordResponse)
}

inline void DeleteRecordResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void DeleteRecordResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void DeleteRecordResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  switch (type_case()) {
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void DeleteRecordResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* DeleteRecordResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.rfidregistry.v1.DeleteRecordResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* DeleteRecordResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.rfidregistry.v1.DeleteRecordResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(this).GetCachedSize(), target, stream);
  }

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

::size_t DeleteRecordResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  ::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 (type_case()) {
    // .keyapis.rfidregistry.v1.DeleteRecordResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void DeleteRecordResponse::MergeFrom(const DeleteRecordResponse& from) {
  DeleteRecordResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::rfidregistry::v1::DeleteRecordResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void DeleteRecordResponse::CopyFrom(const DeleteRecordResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.DeleteRecordResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string DeleteRecordResponse::GetTypeName() const {
  return "keyapis.rfidregistry.v1.DeleteRecordResponse";
}

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

class ValidationError::_Internal {
 public:
};

ValidationError::ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.rfidregistry.v1.ValidationError)
}
ValidationError::ValidationError(const ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_path().empty()) {
    _this->_impl_.path_.Set(from._internal_path(), _this->GetArenaForAllocation());
  }
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_message().empty()) {
    _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.rfidregistry.v1.ValidationError)
}

inline void ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.path_.Destroy();
  _impl_.message_.Destroy();
}

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

void ValidationError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.rfidregistry.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.path_.ClearToEmpty();
  _impl_.message_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* ValidationError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string path = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string message = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.rfidregistry.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string path = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_path().empty()) {
    const std::string& _s = this->_internal_path();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.ValidationError.path");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    const std::string& _s = this->_internal_message();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.rfidregistry.v1.ValidationError.message");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

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

::size_t ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.rfidregistry.v1.ValidationError)
  ::size_t total_size = 0;

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

  // string path = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_path().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_path());
  }

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_message());
  }

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

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

void ValidationError::MergeFrom(const ValidationError& from) {
  ValidationError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.rfidregistry.v1.ValidationError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_path().empty()) {
    _this->_internal_set_path(from._internal_path());
  }
  if (!from._internal_message().empty()) {
    _this->_internal_set_message(from._internal_message());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void ValidationError::CopyFrom(const ValidationError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.rfidregistry.v1.ValidationError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ValidationError::InternalSwap(ValidationError* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.path_, lhs_arena,
                                       &other->_impl_.path_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, lhs_arena,
                                       &other->_impl_.message_, rhs_arena);
}

std::string ValidationError::GetTypeName() const {
  return "keyapis.rfidregistry.v1.ValidationError";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace rfidregistry
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_DataCell*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_DataCell >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_DataCell >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_AesKeyConfiguration*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_AesKeyConfiguration >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_AesKeyConfiguration >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_Trailer*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_Trailer >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_Trailer >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError_StatusTypeRestricted >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError_UidExist*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError_UidExist >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError_UidExist >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError_OwnedByAnotherUser >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError_AlreadyLinked >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError_Conflict*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError_Conflict >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError_Conflict >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record_SavingError*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::Record*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::Record >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::Record >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::RecordFilter*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::RecordFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::RecordFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::RecordPaging*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::RecordPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::RecordPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::PostRecordRequest*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::PostRecordRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::PostRecordRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::PostRecordResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::PostRecordResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::PostRecordResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::PostRecordResponse*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::PostRecordResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::PostRecordResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordRequest*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordResponse*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordCountRequest*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordCountResponse*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordListRequest*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::GetRecordListResponse*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::GetRecordListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::GetRecordListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::DeleteRecordRequest*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::DeleteRecordRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::DeleteRecordRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::DeleteRecordResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::DeleteRecordResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::DeleteRecordResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::DeleteRecordResponse*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::DeleteRecordResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::DeleteRecordResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::rfidregistry::v1::ValidationError*
Arena::CreateMaybeMessage< ::keyapis::rfidregistry::v1::ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::rfidregistry::v1::ValidationError >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
