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

#include "keyapis/device/v1/keyapis_device_sip_phone_v1.pb.h"

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

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace device {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR SipPhone_SavingError_Conflict::SipPhone_SavingError_Conflict(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct SipPhone_SavingError_ConflictDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SipPhone_SavingError_ConflictDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SipPhone_SavingError_ConflictDefaultTypeInternal() {}
  union {
    SipPhone_SavingError_Conflict _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SipPhone_SavingError_ConflictDefaultTypeInternal _SipPhone_SavingError_Conflict_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SipPhone_SavingError::SipPhone_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct SipPhone_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SipPhone_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SipPhone_SavingErrorDefaultTypeInternal() {}
  union {
    SipPhone_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SipPhone_SavingErrorDefaultTypeInternal _SipPhone_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SipPhone::SipPhone(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.sip_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

  , /*decltype(_impl_.status_type_)*/ 0
} {}
struct SipPhoneDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SipPhoneDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SipPhoneDefaultTypeInternal() {}
  union {
    SipPhone _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SipPhoneDefaultTypeInternal _SipPhone_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SipPhoneFilter::SipPhoneFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.sip_numbers_)*/{}
  , /*decltype(_impl_.room_ids_)*/ {}
  ,/* _impl_._room_ids_cached_byte_size_ = */ { 0 }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SipPhoneFilterDefaultTypeInternal _SipPhoneFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SipPhonePaging::SipPhonePaging(
    ::_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 SipPhonePagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SipPhonePagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SipPhonePagingDefaultTypeInternal() {}
  union {
    SipPhonePaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SipPhonePagingDefaultTypeInternal _SipPhonePaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneRequest::GetSipPhoneRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneRequestDefaultTypeInternal _GetSipPhoneRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneResponse_Error::GetSipPhoneResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetSipPhoneResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneResponse_ErrorDefaultTypeInternal() {}
  union {
    GetSipPhoneResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneResponse_ErrorDefaultTypeInternal _GetSipPhoneResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneResponse::GetSipPhoneResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetSipPhoneResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneResponseDefaultTypeInternal() {}
  union {
    GetSipPhoneResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneListRequestDefaultTypeInternal _GetSipPhoneListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneListResponse_Error::GetSipPhoneListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.validation_error_)*/nullptr} {}
struct GetSipPhoneListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetSipPhoneListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneListResponse_ErrorDefaultTypeInternal _GetSipPhoneListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneListResponse::GetSipPhoneListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetSipPhoneListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneListResponseDefaultTypeInternal() {}
  union {
    GetSipPhoneListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneListResponseDefaultTypeInternal _GetSipPhoneListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneCountRequest::GetSipPhoneCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetSipPhoneCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneCountRequestDefaultTypeInternal() {}
  union {
    GetSipPhoneCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneCountRequestDefaultTypeInternal _GetSipPhoneCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneCountResponse_Error::GetSipPhoneCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetSipPhoneCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetSipPhoneCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSipPhoneCountResponse_ErrorDefaultTypeInternal _GetSipPhoneCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetSipPhoneCountResponse::GetSipPhoneCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetSipPhoneCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetSipPhoneCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetSipPhoneCountResponseDefaultTypeInternal() {}
  union {
    GetSipPhoneCountResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetListRequestDefaultTypeInternal _PostSipPhoneGetListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostSipPhoneGetListResponse_Error::PostSipPhoneGetListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostSipPhoneGetListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostSipPhoneGetListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostSipPhoneGetListResponse_ErrorDefaultTypeInternal() {}
  union {
    PostSipPhoneGetListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetListResponse_ErrorDefaultTypeInternal _PostSipPhoneGetListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostSipPhoneGetListResponse::PostSipPhoneGetListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.items_)*/{}
  , /*decltype(_impl_.error_)*/nullptr} {}
struct PostSipPhoneGetListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostSipPhoneGetListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostSipPhoneGetListResponseDefaultTypeInternal() {}
  union {
    PostSipPhoneGetListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetListResponseDefaultTypeInternal _PostSipPhoneGetListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostSipPhoneGetCountRequest::PostSipPhoneGetCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct PostSipPhoneGetCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostSipPhoneGetCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostSipPhoneGetCountRequestDefaultTypeInternal() {}
  union {
    PostSipPhoneGetCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetCountRequestDefaultTypeInternal _PostSipPhoneGetCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostSipPhoneGetCountResponse_Error::PostSipPhoneGetCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostSipPhoneGetCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostSipPhoneGetCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostSipPhoneGetCountResponse_ErrorDefaultTypeInternal() {}
  union {
    PostSipPhoneGetCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetCountResponse_ErrorDefaultTypeInternal _PostSipPhoneGetCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostSipPhoneGetCountResponse::PostSipPhoneGetCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostSipPhoneGetCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostSipPhoneGetCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostSipPhoneGetCountResponseDefaultTypeInternal() {}
  union {
    PostSipPhoneGetCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostSipPhoneGetCountResponseDefaultTypeInternal _PostSipPhoneGetCountResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace keyapis
namespace keyapis {
namespace device {
namespace v1 {
bool SipPhone_StatusType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    SipPhone_StatusType_strings[3] = {};

static const char SipPhone_StatusType_names[] = {
    "ACTIVE"
    "BLOCKED"
    "STATUS_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SipPhone_StatusType_entries[] =
    {
        {{&SipPhone_StatusType_names[0], 6}, 1},
        {{&SipPhone_StatusType_names[6], 7}, 2},
        {{&SipPhone_StatusType_names[13], 19}, 0},
};

static const int SipPhone_StatusType_entries_by_number[] = {
    2,  // 0 -> STATUS_TYPE_UNKNOWN
    0,  // 1 -> ACTIVE
    1,  // 2 -> BLOCKED
};

const std::string& SipPhone_StatusType_Name(SipPhone_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          SipPhone_StatusType_entries, SipPhone_StatusType_entries_by_number,
          3, SipPhone_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      SipPhone_StatusType_entries, SipPhone_StatusType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : SipPhone_StatusType_strings[idx].get();
}

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

constexpr SipPhone_StatusType SipPhone::STATUS_TYPE_UNKNOWN;
constexpr SipPhone_StatusType SipPhone::ACTIVE;
constexpr SipPhone_StatusType SipPhone::BLOCKED;
constexpr SipPhone_StatusType SipPhone::StatusType_MIN;
constexpr SipPhone_StatusType SipPhone::StatusType_MAX;
constexpr int SipPhone::StatusType_ARRAYSIZE;

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

static const char SipPhonePaging_OrderByType_names[] = {
    "CHANGED_AT"
    "CREATED_AT"
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "STATUS"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SipPhonePaging_OrderByType_entries[] =
    {
        {{&SipPhonePaging_OrderByType_names[0], 10}, 3},
        {{&SipPhonePaging_OrderByType_names[10], 10}, 4},
        {{&SipPhonePaging_OrderByType_names[20], 2}, 1},
        {{&SipPhonePaging_OrderByType_names[22], 21}, 0},
        {{&SipPhonePaging_OrderByType_names[43], 6}, 2},
};

static const int SipPhonePaging_OrderByType_entries_by_number[] = {
    3,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    2,  // 1 -> ID
    4,  // 2 -> STATUS
    0,  // 3 -> CHANGED_AT
    1,  // 4 -> CREATED_AT
};

const std::string& SipPhonePaging_OrderByType_Name(SipPhonePaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          SipPhonePaging_OrderByType_entries, SipPhonePaging_OrderByType_entries_by_number,
          5, SipPhonePaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      SipPhonePaging_OrderByType_entries, SipPhonePaging_OrderByType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : SipPhonePaging_OrderByType_strings[idx].get();
}

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

constexpr SipPhonePaging_OrderByType SipPhonePaging::ORDER_BY_TYPE_UNKNOWN;
constexpr SipPhonePaging_OrderByType SipPhonePaging::ID;
constexpr SipPhonePaging_OrderByType SipPhonePaging::STATUS;
constexpr SipPhonePaging_OrderByType SipPhonePaging::CHANGED_AT;
constexpr SipPhonePaging_OrderByType SipPhonePaging::CREATED_AT;
constexpr SipPhonePaging_OrderByType SipPhonePaging::OrderByType_MIN;
constexpr SipPhonePaging_OrderByType SipPhonePaging::OrderByType_MAX;
constexpr int SipPhonePaging::OrderByType_ARRAYSIZE;

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

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

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

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

const std::string& SipPhonePaging_DirectionType_Name(SipPhonePaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          SipPhonePaging_DirectionType_entries, SipPhonePaging_DirectionType_entries_by_number,
          3, SipPhonePaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      SipPhonePaging_DirectionType_entries, SipPhonePaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : SipPhonePaging_DirectionType_strings[idx].get();
}

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

constexpr SipPhonePaging_DirectionType SipPhonePaging::DIRECTION_TYPE_UNKNOWN;
constexpr SipPhonePaging_DirectionType SipPhonePaging::DESC;
constexpr SipPhonePaging_DirectionType SipPhonePaging::ASC;
constexpr SipPhonePaging_DirectionType SipPhonePaging::DirectionType_MIN;
constexpr SipPhonePaging_DirectionType SipPhonePaging::DirectionType_MAX;
constexpr int SipPhonePaging::DirectionType_ARRAYSIZE;

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

class SipPhone_SavingError_Conflict::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

::size_t SipPhone_SavingError_Conflict::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.SipPhone.SavingError.Conflict)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

std::string SipPhone_SavingError_Conflict::GetTypeName() const {
  return "keyapis.device.v1.SipPhone.SavingError.Conflict";
}

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

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

const ::keyapis::device::v1::SipPhone_SavingError_Conflict&
SipPhone_SavingError::_Internal::conflict(const SipPhone_SavingError* msg) {
  return *msg->_impl_.reason_.conflict_;
}
void SipPhone_SavingError::set_allocated_conflict(::keyapis::device::v1::SipPhone_SavingError_Conflict* conflict) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (conflict) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(conflict);
    if (message_arena != submessage_arena) {
      conflict = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, conflict, submessage_arena);
    }
    set_has_conflict();
    _impl_.reason_.conflict_ = conflict;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.SipPhone.SavingError.conflict)
}
SipPhone_SavingError::SipPhone_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.SipPhone.SavingError)
}
SipPhone_SavingError::SipPhone_SavingError(const SipPhone_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SipPhone_SavingError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::device::v1::SipPhone_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.SipPhone.SavingError)
}

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

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

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

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

void SipPhone_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.SipPhone.SavingError)
  switch (reason_case()) {
    case kConflict: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.conflict_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

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

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

  // .keyapis.device.v1.SipPhone.SavingError.Conflict conflict = 1;
  if (reason_case() == kConflict) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::conflict(this),
        _Internal::conflict(this).GetCachedSize(), target, stream);
  }

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

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

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

  switch (reason_case()) {
    // .keyapis.device.v1.SipPhone.SavingError.Conflict conflict = 1;
    case kConflict: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.conflict_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.reason_case()) {
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::device::v1::SipPhone_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class SipPhone::_Internal {
 public:
  using HasBits = decltype(std::declval<SipPhone>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(SipPhone, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const SipPhone* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const SipPhone* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
SipPhone::_Internal::created_at(const SipPhone* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
SipPhone::_Internal::changed_at(const SipPhone* msg) {
  return *msg->_impl_.changed_at_;
}
void SipPhone::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void SipPhone::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
SipPhone::SipPhone(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.SipPhone)
}
SipPhone::SipPhone(const SipPhone& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SipPhone* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.sip_number_) {}

    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.room_id_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.sip_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sip_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sip_number().empty()) {
    _this->_impl_.sip_number_.Set(from._internal_sip_number(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.status_type_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.SipPhone)
}

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

    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.room_id_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
  _impl_.sip_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sip_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void SipPhone::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.sip_number_.Destroy();
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
}

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

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

  _impl_.sip_number_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.status_type_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* SipPhone::_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) {
      // int32 id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 room_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.room_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string sip_number = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_sip_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.SipPhone.StatusType status_type = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::device::v1::SipPhone_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), 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* SipPhone::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.SipPhone)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 id = 1;
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

  // int32 room_id = 2;
  if (this->_internal_room_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_room_id(), target);
  }

  // string sip_number = 3;
  if (!this->_internal_sip_number().empty()) {
    const std::string& _s = this->_internal_sip_number();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.SipPhone.sip_number");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

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

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

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

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

::size_t SipPhone::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.SipPhone)
  ::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 sip_number = 3;
  if (!this->_internal_sip_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sip_number());
  }

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

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

  }
  // int32 id = 1;
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  // int32 room_id = 2;
  if (this->_internal_room_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_room_id());
  }

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

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

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

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

  if (!from._internal_sip_number().empty()) {
    _this->_internal_set_sip_number(from._internal_sip_number());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_room_id() != 0) {
    _this->_internal_set_room_id(from._internal_room_id());
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SipPhone::InternalSwap(SipPhone* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sip_number_, lhs_arena,
                                       &other->_impl_.sip_number_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SipPhone, _impl_.status_type_)
      + sizeof(SipPhone::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(SipPhone, _impl_.created_at_)>(
          reinterpret_cast<char*>(&_impl_.created_at_),
          reinterpret_cast<char*>(&other->_impl_.created_at_));
}

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

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

class SipPhoneFilter::_Internal {
 public:
};

SipPhoneFilter::SipPhoneFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.SipPhoneFilter)
}
SipPhoneFilter::SipPhoneFilter(const SipPhoneFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SipPhoneFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.sip_numbers_){from._impl_.sip_numbers_}
    , decltype(_impl_.room_ids_) { from._impl_.room_ids_ }
    ,/* _impl_._room_ids_cached_byte_size_ = */ { 0 }

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

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

inline void SipPhoneFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.sip_numbers_){arena}
    , decltype(_impl_.room_ids_) { arena }
    ,/* _impl_._room_ids_cached_byte_size_ = */ { 0 }

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

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

inline void SipPhoneFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_sip_numbers()->~RepeatedPtrField();
  _impl_.room_ids_.~RepeatedField();
}

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

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

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

const char* SipPhoneFilter::_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 string sip_numbers = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_sip_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<10>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 room_ids = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_room_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          _internal_add_room_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* SipPhoneFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.SipPhoneFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string sip_numbers = 1;
  for (int i = 0, n = this->_internal_sip_numbers_size(); i < n; ++i) {
    const auto& s = this->_internal_sip_numbers(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.SipPhoneFilter.sip_numbers");
    target = stream->WriteString(1, s, target);
  }

  // repeated int32 room_ids = 2;
  {
    int byte_size = _impl_._room_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(2, _internal_room_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.device.v1.SipPhoneFilter)
  return target;
}

::size_t SipPhoneFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.SipPhoneFilter)
  ::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 string sip_numbers = 1;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_sip_numbers().size());
  for (int i = 0, n = _internal_sip_numbers().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_sip_numbers().Get(i));
  }

  // repeated int32 room_ids = 2;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_room_ids())
    ;
    _impl_._room_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 SipPhoneFilter::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const SipPhoneFilter*>(
      &from));
}

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

  _this->_internal_mutable_sip_numbers()->MergeFrom(from._internal_sip_numbers());
  _this->_impl_.room_ids_.MergeFrom(from._impl_.room_ids_);
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SipPhoneFilter::InternalSwap(SipPhoneFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _internal_mutable_sip_numbers()->InternalSwap(
      other->_internal_mutable_sip_numbers());
  _impl_.room_ids_.InternalSwap(&other->_impl_.room_ids_);
}

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

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

class SipPhonePaging::_Internal {
 public:
};

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

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

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

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

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

void SipPhonePaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.SipPhonePaging)
  ::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* SipPhonePaging::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.SipPhonePaging.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::device::v1::SipPhonePaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.SipPhonePaging.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::device::v1::SipPhonePaging_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* SipPhonePaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.SipPhonePaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

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

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

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

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

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

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

class GetSipPhoneRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

  // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_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.device.v1.GetSipPhoneRequest)
  return target;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::ValidationError&
GetSipPhoneResponse_Error::_Internal::validation(const GetSipPhoneResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetSipPhoneResponse_Error::set_allocated_validation(::keyapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.GetSipPhoneResponse.Error.validation)
}
void GetSipPhoneResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
GetSipPhoneResponse_Error::GetSipPhoneResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetSipPhoneResponse.Error)
}
GetSipPhoneResponse_Error::GetSipPhoneResponse_Error(const GetSipPhoneResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetSipPhoneResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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

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

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

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

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

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

  switch (reason_case()) {
    // .keyapis.device.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void GetSipPhoneResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetSipPhoneResponse)
  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 GetSipPhoneResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSipPhoneResponse)
  ::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* GetSipPhoneResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.SipPhone data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.GetSipPhoneResponse.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* GetSipPhoneResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSipPhoneResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  switch (type_case()) {
    // .keyapis.device.v1.SipPhone data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.GetSipPhoneResponse.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 GetSipPhoneResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSipPhoneResponse*>(
      &from));
}

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

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

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

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

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

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

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

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

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

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

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

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

void GetSipPhoneListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetSipPhoneListRequest)
  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 GetSipPhoneListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSipPhoneListRequest)
  ::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* GetSipPhoneListRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.SipPhoneFilter 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.device.v1.SipPhonePaging 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* GetSipPhoneListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSipPhoneListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.SipPhoneFilter 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.device.v1.SipPhonePaging 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.device.v1.GetSipPhoneListRequest)
  return target;
}

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::ValidationError&
GetSipPhoneListResponse_Error::_Internal::validation_error(const GetSipPhoneListResponse_Error* msg) {
  return *msg->_impl_.validation_error_;
}
void GetSipPhoneListResponse_Error::clear_validation_error() {
  if (_impl_.validation_error_ != nullptr) _impl_.validation_error_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
GetSipPhoneListResponse_Error::GetSipPhoneListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetSipPhoneListResponse.Error)
}
GetSipPhoneListResponse_Error::GetSipPhoneListResponse_Error(const GetSipPhoneListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetSipPhoneListResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.validation_error_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.validation_error_ = new ::keyapis::device::v1::ValidationError(*from._impl_.validation_error_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetSipPhoneListResponse.Error)
}

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

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

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

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

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

const char* GetSipPhoneListResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.ValidationError validation_error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation_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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.ValidationError validation_error = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation_error(this),
        _Internal::validation_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.device.v1.GetSipPhoneListResponse.Error)
  return target;
}

::size_t GetSipPhoneListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSipPhoneListResponse.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;

  // .keyapis.device.v1.ValidationError validation_error = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.validation_error_);
  }

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

void GetSipPhoneListResponse_Error::MergeFrom(const GetSipPhoneListResponse_Error& from) {
  GetSipPhoneListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetSipPhoneListResponse.Error)
  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_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
        from._internal_validation_error());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

void GetSipPhoneListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetSipPhoneListResponse)
  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 GetSipPhoneListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSipPhoneListResponse)
  ::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* GetSipPhoneListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.SipPhone data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.GetSipPhoneListResponse.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* GetSipPhoneListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSipPhoneListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  switch (type_case()) {
    // .keyapis.device.v1.SipPhone data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.GetSipPhoneListResponse.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 GetSipPhoneListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSipPhoneListResponse*>(
      &from));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class GetSipPhoneCountResponse_Error::_Internal {
 public:
};

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

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

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

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

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

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

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

const char* GetSipPhoneCountResponse_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);
    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* GetSipPhoneCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSipPhoneCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t GetSipPhoneCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetSipPhoneCountResponse.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;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


void GetSipPhoneCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetSipPhoneCountResponse)
  ::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* GetSipPhoneCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.GetSipPhoneCountResponse.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* GetSipPhoneCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetSipPhoneCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    // .keyapis.device.v1.GetSipPhoneCountResponse.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 GetSipPhoneCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetSipPhoneCountResponse*>(
      &from));
}

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

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

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

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

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

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

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

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

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

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

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

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

void PostSipPhoneGetListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostSipPhoneGetListRequest)
  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 PostSipPhoneGetListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostSipPhoneGetListRequest)
  ::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* PostSipPhoneGetListRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.device.v1.SipPhoneFilter 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.device.v1.SipPhonePaging 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* PostSipPhoneGetListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostSipPhoneGetListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.SipPhoneFilter 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.device.v1.SipPhonePaging 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.device.v1.PostSipPhoneGetListRequest)
  return target;
}

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::ValidationError&
PostSipPhoneGetListResponse_Error::_Internal::validation(const PostSipPhoneGetListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostSipPhoneGetListResponse_Error::set_allocated_validation(::keyapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostSipPhoneGetListResponse.Error.validation)
}
void PostSipPhoneGetListResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PostSipPhoneGetListResponse_Error::PostSipPhoneGetListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostSipPhoneGetListResponse.Error)
}
PostSipPhoneGetListResponse_Error::PostSipPhoneGetListResponse_Error(const PostSipPhoneGetListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostSipPhoneGetListResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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

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

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

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

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

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

  switch (reason_case()) {
    // .keyapis.device.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::PostSipPhoneGetListResponse_Error&
PostSipPhoneGetListResponse::_Internal::error(const PostSipPhoneGetListResponse* msg) {
  return *msg->_impl_.error_;
}
PostSipPhoneGetListResponse::PostSipPhoneGetListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostSipPhoneGetListResponse)
}
PostSipPhoneGetListResponse::PostSipPhoneGetListResponse(const PostSipPhoneGetListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostSipPhoneGetListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.items_){from._impl_.items_}
    , decltype(_impl_.error_){nullptr}};

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

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

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

inline void PostSipPhoneGetListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_items()->~RepeatedPtrField();
  if (this != internal_default_instance()) delete _impl_.error_;
}

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

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

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

const char* PostSipPhoneGetListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .keyapis.device.v1.SipPhone items = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_items(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostSipPhoneGetListResponse.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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated .keyapis.device.v1.SipPhone items = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_items_size()); i < n; i++) {
    const auto& repfield = this->_internal_items(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.PostSipPhoneGetListResponse.Error error = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _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.device.v1.PostSipPhoneGetListResponse)
  return target;
}

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

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

  // repeated .keyapis.device.v1.SipPhone items = 1;
  total_size += 1UL * this->_internal_items_size();
  for (const auto& msg : this->_internal_items()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // .keyapis.device.v1.PostSipPhoneGetListResponse.Error error = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.error_);
  }

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

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

  _this->_internal_mutable_items()->MergeFrom(from._internal_items());
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_error()->::keyapis::device::v1::PostSipPhoneGetListResponse_Error::MergeFrom(
        from._internal_error());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class PostSipPhoneGetCountResponse_Error::_Internal {
 public:
};

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

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

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

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

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

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

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

const char* PostSipPhoneGetCountResponse_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);
    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* PostSipPhoneGetCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostSipPhoneGetCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t PostSipPhoneGetCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostSipPhoneGetCountResponse.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;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


void PostSipPhoneGetCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostSipPhoneGetCountResponse)
  ::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* PostSipPhoneGetCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostSipPhoneGetCountResponse.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* PostSipPhoneGetCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostSipPhoneGetCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    // .keyapis.device.v1.PostSipPhoneGetCountResponse.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 PostSipPhoneGetCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostSipPhoneGetCountResponse*>(
      &from));
}

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SipPhone_SavingError_Conflict*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SipPhone_SavingError_Conflict >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SipPhone_SavingError_Conflict >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SipPhone_SavingError*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SipPhone_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SipPhone_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SipPhone*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SipPhone >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SipPhone >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SipPhoneFilter*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SipPhoneFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SipPhoneFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SipPhonePaging*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SipPhonePaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SipPhonePaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneListRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneListResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneCountRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetSipPhoneCountResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetSipPhoneCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetSipPhoneCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetListRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetListResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetCountRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostSipPhoneGetCountResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostSipPhoneGetCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostSipPhoneGetCountResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
