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

#include "keyapis/access_control/v1/keyapis_access_control_room_device_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 access_control {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR RoomDevice::RoomDevice(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.room_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.orpon_)*/ ::int64_t{0}

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDeviceDefaultTypeInternal _RoomDevice_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceAttachRequest::PutRoomDeviceAttachRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.room_device_)*/nullptr} {}
struct PutRoomDeviceAttachRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceAttachRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceAttachRequestDefaultTypeInternal() {}
  union {
    PutRoomDeviceAttachRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceAttachRequestDefaultTypeInternal _PutRoomDeviceAttachRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceAttachResponse_Error::PutRoomDeviceAttachResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutRoomDeviceAttachResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceAttachResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceAttachResponse_ErrorDefaultTypeInternal() {}
  union {
    PutRoomDeviceAttachResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceAttachResponse_ErrorDefaultTypeInternal _PutRoomDeviceAttachResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceAttachResponse::PutRoomDeviceAttachResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutRoomDeviceAttachResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceAttachResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceAttachResponseDefaultTypeInternal() {}
  union {
    PutRoomDeviceAttachResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceAttachResponseDefaultTypeInternal _PutRoomDeviceAttachResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceDetachRequest::PutRoomDeviceDetachRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.room_device_)*/nullptr} {}
struct PutRoomDeviceDetachRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceDetachRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceDetachRequestDefaultTypeInternal() {}
  union {
    PutRoomDeviceDetachRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceDetachRequestDefaultTypeInternal _PutRoomDeviceDetachRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceDetachResponse_Error::PutRoomDeviceDetachResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutRoomDeviceDetachResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceDetachResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceDetachResponse_ErrorDefaultTypeInternal() {}
  union {
    PutRoomDeviceDetachResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceDetachResponse_ErrorDefaultTypeInternal _PutRoomDeviceDetachResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutRoomDeviceDetachResponse::PutRoomDeviceDetachResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutRoomDeviceDetachResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutRoomDeviceDetachResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutRoomDeviceDetachResponseDefaultTypeInternal() {}
  union {
    PutRoomDeviceDetachResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutRoomDeviceDetachResponseDefaultTypeInternal _PutRoomDeviceDetachResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RoomDeviceFilter::RoomDeviceFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.flatgramm_ids_)*/ {}
  ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.orpons_)*/ {}
  ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.room_numbers_)*/{}
  , /*decltype(_impl_.device_ids_)*/ {}
  ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDeviceFilterDefaultTypeInternal _RoomDeviceFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RoomDevicePaging::RoomDevicePaging(
    ::_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 RoomDevicePagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RoomDevicePagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~RoomDevicePagingDefaultTypeInternal() {}
  union {
    RoomDevicePaging _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDeviceListRequestDefaultTypeInternal _GetRoomDeviceListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRoomDeviceListResponse_Error::GetRoomDeviceListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRoomDeviceListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRoomDeviceListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRoomDeviceListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetRoomDeviceListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDeviceListResponse_ErrorDefaultTypeInternal _GetRoomDeviceListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRoomDeviceListResponse::GetRoomDeviceListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRoomDeviceListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRoomDeviceListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRoomDeviceListResponseDefaultTypeInternal() {}
  union {
    GetRoomDeviceListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDeviceListResponseDefaultTypeInternal _GetRoomDeviceListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRoomDeviceCountRequest::GetRoomDeviceCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetRoomDeviceCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRoomDeviceCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRoomDeviceCountRequestDefaultTypeInternal() {}
  union {
    GetRoomDeviceCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDeviceCountRequestDefaultTypeInternal _GetRoomDeviceCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRoomDeviceCountResponse::GetRoomDeviceCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetRoomDeviceCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRoomDeviceCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRoomDeviceCountResponseDefaultTypeInternal() {}
  union {
    GetRoomDeviceCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDeviceCountResponseDefaultTypeInternal _GetRoomDeviceCountResponse_default_instance_;
}  // namespace v1
}  // namespace access_control
}  // namespace keyapis
namespace keyapis {
namespace access_control {
namespace v1 {
bool RoomDevicePaging_OrderByType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    RoomDevicePaging_OrderByType_strings[3] = {};

static const char RoomDevicePaging_OrderByType_names[] = {
    "DEVICE_ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "ORPON_THEN_ENTRANCE_NUMBER"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry RoomDevicePaging_OrderByType_entries[] =
    {
        {{&RoomDevicePaging_OrderByType_names[0], 9}, 2},
        {{&RoomDevicePaging_OrderByType_names[9], 21}, 0},
        {{&RoomDevicePaging_OrderByType_names[30], 26}, 1},
};

static const int RoomDevicePaging_OrderByType_entries_by_number[] = {
    1,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    2,  // 1 -> ORPON_THEN_ENTRANCE_NUMBER
    0,  // 2 -> DEVICE_ID
};

const std::string& RoomDevicePaging_OrderByType_Name(RoomDevicePaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RoomDevicePaging_OrderByType_entries, RoomDevicePaging_OrderByType_entries_by_number,
          3, RoomDevicePaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RoomDevicePaging_OrderByType_entries, RoomDevicePaging_OrderByType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RoomDevicePaging_OrderByType_strings[idx].get();
}

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

constexpr RoomDevicePaging_OrderByType RoomDevicePaging::ORDER_BY_TYPE_UNKNOWN;
constexpr RoomDevicePaging_OrderByType RoomDevicePaging::ORPON_THEN_ENTRANCE_NUMBER;
constexpr RoomDevicePaging_OrderByType RoomDevicePaging::DEVICE_ID;
constexpr RoomDevicePaging_OrderByType RoomDevicePaging::OrderByType_MIN;
constexpr RoomDevicePaging_OrderByType RoomDevicePaging::OrderByType_MAX;
constexpr int RoomDevicePaging::OrderByType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool RoomDevicePaging_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>
    RoomDevicePaging_DirectionType_strings[3] = {};

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

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

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

const std::string& RoomDevicePaging_DirectionType_Name(RoomDevicePaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RoomDevicePaging_DirectionType_entries, RoomDevicePaging_DirectionType_entries_by_number,
          3, RoomDevicePaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RoomDevicePaging_DirectionType_entries, RoomDevicePaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RoomDevicePaging_DirectionType_strings[idx].get();
}

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

constexpr RoomDevicePaging_DirectionType RoomDevicePaging::DIRECTION_TYPE_UNKNOWN;
constexpr RoomDevicePaging_DirectionType RoomDevicePaging::DESC;
constexpr RoomDevicePaging_DirectionType RoomDevicePaging::ASC;
constexpr RoomDevicePaging_DirectionType RoomDevicePaging::DirectionType_MIN;
constexpr RoomDevicePaging_DirectionType RoomDevicePaging::DirectionType_MAX;
constexpr int RoomDevicePaging::DirectionType_ARRAYSIZE;

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

class RoomDevice::_Internal {
 public:
};

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

    , decltype(_impl_.orpon_) {}

    , decltype(_impl_.device_id_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.room_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.room_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_room_number().empty()) {
    _this->_impl_.room_number_.Set(from._internal_room_number(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.orpon_, &from._impl_.orpon_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.device_id_) -
    reinterpret_cast<char*>(&_impl_.orpon_)) + sizeof(_impl_.device_id_));
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.RoomDevice)
}

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

    , decltype(_impl_.orpon_) { ::int64_t{0} }

    , decltype(_impl_.device_id_) { 0 }

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

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

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

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

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

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

const char* RoomDevice::_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) {
      // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string room_number = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_room_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.device_id_ = ::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* RoomDevice::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.RoomDevice)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        1, this->_internal_orpon(), target);
  }

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

  // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_device_id(), 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.access_control.v1.RoomDevice)
  return target;
}

::size_t RoomDevice::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.RoomDevice)
  ::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 room_number = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_room_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_room_number());
  }

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
        this->_internal_orpon());
  }

  // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_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 RoomDevice::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const RoomDevice*>(
      &from));
}

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

  if (!from._internal_room_number().empty()) {
    _this->_internal_set_room_number(from._internal_room_number());
  }
  if (from._internal_orpon() != 0) {
    _this->_internal_set_orpon(from._internal_orpon());
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string RoomDevice::GetTypeName() const {
  return "keyapis.access_control.v1.RoomDevice";
}

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

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

const ::keyapis::access_control::v1::RoomDevice&
PutRoomDeviceAttachRequest::_Internal::room_device(const PutRoomDeviceAttachRequest* msg) {
  return *msg->_impl_.room_device_;
}
PutRoomDeviceAttachRequest::PutRoomDeviceAttachRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.PutRoomDeviceAttachRequest)
}
PutRoomDeviceAttachRequest::PutRoomDeviceAttachRequest(const PutRoomDeviceAttachRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutRoomDeviceAttachRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.room_device_){nullptr}};

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

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

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

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

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

void PutRoomDeviceAttachRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.PutRoomDeviceAttachRequest)
  ::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_.room_device_ != nullptr);
    _impl_.room_device_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PutRoomDeviceAttachRequest::_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.access_control.v1.RoomDevice room_device = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_room_device(), 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* PutRoomDeviceAttachRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.PutRoomDeviceAttachRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.RoomDevice room_device = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::room_device(this),
        _Internal::room_device(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.access_control.v1.PutRoomDeviceAttachRequest)
  return target;
}

::size_t PutRoomDeviceAttachRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.PutRoomDeviceAttachRequest)
  ::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.access_control.v1.RoomDevice room_device = 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_.room_device_);
  }

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

void PutRoomDeviceAttachRequest::MergeFrom(const PutRoomDeviceAttachRequest& from) {
  PutRoomDeviceAttachRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.access_control.v1.PutRoomDeviceAttachRequest)
  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_room_device()->::keyapis::access_control::v1::RoomDevice::MergeFrom(
        from._internal_room_device());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PutRoomDeviceAttachRequest::GetTypeName() const {
  return "keyapis.access_control.v1.PutRoomDeviceAttachRequest";
}

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

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

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

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

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

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

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

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

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

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

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

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

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

void PutRoomDeviceAttachResponse_Error::InternalSwap(PutRoomDeviceAttachResponse_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 PutRoomDeviceAttachResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.PutRoomDeviceAttachResponse.Error";
}

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

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

const ::keyapis::access_control::v1::PutRoomDeviceAttachResponse_Error&
PutRoomDeviceAttachResponse::_Internal::error(const PutRoomDeviceAttachResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PutRoomDeviceAttachResponse::set_allocated_error(::keyapis::access_control::v1::PutRoomDeviceAttachResponse_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.access_control.v1.PutRoomDeviceAttachResponse.error)
}
PutRoomDeviceAttachResponse::PutRoomDeviceAttachResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
}
PutRoomDeviceAttachResponse::PutRoomDeviceAttachResponse(const PutRoomDeviceAttachResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutRoomDeviceAttachResponse* 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::access_control::v1::PutRoomDeviceAttachResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
}

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

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

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

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

void PutRoomDeviceAttachResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
  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 PutRoomDeviceAttachResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
  ::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* PutRoomDeviceAttachResponse::_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.access_control.v1.PutRoomDeviceAttachResponse.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* PutRoomDeviceAttachResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.access_control.v1.PutRoomDeviceAttachResponse.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.access_control.v1.PutRoomDeviceAttachResponse)
  return target;
}

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

void PutRoomDeviceAttachResponse::MergeFrom(const PutRoomDeviceAttachResponse& from) {
  PutRoomDeviceAttachResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.access_control.v1.PutRoomDeviceAttachResponse)
  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::access_control::v1::PutRoomDeviceAttachResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

const ::keyapis::access_control::v1::RoomDevice&
PutRoomDeviceDetachRequest::_Internal::room_device(const PutRoomDeviceDetachRequest* msg) {
  return *msg->_impl_.room_device_;
}
PutRoomDeviceDetachRequest::PutRoomDeviceDetachRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.PutRoomDeviceDetachRequest)
}
PutRoomDeviceDetachRequest::PutRoomDeviceDetachRequest(const PutRoomDeviceDetachRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutRoomDeviceDetachRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.room_device_){nullptr}};

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

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

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

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

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

void PutRoomDeviceDetachRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.PutRoomDeviceDetachRequest)
  ::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_.room_device_ != nullptr);
    _impl_.room_device_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PutRoomDeviceDetachRequest::_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.access_control.v1.RoomDevice room_device = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_room_device(), 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* PutRoomDeviceDetachRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.PutRoomDeviceDetachRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.RoomDevice room_device = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::room_device(this),
        _Internal::room_device(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.access_control.v1.PutRoomDeviceDetachRequest)
  return target;
}

::size_t PutRoomDeviceDetachRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.PutRoomDeviceDetachRequest)
  ::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.access_control.v1.RoomDevice room_device = 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_.room_device_);
  }

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

void PutRoomDeviceDetachRequest::MergeFrom(const PutRoomDeviceDetachRequest& from) {
  PutRoomDeviceDetachRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.access_control.v1.PutRoomDeviceDetachRequest)
  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_room_device()->::keyapis::access_control::v1::RoomDevice::MergeFrom(
        from._internal_room_device());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PutRoomDeviceDetachRequest::GetTypeName() const {
  return "keyapis.access_control.v1.PutRoomDeviceDetachRequest";
}

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

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

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

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

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

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

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

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

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

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

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

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

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

void PutRoomDeviceDetachResponse_Error::InternalSwap(PutRoomDeviceDetachResponse_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 PutRoomDeviceDetachResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.PutRoomDeviceDetachResponse.Error";
}

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

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

const ::keyapis::access_control::v1::PutRoomDeviceDetachResponse_Error&
PutRoomDeviceDetachResponse::_Internal::error(const PutRoomDeviceDetachResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PutRoomDeviceDetachResponse::set_allocated_error(::keyapis::access_control::v1::PutRoomDeviceDetachResponse_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.access_control.v1.PutRoomDeviceDetachResponse.error)
}
PutRoomDeviceDetachResponse::PutRoomDeviceDetachResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
}
PutRoomDeviceDetachResponse::PutRoomDeviceDetachResponse(const PutRoomDeviceDetachResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutRoomDeviceDetachResponse* 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::access_control::v1::PutRoomDeviceDetachResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
}

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

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

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

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

void PutRoomDeviceDetachResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
  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 PutRoomDeviceDetachResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
  ::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* PutRoomDeviceDetachResponse::_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.access_control.v1.PutRoomDeviceDetachResponse.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* PutRoomDeviceDetachResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.access_control.v1.PutRoomDeviceDetachResponse.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.access_control.v1.PutRoomDeviceDetachResponse)
  return target;
}

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

void PutRoomDeviceDetachResponse::MergeFrom(const PutRoomDeviceDetachResponse& from) {
  PutRoomDeviceDetachResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.access_control.v1.PutRoomDeviceDetachResponse)
  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::access_control::v1::PutRoomDeviceDetachResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

class RoomDeviceFilter::_Internal {
 public:
};

RoomDeviceFilter::RoomDeviceFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.RoomDeviceFilter)
}
RoomDeviceFilter::RoomDeviceFilter(const RoomDeviceFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  RoomDeviceFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.flatgramm_ids_) { from._impl_.flatgramm_ids_ }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.orpons_) { from._impl_.orpons_ }
    ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.room_numbers_){from._impl_.room_numbers_}
    , decltype(_impl_.device_ids_) { from._impl_.device_ids_ }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.RoomDeviceFilter)
}

inline void RoomDeviceFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.flatgramm_ids_) { arena }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.orpons_) { arena }
    ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.room_numbers_){arena}
    , decltype(_impl_.device_ids_) { arena }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

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

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

inline void RoomDeviceFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.flatgramm_ids_.~RepeatedField();
  _impl_.orpons_.~RepeatedField();
  _internal_mutable_room_numbers()->~RepeatedPtrField();
  _impl_.device_ids_.~RepeatedField();
}

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

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

  _internal_mutable_flatgramm_ids()->Clear();
  _internal_mutable_orpons()->Clear();
  _internal_mutable_room_numbers()->Clear();
  _internal_mutable_device_ids()->Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* RoomDeviceFilter::_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) {
      // repeated int32 flatgramm_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_flatgramm_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          _internal_add_flatgramm_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int64 orpons = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_orpons(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          _internal_add_orpons(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string room_numbers = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_room_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<26>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 device_ids = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_device_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 32) {
          _internal_add_device_ids(::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* RoomDeviceFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.RoomDeviceFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 flatgramm_ids = 1;
  {
    int byte_size = _impl_._flatgramm_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(1, _internal_flatgramm_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int64 orpons = 2;
  {
    int byte_size = _impl_._orpons_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt64Packed(2, _internal_orpons(),
                                                 byte_size, target);
    }
  }

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

  // repeated int32 device_ids = 4;
  {
    int byte_size = _impl_._device_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(4, _internal_device_ids(),
                                                 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.access_control.v1.RoomDeviceFilter)
  return target;
}

::size_t RoomDeviceFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.RoomDeviceFilter)
  ::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 int32 flatgramm_ids = 1;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_flatgramm_ids())
    ;
    _impl_._flatgramm_ids_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 int64 orpons = 2;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
        this->_internal_orpons())
    ;
    _impl_._orpons_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 string room_numbers = 3;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_room_numbers().size());
  for (int i = 0, n = _internal_room_numbers().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_room_numbers().Get(i));
  }

  // repeated int32 device_ids = 4;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_device_ids())
    ;
    _impl_._device_ids_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;
  }

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

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

  _this->_impl_.flatgramm_ids_.MergeFrom(from._impl_.flatgramm_ids_);
  _this->_impl_.orpons_.MergeFrom(from._impl_.orpons_);
  _this->_internal_mutable_room_numbers()->MergeFrom(from._internal_room_numbers());
  _this->_impl_.device_ids_.MergeFrom(from._impl_.device_ids_);
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void RoomDeviceFilter::InternalSwap(RoomDeviceFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.flatgramm_ids_.InternalSwap(&other->_impl_.flatgramm_ids_);
  _impl_.orpons_.InternalSwap(&other->_impl_.orpons_);
  _internal_mutable_room_numbers()->InternalSwap(
      other->_internal_mutable_room_numbers());
  _impl_.device_ids_.InternalSwap(&other->_impl_.device_ids_);
}

std::string RoomDeviceFilter::GetTypeName() const {
  return "keyapis.access_control.v1.RoomDeviceFilter";
}

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

class RoomDevicePaging::_Internal {
 public:
};

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

inline void RoomDevicePaging::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_)*/{}
  };
}

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

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

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

void RoomDevicePaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.RoomDevicePaging)
  ::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* RoomDevicePaging::_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.access_control.v1.RoomDevicePaging.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::access_control::v1::RoomDevicePaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.RoomDevicePaging.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::access_control::v1::RoomDevicePaging_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* RoomDevicePaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.RoomDevicePaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.access_control.v1.RoomDevicePaging.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.access_control.v1.RoomDevicePaging.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.access_control.v1.RoomDevicePaging)
  return target;
}

::size_t RoomDevicePaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.RoomDevicePaging)
  ::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.access_control.v1.RoomDevicePaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_order_by_type());
  }

  // .keyapis.access_control.v1.RoomDevicePaging.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 RoomDevicePaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const RoomDevicePaging*>(
      &from));
}

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

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

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

std::string RoomDevicePaging::GetTypeName() const {
  return "keyapis.access_control.v1.RoomDevicePaging";
}

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

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

const ::keyapis::access_control::v1::RoomDeviceFilter&
GetRoomDeviceListRequest::_Internal::filter(const GetRoomDeviceListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::access_control::v1::RoomDevicePaging&
GetRoomDeviceListRequest::_Internal::paging(const GetRoomDeviceListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetRoomDeviceListRequest::set_allocated_paging(::keyapis::access_control::v1::RoomDevicePaging* 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.access_control.v1.GetRoomDeviceListRequest.paging)
}
GetRoomDeviceListRequest::GetRoomDeviceListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetRoomDeviceListRequest)
}
GetRoomDeviceListRequest::GetRoomDeviceListRequest(const GetRoomDeviceListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRoomDeviceListRequest* 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::access_control::v1::RoomDeviceFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::access_control::v1::RoomDevicePaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetRoomDeviceListRequest)
}

inline void GetRoomDeviceListRequest::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();
}

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

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

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

void GetRoomDeviceListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetRoomDeviceListRequest)
  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 GetRoomDeviceListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.GetRoomDeviceListRequest)
  ::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* GetRoomDeviceListRequest::_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.access_control.v1.RoomDeviceFilter 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.access_control.v1.RoomDevicePaging 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* GetRoomDeviceListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.GetRoomDeviceListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.RoomDeviceFilter 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.access_control.v1.RoomDevicePaging 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.access_control.v1.GetRoomDeviceListRequest)
  return target;
}

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

void GetRoomDeviceListRequest::MergeFrom(const GetRoomDeviceListRequest& from) {
  GetRoomDeviceListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.access_control.v1.GetRoomDeviceListRequest)
  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::access_control::v1::RoomDeviceFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::access_control::v1::RoomDevicePaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void GetRoomDeviceListResponse_Error::InternalSwap(GetRoomDeviceListResponse_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 GetRoomDeviceListResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.GetRoomDeviceListResponse.Error";
}

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

class GetRoomDeviceListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetRoomDeviceListResponse, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::RoomDevice& data(const GetRoomDeviceListResponse* msg);
  static const ::keyapis::access_control::v1::GetRoomDeviceListResponse_Error& error(const GetRoomDeviceListResponse* msg);
};

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

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

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

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

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

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

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

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

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

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

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

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

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

const ::keyapis::access_control::v1::RoomDeviceFilter&
GetRoomDeviceCountRequest::_Internal::filter(const GetRoomDeviceCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetRoomDeviceCountRequest::GetRoomDeviceCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetRoomDeviceCountRequest)
}
GetRoomDeviceCountRequest::GetRoomDeviceCountRequest(const GetRoomDeviceCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRoomDeviceCountRequest* 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::access_control::v1::RoomDeviceFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetRoomDeviceCountRequest)
}

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

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

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

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

void GetRoomDeviceCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.GetRoomDeviceCountRequest)
  ::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* GetRoomDeviceCountRequest::_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.access_control.v1.RoomDeviceFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
      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* GetRoomDeviceCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.GetRoomDeviceCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.RoomDeviceFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
  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.access_control.v1.GetRoomDeviceCountRequest)
  return target;
}

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

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

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

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

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

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

class GetRoomDeviceCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetRoomDeviceCountResponse, _impl_._oneof_case_);
};

GetRoomDeviceCountResponse::GetRoomDeviceCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetRoomDeviceCountResponse)
}
GetRoomDeviceCountResponse::GetRoomDeviceCountResponse(const GetRoomDeviceCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRoomDeviceCountResponse* 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 TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetRoomDeviceCountResponse)
}

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

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

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

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

void GetRoomDeviceCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetRoomDeviceCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetRoomDeviceCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.GetRoomDeviceCountResponse)
  ::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* GetRoomDeviceCountResponse::_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;
      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* GetRoomDeviceCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.GetRoomDeviceCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 data = 1;
  if (type_case() == kData) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_data(), 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.access_control.v1.GetRoomDeviceCountResponse)
  return target;
}

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace access_control
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::RoomDevice*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::RoomDevice >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::RoomDevice >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceAttachRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceAttachRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceAttachRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceAttachResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceAttachResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceAttachResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceAttachResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceAttachResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceAttachResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceDetachRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceDetachRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceDetachRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceDetachResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceDetachResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceDetachResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::PutRoomDeviceDetachResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::PutRoomDeviceDetachResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::PutRoomDeviceDetachResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::RoomDeviceFilter*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::RoomDeviceFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::RoomDeviceFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::RoomDevicePaging*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::RoomDevicePaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::RoomDevicePaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetRoomDeviceListRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetRoomDeviceListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetRoomDeviceListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetRoomDeviceListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetRoomDeviceListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetRoomDeviceListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetRoomDeviceListResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetRoomDeviceListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetRoomDeviceListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetRoomDeviceCountRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetRoomDeviceCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetRoomDeviceCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetRoomDeviceCountResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetRoomDeviceCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetRoomDeviceCountResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
