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

#include "keyapis/device/v1/keyapis_device_system_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 device {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR GetSystemStatusRequest::GetSystemStatusRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetSystemStatusRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSystemStatusRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSystemStatusRequestDefaultTypeInternal() {}
  union {
    GetSystemStatusRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSystemStatusRequestDefaultTypeInternal _GetSystemStatusRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSystemStatusResponse::GetSystemStatusResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetSystemStatusResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSystemStatusResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSystemStatusResponseDefaultTypeInternal() {}
  union {
    GetSystemStatusResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSystemStatusResponseDefaultTypeInternal _GetSystemStatusResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RfidAutoGenerateSettings::RfidAutoGenerateSettings(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RfidAutoGenerateSettingsDefaultTypeInternal _RfidAutoGenerateSettings_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSystemRfidAutoGenerateSettingsRequest::GetSystemRfidAutoGenerateSettingsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal() {}
  union {
    GetSystemRfidAutoGenerateSettingsRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal _GetSystemRfidAutoGenerateSettingsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSystemRfidAutoGenerateSettingsResponse::GetSystemRfidAutoGenerateSettingsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct GetSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal() {}
  union {
    GetSystemRfidAutoGenerateSettingsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal _GetSystemRfidAutoGenerateSettingsResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsRequest::PutSystemRfidAutoGenerateSettingsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PutSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal() {}
  union {
    PutSystemRfidAutoGenerateSettingsRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutSystemRfidAutoGenerateSettingsRequestDefaultTypeInternal _PutSystemRfidAutoGenerateSettingsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsResponse_Error::PutSystemRfidAutoGenerateSettingsResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutSystemRfidAutoGenerateSettingsResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutSystemRfidAutoGenerateSettingsResponse_ErrorDefaultTypeInternal() {}
  union {
    PutSystemRfidAutoGenerateSettingsResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutSystemRfidAutoGenerateSettingsResponse_ErrorDefaultTypeInternal _PutSystemRfidAutoGenerateSettingsResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsResponse::PutSystemRfidAutoGenerateSettingsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal() {}
  union {
    PutSystemRfidAutoGenerateSettingsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutSystemRfidAutoGenerateSettingsResponseDefaultTypeInternal _PutSystemRfidAutoGenerateSettingsResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace keyapis
namespace keyapis {
namespace device {
namespace v1 {
// ===================================================================

class GetSystemStatusRequest::_Internal {
 public:
};

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

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

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

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

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

void GetSystemStatusRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSystemStatusRequest)
  ::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* GetSystemStatusRequest::_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* GetSystemStatusRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSystemStatusRequest)
  ::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.device.v1.GetSystemStatusRequest)
  return target;
}

::size_t GetSystemStatusRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSystemStatusRequest)
  ::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 GetSystemStatusRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSystemStatusRequest*>(
      &from));
}

void GetSystemStatusRequest::MergeFrom(const GetSystemStatusRequest& from) {
  GetSystemStatusRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetSystemStatusRequest)
  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 GetSystemStatusRequest::CopyFrom(const GetSystemStatusRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetSystemStatusRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetSystemStatusRequest::GetTypeName() const {
  return "keyapis.device.v1.GetSystemStatusRequest";
}

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

class GetSystemStatusResponse::_Internal {
 public:
};

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

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

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

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

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

void GetSystemStatusResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSystemStatusResponse)
  ::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* GetSystemStatusResponse::_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* GetSystemStatusResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSystemStatusResponse)
  ::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.device.v1.GetSystemStatusResponse)
  return target;
}

::size_t GetSystemStatusResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSystemStatusResponse)
  ::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 GetSystemStatusResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSystemStatusResponse*>(
      &from));
}

void GetSystemStatusResponse::MergeFrom(const GetSystemStatusResponse& from) {
  GetSystemStatusResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetSystemStatusResponse)
  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 GetSystemStatusResponse::CopyFrom(const GetSystemStatusResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetSystemStatusResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetSystemStatusResponse::GetTypeName() const {
  return "keyapis.device.v1.GetSystemStatusResponse";
}

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

class RfidAutoGenerateSettings::_Internal {
 public:
};

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

inline void RfidAutoGenerateSettings::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.is_enabled_) { false }

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

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

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

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

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

  _impl_.is_enabled_ = false;
  _internal_metadata_.Clear<std::string>();
}

const char* RfidAutoGenerateSettings::_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) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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* RfidAutoGenerateSettings::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.RfidAutoGenerateSettings)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), 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.device.v1.RfidAutoGenerateSettings)
  return target;
}

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

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    total_size += 2;
  }

  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 RfidAutoGenerateSettings::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const RfidAutoGenerateSettings*>(
      &from));
}

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

  if (from._internal_is_enabled() != 0) {
    _this->_internal_set_is_enabled(from._internal_is_enabled());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

std::string RfidAutoGenerateSettings::GetTypeName() const {
  return "keyapis.device.v1.RfidAutoGenerateSettings";
}

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

class GetSystemRfidAutoGenerateSettingsRequest::_Internal {
 public:
};

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

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

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

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

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

void GetSystemRfidAutoGenerateSettingsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  ::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* GetSystemRfidAutoGenerateSettingsRequest::_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* GetSystemRfidAutoGenerateSettingsRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  ::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.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  return target;
}

::size_t GetSystemRfidAutoGenerateSettingsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  ::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 GetSystemRfidAutoGenerateSettingsRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSystemRfidAutoGenerateSettingsRequest*>(
      &from));
}

void GetSystemRfidAutoGenerateSettingsRequest::MergeFrom(const GetSystemRfidAutoGenerateSettingsRequest& from) {
  GetSystemRfidAutoGenerateSettingsRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  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 GetSystemRfidAutoGenerateSettingsRequest::CopyFrom(const GetSystemRfidAutoGenerateSettingsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string GetSystemRfidAutoGenerateSettingsRequest::GetTypeName() const {
  return "keyapis.device.v1.GetSystemRfidAutoGenerateSettingsRequest";
}

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

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

const ::keyapis::device::v1::RfidAutoGenerateSettings&
GetSystemRfidAutoGenerateSettingsResponse::_Internal::data(const GetSystemRfidAutoGenerateSettingsResponse* msg) {
  return *msg->_impl_.data_;
}
GetSystemRfidAutoGenerateSettingsResponse::GetSystemRfidAutoGenerateSettingsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
}
GetSystemRfidAutoGenerateSettingsResponse::GetSystemRfidAutoGenerateSettingsResponse(const GetSystemRfidAutoGenerateSettingsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetSystemRfidAutoGenerateSettingsResponse* 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::device::v1::RfidAutoGenerateSettings(*from._impl_.data_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
}

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

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

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

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

void GetSystemRfidAutoGenerateSettingsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
  ::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* GetSystemRfidAutoGenerateSettingsResponse::_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.device.v1.RfidAutoGenerateSettings 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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.RfidAutoGenerateSettings data = 1;
  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.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
  return target;
}

::size_t GetSystemRfidAutoGenerateSettingsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
  ::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.device.v1.RfidAutoGenerateSettings data = 1;
  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 GetSystemRfidAutoGenerateSettingsResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSystemRfidAutoGenerateSettingsResponse*>(
      &from));
}

void GetSystemRfidAutoGenerateSettingsResponse::MergeFrom(const GetSystemRfidAutoGenerateSettingsResponse& from) {
  GetSystemRfidAutoGenerateSettingsResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse)
  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::device::v1::RfidAutoGenerateSettings::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetSystemRfidAutoGenerateSettingsResponse::InternalSwap(GetSystemRfidAutoGenerateSettingsResponse* 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 GetSystemRfidAutoGenerateSettingsResponse::GetTypeName() const {
  return "keyapis.device.v1.GetSystemRfidAutoGenerateSettingsResponse";
}

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

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

const ::keyapis::device::v1::RfidAutoGenerateSettings&
PutSystemRfidAutoGenerateSettingsRequest::_Internal::data(const PutSystemRfidAutoGenerateSettingsRequest* msg) {
  return *msg->_impl_.data_;
}
PutSystemRfidAutoGenerateSettingsRequest::PutSystemRfidAutoGenerateSettingsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
}
PutSystemRfidAutoGenerateSettingsRequest::PutSystemRfidAutoGenerateSettingsRequest(const PutSystemRfidAutoGenerateSettingsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutSystemRfidAutoGenerateSettingsRequest* 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::device::v1::RfidAutoGenerateSettings(*from._impl_.data_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
}

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

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

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

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

void PutSystemRfidAutoGenerateSettingsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
  ::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* PutSystemRfidAutoGenerateSettingsRequest::_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.device.v1.RfidAutoGenerateSettings 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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.RfidAutoGenerateSettings data = 1;
  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.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
  return target;
}

::size_t PutSystemRfidAutoGenerateSettingsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
  ::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.device.v1.RfidAutoGenerateSettings data = 1;
  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 PutSystemRfidAutoGenerateSettingsRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PutSystemRfidAutoGenerateSettingsRequest*>(
      &from));
}

void PutSystemRfidAutoGenerateSettingsRequest::MergeFrom(const PutSystemRfidAutoGenerateSettingsRequest& from) {
  PutSystemRfidAutoGenerateSettingsRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest)
  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::device::v1::RfidAutoGenerateSettings::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PutSystemRfidAutoGenerateSettingsRequest::InternalSwap(PutSystemRfidAutoGenerateSettingsRequest* 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 PutSystemRfidAutoGenerateSettingsRequest::GetTypeName() const {
  return "keyapis.device.v1.PutSystemRfidAutoGenerateSettingsRequest";
}

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

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

const ::keyapis::device::v1::ValidationError&
PutSystemRfidAutoGenerateSettingsResponse_Error::_Internal::validation(const PutSystemRfidAutoGenerateSettingsResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PutSystemRfidAutoGenerateSettingsResponse_Error::set_allocated_validation(::keyapis::device::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(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(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.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error.validation)
}
void PutSystemRfidAutoGenerateSettingsResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PutSystemRfidAutoGenerateSettingsResponse_Error::PutSystemRfidAutoGenerateSettingsResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error)
}
PutSystemRfidAutoGenerateSettingsResponse_Error::PutSystemRfidAutoGenerateSettingsResponse_Error(const PutSystemRfidAutoGenerateSettingsResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutSystemRfidAutoGenerateSettingsResponse_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::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error)
}

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

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

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

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

void PutSystemRfidAutoGenerateSettingsResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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 PutSystemRfidAutoGenerateSettingsResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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* PutSystemRfidAutoGenerateSettingsResponse_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.device.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* PutSystemRfidAutoGenerateSettingsResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.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.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error)
  return target;
}

::size_t PutSystemRfidAutoGenerateSettingsResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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.device.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 PutSystemRfidAutoGenerateSettingsResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PutSystemRfidAutoGenerateSettingsResponse_Error*>(
      &from));
}

void PutSystemRfidAutoGenerateSettingsResponse_Error::MergeFrom(const PutSystemRfidAutoGenerateSettingsResponse_Error& from) {
  PutSystemRfidAutoGenerateSettingsResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PutSystemRfidAutoGenerateSettingsResponse_Error::InternalSwap(PutSystemRfidAutoGenerateSettingsResponse_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 PutSystemRfidAutoGenerateSettingsResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.Error";
}

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

class PutSystemRfidAutoGenerateSettingsResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::RfidAutoGenerateSettings& data(const PutSystemRfidAutoGenerateSettingsResponse* msg);
  static const ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error& error(const PutSystemRfidAutoGenerateSettingsResponse* msg);
};

const ::keyapis::device::v1::RfidAutoGenerateSettings&
PutSystemRfidAutoGenerateSettingsResponse::_Internal::data(const PutSystemRfidAutoGenerateSettingsResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error&
PutSystemRfidAutoGenerateSettingsResponse::_Internal::error(const PutSystemRfidAutoGenerateSettingsResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PutSystemRfidAutoGenerateSettingsResponse::set_allocated_data(::keyapis::device::v1::RfidAutoGenerateSettings* 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.device.v1.PutSystemRfidAutoGenerateSettingsResponse.data)
}
void PutSystemRfidAutoGenerateSettingsResponse::set_allocated_error(::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_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.device.v1.PutSystemRfidAutoGenerateSettingsResponse.error)
}
PutSystemRfidAutoGenerateSettingsResponse::PutSystemRfidAutoGenerateSettingsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
}
PutSystemRfidAutoGenerateSettingsResponse::PutSystemRfidAutoGenerateSettingsResponse(const PutSystemRfidAutoGenerateSettingsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutSystemRfidAutoGenerateSettingsResponse* 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::device::v1::RfidAutoGenerateSettings::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
}

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

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

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

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

void PutSystemRfidAutoGenerateSettingsResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  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 PutSystemRfidAutoGenerateSettingsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  ::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* PutSystemRfidAutoGenerateSettingsResponse::_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.device.v1.RfidAutoGenerateSettings 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.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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* PutSystemRfidAutoGenerateSettingsResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  ::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.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  return target;
}

::size_t PutSystemRfidAutoGenerateSettingsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  ::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.device.v1.RfidAutoGenerateSettings data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse.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 PutSystemRfidAutoGenerateSettingsResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PutSystemRfidAutoGenerateSettingsResponse*>(
      &from));
}

void PutSystemRfidAutoGenerateSettingsResponse::MergeFrom(const PutSystemRfidAutoGenerateSettingsResponse& from) {
  PutSystemRfidAutoGenerateSettingsResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse)
  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::device::v1::RfidAutoGenerateSettings::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PutSystemRfidAutoGenerateSettingsResponse::InternalSwap(PutSystemRfidAutoGenerateSettingsResponse* 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 PutSystemRfidAutoGenerateSettingsResponse::GetTypeName() const {
  return "keyapis.device.v1.PutSystemRfidAutoGenerateSettingsResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSystemStatusRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSystemStatusRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSystemStatusRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSystemStatusResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSystemStatusResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSystemStatusResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::RfidAutoGenerateSettings*
Arena::CreateMaybeMessage< ::keyapis::device::v1::RfidAutoGenerateSettings >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::RfidAutoGenerateSettings >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSystemRfidAutoGenerateSettingsResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PutSystemRfidAutoGenerateSettingsResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
