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

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

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

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

  , /*decltype(_impl_.password_)*/nullptr} {}
struct Device_SputnikCredentialsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SputnikCredentialsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SputnikCredentialsDefaultTypeInternal() {}
  union {
    Device_SputnikCredentials _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SputnikCredentialsDefaultTypeInternal _Device_SputnikCredentials_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Location::Device_Location(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.latitude_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_LocationDefaultTypeInternal _Device_Location_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_CoordinateMatrixSwitch::Device_Settings_CoordinateMatrixSwitch(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_CoordinateMatrixSwitchDefaultTypeInternal _Device_Settings_CoordinateMatrixSwitch_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_ConciergeCall::Device_Settings_ConciergeCall(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.room_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_ConciergeCallDefaultTypeInternal _Device_Settings_ConciergeCall_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_Autocollect::Device_Settings_Autocollect(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_AutocollectDefaultTypeInternal _Device_Settings_Autocollect_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_FaceRecognition::Device_Settings_FaceRecognition(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_FaceRecognitionDefaultTypeInternal _Device_Settings_FaceRecognition_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_Sl3Mode::Device_Settings_Sl3Mode(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.encryption_profile_id_)*/nullptr
  , /*decltype(_impl_.is_enabled_)*/ false
} {}
struct Device_Settings_Sl3ModeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_Settings_Sl3ModeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_Settings_Sl3ModeDefaultTypeInternal() {}
  union {
    Device_Settings_Sl3Mode _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_Sl3ModeDefaultTypeInternal _Device_Settings_Sl3Mode_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings_EmergencyCall::Device_Settings_EmergencyCall(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.emergency_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_Settings_EmergencyCallDefaultTypeInternal _Device_Settings_EmergencyCall_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Settings::Device_Settings(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.coordinate_matrix_switch_)*/nullptr
  , /*decltype(_impl_.concierge_call_)*/nullptr
  , /*decltype(_impl_.autocollect_)*/nullptr
  , /*decltype(_impl_.face_recognition_)*/nullptr
  , /*decltype(_impl_.sl3_mode_)*/nullptr
  , /*decltype(_impl_.emergency_call_)*/nullptr} {}
struct Device_SettingsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SettingsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SettingsDefaultTypeInternal() {}
  union {
    Device_Settings _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SettingsDefaultTypeInternal _Device_Settings_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Dispatching::Device_Dispatching(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.public_identity_)*/nullptr
  , /*decltype(_impl_.is_enabled_)*/ false
} {}
struct Device_DispatchingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_DispatchingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_DispatchingDefaultTypeInternal() {}
  union {
    Device_Dispatching _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_DispatchingDefaultTypeInternal _Device_Dispatching_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SipTrunk::Device_SipTrunk(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.abc_number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.host_)*/nullptr
  , /*decltype(_impl_.port_)*/nullptr
  , /*decltype(_impl_.sip_type_)*/ 0
} {}
struct Device_SipTrunkDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SipTrunkDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SipTrunkDefaultTypeInternal() {}
  union {
    Device_SipTrunk _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SipTrunkDefaultTypeInternal _Device_SipTrunk_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Redirect::Device_Redirect(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_sip_)*/ false

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_RedirectDefaultTypeInternal _Device_Redirect_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_AutochangePasswordSettings::Device_AutochangePasswordSettings(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_enabled_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_AutochangePasswordSettingsDefaultTypeInternal _Device_AutochangePasswordSettings_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_Credentials::Device_Credentials(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.login_)*/nullptr
  , /*decltype(_impl_.password_)*/nullptr
  , /*decltype(_impl_.user_access_type_)*/ 0
} {}
struct Device_CredentialsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_CredentialsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_CredentialsDefaultTypeInternal() {}
  union {
    Device_Credentials _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_CredentialsDefaultTypeInternal _Device_Credentials_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_MacAddressInvalid::Device_SavingError_MacAddressInvalid(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_MacAddressInvalidDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_MacAddressInvalidDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_MacAddressInvalidDefaultTypeInternal() {}
  union {
    Device_SavingError_MacAddressInvalid _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_MacAddressInvalidDefaultTypeInternal _Device_SavingError_MacAddressInvalid_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_SerialNumberInvalid::Device_SavingError_SerialNumberInvalid(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_SerialNumberInvalidDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_SerialNumberInvalidDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_SerialNumberInvalidDefaultTypeInternal() {}
  union {
    Device_SavingError_SerialNumberInvalid _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_SerialNumberInvalidDefaultTypeInternal _Device_SavingError_SerialNumberInvalid_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_NotAllowedForType::Device_SavingError_NotAllowedForType(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_NotAllowedForTypeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_NotAllowedForTypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_NotAllowedForTypeDefaultTypeInternal() {}
  union {
    Device_SavingError_NotAllowedForType _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_NotAllowedForTypeDefaultTypeInternal _Device_SavingError_NotAllowedForType_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_NotAllowedForModel::Device_SavingError_NotAllowedForModel(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_NotAllowedForModelDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_NotAllowedForModelDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_NotAllowedForModelDefaultTypeInternal() {}
  union {
    Device_SavingError_NotAllowedForModel _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_NotAllowedForModelDefaultTypeInternal _Device_SavingError_NotAllowedForModel_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_SerialNumberForModelIsExist::Device_SavingError_SerialNumberForModelIsExist(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_SerialNumberForModelIsExistDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_SerialNumberForModelIsExistDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_SerialNumberForModelIsExistDefaultTypeInternal() {}
  union {
    Device_SavingError_SerialNumberForModelIsExist _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_SerialNumberForModelIsExistDefaultTypeInternal _Device_SavingError_SerialNumberForModelIsExist_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_MacAddressIsExist::Device_SavingError_MacAddressIsExist(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_MacAddressIsExistDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_MacAddressIsExistDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_MacAddressIsExistDefaultTypeInternal() {}
  union {
    Device_SavingError_MacAddressIsExist _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_MacAddressIsExistDefaultTypeInternal _Device_SavingError_MacAddressIsExist_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_CapabilityIsNotSupported::Device_SavingError_CapabilityIsNotSupported(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.model_capability_type_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_CapabilityIsNotSupportedDefaultTypeInternal _Device_SavingError_CapabilityIsNotSupported_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_AbcNumberIsExistOnAnotherDevice::Device_SavingError_AbcNumberIsExistOnAnotherDevice(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.device_id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_AbcNumberIsExistOnAnotherDeviceDefaultTypeInternal _Device_SavingError_AbcNumberIsExistOnAnotherDevice_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_PublicIdentityIsExist::Device_SavingError_PublicIdentityIsExist(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_PublicIdentityIsExistDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_PublicIdentityIsExistDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_PublicIdentityIsExistDefaultTypeInternal() {}
  union {
    Device_SavingError_PublicIdentityIsExist _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_PublicIdentityIsExistDefaultTypeInternal _Device_SavingError_PublicIdentityIsExist_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_ConciergeRoomNotFound::Device_SavingError_ConciergeRoomNotFound(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_ConciergeRoomNotFoundDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_ConciergeRoomNotFoundDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_ConciergeRoomNotFoundDefaultTypeInternal() {}
  union {
    Device_SavingError_ConciergeRoomNotFound _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_ConciergeRoomNotFoundDefaultTypeInternal _Device_SavingError_ConciergeRoomNotFound_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_LoginIsExist::Device_SavingError_LoginIsExist(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_LoginIsExistDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_LoginIsExistDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_LoginIsExistDefaultTypeInternal() {}
  union {
    Device_SavingError_LoginIsExist _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_LoginIsExistDefaultTypeInternal _Device_SavingError_LoginIsExist_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_CredentialsAreRequired::Device_SavingError_CredentialsAreRequired(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_CredentialsAreRequiredDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_CredentialsAreRequiredDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_CredentialsAreRequiredDefaultTypeInternal() {}
  union {
    Device_SavingError_CredentialsAreRequired _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_CredentialsAreRequiredDefaultTypeInternal _Device_SavingError_CredentialsAreRequired_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError_FieldIsNotSupported::Device_SavingError_FieldIsNotSupported(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Device_SavingError_FieldIsNotSupportedDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingError_FieldIsNotSupportedDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingError_FieldIsNotSupportedDefaultTypeInternal() {}
  union {
    Device_SavingError_FieldIsNotSupported _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingError_FieldIsNotSupportedDefaultTypeInternal _Device_SavingError_FieldIsNotSupported_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device_SavingError::Device_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct Device_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Device_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Device_SavingErrorDefaultTypeInternal() {}
  union {
    Device_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Device_SavingErrorDefaultTypeInternal _Device_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device::Device(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.tags_)*/{}
  , /*decltype(_impl_.credentials_)*/{}
  , /*decltype(_impl_.mac_address_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

  , /*decltype(_impl_.preset_configured_at_)*/nullptr
  , /*decltype(_impl_.ip_address_)*/nullptr
  , /*decltype(_impl_.port_)*/nullptr
  , /*decltype(_impl_.sputnik_credentials_)*/nullptr
  , /*decltype(_impl_.location_)*/nullptr
  , /*decltype(_impl_.camera_id_)*/nullptr
  , /*decltype(_impl_.settings_)*/nullptr
  , /*decltype(_impl_.dispatching_)*/nullptr
  , /*decltype(_impl_.sip_trunk_)*/nullptr
  , /*decltype(_impl_.redirect_)*/nullptr
  , /*decltype(_impl_.autochange_password_settings_)*/nullptr
  , /*decltype(_impl_.sip_account_)*/nullptr
  , /*decltype(_impl_.sync_status_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

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

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceDefaultTypeInternal _Device_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceLite::DeviceLite(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.title_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.location_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceLiteDefaultTypeInternal _DeviceLite_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatus_Payload_Autocollect::DeviceConfigurationStatus_Payload_Autocollect(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.enabled_at_)*/nullptr
  , /*decltype(_impl_.to_be_disabled_at_)*/nullptr} {}
struct DeviceConfigurationStatus_Payload_AutocollectDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceConfigurationStatus_Payload_AutocollectDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceConfigurationStatus_Payload_AutocollectDefaultTypeInternal() {}
  union {
    DeviceConfigurationStatus_Payload_Autocollect _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceConfigurationStatus_Payload_AutocollectDefaultTypeInternal _DeviceConfigurationStatus_Payload_Autocollect_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatus_Payload::DeviceConfigurationStatus_Payload(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.attribute_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeviceConfigurationStatus_PayloadDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceConfigurationStatus_PayloadDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceConfigurationStatus_PayloadDefaultTypeInternal() {}
  union {
    DeviceConfigurationStatus_Payload _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceConfigurationStatus_PayloadDefaultTypeInternal _DeviceConfigurationStatus_Payload_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatus::DeviceConfigurationStatus(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.configured_at_)*/nullptr
  , /*decltype(_impl_.error_message_)*/nullptr
  , /*decltype(_impl_.payload_)*/nullptr
  , /*decltype(_impl_.next_retry_at_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

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

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

  , /*decltype(_impl_.retry_count_)*/ 0
} {}
struct DeviceConfigurationStatusDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceConfigurationStatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceConfigurationStatusDefaultTypeInternal() {}
  union {
    DeviceConfigurationStatus _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceConfigurationStatusDefaultTypeInternal _DeviceConfigurationStatus_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatusGrouped::DeviceConfigurationStatusGrouped(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.statuses_)*/{}
  , /*decltype(_impl_.device_id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceConfigurationStatusGroupedDefaultTypeInternal _DeviceConfigurationStatusGrouped_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR CameraStatus::CameraStatus(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.error_message_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.id_)*/nullptr
  , /*decltype(_impl_.status_type_)*/ 0
} {}
struct CameraStatusDefaultTypeInternal {
  PROTOBUF_CONSTEXPR CameraStatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~CameraStatusDefaultTypeInternal() {}
  union {
    CameraStatus _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CameraStatusDefaultTypeInternal _CameraStatus_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SyncStatus::SyncStatus(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.error_message_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.successful_at_)*/nullptr
  , /*decltype(_impl_.sync_at_)*/nullptr
  , /*decltype(_impl_.status_type_)*/ 0

  , /*decltype(_impl_.retry_count_)*/ 0
} {}
struct SyncStatusDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SyncStatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SyncStatusDefaultTypeInternal() {}
  union {
    SyncStatus _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SyncStatusDefaultTypeInternal _SyncStatus_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceRequest::GetDeviceRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceRequestDefaultTypeInternal _GetDeviceRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceResponse::GetDeviceResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceResponseDefaultTypeInternal() {}
  union {
    GetDeviceResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceResponseDefaultTypeInternal _GetDeviceResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceLiteRequest::GetDeviceLiteRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceLiteRequestDefaultTypeInternal _GetDeviceLiteRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceLiteResponse::GetDeviceLiteResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceLiteResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceLiteResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceLiteResponseDefaultTypeInternal() {}
  union {
    GetDeviceLiteResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceLiteResponseDefaultTypeInternal _GetDeviceLiteResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceRequest::PostDeviceRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PostDeviceRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceRequestDefaultTypeInternal() {}
  union {
    PostDeviceRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceRequestDefaultTypeInternal _PostDeviceRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceResponse_Error::PostDeviceResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceResponse_ErrorDefaultTypeInternal() {}
  union {
    PostDeviceResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceResponse_ErrorDefaultTypeInternal _PostDeviceResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceResponse::PostDeviceResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceResponseDefaultTypeInternal() {}
  union {
    PostDeviceResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceListRequestDefaultTypeInternal _GetDeviceListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceListResponse_Error::GetDeviceListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetDeviceListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceListResponse_ErrorDefaultTypeInternal _GetDeviceListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceListResponse::GetDeviceListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceListResponseDefaultTypeInternal() {}
  union {
    GetDeviceListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceListResponseDefaultTypeInternal _GetDeviceListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceCountRequest::GetDeviceCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetDeviceCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceCountRequestDefaultTypeInternal() {}
  union {
    GetDeviceCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceCountRequestDefaultTypeInternal _GetDeviceCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceCountResponse_Error::GetDeviceCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetDeviceCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceCountResponse_ErrorDefaultTypeInternal _GetDeviceCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceCountResponse::GetDeviceCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceCountResponseDefaultTypeInternal() {}
  union {
    GetDeviceCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceCountResponseDefaultTypeInternal _GetDeviceCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutDeviceRequest::PutDeviceRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutDeviceRequestDefaultTypeInternal _PutDeviceRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PutDeviceResponse::PutDeviceResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PutDeviceResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PutDeviceResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PutDeviceResponseDefaultTypeInternal() {}
  union {
    PutDeviceResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutDeviceResponseDefaultTypeInternal _PutDeviceResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceInstallPresetRequest::PostDeviceInstallPresetRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceInstallPresetRequestDefaultTypeInternal _PostDeviceInstallPresetRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessingDefaultTypeInternal() {}
  union {
    PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessingDefaultTypeInternal _PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponse_Error::PostDeviceInstallPresetResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceInstallPresetResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceInstallPresetResponse_ErrorDefaultTypeInternal() {}
  union {
    PostDeviceInstallPresetResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceInstallPresetResponse_ErrorDefaultTypeInternal _PostDeviceInstallPresetResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponse::PostDeviceInstallPresetResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceInstallPresetResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceInstallPresetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceInstallPresetResponseDefaultTypeInternal() {}
  union {
    PostDeviceInstallPresetResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceInstallPresetResponseDefaultTypeInternal _PostDeviceInstallPresetResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceRequest::PostDeviceReplaceRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceRequestDefaultTypeInternal _PostDeviceReplaceRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_HostExists::PostDeviceReplaceResponse_Error_HostExists(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceReplaceResponse_Error_HostExistsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_HostExistsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_Error_HostExistsDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error_HostExists _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_Error_HostExistsDefaultTypeInternal _PostDeviceReplaceResponse_Error_HostExists_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_MacAddressExists::PostDeviceReplaceResponse_Error_MacAddressExists(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceReplaceResponse_Error_MacAddressExistsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_MacAddressExistsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_Error_MacAddressExistsDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error_MacAddressExists _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_Error_MacAddressExistsDefaultTypeInternal _PostDeviceReplaceResponse_Error_MacAddressExists_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_SerialNumberExists::PostDeviceReplaceResponse_Error_SerialNumberExists(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceReplaceResponse_Error_SerialNumberExistsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_SerialNumberExistsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_Error_SerialNumberExistsDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error_SerialNumberExists _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_Error_SerialNumberExistsDefaultTypeInternal _PostDeviceReplaceResponse_Error_SerialNumberExists_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_LoginExists::PostDeviceReplaceResponse_Error_LoginExists(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceReplaceResponse_Error_LoginExistsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_LoginExistsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_Error_LoginExistsDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error_LoginExists _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_Error_LoginExistsDefaultTypeInternal _PostDeviceReplaceResponse_Error_LoginExists_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_LoginIsRequired::PostDeviceReplaceResponse_Error_LoginIsRequired(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostDeviceReplaceResponse_Error_LoginIsRequiredDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error_LoginIsRequiredDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_Error_LoginIsRequiredDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error_LoginIsRequired _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_Error_LoginIsRequiredDefaultTypeInternal _PostDeviceReplaceResponse_Error_LoginIsRequired_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_Error::PostDeviceReplaceResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceReplaceResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponse_ErrorDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponse_ErrorDefaultTypeInternal _PostDeviceReplaceResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReplaceResponse::PostDeviceReplaceResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceReplaceResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReplaceResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReplaceResponseDefaultTypeInternal() {}
  union {
    PostDeviceReplaceResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReplaceResponseDefaultTypeInternal _PostDeviceReplaceResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReconfigureRequest::PostDeviceReconfigureRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReconfigureRequestDefaultTypeInternal _PostDeviceReconfigureRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReconfigureResponse_Error::PostDeviceReconfigureResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceReconfigureResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReconfigureResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReconfigureResponse_ErrorDefaultTypeInternal() {}
  union {
    PostDeviceReconfigureResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReconfigureResponse_ErrorDefaultTypeInternal _PostDeviceReconfigureResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceReconfigureResponse::PostDeviceReconfigureResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceReconfigureResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceReconfigureResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceReconfigureResponseDefaultTypeInternal() {}
  union {
    PostDeviceReconfigureResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceReconfigureResponseDefaultTypeInternal _PostDeviceReconfigureResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesRequest::GetDeviceConfigurationStatusesRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusesRequestDefaultTypeInternal _GetDeviceConfigurationStatusesRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponse_Statuses::GetDeviceConfigurationStatusesResponse_Statuses(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.device_configuration_statuses_)*/{}
  , /*decltype(_impl_.camera_status_)*/nullptr
  , /*decltype(_impl_.sync_status_)*/nullptr
  , /*decltype(_impl_.device_status_type_)*/ 0
} {}
struct GetDeviceConfigurationStatusesResponse_StatusesDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponse_StatusesDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusesResponse_StatusesDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusesResponse_Statuses _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusesResponse_StatusesDefaultTypeInternal _GetDeviceConfigurationStatusesResponse_Statuses_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponse_Error::GetDeviceConfigurationStatusesResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceConfigurationStatusesResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusesResponse_ErrorDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusesResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusesResponse_ErrorDefaultTypeInternal _GetDeviceConfigurationStatusesResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponse::GetDeviceConfigurationStatusesResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceConfigurationStatusesResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusesResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusesResponseDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusesResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusesResponseDefaultTypeInternal _GetDeviceConfigurationStatusesResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusRequest::PostDeviceConfigurationStatusRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PostDeviceConfigurationStatusRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceConfigurationStatusRequestDefaultTypeInternal() {}
  union {
    PostDeviceConfigurationStatusRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceConfigurationStatusRequestDefaultTypeInternal _PostDeviceConfigurationStatusRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusResponse_Error::PostDeviceConfigurationStatusResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceConfigurationStatusResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceConfigurationStatusResponse_ErrorDefaultTypeInternal() {}
  union {
    PostDeviceConfigurationStatusResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostDeviceConfigurationStatusResponse_ErrorDefaultTypeInternal _PostDeviceConfigurationStatusResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusResponse::PostDeviceConfigurationStatusResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostDeviceConfigurationStatusResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostDeviceConfigurationStatusResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostDeviceConfigurationStatusResponseDefaultTypeInternal() {}
  union {
    PostDeviceConfigurationStatusResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusGroupedListRequestDefaultTypeInternal _GetDeviceConfigurationStatusGroupedListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedListResponse_Error::GetDeviceConfigurationStatusGroupedListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceConfigurationStatusGroupedListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusGroupedListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusGroupedListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusGroupedListResponse_ErrorDefaultTypeInternal _GetDeviceConfigurationStatusGroupedListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedListResponse::GetDeviceConfigurationStatusGroupedListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceConfigurationStatusGroupedListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusGroupedListResponseDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusGroupedListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusGroupedListResponseDefaultTypeInternal _GetDeviceConfigurationStatusGroupedListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedCountRequest::GetDeviceConfigurationStatusGroupedCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetDeviceConfigurationStatusGroupedCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusGroupedCountRequestDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusGroupedCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusGroupedCountRequestDefaultTypeInternal _GetDeviceConfigurationStatusGroupedCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedCountResponse::GetDeviceConfigurationStatusGroupedCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDeviceConfigurationStatusGroupedCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDeviceConfigurationStatusGroupedCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDeviceConfigurationStatusGroupedCountResponseDefaultTypeInternal() {}
  union {
    GetDeviceConfigurationStatusGroupedCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDeviceConfigurationStatusGroupedCountResponseDefaultTypeInternal _GetDeviceConfigurationStatusGroupedCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteDeviceRequest::DeleteDeviceRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteDeviceRequestDefaultTypeInternal _DeleteDeviceRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteDeviceResponse::DeleteDeviceResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct DeleteDeviceResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteDeviceResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteDeviceResponseDefaultTypeInternal() {}
  union {
    DeleteDeviceResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteDeviceResponseDefaultTypeInternal _DeleteDeviceResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR ReinstallError_SipLoginIsMissing::ReinstallError_SipLoginIsMissing(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct ReinstallError_SipLoginIsMissingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReinstallError_SipLoginIsMissingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReinstallError_SipLoginIsMissingDefaultTypeInternal() {}
  union {
    ReinstallError_SipLoginIsMissing _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReinstallError_SipLoginIsMissingDefaultTypeInternal _ReinstallError_SipLoginIsMissing_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR ReinstallError::ReinstallError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct ReinstallErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReinstallErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReinstallErrorDefaultTypeInternal() {}
  union {
    ReinstallError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReinstallErrorDefaultTypeInternal _ReinstallError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceFilter::DeviceFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.owner_company_ids_)*/ {}
  ,/* _impl_._owner_company_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.flatgramm_ids_)*/ {}
  ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.serial_numbers_)*/{}
  , /*decltype(_impl_.device_status_types_)*/ {}
  , /*decltype(_impl_._device_status_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.device_types_)*/ {}
  , /*decltype(_impl_._device_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.device_model_types_)*/ {}
  , /*decltype(_impl_._device_model_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.abc_number_)*/{}
  , /*decltype(_impl_.camera_ids_)*/{}
  , /*decltype(_impl_.sync_status_status_types_)*/ {}
  , /*decltype(_impl_._sync_status_status_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.text_)*/nullptr
  , /*decltype(_impl_.is_concierge_enabled_)*/nullptr
  , /*decltype(_impl_.is_dispatching_enabled_)*/nullptr
  , /*decltype(_impl_.dispatching_public_number_)*/nullptr
  , /*decltype(_impl_.hardware_version_)*/nullptr
  , /*decltype(_impl_.software_version_)*/nullptr
  , /*decltype(_impl_.is_autochange_password_enabled_)*/nullptr
  , /*decltype(_impl_.sync_retry_count_less_then_)*/nullptr
  , /*decltype(_impl_.begin_sync_successful_at_)*/nullptr
  , /*decltype(_impl_.end_sync_successful_at_)*/nullptr
  , /*decltype(_impl_.begin_sync_at_)*/nullptr
  , /*decltype(_impl_.end_sync_at_)*/nullptr} {}
struct DeviceFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceFilterDefaultTypeInternal() {}
  union {
    DeviceFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceFilterDefaultTypeInternal _DeviceFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DevicePaging::DevicePaging(
    ::_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 DevicePagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DevicePagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DevicePagingDefaultTypeInternal() {}
  union {
    DevicePaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DevicePagingDefaultTypeInternal _DevicePaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatusGroupedFilter::DeviceConfigurationStatusGroupedFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.device_ids_)*/ {}
  ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.configuration_types_)*/ {}
  , /*decltype(_impl_._configuration_types_cached_byte_size_)*/ { 0 }

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

  , /*decltype(_impl_.is_ready_for_retry_)*/nullptr
  , /*decltype(_impl_.retry_count_less_then_)*/nullptr} {}
struct DeviceConfigurationStatusGroupedFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceConfigurationStatusGroupedFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceConfigurationStatusGroupedFilterDefaultTypeInternal() {}
  union {
    DeviceConfigurationStatusGroupedFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceConfigurationStatusGroupedFilterDefaultTypeInternal _DeviceConfigurationStatusGroupedFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceConfigurationStatusGroupedPaging::DeviceConfigurationStatusGroupedPaging(
    ::_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 DeviceConfigurationStatusGroupedPagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceConfigurationStatusGroupedPagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceConfigurationStatusGroupedPagingDefaultTypeInternal() {}
  union {
    DeviceConfigurationStatusGroupedPaging _instance;
  };
};

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValidationErrorDefaultTypeInternal _ValidationError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Sip::Preset_Sip(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SipDefaultTypeInternal _Preset_Sip_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Ntp::Preset_Ntp(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_NtpDefaultTypeInternal _Preset_Ntp_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Syslog::Preset_Syslog(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SyslogDefaultTypeInternal _Preset_Syslog_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Room::Preset_Room(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.phone_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_RoomDefaultTypeInternal _Preset_Room_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.username_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_VideoConfig_RtspUserDefaultTypeInternal _Preset_VideoConfig_RtspUser_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_VideoConfig::Preset_VideoConfig(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.rtsp_user_)*/nullptr
  , /*decltype(_impl_.quality_type_)*/ 0
} {}
struct Preset_VideoConfigDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_VideoConfigDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_VideoConfigDefaultTypeInternal() {}
  union {
    Preset_VideoConfig _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_VideoConfigDefaultTypeInternal _Preset_VideoConfig_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Dtmf::Preset_Dtmf(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.code_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_DtmfDefaultTypeInternal _Preset_Dtmf_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_FaceRecognition::Preset_FaceRecognition(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.group_ids_)*/ {}
  ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_FaceRecognitionDefaultTypeInternal _Preset_FaceRecognition_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError_Conflict::Preset_SavingError_Conflict(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Preset_SavingError_ConflictDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingError_ConflictDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingError_ConflictDefaultTypeInternal() {}
  union {
    Preset_SavingError_Conflict _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingError_ConflictDefaultTypeInternal _Preset_SavingError_Conflict_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError_NotAllowedForDefault::Preset_SavingError_NotAllowedForDefault(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal() {}
  union {
    Preset_SavingError_NotAllowedForDefault _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal _Preset_SavingError_NotAllowedForDefault_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError::Preset_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct Preset_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingErrorDefaultTypeInternal() {}
  union {
    Preset_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingErrorDefaultTypeInternal _Preset_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset::Preset(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.mrf_ids_)*/ {}
  ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.rf_ids_)*/ {}
  ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.rooms_)*/{}
  , /*decltype(_impl_.dtmf_)*/{}
  , /*decltype(_impl_.title_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.description_)*/nullptr
  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.sip_)*/nullptr
  , /*decltype(_impl_.ntp_)*/nullptr
  , /*decltype(_impl_.syslog_)*/nullptr
  , /*decltype(_impl_.video_config_)*/nullptr
  , /*decltype(_impl_.face_recognition_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

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

static const char Device_SipTrunk_SipType_names[] = {
    "NGN"
    "SIP_TYPE_UNKNOWN"
    "VIMS"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Device_SipTrunk_SipType_entries[] =
    {
        {{&Device_SipTrunk_SipType_names[0], 3}, 2},
        {{&Device_SipTrunk_SipType_names[3], 16}, 0},
        {{&Device_SipTrunk_SipType_names[19], 4}, 1},
};

static const int Device_SipTrunk_SipType_entries_by_number[] = {
    1,  // 0 -> SIP_TYPE_UNKNOWN
    2,  // 1 -> VIMS
    0,  // 2 -> NGN
};

const std::string& Device_SipTrunk_SipType_Name(Device_SipTrunk_SipType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_SipTrunk_SipType_entries, Device_SipTrunk_SipType_entries_by_number,
          3, Device_SipTrunk_SipType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_SipTrunk_SipType_entries, Device_SipTrunk_SipType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_SipTrunk_SipType_strings[idx].get();
}

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

constexpr Device_SipTrunk_SipType Device_SipTrunk::SIP_TYPE_UNKNOWN;
constexpr Device_SipTrunk_SipType Device_SipTrunk::VIMS;
constexpr Device_SipTrunk_SipType Device_SipTrunk::NGN;
constexpr Device_SipTrunk_SipType Device_SipTrunk::SipType_MIN;
constexpr Device_SipTrunk_SipType Device_SipTrunk::SipType_MAX;
constexpr int Device_SipTrunk::SipType_ARRAYSIZE;

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

static const char Device_Credentials_UserAccessType_names[] = {
    "API"
    "RTSP"
    "SU"
    "USER_ACCESS_TYPE_UNKNOWN"
    "WEB"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Device_Credentials_UserAccessType_entries[] =
    {
        {{&Device_Credentials_UserAccessType_names[0], 3}, 1},
        {{&Device_Credentials_UserAccessType_names[3], 4}, 3},
        {{&Device_Credentials_UserAccessType_names[7], 2}, 4},
        {{&Device_Credentials_UserAccessType_names[9], 24}, 0},
        {{&Device_Credentials_UserAccessType_names[33], 3}, 2},
};

static const int Device_Credentials_UserAccessType_entries_by_number[] = {
    3,  // 0 -> USER_ACCESS_TYPE_UNKNOWN
    0,  // 1 -> API
    4,  // 2 -> WEB
    1,  // 3 -> RTSP
    2,  // 4 -> SU
};

const std::string& Device_Credentials_UserAccessType_Name(Device_Credentials_UserAccessType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_Credentials_UserAccessType_entries, Device_Credentials_UserAccessType_entries_by_number,
          5, Device_Credentials_UserAccessType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_Credentials_UserAccessType_entries, Device_Credentials_UserAccessType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_Credentials_UserAccessType_strings[idx].get();
}

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

constexpr Device_Credentials_UserAccessType Device_Credentials::USER_ACCESS_TYPE_UNKNOWN;
constexpr Device_Credentials_UserAccessType Device_Credentials::API;
constexpr Device_Credentials_UserAccessType Device_Credentials::WEB;
constexpr Device_Credentials_UserAccessType Device_Credentials::RTSP;
constexpr Device_Credentials_UserAccessType Device_Credentials::SU;
constexpr Device_Credentials_UserAccessType Device_Credentials::UserAccessType_MIN;
constexpr Device_Credentials_UserAccessType Device_Credentials::UserAccessType_MAX;
constexpr int Device_Credentials::UserAccessType_ARRAYSIZE;

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

static const char Device_PresetStatusType_names[] = {
    "ERROR"
    "PRESET_STATUS_TYPE_UNKNOWN"
    "PROCESSING"
    "SUCCESS"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Device_PresetStatusType_entries[] =
    {
        {{&Device_PresetStatusType_names[0], 5}, 3},
        {{&Device_PresetStatusType_names[5], 26}, 0},
        {{&Device_PresetStatusType_names[31], 10}, 1},
        {{&Device_PresetStatusType_names[41], 7}, 2},
};

static const int Device_PresetStatusType_entries_by_number[] = {
    1,  // 0 -> PRESET_STATUS_TYPE_UNKNOWN
    2,  // 1 -> PROCESSING
    3,  // 2 -> SUCCESS
    0,  // 3 -> ERROR
};

const std::string& Device_PresetStatusType_Name(Device_PresetStatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_PresetStatusType_entries, Device_PresetStatusType_entries_by_number,
          4, Device_PresetStatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_PresetStatusType_entries, Device_PresetStatusType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_PresetStatusType_strings[idx].get();
}

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

constexpr Device_PresetStatusType Device::PRESET_STATUS_TYPE_UNKNOWN;
constexpr Device_PresetStatusType Device::PROCESSING;
constexpr Device_PresetStatusType Device::SUCCESS;
constexpr Device_PresetStatusType Device::ERROR;
constexpr Device_PresetStatusType Device::PresetStatusType_MIN;
constexpr Device_PresetStatusType Device::PresetStatusType_MAX;
constexpr int Device::PresetStatusType_ARRAYSIZE;

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

static const char Device_Type_names[] = {
    "ACCESS_CONTROL_PANEL"
    "BARRIER"
    "GATE"
    "INTERCOM"
    "OUTDOOR_CAMERA"
    "TYPE_UNKNOWN"
    "VIDEOCAMERA"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Device_Type_entries[] =
    {
        {{&Device_Type_names[0], 20}, 5},
        {{&Device_Type_names[20], 7}, 3},
        {{&Device_Type_names[27], 4}, 4},
        {{&Device_Type_names[31], 8}, 1},
        {{&Device_Type_names[39], 14}, 6},
        {{&Device_Type_names[53], 12}, 0},
        {{&Device_Type_names[65], 11}, 2},
};

static const int Device_Type_entries_by_number[] = {
    5,  // 0 -> TYPE_UNKNOWN
    3,  // 1 -> INTERCOM
    6,  // 2 -> VIDEOCAMERA
    1,  // 3 -> BARRIER
    2,  // 4 -> GATE
    0,  // 5 -> ACCESS_CONTROL_PANEL
    4,  // 6 -> OUTDOOR_CAMERA
};

const std::string& Device_Type_Name(Device_Type value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_Type_entries, Device_Type_entries_by_number,
          7, Device_Type_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_Type_entries, Device_Type_entries_by_number, 7,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_Type_strings[idx].get();
}

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

constexpr Device_Type Device::TYPE_UNKNOWN;
constexpr Device_Type Device::INTERCOM;
constexpr Device_Type Device::VIDEOCAMERA;
constexpr Device_Type Device::BARRIER;
constexpr Device_Type Device::GATE;
constexpr Device_Type Device::ACCESS_CONTROL_PANEL;
constexpr Device_Type Device::OUTDOOR_CAMERA;
constexpr Device_Type Device::Type_MIN;
constexpr Device_Type Device::Type_MAX;
constexpr int Device::Type_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Device_ModelType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
    case 24:
    case 25:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Device_ModelType_strings[26] = {};

static const char Device_ModelType_names[] = {
    "AKUVOX_R29C"
    "AKUVOX_X915S"
    "BAS_IP_AA_12FB"
    "BEWARD"
    "BEWARD_DS85006MP"
    "BEWARD_DS86006AP"
    "BEWARD_DS86017CP"
    "BEWARD_FR"
    "BEWARD_LOW_COST"
    "BEWARD_MIFARE"
    "DAHUA_VTO2101E_P"
    "ELTEX_IPA_ER_010"
    "HIKVISION_DS_KV8155_IM"
    "MAXETLINE"
    "MODEL_TYPE_UNKNOWN"
    "NATEKS"
    "QTECH"
    "QTECH_FR"
    "RODOS8"
    "RODOS8_2"
    "RUBETEK_RV_3434"
    "SAFE_LOGIC"
    "SOKOL_PLUS"
    "SPUTNIK_IO"
    "TNB"
    "TNB_DO2"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Device_ModelType_entries[] =
    {
        {{&Device_ModelType_names[0], 11}, 13},
        {{&Device_ModelType_names[11], 12}, 22},
        {{&Device_ModelType_names[23], 14}, 21},
        {{&Device_ModelType_names[37], 6}, 2},
        {{&Device_ModelType_names[43], 16}, 9},
        {{&Device_ModelType_names[59], 16}, 15},
        {{&Device_ModelType_names[75], 16}, 8},
        {{&Device_ModelType_names[91], 9}, 17},
        {{&Device_ModelType_names[100], 15}, 25},
        {{&Device_ModelType_names[115], 13}, 20},
        {{&Device_ModelType_names[128], 16}, 10},
        {{&Device_ModelType_names[144], 16}, 19},
        {{&Device_ModelType_names[160], 22}, 11},
        {{&Device_ModelType_names[182], 9}, 6},
        {{&Device_ModelType_names[191], 18}, 0},
        {{&Device_ModelType_names[209], 6}, 4},
        {{&Device_ModelType_names[215], 5}, 3},
        {{&Device_ModelType_names[220], 8}, 18},
        {{&Device_ModelType_names[228], 6}, 1},
        {{&Device_ModelType_names[234], 8}, 12},
        {{&Device_ModelType_names[242], 15}, 23},
        {{&Device_ModelType_names[257], 10}, 14},
        {{&Device_ModelType_names[267], 10}, 24},
        {{&Device_ModelType_names[277], 10}, 16},
        {{&Device_ModelType_names[287], 3}, 5},
        {{&Device_ModelType_names[290], 7}, 7},
};

static const int Device_ModelType_entries_by_number[] = {
    14,  // 0 -> MODEL_TYPE_UNKNOWN
    18,  // 1 -> RODOS8
    3,  // 2 -> BEWARD
    16,  // 3 -> QTECH
    15,  // 4 -> NATEKS
    24,  // 5 -> TNB
    13,  // 6 -> MAXETLINE
    25,  // 7 -> TNB_DO2
    6,  // 8 -> BEWARD_DS86017CP
    4,  // 9 -> BEWARD_DS85006MP
    10,  // 10 -> DAHUA_VTO2101E_P
    12,  // 11 -> HIKVISION_DS_KV8155_IM
    19,  // 12 -> RODOS8_2
    0,  // 13 -> AKUVOX_R29C
    21,  // 14 -> SAFE_LOGIC
    5,  // 15 -> BEWARD_DS86006AP
    23,  // 16 -> SPUTNIK_IO
    7,  // 17 -> BEWARD_FR
    17,  // 18 -> QTECH_FR
    11,  // 19 -> ELTEX_IPA_ER_010
    9,  // 20 -> BEWARD_MIFARE
    2,  // 21 -> BAS_IP_AA_12FB
    1,  // 22 -> AKUVOX_X915S
    20,  // 23 -> RUBETEK_RV_3434
    22,  // 24 -> SOKOL_PLUS
    8,  // 25 -> BEWARD_LOW_COST
};

const std::string& Device_ModelType_Name(Device_ModelType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_ModelType_entries, Device_ModelType_entries_by_number,
          26, Device_ModelType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_ModelType_entries, Device_ModelType_entries_by_number, 26,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_ModelType_strings[idx].get();
}

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

constexpr Device_ModelType Device::MODEL_TYPE_UNKNOWN;
constexpr Device_ModelType Device::RODOS8;
constexpr Device_ModelType Device::BEWARD;
constexpr Device_ModelType Device::QTECH;
constexpr Device_ModelType Device::NATEKS;
constexpr Device_ModelType Device::TNB;
constexpr Device_ModelType Device::MAXETLINE;
constexpr Device_ModelType Device::TNB_DO2;
constexpr Device_ModelType Device::BEWARD_DS86017CP;
constexpr Device_ModelType Device::BEWARD_DS85006MP;
constexpr Device_ModelType Device::DAHUA_VTO2101E_P;
constexpr Device_ModelType Device::HIKVISION_DS_KV8155_IM;
constexpr Device_ModelType Device::RODOS8_2;
constexpr Device_ModelType Device::AKUVOX_R29C;
constexpr Device_ModelType Device::SAFE_LOGIC;
constexpr Device_ModelType Device::BEWARD_DS86006AP;
constexpr Device_ModelType Device::SPUTNIK_IO;
constexpr Device_ModelType Device::BEWARD_FR;
constexpr Device_ModelType Device::QTECH_FR;
constexpr Device_ModelType Device::ELTEX_IPA_ER_010;
constexpr Device_ModelType Device::BEWARD_MIFARE;
constexpr Device_ModelType Device::BAS_IP_AA_12FB;
constexpr Device_ModelType Device::AKUVOX_X915S;
constexpr Device_ModelType Device::RUBETEK_RV_3434;
constexpr Device_ModelType Device::SOKOL_PLUS;
constexpr Device_ModelType Device::BEWARD_LOW_COST;
constexpr Device_ModelType Device::ModelType_MIN;
constexpr Device_ModelType Device::ModelType_MAX;
constexpr int Device::ModelType_ARRAYSIZE;

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

static const char Device_StatusType_names[] = {
    "OFFLINE"
    "ONLINE"
    "STATUS_TYPE_UNKNOWN"
};

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

static const int Device_StatusType_entries_by_number[] = {
    2,  // 0 -> STATUS_TYPE_UNKNOWN
    0,  // 1 -> OFFLINE
    1,  // 2 -> ONLINE
};

const std::string& Device_StatusType_Name(Device_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Device_StatusType_entries, Device_StatusType_entries_by_number,
          3, Device_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Device_StatusType_entries, Device_StatusType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Device_StatusType_strings[idx].get();
}

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

constexpr Device_StatusType Device::STATUS_TYPE_UNKNOWN;
constexpr Device_StatusType Device::OFFLINE;
constexpr Device_StatusType Device::ONLINE;
constexpr Device_StatusType Device::StatusType_MIN;
constexpr Device_StatusType Device::StatusType_MAX;
constexpr int Device::StatusType_ARRAYSIZE;

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

static const char DeviceConfigurationStatus_ConfigurationType_names[] = {
    "AUTOCOLLECT"
    "CODES"
    "CONCIERGE"
    "CONFIGURATION_TYPE_UNKNOWN"
    "EMERGENCY_CALL"
    "FACE_RECOGNITION"
    "GATE"
    "PRESET"
    "RFIDS"
    "SIP_ACCOUNT"
    "SIP_ROOMS"
    "SL3"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceConfigurationStatus_ConfigurationType_entries[] =
    {
        {{&DeviceConfigurationStatus_ConfigurationType_names[0], 11}, 9},
        {{&DeviceConfigurationStatus_ConfigurationType_names[11], 5}, 6},
        {{&DeviceConfigurationStatus_ConfigurationType_names[16], 9}, 8},
        {{&DeviceConfigurationStatus_ConfigurationType_names[25], 26}, 0},
        {{&DeviceConfigurationStatus_ConfigurationType_names[51], 14}, 11},
        {{&DeviceConfigurationStatus_ConfigurationType_names[65], 16}, 7},
        {{&DeviceConfigurationStatus_ConfigurationType_names[81], 4}, 4},
        {{&DeviceConfigurationStatus_ConfigurationType_names[85], 6}, 1},
        {{&DeviceConfigurationStatus_ConfigurationType_names[91], 5}, 5},
        {{&DeviceConfigurationStatus_ConfigurationType_names[96], 11}, 2},
        {{&DeviceConfigurationStatus_ConfigurationType_names[107], 9}, 3},
        {{&DeviceConfigurationStatus_ConfigurationType_names[116], 3}, 10},
};

static const int DeviceConfigurationStatus_ConfigurationType_entries_by_number[] = {
    3,  // 0 -> CONFIGURATION_TYPE_UNKNOWN
    7,  // 1 -> PRESET
    9,  // 2 -> SIP_ACCOUNT
    10,  // 3 -> SIP_ROOMS
    6,  // 4 -> GATE
    8,  // 5 -> RFIDS
    1,  // 6 -> CODES
    5,  // 7 -> FACE_RECOGNITION
    2,  // 8 -> CONCIERGE
    0,  // 9 -> AUTOCOLLECT
    11,  // 10 -> SL3
    4,  // 11 -> EMERGENCY_CALL
};

const std::string& DeviceConfigurationStatus_ConfigurationType_Name(DeviceConfigurationStatus_ConfigurationType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceConfigurationStatus_ConfigurationType_entries, DeviceConfigurationStatus_ConfigurationType_entries_by_number,
          12, DeviceConfigurationStatus_ConfigurationType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceConfigurationStatus_ConfigurationType_entries, DeviceConfigurationStatus_ConfigurationType_entries_by_number, 12,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceConfigurationStatus_ConfigurationType_strings[idx].get();
}

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

constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::CONFIGURATION_TYPE_UNKNOWN;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::PRESET;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::SIP_ACCOUNT;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::SIP_ROOMS;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::GATE;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::RFIDS;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::CODES;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::FACE_RECOGNITION;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::CONCIERGE;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::AUTOCOLLECT;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::SL3;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::EMERGENCY_CALL;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::ConfigurationType_MIN;
constexpr DeviceConfigurationStatus_ConfigurationType DeviceConfigurationStatus::ConfigurationType_MAX;
constexpr int DeviceConfigurationStatus::ConfigurationType_ARRAYSIZE;

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

static const char DeviceConfigurationStatus_StatusType_names[] = {
    "ERROR"
    "PENDING"
    "PROCESSING"
    "STATUS_TYPE_UNKNOWN"
    "SUCCESS"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceConfigurationStatus_StatusType_entries[] =
    {
        {{&DeviceConfigurationStatus_StatusType_names[0], 5}, 2},
        {{&DeviceConfigurationStatus_StatusType_names[5], 7}, 3},
        {{&DeviceConfigurationStatus_StatusType_names[12], 10}, 4},
        {{&DeviceConfigurationStatus_StatusType_names[22], 19}, 0},
        {{&DeviceConfigurationStatus_StatusType_names[41], 7}, 1},
};

static const int DeviceConfigurationStatus_StatusType_entries_by_number[] = {
    3,  // 0 -> STATUS_TYPE_UNKNOWN
    4,  // 1 -> SUCCESS
    0,  // 2 -> ERROR
    1,  // 3 -> PENDING
    2,  // 4 -> PROCESSING
};

const std::string& DeviceConfigurationStatus_StatusType_Name(DeviceConfigurationStatus_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceConfigurationStatus_StatusType_entries, DeviceConfigurationStatus_StatusType_entries_by_number,
          5, DeviceConfigurationStatus_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceConfigurationStatus_StatusType_entries, DeviceConfigurationStatus_StatusType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceConfigurationStatus_StatusType_strings[idx].get();
}

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

constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::STATUS_TYPE_UNKNOWN;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::SUCCESS;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::ERROR;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::PENDING;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::PROCESSING;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::StatusType_MIN;
constexpr DeviceConfigurationStatus_StatusType DeviceConfigurationStatus::StatusType_MAX;
constexpr int DeviceConfigurationStatus::StatusType_ARRAYSIZE;

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

static const char CameraStatus_StatusType_names[] = {
    "ACTIVE"
    "PROCESSING"
    "PROCESSING_ERROR"
    "STATUS_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry CameraStatus_StatusType_entries[] =
    {
        {{&CameraStatus_StatusType_names[0], 6}, 3},
        {{&CameraStatus_StatusType_names[6], 10}, 1},
        {{&CameraStatus_StatusType_names[16], 16}, 2},
        {{&CameraStatus_StatusType_names[32], 19}, 0},
};

static const int CameraStatus_StatusType_entries_by_number[] = {
    3,  // 0 -> STATUS_TYPE_UNKNOWN
    1,  // 1 -> PROCESSING
    2,  // 2 -> PROCESSING_ERROR
    0,  // 3 -> ACTIVE
};

const std::string& CameraStatus_StatusType_Name(CameraStatus_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          CameraStatus_StatusType_entries, CameraStatus_StatusType_entries_by_number,
          4, CameraStatus_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      CameraStatus_StatusType_entries, CameraStatus_StatusType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : CameraStatus_StatusType_strings[idx].get();
}

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

constexpr CameraStatus_StatusType CameraStatus::STATUS_TYPE_UNKNOWN;
constexpr CameraStatus_StatusType CameraStatus::PROCESSING;
constexpr CameraStatus_StatusType CameraStatus::PROCESSING_ERROR;
constexpr CameraStatus_StatusType CameraStatus::ACTIVE;
constexpr CameraStatus_StatusType CameraStatus::StatusType_MIN;
constexpr CameraStatus_StatusType CameraStatus::StatusType_MAX;
constexpr int CameraStatus::StatusType_ARRAYSIZE;

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

static const char SyncStatus_StatusType_names[] = {
    "DISABLED"
    "ERROR"
    "NEW"
    "PENDING"
    "STATUS_TYPE_UNKNOWN"
    "SUCCESS"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SyncStatus_StatusType_entries[] =
    {
        {{&SyncStatus_StatusType_names[0], 8}, 5},
        {{&SyncStatus_StatusType_names[8], 5}, 3},
        {{&SyncStatus_StatusType_names[13], 3}, 1},
        {{&SyncStatus_StatusType_names[16], 7}, 2},
        {{&SyncStatus_StatusType_names[23], 19}, 0},
        {{&SyncStatus_StatusType_names[42], 7}, 4},
};

static const int SyncStatus_StatusType_entries_by_number[] = {
    4,  // 0 -> STATUS_TYPE_UNKNOWN
    2,  // 1 -> NEW
    3,  // 2 -> PENDING
    1,  // 3 -> ERROR
    5,  // 4 -> SUCCESS
    0,  // 5 -> DISABLED
};

const std::string& SyncStatus_StatusType_Name(SyncStatus_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          SyncStatus_StatusType_entries, SyncStatus_StatusType_entries_by_number,
          6, SyncStatus_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      SyncStatus_StatusType_entries, SyncStatus_StatusType_entries_by_number, 6,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : SyncStatus_StatusType_strings[idx].get();
}

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

constexpr SyncStatus_StatusType SyncStatus::STATUS_TYPE_UNKNOWN;
constexpr SyncStatus_StatusType SyncStatus::NEW;
constexpr SyncStatus_StatusType SyncStatus::PENDING;
constexpr SyncStatus_StatusType SyncStatus::ERROR;
constexpr SyncStatus_StatusType SyncStatus::SUCCESS;
constexpr SyncStatus_StatusType SyncStatus::DISABLED;
constexpr SyncStatus_StatusType SyncStatus::StatusType_MIN;
constexpr SyncStatus_StatusType SyncStatus::StatusType_MAX;
constexpr int SyncStatus::StatusType_ARRAYSIZE;

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

static const char DevicePaging_OrderByType_names[] = {
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "SYNC_AT"
    "TITLE"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DevicePaging_OrderByType_entries[] =
    {
        {{&DevicePaging_OrderByType_names[0], 2}, 1},
        {{&DevicePaging_OrderByType_names[2], 21}, 0},
        {{&DevicePaging_OrderByType_names[23], 7}, 3},
        {{&DevicePaging_OrderByType_names[30], 5}, 2},
};

static const int DevicePaging_OrderByType_entries_by_number[] = {
    1,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    0,  // 1 -> ID
    3,  // 2 -> TITLE
    2,  // 3 -> SYNC_AT
};

const std::string& DevicePaging_OrderByType_Name(DevicePaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DevicePaging_OrderByType_entries, DevicePaging_OrderByType_entries_by_number,
          4, DevicePaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DevicePaging_OrderByType_entries, DevicePaging_OrderByType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DevicePaging_OrderByType_strings[idx].get();
}

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

constexpr DevicePaging_OrderByType DevicePaging::ORDER_BY_TYPE_UNKNOWN;
constexpr DevicePaging_OrderByType DevicePaging::ID;
constexpr DevicePaging_OrderByType DevicePaging::TITLE;
constexpr DevicePaging_OrderByType DevicePaging::SYNC_AT;
constexpr DevicePaging_OrderByType DevicePaging::OrderByType_MIN;
constexpr DevicePaging_OrderByType DevicePaging::OrderByType_MAX;
constexpr int DevicePaging::OrderByType_ARRAYSIZE;

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

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

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

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

const std::string& DevicePaging_DirectionType_Name(DevicePaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DevicePaging_DirectionType_entries, DevicePaging_DirectionType_entries_by_number,
          3, DevicePaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DevicePaging_DirectionType_entries, DevicePaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DevicePaging_DirectionType_strings[idx].get();
}

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

constexpr DevicePaging_DirectionType DevicePaging::DIRECTION_TYPE_UNKNOWN;
constexpr DevicePaging_DirectionType DevicePaging::DESC;
constexpr DevicePaging_DirectionType DevicePaging::ASC;
constexpr DevicePaging_DirectionType DevicePaging::DirectionType_MIN;
constexpr DevicePaging_DirectionType DevicePaging::DirectionType_MAX;
constexpr int DevicePaging::DirectionType_ARRAYSIZE;

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

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

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceConfigurationStatusGroupedPaging_OrderByType_entries[] =
    {
        {{&DeviceConfigurationStatusGroupedPaging_OrderByType_names[0], 9}, 1},
        {{&DeviceConfigurationStatusGroupedPaging_OrderByType_names[9], 21}, 0},
};

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

const std::string& DeviceConfigurationStatusGroupedPaging_OrderByType_Name(DeviceConfigurationStatusGroupedPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceConfigurationStatusGroupedPaging_OrderByType_entries, DeviceConfigurationStatusGroupedPaging_OrderByType_entries_by_number,
          2, DeviceConfigurationStatusGroupedPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceConfigurationStatusGroupedPaging_OrderByType_entries, DeviceConfigurationStatusGroupedPaging_OrderByType_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceConfigurationStatusGroupedPaging_OrderByType_strings[idx].get();
}

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

constexpr DeviceConfigurationStatusGroupedPaging_OrderByType DeviceConfigurationStatusGroupedPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr DeviceConfigurationStatusGroupedPaging_OrderByType DeviceConfigurationStatusGroupedPaging::DEVICE_ID;
constexpr DeviceConfigurationStatusGroupedPaging_OrderByType DeviceConfigurationStatusGroupedPaging::OrderByType_MIN;
constexpr DeviceConfigurationStatusGroupedPaging_OrderByType DeviceConfigurationStatusGroupedPaging::OrderByType_MAX;
constexpr int DeviceConfigurationStatusGroupedPaging::OrderByType_ARRAYSIZE;

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

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

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

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

const std::string& DeviceConfigurationStatusGroupedPaging_DirectionType_Name(DeviceConfigurationStatusGroupedPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceConfigurationStatusGroupedPaging_DirectionType_entries, DeviceConfigurationStatusGroupedPaging_DirectionType_entries_by_number,
          3, DeviceConfigurationStatusGroupedPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceConfigurationStatusGroupedPaging_DirectionType_entries, DeviceConfigurationStatusGroupedPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceConfigurationStatusGroupedPaging_DirectionType_strings[idx].get();
}

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

constexpr DeviceConfigurationStatusGroupedPaging_DirectionType DeviceConfigurationStatusGroupedPaging::DIRECTION_TYPE_UNKNOWN;
constexpr DeviceConfigurationStatusGroupedPaging_DirectionType DeviceConfigurationStatusGroupedPaging::DESC;
constexpr DeviceConfigurationStatusGroupedPaging_DirectionType DeviceConfigurationStatusGroupedPaging::ASC;
constexpr DeviceConfigurationStatusGroupedPaging_DirectionType DeviceConfigurationStatusGroupedPaging::DirectionType_MIN;
constexpr DeviceConfigurationStatusGroupedPaging_DirectionType DeviceConfigurationStatusGroupedPaging::DirectionType_MAX;
constexpr int DeviceConfigurationStatusGroupedPaging::DirectionType_ARRAYSIZE;

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

static const char Preset_Syslog_ProtocolType_names[] = {
    "PROTOCOL_TYPE_UNKNOWN"
    "TCP"
    "UDP"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_Syslog_ProtocolType_entries[] =
    {
        {{&Preset_Syslog_ProtocolType_names[0], 21}, 0},
        {{&Preset_Syslog_ProtocolType_names[21], 3}, 2},
        {{&Preset_Syslog_ProtocolType_names[24], 3}, 1},
};

static const int Preset_Syslog_ProtocolType_entries_by_number[] = {
    0,  // 0 -> PROTOCOL_TYPE_UNKNOWN
    2,  // 1 -> UDP
    1,  // 2 -> TCP
};

const std::string& Preset_Syslog_ProtocolType_Name(Preset_Syslog_ProtocolType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_Syslog_ProtocolType_entries, Preset_Syslog_ProtocolType_entries_by_number,
          3, Preset_Syslog_ProtocolType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_Syslog_ProtocolType_entries, Preset_Syslog_ProtocolType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_Syslog_ProtocolType_strings[idx].get();
}

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

constexpr Preset_Syslog_ProtocolType Preset_Syslog::PROTOCOL_TYPE_UNKNOWN;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::UDP;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::TCP;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::ProtocolType_MIN;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::ProtocolType_MAX;
constexpr int Preset_Syslog::ProtocolType_ARRAYSIZE;

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

static const char Preset_VideoConfig_QualityType_names[] = {
    "HIGH"
    "MEDIUM"
    "QUALITY_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_VideoConfig_QualityType_entries[] =
    {
        {{&Preset_VideoConfig_QualityType_names[0], 4}, 1},
        {{&Preset_VideoConfig_QualityType_names[4], 6}, 2},
        {{&Preset_VideoConfig_QualityType_names[10], 20}, 0},
};

static const int Preset_VideoConfig_QualityType_entries_by_number[] = {
    2,  // 0 -> QUALITY_TYPE_UNKNOWN
    0,  // 1 -> HIGH
    1,  // 2 -> MEDIUM
};

const std::string& Preset_VideoConfig_QualityType_Name(Preset_VideoConfig_QualityType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_VideoConfig_QualityType_entries, Preset_VideoConfig_QualityType_entries_by_number,
          3, Preset_VideoConfig_QualityType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_VideoConfig_QualityType_entries, Preset_VideoConfig_QualityType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_VideoConfig_QualityType_strings[idx].get();
}

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

constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QUALITY_TYPE_UNKNOWN;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::HIGH;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::MEDIUM;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QualityType_MIN;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QualityType_MAX;
constexpr int Preset_VideoConfig::QualityType_ARRAYSIZE;

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

static const char Preset_FaceRecognition_ConfigurationType_names[] = {
    "CONFIGURATION_TYPE_UNKNOWN"
    "DEFAULT"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_FaceRecognition_ConfigurationType_entries[] =
    {
        {{&Preset_FaceRecognition_ConfigurationType_names[0], 26}, 0},
        {{&Preset_FaceRecognition_ConfigurationType_names[26], 7}, 1},
};

static const int Preset_FaceRecognition_ConfigurationType_entries_by_number[] = {
    0,  // 0 -> CONFIGURATION_TYPE_UNKNOWN
    1,  // 1 -> DEFAULT
};

const std::string& Preset_FaceRecognition_ConfigurationType_Name(Preset_FaceRecognition_ConfigurationType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_FaceRecognition_ConfigurationType_entries, Preset_FaceRecognition_ConfigurationType_entries_by_number,
          2, Preset_FaceRecognition_ConfigurationType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_FaceRecognition_ConfigurationType_entries, Preset_FaceRecognition_ConfigurationType_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_FaceRecognition_ConfigurationType_strings[idx].get();
}

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

constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::CONFIGURATION_TYPE_UNKNOWN;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::DEFAULT;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::ConfigurationType_MIN;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::ConfigurationType_MAX;
constexpr int Preset_FaceRecognition::ConfigurationType_ARRAYSIZE;

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

static const char Preset_StatusType_names[] = {
    "ACTIVE"
    "ARCHIVE"
    "STATUS_TYPE_UNKNOWN"
};

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

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

const std::string& Preset_StatusType_Name(Preset_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_StatusType_entries, Preset_StatusType_entries_by_number,
          3, Preset_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_StatusType_entries, Preset_StatusType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_StatusType_strings[idx].get();
}

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

constexpr Preset_StatusType Preset::STATUS_TYPE_UNKNOWN;
constexpr Preset_StatusType Preset::ACTIVE;
constexpr Preset_StatusType Preset::ARCHIVE;
constexpr Preset_StatusType Preset::StatusType_MIN;
constexpr Preset_StatusType Preset::StatusType_MAX;
constexpr int Preset::StatusType_ARRAYSIZE;

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

class Device_SputnikCredentials::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_SputnikCredentials>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_SputnikCredentials, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& password(const Device_SputnikCredentials* msg);
  static void set_has_password(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_SputnikCredentials::_Internal::password(const Device_SputnikCredentials* msg) {
  return *msg->_impl_.password_;
}
void Device_SputnikCredentials::clear_password() {
  if (_impl_.password_ != nullptr) _impl_.password_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
Device_SputnikCredentials::Device_SputnikCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.SputnikCredentials)
}
Device_SputnikCredentials::Device_SputnikCredentials(const Device_SputnikCredentials& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_SputnikCredentials* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.login_) {}

    , decltype(_impl_.password_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.login_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.login_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_login().empty()) {
    _this->_impl_.login_.Set(from._internal_login(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.password_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.password_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.SputnikCredentials)
}

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

    , decltype(_impl_.password_){nullptr}
  };
  _impl_.login_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.login_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Device_SputnikCredentials::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.login_.Destroy();
  if (this != internal_default_instance()) delete _impl_.password_;
}

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

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

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

const char* Device_SputnikCredentials::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string login = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_login();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue password = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_password(), 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* Device_SputnikCredentials::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.SputnikCredentials)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue password = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::password(this),
        _Internal::password(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.Device.SputnikCredentials)
  return target;
}

::size_t Device_SputnikCredentials::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.SputnikCredentials)
  ::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 login = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_login().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_login());
  }

  // .google.protobuf.StringValue password = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.password_);
  }

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

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

  if (!from._internal_login().empty()) {
    _this->_internal_set_login(from._internal_login());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_password()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_password());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_SputnikCredentials::InternalSwap(Device_SputnikCredentials* 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_.login_, lhs_arena,
                                       &other->_impl_.login_, rhs_arena);
  swap(_impl_.password_, other->_impl_.password_);
}

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

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

class Device_Location::_Internal {
 public:
};

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

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

    , decltype(_impl_.longitude_) { 0 }

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

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

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

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

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

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

const char* Device_Location::_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) {
      // float latitude = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
          _impl_.latitude_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else {
          goto handle_unusual;
        }
        continue;
      // float longitude = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
          _impl_.longitude_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } 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* Device_Location::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.Location)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // float latitude = 1 [(.google.api.field_behavior) = REQUIRED];
  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_latitude = this->_internal_latitude();
  ::uint32_t raw_latitude;
  memcpy(&raw_latitude, &tmp_latitude, sizeof(tmp_latitude));
  if (raw_latitude != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        1, this->_internal_latitude(), target);
  }

  // float longitude = 2 [(.google.api.field_behavior) = REQUIRED];
  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_longitude = this->_internal_longitude();
  ::uint32_t raw_longitude;
  memcpy(&raw_longitude, &tmp_longitude, sizeof(tmp_longitude));
  if (raw_longitude != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        2, this->_internal_longitude(), 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.Device.Location)
  return target;
}

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

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

  // float latitude = 1 [(.google.api.field_behavior) = REQUIRED];
  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_latitude = this->_internal_latitude();
  ::uint32_t raw_latitude;
  memcpy(&raw_latitude, &tmp_latitude, sizeof(tmp_latitude));
  if (raw_latitude != 0) {
    total_size += 5;
  }

  // float longitude = 2 [(.google.api.field_behavior) = REQUIRED];
  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_longitude = this->_internal_longitude();
  ::uint32_t raw_longitude;
  memcpy(&raw_longitude, &tmp_longitude, sizeof(tmp_longitude));
  if (raw_longitude != 0) {
    total_size += 5;
  }

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

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

  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_latitude = from._internal_latitude();
  ::uint32_t raw_latitude;
  memcpy(&raw_latitude, &tmp_latitude, sizeof(tmp_latitude));
  if (raw_latitude != 0) {
    _this->_internal_set_latitude(from._internal_latitude());
  }
  static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes ::uint32_t and float are the same size.");
  float tmp_longitude = from._internal_longitude();
  ::uint32_t raw_longitude;
  memcpy(&raw_longitude, &tmp_longitude, sizeof(tmp_longitude));
  if (raw_longitude != 0) {
    _this->_internal_set_longitude(from._internal_longitude());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class Device_Settings_CoordinateMatrixSwitch::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_Settings_CoordinateMatrixSwitch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

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

::size_t Device_Settings_CoordinateMatrixSwitch::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.CoordinateMatrixSwitch)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

std::string Device_Settings_CoordinateMatrixSwitch::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.CoordinateMatrixSwitch";
}

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

class Device_Settings_ConciergeCall::_Internal {
 public:
};

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

    , decltype(_impl_.sip_number_) {}

    , decltype(_impl_.orpon_) {}

    , decltype(_impl_.is_enabled_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.room_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.room_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_room_number().empty()) {
    _this->_impl_.room_number_.Set(from._internal_room_number(), _this->GetArenaForAllocation());
  }
  _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());
  }
  ::memcpy(&_impl_.orpon_, &from._impl_.orpon_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.is_enabled_) -
    reinterpret_cast<char*>(&_impl_.orpon_)) + sizeof(_impl_.is_enabled_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Settings.ConciergeCall)
}

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

    , decltype(_impl_.sip_number_) {}

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

    , decltype(_impl_.is_enabled_) { false }

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

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

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

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

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

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

const char* Device_Settings_ConciergeCall::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int64 orpon = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string room_number = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_room_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string sip_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_sip_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

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

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

  // string sip_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
  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.Device.Settings.ConciergeCall.sip_number");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

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

::size_t Device_Settings_ConciergeCall::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.ConciergeCall)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

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

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

std::string Device_Settings_ConciergeCall::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.ConciergeCall";
}

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

class Device_Settings_Autocollect::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_Settings_Autocollect::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

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

::size_t Device_Settings_Autocollect::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.Autocollect)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

std::string Device_Settings_Autocollect::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.Autocollect";
}

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

class Device_Settings_FaceRecognition::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_Settings_FaceRecognition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

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

::size_t Device_Settings_FaceRecognition::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.FaceRecognition)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

std::string Device_Settings_FaceRecognition::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.FaceRecognition";
}

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

class Device_Settings_Sl3Mode::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_Settings_Sl3Mode>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_Settings_Sl3Mode, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& encryption_profile_id(const Device_Settings_Sl3Mode* msg);
  static void set_has_encryption_profile_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_Settings_Sl3Mode::_Internal::encryption_profile_id(const Device_Settings_Sl3Mode* msg) {
  return *msg->_impl_.encryption_profile_id_;
}
void Device_Settings_Sl3Mode::clear_encryption_profile_id() {
  if (_impl_.encryption_profile_id_ != nullptr) _impl_.encryption_profile_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
Device_Settings_Sl3Mode::Device_Settings_Sl3Mode(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.Settings.Sl3Mode)
}
Device_Settings_Sl3Mode::Device_Settings_Sl3Mode(const Device_Settings_Sl3Mode& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_Settings_Sl3Mode* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.encryption_profile_id_){nullptr}
    , decltype(_impl_.is_enabled_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.encryption_profile_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.encryption_profile_id_);
  }
  _this->_impl_.is_enabled_ = from._impl_.is_enabled_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Settings.Sl3Mode)
}

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

  };
}

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

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

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

void Device_Settings_Sl3Mode::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Device.Settings.Sl3Mode)
  ::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_.encryption_profile_id_ != nullptr);
    _impl_.encryption_profile_id_->Clear();
  }
  _impl_.is_enabled_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device_Settings_Sl3Mode::_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) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue encryption_profile_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_encryption_profile_id(), 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* Device_Settings_Sl3Mode::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.Settings.Sl3Mode)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue encryption_profile_id = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::encryption_profile_id(this),
        _Internal::encryption_profile_id(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.Device.Settings.Sl3Mode)
  return target;
}

::size_t Device_Settings_Sl3Mode::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.Sl3Mode)
  ::size_t total_size = 0;

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

  // .google.protobuf.StringValue encryption_profile_id = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.encryption_profile_id_);
  }

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

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

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

void Device_Settings_Sl3Mode::MergeFrom(const Device_Settings_Sl3Mode& from) {
  Device_Settings_Sl3Mode* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Device.Settings.Sl3Mode)
  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_encryption_profile_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_encryption_profile_id());
  }
  if (from._internal_is_enabled() != 0) {
    _this->_internal_set_is_enabled(from._internal_is_enabled());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_Settings_Sl3Mode::InternalSwap(Device_Settings_Sl3Mode* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device_Settings_Sl3Mode, _impl_.is_enabled_)
      + sizeof(Device_Settings_Sl3Mode::_impl_.is_enabled_)
      - PROTOBUF_FIELD_OFFSET(Device_Settings_Sl3Mode, _impl_.encryption_profile_id_)>(
          reinterpret_cast<char*>(&_impl_.encryption_profile_id_),
          reinterpret_cast<char*>(&other->_impl_.encryption_profile_id_));
}

std::string Device_Settings_Sl3Mode::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.Sl3Mode";
}

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

class Device_Settings_EmergencyCall::_Internal {
 public:
};

Device_Settings_EmergencyCall::Device_Settings_EmergencyCall(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.Settings.EmergencyCall)
}
Device_Settings_EmergencyCall::Device_Settings_EmergencyCall(const Device_Settings_EmergencyCall& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_Settings_EmergencyCall* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.emergency_number_) {}

    , decltype(_impl_.is_call_available_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.emergency_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.emergency_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_emergency_number().empty()) {
    _this->_impl_.emergency_number_.Set(from._internal_emergency_number(), _this->GetArenaForAllocation());
  }
  _this->_impl_.is_call_available_ = from._impl_.is_call_available_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Settings.EmergencyCall)
}

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

    , decltype(_impl_.is_call_available_) { false }

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

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

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

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

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

  _impl_.emergency_number_.ClearToEmpty();
  _impl_.is_call_available_ = false;
  _internal_metadata_.Clear<std::string>();
}

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

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

  // bool is_call_available = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_call_available() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_call_available(), target);
  }

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

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

::size_t Device_Settings_EmergencyCall::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.Settings.EmergencyCall)
  ::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 emergency_number = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_emergency_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_emergency_number());
  }

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

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

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

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

  if (!from._internal_emergency_number().empty()) {
    _this->_internal_set_emergency_number(from._internal_emergency_number());
  }
  if (from._internal_is_call_available() != 0) {
    _this->_internal_set_is_call_available(from._internal_is_call_available());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

std::string Device_Settings_EmergencyCall::GetTypeName() const {
  return "keyapis.device.v1.Device.Settings.EmergencyCall";
}

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

class Device_Settings::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_Settings>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_Settings, _impl_._has_bits_);
  static const ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch& coordinate_matrix_switch(const Device_Settings* msg);
  static void set_has_coordinate_matrix_switch(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::device::v1::Device_Settings_ConciergeCall& concierge_call(const Device_Settings* msg);
  static void set_has_concierge_call(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::keyapis::device::v1::Device_Settings_Autocollect& autocollect(const Device_Settings* msg);
  static void set_has_autocollect(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::keyapis::device::v1::Device_Settings_FaceRecognition& face_recognition(const Device_Settings* msg);
  static void set_has_face_recognition(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::keyapis::device::v1::Device_Settings_Sl3Mode& sl3_mode(const Device_Settings* msg);
  static void set_has_sl3_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::keyapis::device::v1::Device_Settings_EmergencyCall& emergency_call(const Device_Settings* msg);
  static void set_has_emergency_call(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch&
Device_Settings::_Internal::coordinate_matrix_switch(const Device_Settings* msg) {
  return *msg->_impl_.coordinate_matrix_switch_;
}
const ::keyapis::device::v1::Device_Settings_ConciergeCall&
Device_Settings::_Internal::concierge_call(const Device_Settings* msg) {
  return *msg->_impl_.concierge_call_;
}
const ::keyapis::device::v1::Device_Settings_Autocollect&
Device_Settings::_Internal::autocollect(const Device_Settings* msg) {
  return *msg->_impl_.autocollect_;
}
const ::keyapis::device::v1::Device_Settings_FaceRecognition&
Device_Settings::_Internal::face_recognition(const Device_Settings* msg) {
  return *msg->_impl_.face_recognition_;
}
const ::keyapis::device::v1::Device_Settings_Sl3Mode&
Device_Settings::_Internal::sl3_mode(const Device_Settings* msg) {
  return *msg->_impl_.sl3_mode_;
}
const ::keyapis::device::v1::Device_Settings_EmergencyCall&
Device_Settings::_Internal::emergency_call(const Device_Settings* msg) {
  return *msg->_impl_.emergency_call_;
}
Device_Settings::Device_Settings(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.Settings)
}
Device_Settings::Device_Settings(const Device_Settings& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_Settings* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.coordinate_matrix_switch_){nullptr}
    , decltype(_impl_.concierge_call_){nullptr}
    , decltype(_impl_.autocollect_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.sl3_mode_){nullptr}
    , decltype(_impl_.emergency_call_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.coordinate_matrix_switch_ = new ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch(*from._impl_.coordinate_matrix_switch_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.concierge_call_ = new ::keyapis::device::v1::Device_Settings_ConciergeCall(*from._impl_.concierge_call_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.autocollect_ = new ::keyapis::device::v1::Device_Settings_Autocollect(*from._impl_.autocollect_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.face_recognition_ = new ::keyapis::device::v1::Device_Settings_FaceRecognition(*from._impl_.face_recognition_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.sl3_mode_ = new ::keyapis::device::v1::Device_Settings_Sl3Mode(*from._impl_.sl3_mode_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.emergency_call_ = new ::keyapis::device::v1::Device_Settings_EmergencyCall(*from._impl_.emergency_call_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Settings)
}

inline void Device_Settings::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.coordinate_matrix_switch_){nullptr}
    , decltype(_impl_.concierge_call_){nullptr}
    , decltype(_impl_.autocollect_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.sl3_mode_){nullptr}
    , decltype(_impl_.emergency_call_){nullptr}
  };
}

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

inline void Device_Settings::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.coordinate_matrix_switch_;
  if (this != internal_default_instance()) delete _impl_.concierge_call_;
  if (this != internal_default_instance()) delete _impl_.autocollect_;
  if (this != internal_default_instance()) delete _impl_.face_recognition_;
  if (this != internal_default_instance()) delete _impl_.sl3_mode_;
  if (this != internal_default_instance()) delete _impl_.emergency_call_;
}

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

void Device_Settings::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Device.Settings)
  ::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 & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.coordinate_matrix_switch_ != nullptr);
      _impl_.coordinate_matrix_switch_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.concierge_call_ != nullptr);
      _impl_.concierge_call_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.autocollect_ != nullptr);
      _impl_.autocollect_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.face_recognition_ != nullptr);
      _impl_.face_recognition_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.sl3_mode_ != nullptr);
      _impl_.sl3_mode_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.emergency_call_ != nullptr);
      _impl_.emergency_call_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device_Settings::_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.Device.Settings.CoordinateMatrixSwitch coordinate_matrix_switch = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_coordinate_matrix_switch(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings.ConciergeCall concierge_call = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_concierge_call(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings.Autocollect autocollect = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_autocollect(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings.FaceRecognition face_recognition = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_face_recognition(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings.Sl3Mode sl3_mode = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_sl3_mode(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings.EmergencyCall emergency_call = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_emergency_call(), 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* Device_Settings::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.Settings)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // .keyapis.device.v1.Device.Settings.ConciergeCall concierge_call = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::concierge_call(this),
        _Internal::concierge_call(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Settings.Autocollect autocollect = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::autocollect(this),
        _Internal::autocollect(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Settings.FaceRecognition face_recognition = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::face_recognition(this),
        _Internal::face_recognition(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Settings.Sl3Mode sl3_mode = 5;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::sl3_mode(this),
        _Internal::sl3_mode(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Settings.EmergencyCall emergency_call = 6;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::emergency_call(this),
        _Internal::emergency_call(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.Device.Settings)
  return target;
}

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

  ::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 & 0x0000003fu) {
    // .keyapis.device.v1.Device.Settings.CoordinateMatrixSwitch coordinate_matrix_switch = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.coordinate_matrix_switch_);
    }

    // .keyapis.device.v1.Device.Settings.ConciergeCall concierge_call = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.concierge_call_);
    }

    // .keyapis.device.v1.Device.Settings.Autocollect autocollect = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.autocollect_);
    }

    // .keyapis.device.v1.Device.Settings.FaceRecognition face_recognition = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.face_recognition_);
    }

    // .keyapis.device.v1.Device.Settings.Sl3Mode sl3_mode = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sl3_mode_);
    }

    // .keyapis.device.v1.Device.Settings.EmergencyCall emergency_call = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.emergency_call_);
    }

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

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_coordinate_matrix_switch()->::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch::MergeFrom(
          from._internal_coordinate_matrix_switch());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_concierge_call()->::keyapis::device::v1::Device_Settings_ConciergeCall::MergeFrom(
          from._internal_concierge_call());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_autocollect()->::keyapis::device::v1::Device_Settings_Autocollect::MergeFrom(
          from._internal_autocollect());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_face_recognition()->::keyapis::device::v1::Device_Settings_FaceRecognition::MergeFrom(
          from._internal_face_recognition());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_sl3_mode()->::keyapis::device::v1::Device_Settings_Sl3Mode::MergeFrom(
          from._internal_sl3_mode());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_emergency_call()->::keyapis::device::v1::Device_Settings_EmergencyCall::MergeFrom(
          from._internal_emergency_call());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_Settings::InternalSwap(Device_Settings* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device_Settings, _impl_.emergency_call_)
      + sizeof(Device_Settings::_impl_.emergency_call_)
      - PROTOBUF_FIELD_OFFSET(Device_Settings, _impl_.coordinate_matrix_switch_)>(
          reinterpret_cast<char*>(&_impl_.coordinate_matrix_switch_),
          reinterpret_cast<char*>(&other->_impl_.coordinate_matrix_switch_));
}

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

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

class Device_Dispatching::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_Dispatching>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_Dispatching, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& public_identity(const Device_Dispatching* msg);
  static void set_has_public_identity(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_Dispatching::_Internal::public_identity(const Device_Dispatching* msg) {
  return *msg->_impl_.public_identity_;
}
void Device_Dispatching::clear_public_identity() {
  if (_impl_.public_identity_ != nullptr) _impl_.public_identity_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
Device_Dispatching::Device_Dispatching(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.Dispatching)
}
Device_Dispatching::Device_Dispatching(const Device_Dispatching& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_Dispatching* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.public_identity_){nullptr}
    , decltype(_impl_.is_enabled_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.public_identity_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.public_identity_);
  }
  _this->_impl_.is_enabled_ = from._impl_.is_enabled_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Dispatching)
}

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

  };
}

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

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

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

void Device_Dispatching::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Device.Dispatching)
  ::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_.public_identity_ != nullptr);
    _impl_.public_identity_->Clear();
  }
  _impl_.is_enabled_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device_Dispatching::_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) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue public_identity = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_public_identity(), 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* Device_Dispatching::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.Dispatching)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue public_identity = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::public_identity(this),
        _Internal::public_identity(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.Device.Dispatching)
  return target;
}

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

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

  // .google.protobuf.StringValue public_identity = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.public_identity_);
  }

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

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

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

void Device_Dispatching::MergeFrom(const Device_Dispatching& from) {
  Device_Dispatching* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Device.Dispatching)
  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_public_identity()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_public_identity());
  }
  if (from._internal_is_enabled() != 0) {
    _this->_internal_set_is_enabled(from._internal_is_enabled());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_Dispatching::InternalSwap(Device_Dispatching* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device_Dispatching, _impl_.is_enabled_)
      + sizeof(Device_Dispatching::_impl_.is_enabled_)
      - PROTOBUF_FIELD_OFFSET(Device_Dispatching, _impl_.public_identity_)>(
          reinterpret_cast<char*>(&_impl_.public_identity_),
          reinterpret_cast<char*>(&other->_impl_.public_identity_));
}

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

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

class Device_SipTrunk::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_SipTrunk>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_SipTrunk, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& host(const Device_SipTrunk* msg);
  static void set_has_host(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& port(const Device_SipTrunk* msg);
  static void set_has_port(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_SipTrunk::_Internal::host(const Device_SipTrunk* msg) {
  return *msg->_impl_.host_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Device_SipTrunk::_Internal::port(const Device_SipTrunk* msg) {
  return *msg->_impl_.port_;
}
void Device_SipTrunk::clear_host() {
  if (_impl_.host_ != nullptr) _impl_.host_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Device_SipTrunk::clear_port() {
  if (_impl_.port_ != nullptr) _impl_.port_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
Device_SipTrunk::Device_SipTrunk(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.SipTrunk)
}
Device_SipTrunk::Device_SipTrunk(const Device_SipTrunk& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_SipTrunk* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.abc_number_) {}

    , decltype(_impl_.host_){nullptr}
    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.sip_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.abc_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.abc_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_abc_number().empty()) {
    _this->_impl_.abc_number_.Set(from._internal_abc_number(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.host_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.host_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.port_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.port_);
  }
  _this->_impl_.sip_type_ = from._impl_.sip_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.SipTrunk)
}

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

    , decltype(_impl_.host_){nullptr}
    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.sip_type_) { 0 }

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

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

inline void Device_SipTrunk::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.abc_number_.Destroy();
  if (this != internal_default_instance()) delete _impl_.host_;
  if (this != internal_default_instance()) delete _impl_.port_;
}

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

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

  _impl_.abc_number_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.host_ != nullptr);
      _impl_.host_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.port_ != nullptr);
      _impl_.port_->Clear();
    }
  }
  _impl_.sip_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device_SipTrunk::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string abc_number = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_abc_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue host = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_host(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value port = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_port(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SipTrunk.SipType sip_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_sip_type(static_cast<::keyapis::device::v1::Device_SipTrunk_SipType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

  // .keyapis.device.v1.Device.SipTrunk.SipType sip_type = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_sip_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this->_internal_sip_type(), target);
  }

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

::size_t Device_SipTrunk::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.SipTrunk)
  ::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 abc_number = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_abc_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_abc_number());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .google.protobuf.StringValue host = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.host_);
    }

    // .google.protobuf.Int32Value port = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.port_);
    }

  }
  // .keyapis.device.v1.Device.SipTrunk.SipType sip_type = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_sip_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_sip_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 Device_SipTrunk::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Device_SipTrunk*>(
      &from));
}

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

  if (!from._internal_abc_number().empty()) {
    _this->_internal_set_abc_number(from._internal_abc_number());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_host()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_host());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_port()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_port());
    }
  }
  if (from._internal_sip_type() != 0) {
    _this->_internal_set_sip_type(from._internal_sip_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_SipTrunk::InternalSwap(Device_SipTrunk* 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_.abc_number_, lhs_arena,
                                       &other->_impl_.abc_number_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device_SipTrunk, _impl_.sip_type_)
      + sizeof(Device_SipTrunk::_impl_.sip_type_)
      - PROTOBUF_FIELD_OFFSET(Device_SipTrunk, _impl_.host_)>(
          reinterpret_cast<char*>(&_impl_.host_),
          reinterpret_cast<char*>(&other->_impl_.host_));
}

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

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

class Device_Redirect::_Internal {
 public:
};

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

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

    , decltype(_impl_.is_enabled_phone_) { false }

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

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

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

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

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

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

const char* Device_Redirect::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled_sip = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_sip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_enabled_phone = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.is_enabled_phone_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled_sip = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled_sip() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled_sip(), target);
  }

  // bool is_enabled_phone = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled_phone() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        2, this->_internal_is_enabled_phone(), 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.Device.Redirect)
  return target;
}

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

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

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

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

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

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

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

  if (from._internal_is_enabled_sip() != 0) {
    _this->_internal_set_is_enabled_sip(from._internal_is_enabled_sip());
  }
  if (from._internal_is_enabled_phone() != 0) {
    _this->_internal_set_is_enabled_phone(from._internal_is_enabled_phone());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class Device_AutochangePasswordSettings::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_AutochangePasswordSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_enabled = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_enabled(), target);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class Device_Credentials::_Internal {
 public:
  using HasBits = decltype(std::declval<Device_Credentials>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device_Credentials, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& login(const Device_Credentials* msg);
  static void set_has_login(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& password(const Device_Credentials* msg);
  static void set_has_password(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_Credentials::_Internal::login(const Device_Credentials* msg) {
  return *msg->_impl_.login_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device_Credentials::_Internal::password(const Device_Credentials* msg) {
  return *msg->_impl_.password_;
}
void Device_Credentials::clear_login() {
  if (_impl_.login_ != nullptr) _impl_.login_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Device_Credentials::clear_password() {
  if (_impl_.password_ != nullptr) _impl_.password_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
Device_Credentials::Device_Credentials(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.Credentials)
}
Device_Credentials::Device_Credentials(const Device_Credentials& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_Credentials* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.user_access_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.login_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.login_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.password_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.password_);
  }
  _this->_impl_.user_access_type_ = from._impl_.user_access_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.Credentials)
}

inline void Device_Credentials::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.user_access_type_) { 0 }

  };
}

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

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

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

void Device_Credentials::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Device.Credentials)
  ::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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.login_ != nullptr);
      _impl_.login_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.password_ != nullptr);
      _impl_.password_->Clear();
    }
  }
  _impl_.user_access_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device_Credentials::_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) {
      // .google.protobuf.StringValue login = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_login(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue password = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_password(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Credentials.UserAccessType user_access_type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_user_access_type(static_cast<::keyapis::device::v1::Device_Credentials_UserAccessType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

  // .keyapis.device.v1.Device.Credentials.UserAccessType user_access_type = 3;
  if (this->_internal_user_access_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_user_access_type(), target);
  }

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

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

  ::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 & 0x00000003u) {
    // .google.protobuf.StringValue login = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.login_);
    }

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

  }
  // .keyapis.device.v1.Device.Credentials.UserAccessType user_access_type = 3;
  if (this->_internal_user_access_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_user_access_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 Device_Credentials::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Device_Credentials*>(
      &from));
}

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_login()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_login());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_password()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_password());
    }
  }
  if (from._internal_user_access_type() != 0) {
    _this->_internal_set_user_access_type(from._internal_user_access_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device_Credentials::InternalSwap(Device_Credentials* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device_Credentials, _impl_.user_access_type_)
      + sizeof(Device_Credentials::_impl_.user_access_type_)
      - PROTOBUF_FIELD_OFFSET(Device_Credentials, _impl_.login_)>(
          reinterpret_cast<char*>(&_impl_.login_),
          reinterpret_cast<char*>(&other->_impl_.login_));
}

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

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

class Device_SavingError_MacAddressInvalid::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_MacAddressInvalid::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.MacAddressInvalid";
}

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

class Device_SavingError_SerialNumberInvalid::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_SerialNumberInvalid::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.SerialNumberInvalid";
}

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

class Device_SavingError_NotAllowedForType::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_NotAllowedForType::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.NotAllowedForType";
}

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

class Device_SavingError_NotAllowedForModel::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_NotAllowedForModel::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.NotAllowedForModel";
}

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

class Device_SavingError_SerialNumberForModelIsExist::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_SerialNumberForModelIsExist::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.SerialNumberForModelIsExist";
}

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

class Device_SavingError_MacAddressIsExist::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_MacAddressIsExist::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.MacAddressIsExist";
}

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

class Device_SavingError_CapabilityIsNotSupported::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_SavingError_CapabilityIsNotSupported::_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.Model.CapabilityType model_capability_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_model_capability_type(static_cast<::keyapis::device::v1::Model_CapabilityType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.device.v1.Model.CapabilityType model_capability_type = 1;
  if (this->_internal_model_capability_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_model_capability_type(), target);
  }

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

::size_t Device_SavingError_CapabilityIsNotSupported::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.SavingError.CapabilityIsNotSupported)
  ::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.Model.CapabilityType model_capability_type = 1;
  if (this->_internal_model_capability_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_model_capability_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 Device_SavingError_CapabilityIsNotSupported::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Device_SavingError_CapabilityIsNotSupported*>(
      &from));
}

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

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

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

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

void Device_SavingError_CapabilityIsNotSupported::InternalSwap(Device_SavingError_CapabilityIsNotSupported* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.model_capability_type_, other->_impl_.model_capability_type_);
}

std::string Device_SavingError_CapabilityIsNotSupported::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.CapabilityIsNotSupported";
}

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

class Device_SavingError_AbcNumberIsExistOnAnotherDevice::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* Device_SavingError_AbcNumberIsExistOnAnotherDevice::_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 device_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

::size_t Device_SavingError_AbcNumberIsExistOnAnotherDevice::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.SavingError.AbcNumberIsExistOnAnotherDevice)
  ::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 device_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_id());
  }

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

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

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

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

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

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

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

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

std::string Device_SavingError_AbcNumberIsExistOnAnotherDevice::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.AbcNumberIsExistOnAnotherDevice";
}

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

class Device_SavingError_PublicIdentityIsExist::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_PublicIdentityIsExist::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.PublicIdentityIsExist";
}

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

class Device_SavingError_ConciergeRoomNotFound::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_ConciergeRoomNotFound::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.ConciergeRoomNotFound";
}

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

class Device_SavingError_LoginIsExist::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_LoginIsExist::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.LoginIsExist";
}

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

class Device_SavingError_CredentialsAreRequired::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_CredentialsAreRequired::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.CredentialsAreRequired";
}

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

class Device_SavingError_FieldIsNotSupported::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string Device_SavingError_FieldIsNotSupported::GetTypeName() const {
  return "keyapis.device.v1.Device.SavingError.FieldIsNotSupported";
}

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

class Device_SavingError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::Device_SavingError, _impl_._oneof_case_);
  static const ::keyapis::device::v1::Device_SavingError_MacAddressInvalid& mac_address_invalid(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_SerialNumberInvalid& serial_number_invalid(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_NotAllowedForType& not_allowed_for_type(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_NotAllowedForModel& not_allowed_for_model(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist& serial_number_for_model_is_exist(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_MacAddressIsExist& mac_address_is_exist(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported& capability_is_not_supported(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice& abc_number_is_exist_on_another_device(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist& public_identity_is_exist(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound& concierge_room_not_found(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_LoginIsExist& login_is_exist(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_CredentialsAreRequired& credentials_are_required(const Device_SavingError* msg);
  static const ::keyapis::device::v1::Device_SavingError_FieldIsNotSupported& field_is_not_supported(const Device_SavingError* msg);
};

const ::keyapis::device::v1::Device_SavingError_MacAddressInvalid&
Device_SavingError::_Internal::mac_address_invalid(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.mac_address_invalid_;
}
const ::keyapis::device::v1::Device_SavingError_SerialNumberInvalid&
Device_SavingError::_Internal::serial_number_invalid(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.serial_number_invalid_;
}
const ::keyapis::device::v1::Device_SavingError_NotAllowedForType&
Device_SavingError::_Internal::not_allowed_for_type(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.not_allowed_for_type_;
}
const ::keyapis::device::v1::Device_SavingError_NotAllowedForModel&
Device_SavingError::_Internal::not_allowed_for_model(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.not_allowed_for_model_;
}
const ::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist&
Device_SavingError::_Internal::serial_number_for_model_is_exist(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.serial_number_for_model_is_exist_;
}
const ::keyapis::device::v1::Device_SavingError_MacAddressIsExist&
Device_SavingError::_Internal::mac_address_is_exist(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.mac_address_is_exist_;
}
const ::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported&
Device_SavingError::_Internal::capability_is_not_supported(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.capability_is_not_supported_;
}
const ::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice&
Device_SavingError::_Internal::abc_number_is_exist_on_another_device(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.abc_number_is_exist_on_another_device_;
}
const ::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist&
Device_SavingError::_Internal::public_identity_is_exist(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.public_identity_is_exist_;
}
const ::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound&
Device_SavingError::_Internal::concierge_room_not_found(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.concierge_room_not_found_;
}
const ::keyapis::device::v1::Device_SavingError_LoginIsExist&
Device_SavingError::_Internal::login_is_exist(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.login_is_exist_;
}
const ::keyapis::device::v1::Device_SavingError_CredentialsAreRequired&
Device_SavingError::_Internal::credentials_are_required(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.credentials_are_required_;
}
const ::keyapis::device::v1::Device_SavingError_FieldIsNotSupported&
Device_SavingError::_Internal::field_is_not_supported(const Device_SavingError* msg) {
  return *msg->_impl_.reason_.field_is_not_supported_;
}
void Device_SavingError::set_allocated_mac_address_invalid(::keyapis::device::v1::Device_SavingError_MacAddressInvalid* mac_address_invalid) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (mac_address_invalid) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(mac_address_invalid);
    if (message_arena != submessage_arena) {
      mac_address_invalid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mac_address_invalid, submessage_arena);
    }
    set_has_mac_address_invalid();
    _impl_.reason_.mac_address_invalid_ = mac_address_invalid;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.mac_address_invalid)
}
void Device_SavingError::set_allocated_serial_number_invalid(::keyapis::device::v1::Device_SavingError_SerialNumberInvalid* serial_number_invalid) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (serial_number_invalid) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(serial_number_invalid);
    if (message_arena != submessage_arena) {
      serial_number_invalid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, serial_number_invalid, submessage_arena);
    }
    set_has_serial_number_invalid();
    _impl_.reason_.serial_number_invalid_ = serial_number_invalid;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.serial_number_invalid)
}
void Device_SavingError::set_allocated_not_allowed_for_type(::keyapis::device::v1::Device_SavingError_NotAllowedForType* not_allowed_for_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (not_allowed_for_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_allowed_for_type);
    if (message_arena != submessage_arena) {
      not_allowed_for_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, not_allowed_for_type, submessage_arena);
    }
    set_has_not_allowed_for_type();
    _impl_.reason_.not_allowed_for_type_ = not_allowed_for_type;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.not_allowed_for_type)
}
void Device_SavingError::set_allocated_not_allowed_for_model(::keyapis::device::v1::Device_SavingError_NotAllowedForModel* not_allowed_for_model) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (not_allowed_for_model) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_allowed_for_model);
    if (message_arena != submessage_arena) {
      not_allowed_for_model = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, not_allowed_for_model, submessage_arena);
    }
    set_has_not_allowed_for_model();
    _impl_.reason_.not_allowed_for_model_ = not_allowed_for_model;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.not_allowed_for_model)
}
void Device_SavingError::set_allocated_serial_number_for_model_is_exist(::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist* serial_number_for_model_is_exist) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (serial_number_for_model_is_exist) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(serial_number_for_model_is_exist);
    if (message_arena != submessage_arena) {
      serial_number_for_model_is_exist = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, serial_number_for_model_is_exist, submessage_arena);
    }
    set_has_serial_number_for_model_is_exist();
    _impl_.reason_.serial_number_for_model_is_exist_ = serial_number_for_model_is_exist;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.serial_number_for_model_is_exist)
}
void Device_SavingError::set_allocated_mac_address_is_exist(::keyapis::device::v1::Device_SavingError_MacAddressIsExist* mac_address_is_exist) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (mac_address_is_exist) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(mac_address_is_exist);
    if (message_arena != submessage_arena) {
      mac_address_is_exist = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mac_address_is_exist, submessage_arena);
    }
    set_has_mac_address_is_exist();
    _impl_.reason_.mac_address_is_exist_ = mac_address_is_exist;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.mac_address_is_exist)
}
void Device_SavingError::set_allocated_capability_is_not_supported(::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported* capability_is_not_supported) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (capability_is_not_supported) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(capability_is_not_supported);
    if (message_arena != submessage_arena) {
      capability_is_not_supported = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, capability_is_not_supported, submessage_arena);
    }
    set_has_capability_is_not_supported();
    _impl_.reason_.capability_is_not_supported_ = capability_is_not_supported;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.capability_is_not_supported)
}
void Device_SavingError::set_allocated_abc_number_is_exist_on_another_device(::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice* abc_number_is_exist_on_another_device) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (abc_number_is_exist_on_another_device) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(abc_number_is_exist_on_another_device);
    if (message_arena != submessage_arena) {
      abc_number_is_exist_on_another_device = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, abc_number_is_exist_on_another_device, submessage_arena);
    }
    set_has_abc_number_is_exist_on_another_device();
    _impl_.reason_.abc_number_is_exist_on_another_device_ = abc_number_is_exist_on_another_device;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.abc_number_is_exist_on_another_device)
}
void Device_SavingError::set_allocated_public_identity_is_exist(::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist* public_identity_is_exist) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (public_identity_is_exist) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(public_identity_is_exist);
    if (message_arena != submessage_arena) {
      public_identity_is_exist = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, public_identity_is_exist, submessage_arena);
    }
    set_has_public_identity_is_exist();
    _impl_.reason_.public_identity_is_exist_ = public_identity_is_exist;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.public_identity_is_exist)
}
void Device_SavingError::set_allocated_concierge_room_not_found(::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound* concierge_room_not_found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (concierge_room_not_found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(concierge_room_not_found);
    if (message_arena != submessage_arena) {
      concierge_room_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, concierge_room_not_found, submessage_arena);
    }
    set_has_concierge_room_not_found();
    _impl_.reason_.concierge_room_not_found_ = concierge_room_not_found;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.concierge_room_not_found)
}
void Device_SavingError::set_allocated_login_is_exist(::keyapis::device::v1::Device_SavingError_LoginIsExist* login_is_exist) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (login_is_exist) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(login_is_exist);
    if (message_arena != submessage_arena) {
      login_is_exist = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, login_is_exist, submessage_arena);
    }
    set_has_login_is_exist();
    _impl_.reason_.login_is_exist_ = login_is_exist;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.login_is_exist)
}
void Device_SavingError::set_allocated_credentials_are_required(::keyapis::device::v1::Device_SavingError_CredentialsAreRequired* credentials_are_required) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (credentials_are_required) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(credentials_are_required);
    if (message_arena != submessage_arena) {
      credentials_are_required = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, credentials_are_required, submessage_arena);
    }
    set_has_credentials_are_required();
    _impl_.reason_.credentials_are_required_ = credentials_are_required;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.credentials_are_required)
}
void Device_SavingError::set_allocated_field_is_not_supported(::keyapis::device::v1::Device_SavingError_FieldIsNotSupported* field_is_not_supported) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (field_is_not_supported) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(field_is_not_supported);
    if (message_arena != submessage_arena) {
      field_is_not_supported = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, field_is_not_supported, submessage_arena);
    }
    set_has_field_is_not_supported();
    _impl_.reason_.field_is_not_supported_ = field_is_not_supported;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Device.SavingError.field_is_not_supported)
}
Device_SavingError::Device_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device.SavingError)
}
Device_SavingError::Device_SavingError(const Device_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device_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 kMacAddressInvalid: {
      _this->_internal_mutable_mac_address_invalid()->::keyapis::device::v1::Device_SavingError_MacAddressInvalid::MergeFrom(
          from._internal_mac_address_invalid());
      break;
    }
    case kSerialNumberInvalid: {
      _this->_internal_mutable_serial_number_invalid()->::keyapis::device::v1::Device_SavingError_SerialNumberInvalid::MergeFrom(
          from._internal_serial_number_invalid());
      break;
    }
    case kNotAllowedForType: {
      _this->_internal_mutable_not_allowed_for_type()->::keyapis::device::v1::Device_SavingError_NotAllowedForType::MergeFrom(
          from._internal_not_allowed_for_type());
      break;
    }
    case kNotAllowedForModel: {
      _this->_internal_mutable_not_allowed_for_model()->::keyapis::device::v1::Device_SavingError_NotAllowedForModel::MergeFrom(
          from._internal_not_allowed_for_model());
      break;
    }
    case kSerialNumberForModelIsExist: {
      _this->_internal_mutable_serial_number_for_model_is_exist()->::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist::MergeFrom(
          from._internal_serial_number_for_model_is_exist());
      break;
    }
    case kMacAddressIsExist: {
      _this->_internal_mutable_mac_address_is_exist()->::keyapis::device::v1::Device_SavingError_MacAddressIsExist::MergeFrom(
          from._internal_mac_address_is_exist());
      break;
    }
    case kCapabilityIsNotSupported: {
      _this->_internal_mutable_capability_is_not_supported()->::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported::MergeFrom(
          from._internal_capability_is_not_supported());
      break;
    }
    case kAbcNumberIsExistOnAnotherDevice: {
      _this->_internal_mutable_abc_number_is_exist_on_another_device()->::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice::MergeFrom(
          from._internal_abc_number_is_exist_on_another_device());
      break;
    }
    case kPublicIdentityIsExist: {
      _this->_internal_mutable_public_identity_is_exist()->::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist::MergeFrom(
          from._internal_public_identity_is_exist());
      break;
    }
    case kConciergeRoomNotFound: {
      _this->_internal_mutable_concierge_room_not_found()->::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound::MergeFrom(
          from._internal_concierge_room_not_found());
      break;
    }
    case kLoginIsExist: {
      _this->_internal_mutable_login_is_exist()->::keyapis::device::v1::Device_SavingError_LoginIsExist::MergeFrom(
          from._internal_login_is_exist());
      break;
    }
    case kCredentialsAreRequired: {
      _this->_internal_mutable_credentials_are_required()->::keyapis::device::v1::Device_SavingError_CredentialsAreRequired::MergeFrom(
          from._internal_credentials_are_required());
      break;
    }
    case kFieldIsNotSupported: {
      _this->_internal_mutable_field_is_not_supported()->::keyapis::device::v1::Device_SavingError_FieldIsNotSupported::MergeFrom(
          from._internal_field_is_not_supported());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Device.SavingError)
}

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

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

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

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

void Device_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.Device.SavingError)
  switch (reason_case()) {
    case kMacAddressInvalid: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.mac_address_invalid_;
      }
      break;
    }
    case kSerialNumberInvalid: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.serial_number_invalid_;
      }
      break;
    }
    case kNotAllowedForType: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.not_allowed_for_type_;
      }
      break;
    }
    case kNotAllowedForModel: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.not_allowed_for_model_;
      }
      break;
    }
    case kSerialNumberForModelIsExist: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.serial_number_for_model_is_exist_;
      }
      break;
    }
    case kMacAddressIsExist: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.mac_address_is_exist_;
      }
      break;
    }
    case kCapabilityIsNotSupported: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.capability_is_not_supported_;
      }
      break;
    }
    case kAbcNumberIsExistOnAnotherDevice: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.abc_number_is_exist_on_another_device_;
      }
      break;
    }
    case kPublicIdentityIsExist: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.public_identity_is_exist_;
      }
      break;
    }
    case kConciergeRoomNotFound: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.concierge_room_not_found_;
      }
      break;
    }
    case kLoginIsExist: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.login_is_exist_;
      }
      break;
    }
    case kCredentialsAreRequired: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.credentials_are_required_;
      }
      break;
    }
    case kFieldIsNotSupported: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.field_is_not_supported_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void Device_SavingError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Device.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* Device_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.Device.SavingError.MacAddressInvalid mac_address_invalid = 1 [deprecated = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_mac_address_invalid(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.SerialNumberInvalid serial_number_invalid = 2 [deprecated = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_serial_number_invalid(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.NotAllowedForType not_allowed_for_type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_not_allowed_for_type(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.NotAllowedForModel not_allowed_for_model = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_not_allowed_for_model(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.SerialNumberForModelIsExist serial_number_for_model_is_exist = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_serial_number_for_model_is_exist(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.MacAddressIsExist mac_address_is_exist = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_mac_address_is_exist(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.CapabilityIsNotSupported capability_is_not_supported = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_capability_is_not_supported(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.AbcNumberIsExistOnAnotherDevice abc_number_is_exist_on_another_device = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_abc_number_is_exist_on_another_device(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.PublicIdentityIsExist public_identity_is_exist = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_public_identity_is_exist(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.ConciergeRoomNotFound concierge_room_not_found = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_concierge_room_not_found(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.LoginIsExist login_is_exist = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_login_is_exist(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.CredentialsAreRequired credentials_are_required = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_credentials_are_required(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SavingError.FieldIsNotSupported field_is_not_supported = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_field_is_not_supported(), 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* Device_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kMacAddressInvalid: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::mac_address_invalid(this),
          _Internal::mac_address_invalid(this).GetCachedSize(), target, stream);
      break;
    }
    case kSerialNumberInvalid: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::serial_number_invalid(this),
          _Internal::serial_number_invalid(this).GetCachedSize(), target, stream);
      break;
    }
    case kNotAllowedForType: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::not_allowed_for_type(this),
          _Internal::not_allowed_for_type(this).GetCachedSize(), target, stream);
      break;
    }
    case kNotAllowedForModel: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::not_allowed_for_model(this),
          _Internal::not_allowed_for_model(this).GetCachedSize(), target, stream);
      break;
    }
    case kSerialNumberForModelIsExist: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, _Internal::serial_number_for_model_is_exist(this),
          _Internal::serial_number_for_model_is_exist(this).GetCachedSize(), target, stream);
      break;
    }
    case kMacAddressIsExist: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, _Internal::mac_address_is_exist(this),
          _Internal::mac_address_is_exist(this).GetCachedSize(), target, stream);
      break;
    }
    case kCapabilityIsNotSupported: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(7, _Internal::capability_is_not_supported(this),
          _Internal::capability_is_not_supported(this).GetCachedSize(), target, stream);
      break;
    }
    case kAbcNumberIsExistOnAnotherDevice: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, _Internal::abc_number_is_exist_on_another_device(this),
          _Internal::abc_number_is_exist_on_another_device(this).GetCachedSize(), target, stream);
      break;
    }
    case kPublicIdentityIsExist: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(9, _Internal::public_identity_is_exist(this),
          _Internal::public_identity_is_exist(this).GetCachedSize(), target, stream);
      break;
    }
    case kConciergeRoomNotFound: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(10, _Internal::concierge_room_not_found(this),
          _Internal::concierge_room_not_found(this).GetCachedSize(), target, stream);
      break;
    }
    case kLoginIsExist: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(11, _Internal::login_is_exist(this),
          _Internal::login_is_exist(this).GetCachedSize(), target, stream);
      break;
    }
    case kCredentialsAreRequired: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(12, _Internal::credentials_are_required(this),
          _Internal::credentials_are_required(this).GetCachedSize(), target, stream);
      break;
    }
    case kFieldIsNotSupported: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(13, _Internal::field_is_not_supported(this),
          _Internal::field_is_not_supported(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.Device.SavingError)
  return target;
}

::size_t Device_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Device.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.Device.SavingError.MacAddressInvalid mac_address_invalid = 1 [deprecated = true];
    case kMacAddressInvalid: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.mac_address_invalid_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.SerialNumberInvalid serial_number_invalid = 2 [deprecated = true];
    case kSerialNumberInvalid: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.serial_number_invalid_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.NotAllowedForType not_allowed_for_type = 3;
    case kNotAllowedForType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.not_allowed_for_type_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.NotAllowedForModel not_allowed_for_model = 4;
    case kNotAllowedForModel: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.not_allowed_for_model_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.SerialNumberForModelIsExist serial_number_for_model_is_exist = 5;
    case kSerialNumberForModelIsExist: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.serial_number_for_model_is_exist_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.MacAddressIsExist mac_address_is_exist = 6;
    case kMacAddressIsExist: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.mac_address_is_exist_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.CapabilityIsNotSupported capability_is_not_supported = 7;
    case kCapabilityIsNotSupported: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.capability_is_not_supported_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.AbcNumberIsExistOnAnotherDevice abc_number_is_exist_on_another_device = 8;
    case kAbcNumberIsExistOnAnotherDevice: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.abc_number_is_exist_on_another_device_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.PublicIdentityIsExist public_identity_is_exist = 9;
    case kPublicIdentityIsExist: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.public_identity_is_exist_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.ConciergeRoomNotFound concierge_room_not_found = 10;
    case kConciergeRoomNotFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.concierge_room_not_found_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.LoginIsExist login_is_exist = 11;
    case kLoginIsExist: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.login_is_exist_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.CredentialsAreRequired credentials_are_required = 12;
    case kCredentialsAreRequired: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.credentials_are_required_);
      break;
    }
    // .keyapis.device.v1.Device.SavingError.FieldIsNotSupported field_is_not_supported = 13;
    case kFieldIsNotSupported: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.field_is_not_supported_);
      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 Device_SavingError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Device_SavingError*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kMacAddressInvalid: {
      _this->_internal_mutable_mac_address_invalid()->::keyapis::device::v1::Device_SavingError_MacAddressInvalid::MergeFrom(
          from._internal_mac_address_invalid());
      break;
    }
    case kSerialNumberInvalid: {
      _this->_internal_mutable_serial_number_invalid()->::keyapis::device::v1::Device_SavingError_SerialNumberInvalid::MergeFrom(
          from._internal_serial_number_invalid());
      break;
    }
    case kNotAllowedForType: {
      _this->_internal_mutable_not_allowed_for_type()->::keyapis::device::v1::Device_SavingError_NotAllowedForType::MergeFrom(
          from._internal_not_allowed_for_type());
      break;
    }
    case kNotAllowedForModel: {
      _this->_internal_mutable_not_allowed_for_model()->::keyapis::device::v1::Device_SavingError_NotAllowedForModel::MergeFrom(
          from._internal_not_allowed_for_model());
      break;
    }
    case kSerialNumberForModelIsExist: {
      _this->_internal_mutable_serial_number_for_model_is_exist()->::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist::MergeFrom(
          from._internal_serial_number_for_model_is_exist());
      break;
    }
    case kMacAddressIsExist: {
      _this->_internal_mutable_mac_address_is_exist()->::keyapis::device::v1::Device_SavingError_MacAddressIsExist::MergeFrom(
          from._internal_mac_address_is_exist());
      break;
    }
    case kCapabilityIsNotSupported: {
      _this->_internal_mutable_capability_is_not_supported()->::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported::MergeFrom(
          from._internal_capability_is_not_supported());
      break;
    }
    case kAbcNumberIsExistOnAnotherDevice: {
      _this->_internal_mutable_abc_number_is_exist_on_another_device()->::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice::MergeFrom(
          from._internal_abc_number_is_exist_on_another_device());
      break;
    }
    case kPublicIdentityIsExist: {
      _this->_internal_mutable_public_identity_is_exist()->::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist::MergeFrom(
          from._internal_public_identity_is_exist());
      break;
    }
    case kConciergeRoomNotFound: {
      _this->_internal_mutable_concierge_room_not_found()->::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound::MergeFrom(
          from._internal_concierge_room_not_found());
      break;
    }
    case kLoginIsExist: {
      _this->_internal_mutable_login_is_exist()->::keyapis::device::v1::Device_SavingError_LoginIsExist::MergeFrom(
          from._internal_login_is_exist());
      break;
    }
    case kCredentialsAreRequired: {
      _this->_internal_mutable_credentials_are_required()->::keyapis::device::v1::Device_SavingError_CredentialsAreRequired::MergeFrom(
          from._internal_credentials_are_required());
      break;
    }
    case kFieldIsNotSupported: {
      _this->_internal_mutable_field_is_not_supported()->::keyapis::device::v1::Device_SavingError_FieldIsNotSupported::MergeFrom(
          from._internal_field_is_not_supported());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

class Device::_Internal {
 public:
  using HasBits = decltype(std::declval<Device>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Device, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& preset_configured_at(const Device* msg);
  static void set_has_preset_configured_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& ip_address(const Device* msg);
  static void set_has_ip_address(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& port(const Device* msg);
  static void set_has_port(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::keyapis::device::v1::Device_SputnikCredentials& sputnik_credentials(const Device* msg);
  static void set_has_sputnik_credentials(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::keyapis::device::v1::Device_Location& location(const Device* msg);
  static void set_has_location(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& camera_id(const Device* msg);
  static void set_has_camera_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::keyapis::device::v1::Device_Settings& settings(const Device* msg);
  static void set_has_settings(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::keyapis::device::v1::Device_Dispatching& dispatching(const Device* msg);
  static void set_has_dispatching(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::keyapis::device::v1::Device_SipTrunk& sip_trunk(const Device* msg);
  static void set_has_sip_trunk(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::keyapis::device::v1::Device_Redirect& redirect(const Device* msg);
  static void set_has_redirect(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::keyapis::device::v1::Device_AutochangePasswordSettings& autochange_password_settings(const Device* msg);
  static void set_has_autochange_password_settings(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& sip_account(const Device* msg);
  static void set_has_sip_account(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::keyapis::device::v1::SyncStatus& sync_status(const Device* msg);
  static void set_has_sync_status(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Device::_Internal::preset_configured_at(const Device* msg) {
  return *msg->_impl_.preset_configured_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device::_Internal::ip_address(const Device* msg) {
  return *msg->_impl_.ip_address_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Device::_Internal::port(const Device* msg) {
  return *msg->_impl_.port_;
}
const ::keyapis::device::v1::Device_SputnikCredentials&
Device::_Internal::sputnik_credentials(const Device* msg) {
  return *msg->_impl_.sputnik_credentials_;
}
const ::keyapis::device::v1::Device_Location&
Device::_Internal::location(const Device* msg) {
  return *msg->_impl_.location_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device::_Internal::camera_id(const Device* msg) {
  return *msg->_impl_.camera_id_;
}
const ::keyapis::device::v1::Device_Settings&
Device::_Internal::settings(const Device* msg) {
  return *msg->_impl_.settings_;
}
const ::keyapis::device::v1::Device_Dispatching&
Device::_Internal::dispatching(const Device* msg) {
  return *msg->_impl_.dispatching_;
}
const ::keyapis::device::v1::Device_SipTrunk&
Device::_Internal::sip_trunk(const Device* msg) {
  return *msg->_impl_.sip_trunk_;
}
const ::keyapis::device::v1::Device_Redirect&
Device::_Internal::redirect(const Device* msg) {
  return *msg->_impl_.redirect_;
}
const ::keyapis::device::v1::Device_AutochangePasswordSettings&
Device::_Internal::autochange_password_settings(const Device* msg) {
  return *msg->_impl_.autochange_password_settings_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Device::_Internal::sip_account(const Device* msg) {
  return *msg->_impl_.sip_account_;
}
const ::keyapis::device::v1::SyncStatus&
Device::_Internal::sync_status(const Device* msg) {
  return *msg->_impl_.sync_status_;
}
void Device::clear_preset_configured_at() {
  if (_impl_.preset_configured_at_ != nullptr) _impl_.preset_configured_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Device::clear_ip_address() {
  if (_impl_.ip_address_ != nullptr) _impl_.ip_address_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Device::clear_port() {
  if (_impl_.port_ != nullptr) _impl_.port_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void Device::clear_camera_id() {
  if (_impl_.camera_id_ != nullptr) _impl_.camera_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void Device::clear_sip_account() {
  if (_impl_.sip_account_ != nullptr) _impl_.sip_account_->Clear();
  _impl_._has_bits_[0] &= ~0x00000800u;
}
Device::Device(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Device)
}
Device::Device(const Device& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.tags_){from._impl_.tags_}
    , decltype(_impl_.credentials_){from._impl_.credentials_}
    , decltype(_impl_.mac_address_) {}

    , decltype(_impl_.title_) {}

    , decltype(_impl_.serial_number_) {}

    , decltype(_impl_.hardware_version_) {}

    , decltype(_impl_.software_version_) {}

    , decltype(_impl_.preset_configured_at_){nullptr}
    , decltype(_impl_.ip_address_){nullptr}
    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.sputnik_credentials_){nullptr}
    , decltype(_impl_.location_){nullptr}
    , decltype(_impl_.camera_id_){nullptr}
    , decltype(_impl_.settings_){nullptr}
    , decltype(_impl_.dispatching_){nullptr}
    , decltype(_impl_.sip_trunk_){nullptr}
    , decltype(_impl_.redirect_){nullptr}
    , decltype(_impl_.autochange_password_settings_){nullptr}
    , decltype(_impl_.sip_account_){nullptr}
    , decltype(_impl_.sync_status_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.preset_id_) {}

    , decltype(_impl_.preset_status_type_) {}

    , decltype(_impl_.is_sl3_mode_enabled_) {}

    , decltype(_impl_.type_) {}

    , decltype(_impl_.model_type_) {}

    , decltype(_impl_.owner_company_id_) {}

    , decltype(_impl_.flatgramm_id_) {}

    , decltype(_impl_.utc_offset_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.mac_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.mac_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_mac_address().empty()) {
    _this->_impl_.mac_address_.Set(from._internal_mac_address(), _this->GetArenaForAllocation());
  }
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  _impl_.serial_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.serial_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_serial_number().empty()) {
    _this->_impl_.serial_number_.Set(from._internal_serial_number(), _this->GetArenaForAllocation());
  }
  _impl_.hardware_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hardware_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_hardware_version().empty()) {
    _this->_impl_.hardware_version_.Set(from._internal_hardware_version(), _this->GetArenaForAllocation());
  }
  _impl_.software_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.software_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_software_version().empty()) {
    _this->_impl_.software_version_.Set(from._internal_software_version(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.preset_configured_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.preset_configured_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.ip_address_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.ip_address_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.port_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.port_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.sputnik_credentials_ = new ::keyapis::device::v1::Device_SputnikCredentials(*from._impl_.sputnik_credentials_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.location_ = new ::keyapis::device::v1::Device_Location(*from._impl_.location_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.camera_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.camera_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.settings_ = new ::keyapis::device::v1::Device_Settings(*from._impl_.settings_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.dispatching_ = new ::keyapis::device::v1::Device_Dispatching(*from._impl_.dispatching_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.sip_trunk_ = new ::keyapis::device::v1::Device_SipTrunk(*from._impl_.sip_trunk_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.redirect_ = new ::keyapis::device::v1::Device_Redirect(*from._impl_.redirect_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000400u) != 0) {
    _this->_impl_.autochange_password_settings_ = new ::keyapis::device::v1::Device_AutochangePasswordSettings(*from._impl_.autochange_password_settings_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000800u) != 0) {
    _this->_impl_.sip_account_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.sip_account_);
  }
  if ((from._impl_._has_bits_[0] & 0x00001000u) != 0) {
    _this->_impl_.sync_status_ = new ::keyapis::device::v1::SyncStatus(*from._impl_.sync_status_);
  }
  ::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.Device)
}

inline void Device::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.tags_){arena}
    , decltype(_impl_.credentials_){arena}
    , decltype(_impl_.mac_address_) {}

    , decltype(_impl_.title_) {}

    , decltype(_impl_.serial_number_) {}

    , decltype(_impl_.hardware_version_) {}

    , decltype(_impl_.software_version_) {}

    , decltype(_impl_.preset_configured_at_){nullptr}
    , decltype(_impl_.ip_address_){nullptr}
    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.sputnik_credentials_){nullptr}
    , decltype(_impl_.location_){nullptr}
    , decltype(_impl_.camera_id_){nullptr}
    , decltype(_impl_.settings_){nullptr}
    , decltype(_impl_.dispatching_){nullptr}
    , decltype(_impl_.sip_trunk_){nullptr}
    , decltype(_impl_.redirect_){nullptr}
    , decltype(_impl_.autochange_password_settings_){nullptr}
    , decltype(_impl_.sip_account_){nullptr}
    , decltype(_impl_.sync_status_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.preset_id_) { 0 }

    , decltype(_impl_.preset_status_type_) { 0 }

    , decltype(_impl_.is_sl3_mode_enabled_) { false }

    , decltype(_impl_.type_) { 0 }

    , decltype(_impl_.model_type_) { 0 }

    , decltype(_impl_.owner_company_id_) { 0 }

    , decltype(_impl_.flatgramm_id_) { 0 }

    , decltype(_impl_.utc_offset_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
  _impl_.mac_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.mac_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.serial_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.serial_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.hardware_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hardware_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.software_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.software_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Device::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_tags()->~RepeatedPtrField();
  _internal_mutable_credentials()->~RepeatedPtrField();
  _impl_.mac_address_.Destroy();
  _impl_.title_.Destroy();
  _impl_.serial_number_.Destroy();
  _impl_.hardware_version_.Destroy();
  _impl_.software_version_.Destroy();
  if (this != internal_default_instance()) delete _impl_.preset_configured_at_;
  if (this != internal_default_instance()) delete _impl_.ip_address_;
  if (this != internal_default_instance()) delete _impl_.port_;
  if (this != internal_default_instance()) delete _impl_.sputnik_credentials_;
  if (this != internal_default_instance()) delete _impl_.location_;
  if (this != internal_default_instance()) delete _impl_.camera_id_;
  if (this != internal_default_instance()) delete _impl_.settings_;
  if (this != internal_default_instance()) delete _impl_.dispatching_;
  if (this != internal_default_instance()) delete _impl_.sip_trunk_;
  if (this != internal_default_instance()) delete _impl_.redirect_;
  if (this != internal_default_instance()) delete _impl_.autochange_password_settings_;
  if (this != internal_default_instance()) delete _impl_.sip_account_;
  if (this != internal_default_instance()) delete _impl_.sync_status_;
}

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

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

  _internal_mutable_tags()->Clear();
  _internal_mutable_credentials()->Clear();
  _impl_.mac_address_.ClearToEmpty();
  _impl_.title_.ClearToEmpty();
  _impl_.serial_number_.ClearToEmpty();
  _impl_.hardware_version_.ClearToEmpty();
  _impl_.software_version_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.preset_configured_at_ != nullptr);
      _impl_.preset_configured_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.ip_address_ != nullptr);
      _impl_.ip_address_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.port_ != nullptr);
      _impl_.port_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.sputnik_credentials_ != nullptr);
      _impl_.sputnik_credentials_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.location_ != nullptr);
      _impl_.location_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.camera_id_ != nullptr);
      _impl_.camera_id_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.settings_ != nullptr);
      _impl_.settings_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.dispatching_ != nullptr);
      _impl_.dispatching_->Clear();
    }
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.sip_trunk_ != nullptr);
      _impl_.sip_trunk_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.redirect_ != nullptr);
      _impl_.redirect_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      ABSL_DCHECK(_impl_.autochange_password_settings_ != nullptr);
      _impl_.autochange_password_settings_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      ABSL_DCHECK(_impl_.sip_account_ != nullptr);
      _impl_.sip_account_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      ABSL_DCHECK(_impl_.sync_status_ != nullptr);
      _impl_.sync_status_->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* Device::_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 preset_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.preset_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_preset_status_type(static_cast<::keyapis::device::v1::Device_PresetStatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp preset_configured_at = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_preset_configured_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          _impl_.is_sl3_mode_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::device::v1::Device_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string mac_address = 7 [(.google.api.field_behavior) = REQUIRED];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_mac_address();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string title = 8 [(.google.api.field_behavior) = REQUIRED];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_model_type(static_cast<::keyapis::device::v1::Device_ModelType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 owner_company_id = 10 [(.google.api.field_behavior) = REQUIRED];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
          _impl_.owner_company_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string serial_number = 11 [(.google.api.field_behavior) = REQUIRED];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          auto str = _internal_mutable_serial_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 flatgramm_id = 12 [(.google.api.field_behavior) = REQUIRED];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
          _impl_.flatgramm_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 utc_offset = 13 [(.google.api.field_behavior) = REQUIRED];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
          _impl_.utc_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.StatusType status_type = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::device::v1::Device_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue ip_address = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_ip_address(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value port = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_port(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_sputnik_credentials(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Location location = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_location(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue camera_id = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_camera_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string tags = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
          ptr -= 2;
          do {
            ptr += 2;
            auto str = _internal_add_tags();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Settings settings = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_settings(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string hardware_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 178)) {
          auto str = _internal_mutable_hardware_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string software_version = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 186)) {
          auto str = _internal_mutable_software_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Dispatching dispatching = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
          ptr = ctx->ParseMessage(_internal_mutable_dispatching(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.SipTrunk sip_trunk = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_sip_trunk(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Redirect redirect = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_redirect(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;
      case 27:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_autochange_password_settings(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 28:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 226)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_credentials(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<226>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 234)) {
          ptr = ctx->ParseMessage(_internal_mutable_sip_account(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 30:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 242)) {
          ptr = ctx->ParseMessage(_internal_mutable_sync_status(), 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* Device::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Device)
  ::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 preset_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_preset_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_preset_id(), target);
  }

  // .keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {
  if (this->_internal_preset_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_preset_status_type(), target);
  }

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

  // bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {
  if (this->_internal_is_sl3_mode_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        5, this->_internal_is_sl3_mode_enabled(), target);
  }

  // .keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        6, this->_internal_type(), target);
  }

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

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

  // .keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_model_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        9, this->_internal_model_type(), target);
  }

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

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

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

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

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

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

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

  // .keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::sputnik_credentials(this),
        _Internal::sputnik_credentials(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Location location = 18;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(18, _Internal::location(this),
        _Internal::location(this).GetCachedSize(), target, stream);
  }

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

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

  // .keyapis.device.v1.Device.Settings settings = 21;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(21, _Internal::settings(this),
        _Internal::settings(this).GetCachedSize(), target, stream);
  }

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

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

  // .keyapis.device.v1.Device.Dispatching dispatching = 24;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(24, _Internal::dispatching(this),
        _Internal::dispatching(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.SipTrunk sip_trunk = 25;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(25, _Internal::sip_trunk(this),
        _Internal::sip_trunk(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.Redirect redirect = 26;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(26, _Internal::redirect(this),
        _Internal::redirect(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(27, _Internal::autochange_password_settings(this),
        _Internal::autochange_password_settings(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_credentials_size()); i < n; i++) {
    const auto& repfield = this->_internal_credentials(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(28, repfield, repfield.GetCachedSize(), target, stream);
  }

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

  // .keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00001000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(30, _Internal::sync_status(this),
        _Internal::sync_status(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.Device)
  return target;
}

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

  // repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
  total_size += 2UL * this->_internal_credentials_size();
  for (const auto& msg : this->_internal_credentials()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

  // string hardware_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_hardware_version().empty()) {
    total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_hardware_version());
  }

  // string software_version = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_software_version().empty()) {
    total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_software_version());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.Timestamp preset_configured_at = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.preset_configured_at_);
    }

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

    // .google.protobuf.Int32Value port = 16;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.port_);
    }

    // .keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sputnik_credentials_);
    }

    // .keyapis.device.v1.Device.Location location = 18;
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.location_);
    }

    // .google.protobuf.StringValue camera_id = 19;
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.camera_id_);
    }

    // .keyapis.device.v1.Device.Settings settings = 21;
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.settings_);
    }

    // .keyapis.device.v1.Device.Dispatching dispatching = 24;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dispatching_);
    }

  }
  if (cached_has_bits & 0x00001f00u) {
    // .keyapis.device.v1.Device.SipTrunk sip_trunk = 25;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sip_trunk_);
    }

    // .keyapis.device.v1.Device.Redirect redirect = 26;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.redirect_);
    }

    // .keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.autochange_password_settings_);
    }

    // .google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sip_account_);
    }

    // .keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sync_status_);
    }

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

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

  // .keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {
  if (this->_internal_preset_status_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_preset_status_type());
  }

  // bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {
  if (this->_internal_is_sl3_mode_enabled() != 0) {
    total_size += 2;
  }

  // .keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  // .keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_model_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_model_type());
  }

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

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

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

  // .keyapis.device.v1.Device.StatusType status_type = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
  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 Device::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Device*>(
      &from));
}

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

  _this->_internal_mutable_tags()->MergeFrom(from._internal_tags());
  _this->_internal_mutable_credentials()->MergeFrom(from._internal_credentials());
  if (!from._internal_mac_address().empty()) {
    _this->_internal_set_mac_address(from._internal_mac_address());
  }
  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  if (!from._internal_serial_number().empty()) {
    _this->_internal_set_serial_number(from._internal_serial_number());
  }
  if (!from._internal_hardware_version().empty()) {
    _this->_internal_set_hardware_version(from._internal_hardware_version());
  }
  if (!from._internal_software_version().empty()) {
    _this->_internal_set_software_version(from._internal_software_version());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_preset_configured_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_preset_configured_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_ip_address()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_ip_address());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_port()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_port());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_sputnik_credentials()->::keyapis::device::v1::Device_SputnikCredentials::MergeFrom(
          from._internal_sputnik_credentials());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_location()->::keyapis::device::v1::Device_Location::MergeFrom(
          from._internal_location());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_camera_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_camera_id());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_settings()->::keyapis::device::v1::Device_Settings::MergeFrom(
          from._internal_settings());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_dispatching()->::keyapis::device::v1::Device_Dispatching::MergeFrom(
          from._internal_dispatching());
    }
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_sip_trunk()->::keyapis::device::v1::Device_SipTrunk::MergeFrom(
          from._internal_sip_trunk());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_redirect()->::keyapis::device::v1::Device_Redirect::MergeFrom(
          from._internal_redirect());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_autochange_password_settings()->::keyapis::device::v1::Device_AutochangePasswordSettings::MergeFrom(
          from._internal_autochange_password_settings());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_sip_account()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_sip_account());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_sync_status()->::keyapis::device::v1::SyncStatus::MergeFrom(
          from._internal_sync_status());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_preset_id() != 0) {
    _this->_internal_set_preset_id(from._internal_preset_id());
  }
  if (from._internal_preset_status_type() != 0) {
    _this->_internal_set_preset_status_type(from._internal_preset_status_type());
  }
  if (from._internal_is_sl3_mode_enabled() != 0) {
    _this->_internal_set_is_sl3_mode_enabled(from._internal_is_sl3_mode_enabled());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  if (from._internal_model_type() != 0) {
    _this->_internal_set_model_type(from._internal_model_type());
  }
  if (from._internal_owner_company_id() != 0) {
    _this->_internal_set_owner_company_id(from._internal_owner_company_id());
  }
  if (from._internal_flatgramm_id() != 0) {
    _this->_internal_set_flatgramm_id(from._internal_flatgramm_id());
  }
  if (from._internal_utc_offset() != 0) {
    _this->_internal_set_utc_offset(from._internal_utc_offset());
  }
  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 Device::CopyFrom(const Device& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Device)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Device::InternalSwap(Device* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _internal_mutable_tags()->InternalSwap(
      other->_internal_mutable_tags());
  _internal_mutable_credentials()->InternalSwap(other->_internal_mutable_credentials());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.mac_address_, lhs_arena,
                                       &other->_impl_.mac_address_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.serial_number_, lhs_arena,
                                       &other->_impl_.serial_number_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hardware_version_, lhs_arena,
                                       &other->_impl_.hardware_version_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.software_version_, lhs_arena,
                                       &other->_impl_.software_version_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Device, _impl_.status_type_)
      + sizeof(Device::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(Device, _impl_.preset_configured_at_)>(
          reinterpret_cast<char*>(&_impl_.preset_configured_at_),
          reinterpret_cast<char*>(&other->_impl_.preset_configured_at_));
}

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

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

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

const ::keyapis::device::v1::Device_Location&
DeviceLite::_Internal::location(const DeviceLite* msg) {
  return *msg->_impl_.location_;
}
DeviceLite::DeviceLite(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceLite)
}
DeviceLite::DeviceLite(const DeviceLite& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceLite* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.location_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.type_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.location_ = new ::keyapis::device::v1::Device_Location(*from._impl_.location_);
  }
  ::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.DeviceLite)
}

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

    , decltype(_impl_.location_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.type_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

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

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

inline void DeviceLite::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.title_.Destroy();
  if (this != internal_default_instance()) delete _impl_.location_;
}

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

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

  _impl_.title_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.location_ != nullptr);
    _impl_.location_->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* DeviceLite::_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;
      // .keyapis.device.v1.Device.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::device::v1::Device_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string title = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.Location location = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_location(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.StatusType status_type = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::device::v1::Device_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.device.v1.Device.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_type(), target);
  }

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

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

  // .keyapis.device.v1.Device.StatusType status_type = 5;
  if (this->_internal_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this->_internal_status_type(), target);
  }

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

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

  // .keyapis.device.v1.Device.Location location = 4;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.location_);
  }

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

  // .keyapis.device.v1.Device.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

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

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

  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_location()->::keyapis::device::v1::Device_Location::MergeFrom(
        from._internal_location());
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  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 DeviceLite::CopyFrom(const DeviceLite& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeviceLite)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DeviceLite::InternalSwap(DeviceLite* 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_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceLite, _impl_.status_type_)
      + sizeof(DeviceLite::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(DeviceLite, _impl_.location_)>(
          reinterpret_cast<char*>(&_impl_.location_),
          reinterpret_cast<char*>(&other->_impl_.location_));
}

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

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

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

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceConfigurationStatus_Payload_Autocollect::_Internal::enabled_at(const DeviceConfigurationStatus_Payload_Autocollect* msg) {
  return *msg->_impl_.enabled_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceConfigurationStatus_Payload_Autocollect::_Internal::to_be_disabled_at(const DeviceConfigurationStatus_Payload_Autocollect* msg) {
  return *msg->_impl_.to_be_disabled_at_;
}
void DeviceConfigurationStatus_Payload_Autocollect::clear_enabled_at() {
  if (_impl_.enabled_at_ != nullptr) _impl_.enabled_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void DeviceConfigurationStatus_Payload_Autocollect::clear_to_be_disabled_at() {
  if (_impl_.to_be_disabled_at_ != nullptr) _impl_.to_be_disabled_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
DeviceConfigurationStatus_Payload_Autocollect::DeviceConfigurationStatus_Payload_Autocollect(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect)
}
DeviceConfigurationStatus_Payload_Autocollect::DeviceConfigurationStatus_Payload_Autocollect(const DeviceConfigurationStatus_Payload_Autocollect& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceConfigurationStatus_Payload_Autocollect* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.enabled_at_){nullptr}
    , decltype(_impl_.to_be_disabled_at_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.enabled_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.enabled_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.to_be_disabled_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.to_be_disabled_at_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect)
}

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

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

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

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

void DeviceConfigurationStatus_Payload_Autocollect::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect)
  ::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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.enabled_at_ != nullptr);
      _impl_.enabled_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.to_be_disabled_at_ != nullptr);
      _impl_.to_be_disabled_at_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceConfigurationStatus_Payload_Autocollect::_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) {
      // .google.protobuf.Timestamp enabled_at = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_enabled_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp to_be_disabled_at = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_to_be_disabled_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* DeviceConfigurationStatus_Payload_Autocollect::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // .google.protobuf.Timestamp to_be_disabled_at = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::to_be_disabled_at(this),
        _Internal::to_be_disabled_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.DeviceConfigurationStatus.Payload.Autocollect)
  return target;
}

::size_t DeviceConfigurationStatus_Payload_Autocollect::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect)
  ::size_t total_size = 0;

  ::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 & 0x00000003u) {
    // .google.protobuf.Timestamp enabled_at = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.enabled_at_);
    }

    // .google.protobuf.Timestamp to_be_disabled_at = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.to_be_disabled_at_);
    }

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

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

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_enabled_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_enabled_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_to_be_disabled_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_to_be_disabled_at());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeviceConfigurationStatus_Payload_Autocollect::InternalSwap(DeviceConfigurationStatus_Payload_Autocollect* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatus_Payload_Autocollect, _impl_.to_be_disabled_at_)
      + sizeof(DeviceConfigurationStatus_Payload_Autocollect::_impl_.to_be_disabled_at_)
      - PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatus_Payload_Autocollect, _impl_.enabled_at_)>(
          reinterpret_cast<char*>(&_impl_.enabled_at_),
          reinterpret_cast<char*>(&other->_impl_.enabled_at_));
}

std::string DeviceConfigurationStatus_Payload_Autocollect::GetTypeName() const {
  return "keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect";
}

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

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

const ::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect&
DeviceConfigurationStatus_Payload::_Internal::autocollect(const DeviceConfigurationStatus_Payload* msg) {
  return *msg->_impl_.attribute_.autocollect_;
}
void DeviceConfigurationStatus_Payload::set_allocated_autocollect(::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect* autocollect) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_attribute();
  if (autocollect) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(autocollect);
    if (message_arena != submessage_arena) {
      autocollect = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, autocollect, submessage_arena);
    }
    set_has_autocollect();
    _impl_.attribute_.autocollect_ = autocollect;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.DeviceConfigurationStatus.Payload.autocollect)
}
DeviceConfigurationStatus_Payload::DeviceConfigurationStatus_Payload(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceConfigurationStatus.Payload)
}
DeviceConfigurationStatus_Payload::DeviceConfigurationStatus_Payload(const DeviceConfigurationStatus_Payload& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceConfigurationStatus_Payload* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.attribute_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_attribute();
  switch (from.attribute_case()) {
    case kAutocollect: {
      _this->_internal_mutable_autocollect()->::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect::MergeFrom(
          from._internal_autocollect());
      break;
    }
    case ATTRIBUTE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatus.Payload)
}

inline void DeviceConfigurationStatus_Payload::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.attribute_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_attribute();
}

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

inline void DeviceConfigurationStatus_Payload::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_attribute()) {
    clear_attribute();
  }
}

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

void DeviceConfigurationStatus_Payload::clear_attribute() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.DeviceConfigurationStatus.Payload)
  switch (attribute_case()) {
    case kAutocollect: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.attribute_.autocollect_;
      }
      break;
    }
    case ATTRIBUTE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = ATTRIBUTE_NOT_SET;
}


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

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

const char* DeviceConfigurationStatus_Payload::_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.DeviceConfigurationStatus.Payload.Autocollect autocollect = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_autocollect(), 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* DeviceConfigurationStatus_Payload::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatus.Payload)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect autocollect = 1;
  if (attribute_case() == kAutocollect) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::autocollect(this),
        _Internal::autocollect(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.DeviceConfigurationStatus.Payload)
  return target;
}

::size_t DeviceConfigurationStatus_Payload::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceConfigurationStatus.Payload)
  ::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 (attribute_case()) {
    // .keyapis.device.v1.DeviceConfigurationStatus.Payload.Autocollect autocollect = 1;
    case kAutocollect: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.attribute_.autocollect_);
      break;
    }
    case ATTRIBUTE_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 DeviceConfigurationStatus_Payload::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceConfigurationStatus_Payload*>(
      &from));
}

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

  switch (from.attribute_case()) {
    case kAutocollect: {
      _this->_internal_mutable_autocollect()->::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect::MergeFrom(
          from._internal_autocollect());
      break;
    }
    case ATTRIBUTE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class DeviceConfigurationStatus::_Internal {
 public:
  using HasBits = decltype(std::declval<DeviceConfigurationStatus>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatus, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& configured_at(const DeviceConfigurationStatus* msg);
  static void set_has_configured_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& error_message(const DeviceConfigurationStatus* msg);
  static void set_has_error_message(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::keyapis::device::v1::DeviceConfigurationStatus_Payload& payload(const DeviceConfigurationStatus* msg);
  static void set_has_payload(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& next_retry_at(const DeviceConfigurationStatus* msg);
  static void set_has_next_retry_at(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceConfigurationStatus::_Internal::configured_at(const DeviceConfigurationStatus* msg) {
  return *msg->_impl_.configured_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
DeviceConfigurationStatus::_Internal::error_message(const DeviceConfigurationStatus* msg) {
  return *msg->_impl_.error_message_;
}
const ::keyapis::device::v1::DeviceConfigurationStatus_Payload&
DeviceConfigurationStatus::_Internal::payload(const DeviceConfigurationStatus* msg) {
  return *msg->_impl_.payload_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceConfigurationStatus::_Internal::next_retry_at(const DeviceConfigurationStatus* msg) {
  return *msg->_impl_.next_retry_at_;
}
void DeviceConfigurationStatus::clear_configured_at() {
  if (_impl_.configured_at_ != nullptr) _impl_.configured_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void DeviceConfigurationStatus::clear_error_message() {
  if (_impl_.error_message_ != nullptr) _impl_.error_message_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void DeviceConfigurationStatus::clear_next_retry_at() {
  if (_impl_.next_retry_at_ != nullptr) _impl_.next_retry_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
DeviceConfigurationStatus::DeviceConfigurationStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceConfigurationStatus)
}
DeviceConfigurationStatus::DeviceConfigurationStatus(const DeviceConfigurationStatus& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceConfigurationStatus* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.configured_at_){nullptr}
    , decltype(_impl_.error_message_){nullptr}
    , decltype(_impl_.payload_){nullptr}
    , decltype(_impl_.next_retry_at_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.device_id_) {}

    , decltype(_impl_.configuration_type_) {}

    , decltype(_impl_.status_type_) {}

    , decltype(_impl_.retry_count_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.configured_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.configured_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.error_message_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.error_message_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.payload_ = new ::keyapis::device::v1::DeviceConfigurationStatus_Payload(*from._impl_.payload_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.next_retry_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.next_retry_at_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.retry_count_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.retry_count_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatus)
}

inline void DeviceConfigurationStatus::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.configured_at_){nullptr}
    , decltype(_impl_.error_message_){nullptr}
    , decltype(_impl_.payload_){nullptr}
    , decltype(_impl_.next_retry_at_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.device_id_) { 0 }

    , decltype(_impl_.configuration_type_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

    , decltype(_impl_.retry_count_) { 0 }

  };
}

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

inline void DeviceConfigurationStatus::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.configured_at_;
  if (this != internal_default_instance()) delete _impl_.error_message_;
  if (this != internal_default_instance()) delete _impl_.payload_;
  if (this != internal_default_instance()) delete _impl_.next_retry_at_;
}

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

void DeviceConfigurationStatus::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeviceConfigurationStatus)
  ::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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.configured_at_ != nullptr);
      _impl_.configured_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.error_message_ != nullptr);
      _impl_.error_message_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.payload_ != nullptr);
      _impl_.payload_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.next_retry_at_ != nullptr);
      _impl_.next_retry_at_->Clear();
    }
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.retry_count_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.retry_count_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceConfigurationStatus::_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 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_type = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_configuration_type(static_cast<::keyapis::device::v1::DeviceConfigurationStatus_ConfigurationType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.DeviceConfigurationStatus.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::DeviceConfigurationStatus_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp configured_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_configured_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue error_message = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_error_message(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 retry_count = 7 [(.google.api.field_behavior) = REQUIRED];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
          _impl_.retry_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.DeviceConfigurationStatus.Payload payload = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_payload(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp next_retry_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_next_retry_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* DeviceConfigurationStatus::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatus)
  ::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 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_device_id(), target);
  }

  // .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_configuration_type(), target);
  }

  // .keyapis.device.v1.DeviceConfigurationStatus.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 configured_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::configured_at(this),
        _Internal::configured_at(this).GetCachedSize(), target, stream);
  }

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

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

  // .keyapis.device.v1.DeviceConfigurationStatus.Payload payload = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::payload(this),
        _Internal::payload(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp next_retry_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::next_retry_at(this),
        _Internal::next_retry_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.DeviceConfigurationStatus)
  return target;
}

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

  ::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 & 0x0000000fu) {
    // .google.protobuf.Timestamp configured_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.configured_at_);
    }

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

    // .keyapis.device.v1.DeviceConfigurationStatus.Payload payload = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.payload_);
    }

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

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

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

  // .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_configuration_type());
  }

  // .keyapis.device.v1.DeviceConfigurationStatus.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());
  }

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

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

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_configured_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_configured_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_error_message()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_error_message());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_payload()->::keyapis::device::v1::DeviceConfigurationStatus_Payload::MergeFrom(
          from._internal_payload());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_next_retry_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_next_retry_at());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  if (from._internal_configuration_type() != 0) {
    _this->_internal_set_configuration_type(from._internal_configuration_type());
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  if (from._internal_retry_count() != 0) {
    _this->_internal_set_retry_count(from._internal_retry_count());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeviceConfigurationStatus::InternalSwap(DeviceConfigurationStatus* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatus, _impl_.retry_count_)
      + sizeof(DeviceConfigurationStatus::_impl_.retry_count_)
      - PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatus, _impl_.configured_at_)>(
          reinterpret_cast<char*>(&_impl_.configured_at_),
          reinterpret_cast<char*>(&other->_impl_.configured_at_));
}

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

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

class DeviceConfigurationStatusGrouped::_Internal {
 public:
};

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

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _this->_impl_.device_id_ = from._impl_.device_id_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatusGrouped)
}

inline void DeviceConfigurationStatusGrouped::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.statuses_){arena}
    , decltype(_impl_.device_id_) { 0 }

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

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

inline void DeviceConfigurationStatusGrouped::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_statuses()->~RepeatedPtrField();
}

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

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

  _internal_mutable_statuses()->Clear();
  _impl_.device_id_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceConfigurationStatusGrouped::_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 device_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_statuses(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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* DeviceConfigurationStatusGrouped::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatusGrouped)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // repeated .keyapis.device.v1.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_statuses_size()); i < n; i++) {
    const auto& repfield = this->_internal_statuses(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.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.DeviceConfigurationStatusGrouped)
  return target;
}

::size_t DeviceConfigurationStatusGrouped::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceConfigurationStatusGrouped)
  ::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.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];
  total_size += 1UL * this->_internal_statuses_size();
  for (const auto& msg : this->_internal_statuses()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

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

  _this->_internal_mutable_statuses()->MergeFrom(from._internal_statuses());
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

class CameraStatus::_Internal {
 public:
  using HasBits = decltype(std::declval<CameraStatus>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(CameraStatus, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& id(const CameraStatus* msg);
  static void set_has_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
CameraStatus::_Internal::id(const CameraStatus* msg) {
  return *msg->_impl_.id_;
}
void CameraStatus::clear_id() {
  if (_impl_.id_ != nullptr) _impl_.id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
CameraStatus::CameraStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.CameraStatus)
}
CameraStatus::CameraStatus(const CameraStatus& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  CameraStatus* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.error_message_) {}

    , decltype(_impl_.id_){nullptr}
    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.error_message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.error_message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_error_message().empty()) {
    _this->_impl_.error_message_.Set(from._internal_error_message(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.id_);
  }
  _this->_impl_.status_type_ = from._impl_.status_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.CameraStatus)
}

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

    , decltype(_impl_.id_){nullptr}
    , decltype(_impl_.status_type_) { 0 }

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

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

inline void CameraStatus::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.error_message_.Destroy();
  if (this != internal_default_instance()) delete _impl_.id_;
}

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

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

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

const char* CameraStatus::_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) {
      // .google.protobuf.StringValue id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.CameraStatus.StatusType status_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      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_status_type(static_cast<::keyapis::device::v1::CameraStatus_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string error_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_error_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

::size_t CameraStatus::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.CameraStatus)
  ::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 error_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_error_message().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_error_message());
  }

  // .google.protobuf.StringValue id = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.id_);
  }

  // .keyapis.device.v1.CameraStatus.StatusType status_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
  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 CameraStatus::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const CameraStatus*>(
      &from));
}

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

  if (!from._internal_error_message().empty()) {
    _this->_internal_set_error_message(from._internal_error_message());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_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 CameraStatus::CopyFrom(const CameraStatus& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.CameraStatus)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void CameraStatus::InternalSwap(CameraStatus* 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_.error_message_, lhs_arena,
                                       &other->_impl_.error_message_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(CameraStatus, _impl_.status_type_)
      + sizeof(CameraStatus::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(CameraStatus, _impl_.id_)>(
          reinterpret_cast<char*>(&_impl_.id_),
          reinterpret_cast<char*>(&other->_impl_.id_));
}

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

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

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

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
SyncStatus::_Internal::successful_at(const SyncStatus* msg) {
  return *msg->_impl_.successful_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
SyncStatus::_Internal::sync_at(const SyncStatus* msg) {
  return *msg->_impl_.sync_at_;
}
void SyncStatus::clear_successful_at() {
  if (_impl_.successful_at_ != nullptr) _impl_.successful_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void SyncStatus::clear_sync_at() {
  if (_impl_.sync_at_ != nullptr) _impl_.sync_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
SyncStatus::SyncStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.SyncStatus)
}
SyncStatus::SyncStatus(const SyncStatus& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SyncStatus* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.error_message_) {}

    , decltype(_impl_.successful_at_){nullptr}
    , decltype(_impl_.sync_at_){nullptr}
    , decltype(_impl_.status_type_) {}

    , decltype(_impl_.retry_count_) {}
  };

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

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

    , decltype(_impl_.successful_at_){nullptr}
    , decltype(_impl_.sync_at_){nullptr}
    , decltype(_impl_.status_type_) { 0 }

    , decltype(_impl_.retry_count_) { 0 }

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

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

inline void SyncStatus::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.error_message_.Destroy();
  if (this != internal_default_instance()) delete _impl_.successful_at_;
  if (this != internal_default_instance()) delete _impl_.sync_at_;
}

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

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

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

const char* SyncStatus::_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.SyncStatus.StatusType status_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      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_status_type(static_cast<::keyapis::device::v1::SyncStatus_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_error_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 retry_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.retry_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp successful_at = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_successful_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp sync_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_sync_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* SyncStatus::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.SyncStatus)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // int32 retry_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_retry_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_retry_count(), target);
  }

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

  // .google.protobuf.Timestamp sync_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::sync_at(this),
        _Internal::sync_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.SyncStatus)
  return target;
}

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

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

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

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

  // int32 retry_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_retry_count() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_retry_count());
  }

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

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

  if (!from._internal_error_message().empty()) {
    _this->_internal_set_error_message(from._internal_error_message());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_successful_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_successful_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_sync_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_sync_at());
    }
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  if (from._internal_retry_count() != 0) {
    _this->_internal_set_retry_count(from._internal_retry_count());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SyncStatus::InternalSwap(SyncStatus* 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_.error_message_, lhs_arena,
                                       &other->_impl_.error_message_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SyncStatus, _impl_.retry_count_)
      + sizeof(SyncStatus::_impl_.retry_count_)
      - PROTOBUF_FIELD_OFFSET(SyncStatus, _impl_.successful_at_)>(
          reinterpret_cast<char*>(&_impl_.successful_at_),
          reinterpret_cast<char*>(&other->_impl_.successful_at_));
}

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

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

class GetDeviceRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::Device&
GetDeviceResponse::_Internal::data(const GetDeviceResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetDeviceResponse::set_allocated_data(::keyapis::device::v1::Device* 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.GetDeviceResponse.data)
}
GetDeviceResponse::GetDeviceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceResponse)
}
GetDeviceResponse::GetDeviceResponse(const GetDeviceResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceResponse* 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::Device::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceResponse)
}

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

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

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

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

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


void GetDeviceResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceResponse)
  ::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* GetDeviceResponse::_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.Device data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

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

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

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

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

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

class GetDeviceLiteRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::DeviceLite&
GetDeviceLiteResponse::_Internal::data(const GetDeviceLiteResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetDeviceLiteResponse::set_allocated_data(::keyapis::device::v1::DeviceLite* 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.GetDeviceLiteResponse.data)
}
GetDeviceLiteResponse::GetDeviceLiteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceLiteResponse)
}
GetDeviceLiteResponse::GetDeviceLiteResponse(const GetDeviceLiteResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceLiteResponse* 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::DeviceLite::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceLiteResponse)
}

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

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

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

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

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


void GetDeviceLiteResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceLiteResponse)
  ::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* GetDeviceLiteResponse::_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.DeviceLite data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char* PostDeviceRequest::_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.Device data = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

::size_t PostDeviceRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceRequest)
  ::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.Device data = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.data_);
  }

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

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

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

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

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

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

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

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

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

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

const ::keyapis::device::v1::ValidationError&
PostDeviceResponse_Error::_Internal::validation(const PostDeviceResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::device::v1::Device_SavingError&
PostDeviceResponse_Error::_Internal::saving(const PostDeviceResponse_Error* msg) {
  return *msg->_impl_.reason_.saving_;
}
void PostDeviceResponse_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(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.PostDeviceResponse.Error.validation)
}
void PostDeviceResponse_Error::set_allocated_saving(::keyapis::device::v1::Device_SavingError* saving) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (saving) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(saving);
    if (message_arena != submessage_arena) {
      saving = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, saving, submessage_arena);
    }
    set_has_saving();
    _impl_.reason_.saving_ = saving;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceResponse.Error.saving)
}
PostDeviceResponse_Error::PostDeviceResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceResponse.Error)
}
PostDeviceResponse_Error::PostDeviceResponse_Error(const PostDeviceResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceResponse_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 kSaving: {
      _this->_internal_mutable_saving()->::keyapis::device::v1::Device_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceResponse.Error)
}

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

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

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

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

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


void PostDeviceResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceResponse.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* PostDeviceResponse_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;
      // .keyapis.device.v1.Device.SavingError saving = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

void PostDeviceResponse_Error::MergeFrom(const PostDeviceResponse_Error& from) {
  PostDeviceResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceResponse.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 kSaving: {
      _this->_internal_mutable_saving()->::keyapis::device::v1::Device_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void GetDeviceListRequest::MergeFrom(const GetDeviceListRequest& from) {
  GetDeviceListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceListRequest)
  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::DeviceFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::device::v1::DevicePaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceListRequest::CopyFrom(const GetDeviceListRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceListRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceListRequest::IsInitialized() const {
  return true;
}

void GetDeviceListRequest::InternalSwap(GetDeviceListRequest* 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 GetDeviceListRequest::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceListRequest";
}

// ===================================================================

class GetDeviceListResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceListResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation(const GetDeviceListResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
GetDeviceListResponse_Error::_Internal::validation(const GetDeviceListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetDeviceListResponse_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(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.GetDeviceListResponse.Error.validation)
}
GetDeviceListResponse_Error::GetDeviceListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceListResponse.Error)
}
GetDeviceListResponse_Error::GetDeviceListResponse_Error(const GetDeviceListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceListResponse_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.GetDeviceListResponse.Error)
}

inline void GetDeviceListResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetDeviceListResponse_Error::~GetDeviceListResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceListResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetDeviceListResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceListResponse.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 GetDeviceListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceListResponse.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* GetDeviceListResponse_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* GetDeviceListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceListResponse.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.GetDeviceListResponse.Error)
  return target;
}

::size_t GetDeviceListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceListResponse.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 GetDeviceListResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceListResponse_Error*>(
      &from));
}

void GetDeviceListResponse_Error::MergeFrom(const GetDeviceListResponse_Error& from) {
  GetDeviceListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceListResponse.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 GetDeviceListResponse_Error::CopyFrom(const GetDeviceListResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceListResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceListResponse_Error::IsInitialized() const {
  return true;
}

void GetDeviceListResponse_Error::InternalSwap(GetDeviceListResponse_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 GetDeviceListResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceListResponse.Error";
}

// ===================================================================

class GetDeviceListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceListResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::Device& data(const GetDeviceListResponse* msg);
  static const ::keyapis::device::v1::GetDeviceListResponse_Error& error(const GetDeviceListResponse* msg);
};

const ::keyapis::device::v1::Device&
GetDeviceListResponse::_Internal::data(const GetDeviceListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::device::v1::GetDeviceListResponse_Error&
GetDeviceListResponse::_Internal::error(const GetDeviceListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetDeviceListResponse::set_allocated_data(::keyapis::device::v1::Device* 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.GetDeviceListResponse.data)
}
void GetDeviceListResponse::set_allocated_error(::keyapis::device::v1::GetDeviceListResponse_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.GetDeviceListResponse.error)
}
GetDeviceListResponse::GetDeviceListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceListResponse)
}
GetDeviceListResponse::GetDeviceListResponse(const GetDeviceListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceListResponse* 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::Device::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceListResponse)
}

inline void GetDeviceListResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetDeviceListResponse::~GetDeviceListResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceListResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetDeviceListResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceListResponse)
  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 GetDeviceListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceListResponse)
  ::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* GetDeviceListResponse::_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.Device 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.GetDeviceListResponse.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* GetDeviceListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceListResponse)
  ::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.GetDeviceListResponse)
  return target;
}

::size_t GetDeviceListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceListResponse)
  ::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.Device data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.GetDeviceListResponse.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 GetDeviceListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceListResponse*>(
      &from));
}

void GetDeviceListResponse::MergeFrom(const GetDeviceListResponse& from) {
  GetDeviceListResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceListResponse)
  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::Device::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceListResponse::CopyFrom(const GetDeviceListResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceListResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceListResponse::IsInitialized() const {
  return true;
}

void GetDeviceListResponse::InternalSwap(GetDeviceListResponse* 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 GetDeviceListResponse::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceListResponse";
}

// ===================================================================

class GetDeviceCountRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetDeviceCountRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetDeviceCountRequest, _impl_._has_bits_);
  static const ::keyapis::device::v1::DeviceFilter& filter(const GetDeviceCountRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::device::v1::DeviceFilter&
GetDeviceCountRequest::_Internal::filter(const GetDeviceCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetDeviceCountRequest::GetDeviceCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceCountRequest)
}
GetDeviceCountRequest::GetDeviceCountRequest(const GetDeviceCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceCountRequest* 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::DeviceFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceCountRequest)
}

inline void GetDeviceCountRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
  };
}

GetDeviceCountRequest::~GetDeviceCountRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceCountRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceCountRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
}

void GetDeviceCountRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceCountRequest)
  ::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* GetDeviceCountRequest::_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.DeviceFilter 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* GetDeviceCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.DeviceFilter 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.GetDeviceCountRequest)
  return target;
}

::size_t GetDeviceCountRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceCountRequest)
  ::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.DeviceFilter 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 GetDeviceCountRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceCountRequest*>(
      &from));
}

void GetDeviceCountRequest::MergeFrom(const GetDeviceCountRequest& from) {
  GetDeviceCountRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceCountRequest)
  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::DeviceFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceCountRequest::CopyFrom(const GetDeviceCountRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceCountRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceCountRequest::IsInitialized() const {
  return true;
}

void GetDeviceCountRequest::InternalSwap(GetDeviceCountRequest* 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 GetDeviceCountRequest::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceCountRequest";
}

// ===================================================================

class GetDeviceCountResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceCountResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation(const GetDeviceCountResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
GetDeviceCountResponse_Error::_Internal::validation(const GetDeviceCountResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetDeviceCountResponse_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(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.GetDeviceCountResponse.Error.validation)
}
GetDeviceCountResponse_Error::GetDeviceCountResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceCountResponse.Error)
}
GetDeviceCountResponse_Error::GetDeviceCountResponse_Error(const GetDeviceCountResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceCountResponse_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.GetDeviceCountResponse.Error)
}

inline void GetDeviceCountResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetDeviceCountResponse_Error::~GetDeviceCountResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceCountResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceCountResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetDeviceCountResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceCountResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceCountResponse.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 GetDeviceCountResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceCountResponse.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* GetDeviceCountResponse_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* GetDeviceCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceCountResponse.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.GetDeviceCountResponse.Error)
  return target;
}

::size_t GetDeviceCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceCountResponse.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 GetDeviceCountResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceCountResponse_Error*>(
      &from));
}

void GetDeviceCountResponse_Error::MergeFrom(const GetDeviceCountResponse_Error& from) {
  GetDeviceCountResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceCountResponse.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 GetDeviceCountResponse_Error::CopyFrom(const GetDeviceCountResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceCountResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceCountResponse_Error::IsInitialized() const {
  return true;
}

void GetDeviceCountResponse_Error::InternalSwap(GetDeviceCountResponse_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 GetDeviceCountResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceCountResponse.Error";
}

// ===================================================================

class GetDeviceCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceCountResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::GetDeviceCountResponse_Error& error(const GetDeviceCountResponse* msg);
};

const ::keyapis::device::v1::GetDeviceCountResponse_Error&
GetDeviceCountResponse::_Internal::error(const GetDeviceCountResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetDeviceCountResponse::set_allocated_error(::keyapis::device::v1::GetDeviceCountResponse_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.GetDeviceCountResponse.error)
}
GetDeviceCountResponse::GetDeviceCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceCountResponse)
}
GetDeviceCountResponse::GetDeviceCountResponse(const GetDeviceCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceCountResponse* 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::GetDeviceCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceCountResponse)
}

inline void GetDeviceCountResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetDeviceCountResponse::~GetDeviceCountResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceCountResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceCountResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetDeviceCountResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceCountResponse)
  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 GetDeviceCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceCountResponse)
  ::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* GetDeviceCountResponse::_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.GetDeviceCountResponse.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* GetDeviceCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceCountResponse)
  ::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.GetDeviceCountResponse)
  return target;
}

::size_t GetDeviceCountResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceCountResponse)
  ::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.GetDeviceCountResponse.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 GetDeviceCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceCountResponse*>(
      &from));
}

void GetDeviceCountResponse::MergeFrom(const GetDeviceCountResponse& from) {
  GetDeviceCountResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceCountResponse)
  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::GetDeviceCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceCountResponse::CopyFrom(const GetDeviceCountResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceCountResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceCountResponse::IsInitialized() const {
  return true;
}

void GetDeviceCountResponse::InternalSwap(GetDeviceCountResponse* 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 GetDeviceCountResponse::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceCountResponse";
}

// ===================================================================

class PutDeviceRequest::_Internal {
 public:
};

PutDeviceRequest::PutDeviceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PutDeviceRequest)
}
PutDeviceRequest::PutDeviceRequest(const PutDeviceRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PutDeviceRequest)
}

inline void PutDeviceRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , decltype(_impl_.preset_id_) { 0 }

    , decltype(_impl_.is_sl3_mode_enabled_) { false }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

PutDeviceRequest::~PutDeviceRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PutDeviceRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PutDeviceRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PutDeviceRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PutDeviceRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PutDeviceRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.is_sl3_mode_enabled_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.is_sl3_mode_enabled_));
  _internal_metadata_.Clear<std::string>();
}

const char* PutDeviceRequest::_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;
      // int32 preset_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.preset_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_sl3_mode_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.is_sl3_mode_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PutDeviceRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PutDeviceRequest)
  ::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);
  }

  // int32 preset_id = 2 [(.google.api.field_behavior) = OPTIONAL];
  if (this->_internal_preset_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_preset_id(), target);
  }

  // bool is_sl3_mode_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];
  if (this->_internal_is_sl3_mode_enabled() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        3, this->_internal_is_sl3_mode_enabled(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PutDeviceRequest)
  return target;
}

::size_t PutDeviceRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PutDeviceRequest)
  ::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());
  }

  // int32 preset_id = 2 [(.google.api.field_behavior) = OPTIONAL];
  if (this->_internal_preset_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_preset_id());
  }

  // bool is_sl3_mode_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];
  if (this->_internal_is_sl3_mode_enabled() != 0) {
    total_size += 2;
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PutDeviceRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PutDeviceRequest*>(
      &from));
}

void PutDeviceRequest::MergeFrom(const PutDeviceRequest& from) {
  PutDeviceRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PutDeviceRequest)
  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());
  }
  if (from._internal_preset_id() != 0) {
    _this->_internal_set_preset_id(from._internal_preset_id());
  }
  if (from._internal_is_sl3_mode_enabled() != 0) {
    _this->_internal_set_is_sl3_mode_enabled(from._internal_is_sl3_mode_enabled());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PutDeviceRequest::CopyFrom(const PutDeviceRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PutDeviceRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PutDeviceRequest::IsInitialized() const {
  return true;
}

void PutDeviceRequest::InternalSwap(PutDeviceRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PutDeviceRequest, _impl_.is_sl3_mode_enabled_)
      + sizeof(PutDeviceRequest::_impl_.is_sl3_mode_enabled_)
      - PROTOBUF_FIELD_OFFSET(PutDeviceRequest, _impl_.id_)>(
          reinterpret_cast<char*>(&_impl_.id_),
          reinterpret_cast<char*>(&other->_impl_.id_));
}

std::string PutDeviceRequest::GetTypeName() const {
  return "keyapis.device.v1.PutDeviceRequest";
}

// ===================================================================

class PutDeviceResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PutDeviceResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::Device& data(const PutDeviceResponse* msg);
};

const ::keyapis::device::v1::Device&
PutDeviceResponse::_Internal::data(const PutDeviceResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void PutDeviceResponse::set_allocated_data(::keyapis::device::v1::Device* 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.PutDeviceResponse.data)
}
PutDeviceResponse::PutDeviceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PutDeviceResponse)
}
PutDeviceResponse::PutDeviceResponse(const PutDeviceResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PutDeviceResponse* 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::Device::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PutDeviceResponse)
}

inline void PutDeviceResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

PutDeviceResponse::~PutDeviceResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PutDeviceResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PutDeviceResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void PutDeviceResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PutDeviceResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PutDeviceResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void PutDeviceResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PutDeviceResponse)
  ::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* PutDeviceResponse::_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.Device data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PutDeviceResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PutDeviceResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.Device data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PutDeviceResponse)
  return target;
}

::size_t PutDeviceResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PutDeviceResponse)
  ::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.Device data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PutDeviceResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PutDeviceResponse*>(
      &from));
}

void PutDeviceResponse::MergeFrom(const PutDeviceResponse& from) {
  PutDeviceResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PutDeviceResponse)
  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::Device::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PutDeviceResponse::CopyFrom(const PutDeviceResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PutDeviceResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PutDeviceResponse::IsInitialized() const {
  return true;
}

void PutDeviceResponse::InternalSwap(PutDeviceResponse* 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 PutDeviceResponse::GetTypeName() const {
  return "keyapis.device.v1.PutDeviceResponse";
}

// ===================================================================

class PostDeviceInstallPresetRequest::_Internal {
 public:
};

PostDeviceInstallPresetRequest::PostDeviceInstallPresetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceInstallPresetRequest)
}
PostDeviceInstallPresetRequest::PostDeviceInstallPresetRequest(const PostDeviceInstallPresetRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceInstallPresetRequest)
}

inline void PostDeviceInstallPresetRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceInstallPresetRequest::~PostDeviceInstallPresetRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceInstallPresetRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceInstallPresetRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceInstallPresetRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceInstallPresetRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceInstallPresetRequest)
  ::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* PostDeviceInstallPresetRequest::_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* PostDeviceInstallPresetRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceInstallPresetRequest)
  ::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.PostDeviceInstallPresetRequest)
  return target;
}

::size_t PostDeviceInstallPresetRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceInstallPresetRequest)
  ::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 PostDeviceInstallPresetRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceInstallPresetRequest*>(
      &from));
}

void PostDeviceInstallPresetRequest::MergeFrom(const PostDeviceInstallPresetRequest& from) {
  PostDeviceInstallPresetRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceInstallPresetRequest)
  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 PostDeviceInstallPresetRequest::CopyFrom(const PostDeviceInstallPresetRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceInstallPresetRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceInstallPresetRequest::IsInitialized() const {
  return true;
}

void PostDeviceInstallPresetRequest::InternalSwap(PostDeviceInstallPresetRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string PostDeviceInstallPresetRequest::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceInstallPresetRequest";
}

// ===================================================================

class PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::_Internal {
 public:
};

PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
}
PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing(const PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
}

inline void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::~PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  ::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* PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::_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* PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  ::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.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  return target;
}

::size_t PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  ::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 PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing*>(
      &from));
}

void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::MergeFrom(const PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing& from) {
  PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  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 PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::CopyFrom(const PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::IsInitialized() const {
  return true;
}

void PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::InternalSwap(PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing";
}

// ===================================================================

class PostDeviceInstallPresetResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceInstallPresetResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing& preset_status_is_processing(const PostDeviceInstallPresetResponse_Error* msg);
};

const ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing&
PostDeviceInstallPresetResponse_Error::_Internal::preset_status_is_processing(const PostDeviceInstallPresetResponse_Error* msg) {
  return *msg->_impl_.reason_.preset_status_is_processing_;
}
void PostDeviceInstallPresetResponse_Error::set_allocated_preset_status_is_processing(::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing* preset_status_is_processing) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (preset_status_is_processing) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(preset_status_is_processing);
    if (message_arena != submessage_arena) {
      preset_status_is_processing = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, preset_status_is_processing, submessage_arena);
    }
    set_has_preset_status_is_processing();
    _impl_.reason_.preset_status_is_processing_ = preset_status_is_processing;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceInstallPresetResponse.Error.preset_status_is_processing)
}
PostDeviceInstallPresetResponse_Error::PostDeviceInstallPresetResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
}
PostDeviceInstallPresetResponse_Error::PostDeviceInstallPresetResponse_Error(const PostDeviceInstallPresetResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceInstallPresetResponse_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 kPresetStatusIsProcessing: {
      _this->_internal_mutable_preset_status_is_processing()->::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::MergeFrom(
          from._internal_preset_status_is_processing());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
}

inline void PostDeviceInstallPresetResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PostDeviceInstallPresetResponse_Error::~PostDeviceInstallPresetResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceInstallPresetResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PostDeviceInstallPresetResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceInstallPresetResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
  switch (reason_case()) {
    case kPresetStatusIsProcessing: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.preset_status_is_processing_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostDeviceInstallPresetResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceInstallPresetResponse.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* PostDeviceInstallPresetResponse_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.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing preset_status_is_processing = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_preset_status_is_processing(), 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* PostDeviceInstallPresetResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing preset_status_is_processing = 1;
  if (reason_case() == kPresetStatusIsProcessing) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::preset_status_is_processing(this),
        _Internal::preset_status_is_processing(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.PostDeviceInstallPresetResponse.Error)
  return target;
}

::size_t PostDeviceInstallPresetResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceInstallPresetResponse.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.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing preset_status_is_processing = 1;
    case kPresetStatusIsProcessing: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.preset_status_is_processing_);
      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 PostDeviceInstallPresetResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceInstallPresetResponse_Error*>(
      &from));
}

void PostDeviceInstallPresetResponse_Error::MergeFrom(const PostDeviceInstallPresetResponse_Error& from) {
  PostDeviceInstallPresetResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kPresetStatusIsProcessing: {
      _this->_internal_mutable_preset_status_is_processing()->::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing::MergeFrom(
          from._internal_preset_status_is_processing());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceInstallPresetResponse_Error::CopyFrom(const PostDeviceInstallPresetResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceInstallPresetResponse_Error::IsInitialized() const {
  return true;
}

void PostDeviceInstallPresetResponse_Error::InternalSwap(PostDeviceInstallPresetResponse_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 PostDeviceInstallPresetResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceInstallPresetResponse.Error";
}

// ===================================================================

class PostDeviceInstallPresetResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceInstallPresetResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error& error(const PostDeviceInstallPresetResponse* msg);
};

const ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error&
PostDeviceInstallPresetResponse::_Internal::error(const PostDeviceInstallPresetResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostDeviceInstallPresetResponse::set_allocated_error(::keyapis::device::v1::PostDeviceInstallPresetResponse_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.PostDeviceInstallPresetResponse.error)
}
PostDeviceInstallPresetResponse::PostDeviceInstallPresetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse)
}
PostDeviceInstallPresetResponse::PostDeviceInstallPresetResponse(const PostDeviceInstallPresetResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceInstallPresetResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceInstallPresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceInstallPresetResponse)
}

inline void PostDeviceInstallPresetResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

PostDeviceInstallPresetResponse::~PostDeviceInstallPresetResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceInstallPresetResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceInstallPresetResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void PostDeviceInstallPresetResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceInstallPresetResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  switch (type_case()) {
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void PostDeviceInstallPresetResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  ::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* PostDeviceInstallPresetResponse::_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.PostDeviceInstallPresetResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostDeviceInstallPresetResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.PostDeviceInstallPresetResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PostDeviceInstallPresetResponse)
  return target;
}

::size_t PostDeviceInstallPresetResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  ::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.PostDeviceInstallPresetResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PostDeviceInstallPresetResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceInstallPresetResponse*>(
      &from));
}

void PostDeviceInstallPresetResponse::MergeFrom(const PostDeviceInstallPresetResponse& from) {
  PostDeviceInstallPresetResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceInstallPresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceInstallPresetResponse::CopyFrom(const PostDeviceInstallPresetResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceInstallPresetResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceInstallPresetResponse::IsInitialized() const {
  return true;
}

void PostDeviceInstallPresetResponse::InternalSwap(PostDeviceInstallPresetResponse* 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 PostDeviceInstallPresetResponse::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceInstallPresetResponse";
}

// ===================================================================

class PostDeviceReplaceRequest::_Internal {
 public:
};

PostDeviceReplaceRequest::PostDeviceReplaceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceRequest)
}
PostDeviceReplaceRequest::PostDeviceReplaceRequest(const PostDeviceReplaceRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceReplaceRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.mac_address_) {}

    , decltype(_impl_.serial_number_) {}

    , decltype(_impl_.login_) {}

    , decltype(_impl_.id_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _impl_.mac_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.mac_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_mac_address().empty()) {
    _this->_impl_.mac_address_.Set(from._internal_mac_address(), _this->GetArenaForAllocation());
  }
  _impl_.serial_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.serial_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_serial_number().empty()) {
    _this->_impl_.serial_number_.Set(from._internal_serial_number(), _this->GetArenaForAllocation());
  }
  _impl_.login_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.login_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_login().empty()) {
    _this->_impl_.login_.Set(from._internal_login(), _this->GetArenaForAllocation());
  }
  _this->_impl_.id_ = from._impl_.id_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceRequest)
}

inline void PostDeviceReplaceRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.mac_address_) {}

    , decltype(_impl_.serial_number_) {}

    , decltype(_impl_.login_) {}

    , decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.mac_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.mac_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.serial_number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.serial_number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.login_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.login_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

PostDeviceReplaceRequest::~PostDeviceReplaceRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
  _impl_.mac_address_.Destroy();
  _impl_.serial_number_.Destroy();
  _impl_.login_.Destroy();
}

void PostDeviceReplaceRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.host_.ClearToEmpty();
  _impl_.mac_address_.ClearToEmpty();
  _impl_.serial_number_.ClearToEmpty();
  _impl_.login_.ClearToEmpty();
  _impl_.id_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* PostDeviceReplaceRequest::_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;
      // string host = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string mac_address = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_mac_address();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string serial_number = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_serial_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string login = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_login();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostDeviceReplaceRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceRequest)
  ::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);
  }

  // string host = 2;
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PostDeviceReplaceRequest.host");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // string mac_address = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_mac_address().empty()) {
    const std::string& _s = this->_internal_mac_address();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PostDeviceReplaceRequest.mac_address");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // string serial_number = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_serial_number().empty()) {
    const std::string& _s = this->_internal_serial_number();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PostDeviceReplaceRequest.serial_number");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // string login = 5;
  if (!this->_internal_login().empty()) {
    const std::string& _s = this->_internal_login();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PostDeviceReplaceRequest.login");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PostDeviceReplaceRequest)
  return target;
}

::size_t PostDeviceReplaceRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceRequest)
  ::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 host = 2;
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

  // string mac_address = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_mac_address().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_mac_address());
  }

  // string serial_number = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_serial_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_serial_number());
  }

  // string login = 5;
  if (!this->_internal_login().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_login());
  }

  // 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 PostDeviceReplaceRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceRequest*>(
      &from));
}

void PostDeviceReplaceRequest::MergeFrom(const PostDeviceReplaceRequest& from) {
  PostDeviceReplaceRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (!from._internal_mac_address().empty()) {
    _this->_internal_set_mac_address(from._internal_mac_address());
  }
  if (!from._internal_serial_number().empty()) {
    _this->_internal_set_serial_number(from._internal_serial_number());
  }
  if (!from._internal_login().empty()) {
    _this->_internal_set_login(from._internal_login());
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceReplaceRequest::CopyFrom(const PostDeviceReplaceRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceRequest::IsInitialized() const {
  return true;
}

void PostDeviceReplaceRequest::InternalSwap(PostDeviceReplaceRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.mac_address_, lhs_arena,
                                       &other->_impl_.mac_address_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.serial_number_, lhs_arena,
                                       &other->_impl_.serial_number_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.login_, lhs_arena,
                                       &other->_impl_.login_, rhs_arena);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string PostDeviceReplaceRequest::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceRequest";
}

// ===================================================================

class PostDeviceReplaceResponse_Error_HostExists::_Internal {
 public:
};

PostDeviceReplaceResponse_Error_HostExists::PostDeviceReplaceResponse_Error_HostExists(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
}
PostDeviceReplaceResponse_Error_HostExists::PostDeviceReplaceResponse_Error_HostExists(const PostDeviceReplaceResponse_Error_HostExists& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
}

inline void PostDeviceReplaceResponse_Error_HostExists::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReplaceResponse_Error_HostExists::~PostDeviceReplaceResponse_Error_HostExists() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error_HostExists::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReplaceResponse_Error_HostExists::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error_HostExists::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  ::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* PostDeviceReplaceResponse_Error_HostExists::_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* PostDeviceReplaceResponse_Error_HostExists::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  ::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.PostDeviceReplaceResponse.Error.HostExists)
  return target;
}

::size_t PostDeviceReplaceResponse_Error_HostExists::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  ::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 PostDeviceReplaceResponse_Error_HostExists::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error_HostExists*>(
      &from));
}

void PostDeviceReplaceResponse_Error_HostExists::MergeFrom(const PostDeviceReplaceResponse_Error_HostExists& from) {
  PostDeviceReplaceResponse_Error_HostExists* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  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 PostDeviceReplaceResponse_Error_HostExists::CopyFrom(const PostDeviceReplaceResponse_Error_HostExists& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error_HostExists::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error_HostExists::InternalSwap(PostDeviceReplaceResponse_Error_HostExists* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceReplaceResponse_Error_HostExists::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists";
}

// ===================================================================

class PostDeviceReplaceResponse_Error_MacAddressExists::_Internal {
 public:
};

PostDeviceReplaceResponse_Error_MacAddressExists::PostDeviceReplaceResponse_Error_MacAddressExists(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
}
PostDeviceReplaceResponse_Error_MacAddressExists::PostDeviceReplaceResponse_Error_MacAddressExists(const PostDeviceReplaceResponse_Error_MacAddressExists& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
}

inline void PostDeviceReplaceResponse_Error_MacAddressExists::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReplaceResponse_Error_MacAddressExists::~PostDeviceReplaceResponse_Error_MacAddressExists() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error_MacAddressExists::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReplaceResponse_Error_MacAddressExists::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error_MacAddressExists::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  ::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* PostDeviceReplaceResponse_Error_MacAddressExists::_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* PostDeviceReplaceResponse_Error_MacAddressExists::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  ::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.PostDeviceReplaceResponse.Error.MacAddressExists)
  return target;
}

::size_t PostDeviceReplaceResponse_Error_MacAddressExists::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  ::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 PostDeviceReplaceResponse_Error_MacAddressExists::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error_MacAddressExists*>(
      &from));
}

void PostDeviceReplaceResponse_Error_MacAddressExists::MergeFrom(const PostDeviceReplaceResponse_Error_MacAddressExists& from) {
  PostDeviceReplaceResponse_Error_MacAddressExists* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  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 PostDeviceReplaceResponse_Error_MacAddressExists::CopyFrom(const PostDeviceReplaceResponse_Error_MacAddressExists& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error_MacAddressExists::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error_MacAddressExists::InternalSwap(PostDeviceReplaceResponse_Error_MacAddressExists* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceReplaceResponse_Error_MacAddressExists::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists";
}

// ===================================================================

class PostDeviceReplaceResponse_Error_SerialNumberExists::_Internal {
 public:
};

PostDeviceReplaceResponse_Error_SerialNumberExists::PostDeviceReplaceResponse_Error_SerialNumberExists(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
}
PostDeviceReplaceResponse_Error_SerialNumberExists::PostDeviceReplaceResponse_Error_SerialNumberExists(const PostDeviceReplaceResponse_Error_SerialNumberExists& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
}

inline void PostDeviceReplaceResponse_Error_SerialNumberExists::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReplaceResponse_Error_SerialNumberExists::~PostDeviceReplaceResponse_Error_SerialNumberExists() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error_SerialNumberExists::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReplaceResponse_Error_SerialNumberExists::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error_SerialNumberExists::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  ::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* PostDeviceReplaceResponse_Error_SerialNumberExists::_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* PostDeviceReplaceResponse_Error_SerialNumberExists::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  ::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.PostDeviceReplaceResponse.Error.SerialNumberExists)
  return target;
}

::size_t PostDeviceReplaceResponse_Error_SerialNumberExists::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  ::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 PostDeviceReplaceResponse_Error_SerialNumberExists::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error_SerialNumberExists*>(
      &from));
}

void PostDeviceReplaceResponse_Error_SerialNumberExists::MergeFrom(const PostDeviceReplaceResponse_Error_SerialNumberExists& from) {
  PostDeviceReplaceResponse_Error_SerialNumberExists* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  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 PostDeviceReplaceResponse_Error_SerialNumberExists::CopyFrom(const PostDeviceReplaceResponse_Error_SerialNumberExists& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error_SerialNumberExists::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error_SerialNumberExists::InternalSwap(PostDeviceReplaceResponse_Error_SerialNumberExists* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceReplaceResponse_Error_SerialNumberExists::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists";
}

// ===================================================================

class PostDeviceReplaceResponse_Error_LoginExists::_Internal {
 public:
};

PostDeviceReplaceResponse_Error_LoginExists::PostDeviceReplaceResponse_Error_LoginExists(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
}
PostDeviceReplaceResponse_Error_LoginExists::PostDeviceReplaceResponse_Error_LoginExists(const PostDeviceReplaceResponse_Error_LoginExists& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
}

inline void PostDeviceReplaceResponse_Error_LoginExists::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReplaceResponse_Error_LoginExists::~PostDeviceReplaceResponse_Error_LoginExists() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error_LoginExists::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReplaceResponse_Error_LoginExists::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error_LoginExists::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  ::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* PostDeviceReplaceResponse_Error_LoginExists::_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* PostDeviceReplaceResponse_Error_LoginExists::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  ::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.PostDeviceReplaceResponse.Error.LoginExists)
  return target;
}

::size_t PostDeviceReplaceResponse_Error_LoginExists::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  ::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 PostDeviceReplaceResponse_Error_LoginExists::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error_LoginExists*>(
      &from));
}

void PostDeviceReplaceResponse_Error_LoginExists::MergeFrom(const PostDeviceReplaceResponse_Error_LoginExists& from) {
  PostDeviceReplaceResponse_Error_LoginExists* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  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 PostDeviceReplaceResponse_Error_LoginExists::CopyFrom(const PostDeviceReplaceResponse_Error_LoginExists& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error_LoginExists::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error_LoginExists::InternalSwap(PostDeviceReplaceResponse_Error_LoginExists* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceReplaceResponse_Error_LoginExists::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists";
}

// ===================================================================

class PostDeviceReplaceResponse_Error_LoginIsRequired::_Internal {
 public:
};

PostDeviceReplaceResponse_Error_LoginIsRequired::PostDeviceReplaceResponse_Error_LoginIsRequired(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
}
PostDeviceReplaceResponse_Error_LoginIsRequired::PostDeviceReplaceResponse_Error_LoginIsRequired(const PostDeviceReplaceResponse_Error_LoginIsRequired& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
}

inline void PostDeviceReplaceResponse_Error_LoginIsRequired::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReplaceResponse_Error_LoginIsRequired::~PostDeviceReplaceResponse_Error_LoginIsRequired() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error_LoginIsRequired::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReplaceResponse_Error_LoginIsRequired::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error_LoginIsRequired::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  ::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* PostDeviceReplaceResponse_Error_LoginIsRequired::_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* PostDeviceReplaceResponse_Error_LoginIsRequired::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  ::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.PostDeviceReplaceResponse.Error.LoginIsRequired)
  return target;
}

::size_t PostDeviceReplaceResponse_Error_LoginIsRequired::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  ::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 PostDeviceReplaceResponse_Error_LoginIsRequired::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error_LoginIsRequired*>(
      &from));
}

void PostDeviceReplaceResponse_Error_LoginIsRequired::MergeFrom(const PostDeviceReplaceResponse_Error_LoginIsRequired& from) {
  PostDeviceReplaceResponse_Error_LoginIsRequired* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  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 PostDeviceReplaceResponse_Error_LoginIsRequired::CopyFrom(const PostDeviceReplaceResponse_Error_LoginIsRequired& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error_LoginIsRequired::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error_LoginIsRequired::InternalSwap(PostDeviceReplaceResponse_Error_LoginIsRequired* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PostDeviceReplaceResponse_Error_LoginIsRequired::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired";
}

// ===================================================================

class PostDeviceReplaceResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceReplaceResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation_error(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists& host_exists(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists& mac_address_exists(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists& serial_number_exists(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists& login_exists(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired& login_is_required(const PostDeviceReplaceResponse_Error* msg);
  static const ::keyapis::device::v1::ReinstallError& reinstall_error(const PostDeviceReplaceResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
PostDeviceReplaceResponse_Error::_Internal::validation_error(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_error_;
}
const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists&
PostDeviceReplaceResponse_Error::_Internal::host_exists(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.host_exists_;
}
const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists&
PostDeviceReplaceResponse_Error::_Internal::mac_address_exists(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.mac_address_exists_;
}
const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists&
PostDeviceReplaceResponse_Error::_Internal::serial_number_exists(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.serial_number_exists_;
}
const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists&
PostDeviceReplaceResponse_Error::_Internal::login_exists(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.login_exists_;
}
const ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired&
PostDeviceReplaceResponse_Error::_Internal::login_is_required(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.login_is_required_;
}
const ::keyapis::device::v1::ReinstallError&
PostDeviceReplaceResponse_Error::_Internal::reinstall_error(const PostDeviceReplaceResponse_Error* msg) {
  return *msg->_impl_.reason_.reinstall_error_;
}
void PostDeviceReplaceResponse_Error::set_allocated_validation_error(::keyapis::device::v1::ValidationError* validation_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation_error);
    if (message_arena != submessage_arena) {
      validation_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation_error, submessage_arena);
    }
    set_has_validation_error();
    _impl_.reason_.validation_error_ = validation_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.validation_error)
}
void PostDeviceReplaceResponse_Error::set_allocated_host_exists(::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists* host_exists) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (host_exists) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(host_exists);
    if (message_arena != submessage_arena) {
      host_exists = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, host_exists, submessage_arena);
    }
    set_has_host_exists();
    _impl_.reason_.host_exists_ = host_exists;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.host_exists)
}
void PostDeviceReplaceResponse_Error::set_allocated_mac_address_exists(::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists* mac_address_exists) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (mac_address_exists) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(mac_address_exists);
    if (message_arena != submessage_arena) {
      mac_address_exists = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mac_address_exists, submessage_arena);
    }
    set_has_mac_address_exists();
    _impl_.reason_.mac_address_exists_ = mac_address_exists;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.mac_address_exists)
}
void PostDeviceReplaceResponse_Error::set_allocated_serial_number_exists(::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists* serial_number_exists) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (serial_number_exists) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(serial_number_exists);
    if (message_arena != submessage_arena) {
      serial_number_exists = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, serial_number_exists, submessage_arena);
    }
    set_has_serial_number_exists();
    _impl_.reason_.serial_number_exists_ = serial_number_exists;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.serial_number_exists)
}
void PostDeviceReplaceResponse_Error::set_allocated_login_exists(::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists* login_exists) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (login_exists) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(login_exists);
    if (message_arena != submessage_arena) {
      login_exists = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, login_exists, submessage_arena);
    }
    set_has_login_exists();
    _impl_.reason_.login_exists_ = login_exists;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.login_exists)
}
void PostDeviceReplaceResponse_Error::set_allocated_login_is_required(::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired* login_is_required) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (login_is_required) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(login_is_required);
    if (message_arena != submessage_arena) {
      login_is_required = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, login_is_required, submessage_arena);
    }
    set_has_login_is_required();
    _impl_.reason_.login_is_required_ = login_is_required;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.login_is_required)
}
void PostDeviceReplaceResponse_Error::set_allocated_reinstall_error(::keyapis::device::v1::ReinstallError* reinstall_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (reinstall_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(reinstall_error);
    if (message_arena != submessage_arena) {
      reinstall_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, reinstall_error, submessage_arena);
    }
    set_has_reinstall_error();
    _impl_.reason_.reinstall_error_ = reinstall_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReplaceResponse.Error.reinstall_error)
}
PostDeviceReplaceResponse_Error::PostDeviceReplaceResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error)
}
PostDeviceReplaceResponse_Error::PostDeviceReplaceResponse_Error(const PostDeviceReplaceResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceReplaceResponse_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 kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case kHostExists: {
      _this->_internal_mutable_host_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists::MergeFrom(
          from._internal_host_exists());
      break;
    }
    case kMacAddressExists: {
      _this->_internal_mutable_mac_address_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists::MergeFrom(
          from._internal_mac_address_exists());
      break;
    }
    case kSerialNumberExists: {
      _this->_internal_mutable_serial_number_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists::MergeFrom(
          from._internal_serial_number_exists());
      break;
    }
    case kLoginExists: {
      _this->_internal_mutable_login_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists::MergeFrom(
          from._internal_login_exists());
      break;
    }
    case kLoginIsRequired: {
      _this->_internal_mutable_login_is_required()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired::MergeFrom(
          from._internal_login_is_required());
      break;
    }
    case kReinstallError: {
      _this->_internal_mutable_reinstall_error()->::keyapis::device::v1::ReinstallError::MergeFrom(
          from._internal_reinstall_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse.Error)
}

inline void PostDeviceReplaceResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PostDeviceReplaceResponse_Error::~PostDeviceReplaceResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PostDeviceReplaceResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.Error)
  switch (reason_case()) {
    case kValidationError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_error_;
      }
      break;
    }
    case kHostExists: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.host_exists_;
      }
      break;
    }
    case kMacAddressExists: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.mac_address_exists_;
      }
      break;
    }
    case kSerialNumberExists: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.serial_number_exists_;
      }
      break;
    }
    case kLoginExists: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.login_exists_;
      }
      break;
    }
    case kLoginIsRequired: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.login_is_required_;
      }
      break;
    }
    case kReinstallError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.reinstall_error_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostDeviceReplaceResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse.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* PostDeviceReplaceResponse_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_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;
      // .keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists host_exists = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_host_exists(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists mac_address_exists = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_mac_address_exists(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists serial_number_exists = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_serial_number_exists(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists login_exists = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_login_exists(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired login_is_required = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_login_is_required(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.ReinstallError reinstall_error = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_reinstall_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* PostDeviceReplaceResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidationError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation_error(this),
          _Internal::validation_error(this).GetCachedSize(), target, stream);
      break;
    }
    case kHostExists: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::host_exists(this),
          _Internal::host_exists(this).GetCachedSize(), target, stream);
      break;
    }
    case kMacAddressExists: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::mac_address_exists(this),
          _Internal::mac_address_exists(this).GetCachedSize(), target, stream);
      break;
    }
    case kSerialNumberExists: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::serial_number_exists(this),
          _Internal::serial_number_exists(this).GetCachedSize(), target, stream);
      break;
    }
    case kLoginExists: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, _Internal::login_exists(this),
          _Internal::login_exists(this).GetCachedSize(), target, stream);
      break;
    }
    case kLoginIsRequired: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, _Internal::login_is_required(this),
          _Internal::login_is_required(this).GetCachedSize(), target, stream);
      break;
    }
    case kReinstallError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(7, _Internal::reinstall_error(this),
          _Internal::reinstall_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.PostDeviceReplaceResponse.Error)
  return target;
}

::size_t PostDeviceReplaceResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse.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_error = 1;
    case kValidationError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_error_);
      break;
    }
    // .keyapis.device.v1.PostDeviceReplaceResponse.Error.HostExists host_exists = 2;
    case kHostExists: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.host_exists_);
      break;
    }
    // .keyapis.device.v1.PostDeviceReplaceResponse.Error.MacAddressExists mac_address_exists = 3;
    case kMacAddressExists: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.mac_address_exists_);
      break;
    }
    // .keyapis.device.v1.PostDeviceReplaceResponse.Error.SerialNumberExists serial_number_exists = 4;
    case kSerialNumberExists: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.serial_number_exists_);
      break;
    }
    // .keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginExists login_exists = 5;
    case kLoginExists: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.login_exists_);
      break;
    }
    // .keyapis.device.v1.PostDeviceReplaceResponse.Error.LoginIsRequired login_is_required = 6;
    case kLoginIsRequired: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.login_is_required_);
      break;
    }
    // .keyapis.device.v1.ReinstallError reinstall_error = 7;
    case kReinstallError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.reinstall_error_);
      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 PostDeviceReplaceResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse_Error*>(
      &from));
}

void PostDeviceReplaceResponse_Error::MergeFrom(const PostDeviceReplaceResponse_Error& from) {
  PostDeviceReplaceResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case kHostExists: {
      _this->_internal_mutable_host_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists::MergeFrom(
          from._internal_host_exists());
      break;
    }
    case kMacAddressExists: {
      _this->_internal_mutable_mac_address_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists::MergeFrom(
          from._internal_mac_address_exists());
      break;
    }
    case kSerialNumberExists: {
      _this->_internal_mutable_serial_number_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists::MergeFrom(
          from._internal_serial_number_exists());
      break;
    }
    case kLoginExists: {
      _this->_internal_mutable_login_exists()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists::MergeFrom(
          from._internal_login_exists());
      break;
    }
    case kLoginIsRequired: {
      _this->_internal_mutable_login_is_required()->::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired::MergeFrom(
          from._internal_login_is_required());
      break;
    }
    case kReinstallError: {
      _this->_internal_mutable_reinstall_error()->::keyapis::device::v1::ReinstallError::MergeFrom(
          from._internal_reinstall_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceReplaceResponse_Error::CopyFrom(const PostDeviceReplaceResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse_Error::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse_Error::InternalSwap(PostDeviceReplaceResponse_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 PostDeviceReplaceResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse.Error";
}

// ===================================================================

class PostDeviceReplaceResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceReplaceResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::PostDeviceReplaceResponse_Error& error(const PostDeviceReplaceResponse* msg);
};

const ::keyapis::device::v1::PostDeviceReplaceResponse_Error&
PostDeviceReplaceResponse::_Internal::error(const PostDeviceReplaceResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostDeviceReplaceResponse::set_allocated_error(::keyapis::device::v1::PostDeviceReplaceResponse_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.PostDeviceReplaceResponse.error)
}
PostDeviceReplaceResponse::PostDeviceReplaceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReplaceResponse)
}
PostDeviceReplaceResponse::PostDeviceReplaceResponse(const PostDeviceReplaceResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceReplaceResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceReplaceResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReplaceResponse)
}

inline void PostDeviceReplaceResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

PostDeviceReplaceResponse::~PostDeviceReplaceResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReplaceResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReplaceResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void PostDeviceReplaceResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReplaceResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceReplaceResponse)
  switch (type_case()) {
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void PostDeviceReplaceResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReplaceResponse)
  ::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* PostDeviceReplaceResponse::_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.PostDeviceReplaceResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostDeviceReplaceResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReplaceResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.PostDeviceReplaceResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PostDeviceReplaceResponse)
  return target;
}

::size_t PostDeviceReplaceResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReplaceResponse)
  ::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.PostDeviceReplaceResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PostDeviceReplaceResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReplaceResponse*>(
      &from));
}

void PostDeviceReplaceResponse::MergeFrom(const PostDeviceReplaceResponse& from) {
  PostDeviceReplaceResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReplaceResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceReplaceResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceReplaceResponse::CopyFrom(const PostDeviceReplaceResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReplaceResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReplaceResponse::IsInitialized() const {
  return true;
}

void PostDeviceReplaceResponse::InternalSwap(PostDeviceReplaceResponse* 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 PostDeviceReplaceResponse::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReplaceResponse";
}

// ===================================================================

class PostDeviceReconfigureRequest::_Internal {
 public:
};

PostDeviceReconfigureRequest::PostDeviceReconfigureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReconfigureRequest)
}
PostDeviceReconfigureRequest::PostDeviceReconfigureRequest(const PostDeviceReconfigureRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReconfigureRequest)
}

inline void PostDeviceReconfigureRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

PostDeviceReconfigureRequest::~PostDeviceReconfigureRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReconfigureRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReconfigureRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PostDeviceReconfigureRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReconfigureRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReconfigureRequest)
  ::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* PostDeviceReconfigureRequest::_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* PostDeviceReconfigureRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReconfigureRequest)
  ::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.PostDeviceReconfigureRequest)
  return target;
}

::size_t PostDeviceReconfigureRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReconfigureRequest)
  ::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 PostDeviceReconfigureRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReconfigureRequest*>(
      &from));
}

void PostDeviceReconfigureRequest::MergeFrom(const PostDeviceReconfigureRequest& from) {
  PostDeviceReconfigureRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReconfigureRequest)
  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 PostDeviceReconfigureRequest::CopyFrom(const PostDeviceReconfigureRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReconfigureRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReconfigureRequest::IsInitialized() const {
  return true;
}

void PostDeviceReconfigureRequest::InternalSwap(PostDeviceReconfigureRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string PostDeviceReconfigureRequest::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReconfigureRequest";
}

// ===================================================================

class PostDeviceReconfigureResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceReconfigureResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation_error(const PostDeviceReconfigureResponse_Error* msg);
  static const ::keyapis::device::v1::ReinstallError& reinstall_error(const PostDeviceReconfigureResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
PostDeviceReconfigureResponse_Error::_Internal::validation_error(const PostDeviceReconfigureResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_error_;
}
const ::keyapis::device::v1::ReinstallError&
PostDeviceReconfigureResponse_Error::_Internal::reinstall_error(const PostDeviceReconfigureResponse_Error* msg) {
  return *msg->_impl_.reason_.reinstall_error_;
}
void PostDeviceReconfigureResponse_Error::set_allocated_validation_error(::keyapis::device::v1::ValidationError* validation_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation_error);
    if (message_arena != submessage_arena) {
      validation_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation_error, submessage_arena);
    }
    set_has_validation_error();
    _impl_.reason_.validation_error_ = validation_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReconfigureResponse.Error.validation_error)
}
void PostDeviceReconfigureResponse_Error::set_allocated_reinstall_error(::keyapis::device::v1::ReinstallError* reinstall_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (reinstall_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(reinstall_error);
    if (message_arena != submessage_arena) {
      reinstall_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, reinstall_error, submessage_arena);
    }
    set_has_reinstall_error();
    _impl_.reason_.reinstall_error_ = reinstall_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.PostDeviceReconfigureResponse.Error.reinstall_error)
}
PostDeviceReconfigureResponse_Error::PostDeviceReconfigureResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
}
PostDeviceReconfigureResponse_Error::PostDeviceReconfigureResponse_Error(const PostDeviceReconfigureResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceReconfigureResponse_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 kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case kReinstallError: {
      _this->_internal_mutable_reinstall_error()->::keyapis::device::v1::ReinstallError::MergeFrom(
          from._internal_reinstall_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
}

inline void PostDeviceReconfigureResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PostDeviceReconfigureResponse_Error::~PostDeviceReconfigureResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReconfigureResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PostDeviceReconfigureResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReconfigureResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
  switch (reason_case()) {
    case kValidationError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_error_;
      }
      break;
    }
    case kReinstallError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.reinstall_error_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostDeviceReconfigureResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReconfigureResponse.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* PostDeviceReconfigureResponse_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_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;
      // .keyapis.device.v1.ReinstallError reinstall_error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_reinstall_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* PostDeviceReconfigureResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidationError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation_error(this),
          _Internal::validation_error(this).GetCachedSize(), target, stream);
      break;
    }
    case kReinstallError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::reinstall_error(this),
          _Internal::reinstall_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.PostDeviceReconfigureResponse.Error)
  return target;
}

::size_t PostDeviceReconfigureResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReconfigureResponse.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_error = 1;
    case kValidationError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_error_);
      break;
    }
    // .keyapis.device.v1.ReinstallError reinstall_error = 2;
    case kReinstallError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.reinstall_error_);
      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 PostDeviceReconfigureResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReconfigureResponse_Error*>(
      &from));
}

void PostDeviceReconfigureResponse_Error::MergeFrom(const PostDeviceReconfigureResponse_Error& from) {
  PostDeviceReconfigureResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case kReinstallError: {
      _this->_internal_mutable_reinstall_error()->::keyapis::device::v1::ReinstallError::MergeFrom(
          from._internal_reinstall_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceReconfigureResponse_Error::CopyFrom(const PostDeviceReconfigureResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReconfigureResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReconfigureResponse_Error::IsInitialized() const {
  return true;
}

void PostDeviceReconfigureResponse_Error::InternalSwap(PostDeviceReconfigureResponse_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 PostDeviceReconfigureResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReconfigureResponse.Error";
}

// ===================================================================

class PostDeviceReconfigureResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceReconfigureResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::PostDeviceReconfigureResponse_Error& error(const PostDeviceReconfigureResponse* msg);
};

const ::keyapis::device::v1::PostDeviceReconfigureResponse_Error&
PostDeviceReconfigureResponse::_Internal::error(const PostDeviceReconfigureResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostDeviceReconfigureResponse::set_allocated_error(::keyapis::device::v1::PostDeviceReconfigureResponse_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.PostDeviceReconfigureResponse.error)
}
PostDeviceReconfigureResponse::PostDeviceReconfigureResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceReconfigureResponse)
}
PostDeviceReconfigureResponse::PostDeviceReconfigureResponse(const PostDeviceReconfigureResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceReconfigureResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceReconfigureResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceReconfigureResponse)
}

inline void PostDeviceReconfigureResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

PostDeviceReconfigureResponse::~PostDeviceReconfigureResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceReconfigureResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceReconfigureResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void PostDeviceReconfigureResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceReconfigureResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  switch (type_case()) {
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void PostDeviceReconfigureResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  ::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* PostDeviceReconfigureResponse::_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.PostDeviceReconfigureResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostDeviceReconfigureResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.PostDeviceReconfigureResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PostDeviceReconfigureResponse)
  return target;
}

::size_t PostDeviceReconfigureResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  ::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.PostDeviceReconfigureResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PostDeviceReconfigureResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceReconfigureResponse*>(
      &from));
}

void PostDeviceReconfigureResponse::MergeFrom(const PostDeviceReconfigureResponse& from) {
  PostDeviceReconfigureResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceReconfigureResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceReconfigureResponse::CopyFrom(const PostDeviceReconfigureResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceReconfigureResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceReconfigureResponse::IsInitialized() const {
  return true;
}

void PostDeviceReconfigureResponse::InternalSwap(PostDeviceReconfigureResponse* 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 PostDeviceReconfigureResponse::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceReconfigureResponse";
}

// ===================================================================

class GetDeviceConfigurationStatusesRequest::_Internal {
 public:
};

GetDeviceConfigurationStatusesRequest::GetDeviceConfigurationStatusesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
}
GetDeviceConfigurationStatusesRequest::GetDeviceConfigurationStatusesRequest(const GetDeviceConfigurationStatusesRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
}

inline void GetDeviceConfigurationStatusesRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

GetDeviceConfigurationStatusesRequest::~GetDeviceConfigurationStatusesRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusesRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void GetDeviceConfigurationStatusesRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusesRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  ::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* GetDeviceConfigurationStatusesRequest::_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* GetDeviceConfigurationStatusesRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  ::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.GetDeviceConfigurationStatusesRequest)
  return target;
}

::size_t GetDeviceConfigurationStatusesRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  ::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 GetDeviceConfigurationStatusesRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusesRequest*>(
      &from));
}

void GetDeviceConfigurationStatusesRequest::MergeFrom(const GetDeviceConfigurationStatusesRequest& from) {
  GetDeviceConfigurationStatusesRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  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 GetDeviceConfigurationStatusesRequest::CopyFrom(const GetDeviceConfigurationStatusesRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusesRequest::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusesRequest::InternalSwap(GetDeviceConfigurationStatusesRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string GetDeviceConfigurationStatusesRequest::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusesRequest";
}

// ===================================================================

class GetDeviceConfigurationStatusesResponse_Statuses::_Internal {
 public:
  using HasBits = decltype(std::declval<GetDeviceConfigurationStatusesResponse_Statuses>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetDeviceConfigurationStatusesResponse_Statuses, _impl_._has_bits_);
  static const ::keyapis::device::v1::CameraStatus& camera_status(const GetDeviceConfigurationStatusesResponse_Statuses* msg);
  static void set_has_camera_status(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::device::v1::SyncStatus& sync_status(const GetDeviceConfigurationStatusesResponse_Statuses* msg);
  static void set_has_sync_status(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::keyapis::device::v1::CameraStatus&
GetDeviceConfigurationStatusesResponse_Statuses::_Internal::camera_status(const GetDeviceConfigurationStatusesResponse_Statuses* msg) {
  return *msg->_impl_.camera_status_;
}
const ::keyapis::device::v1::SyncStatus&
GetDeviceConfigurationStatusesResponse_Statuses::_Internal::sync_status(const GetDeviceConfigurationStatusesResponse_Statuses* msg) {
  return *msg->_impl_.sync_status_;
}
GetDeviceConfigurationStatusesResponse_Statuses::GetDeviceConfigurationStatusesResponse_Statuses(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
}
GetDeviceConfigurationStatusesResponse_Statuses::GetDeviceConfigurationStatusesResponse_Statuses(const GetDeviceConfigurationStatusesResponse_Statuses& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusesResponse_Statuses* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.device_configuration_statuses_){from._impl_.device_configuration_statuses_}
    , decltype(_impl_.camera_status_){nullptr}
    , decltype(_impl_.sync_status_){nullptr}
    , decltype(_impl_.device_status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.camera_status_ = new ::keyapis::device::v1::CameraStatus(*from._impl_.camera_status_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.sync_status_ = new ::keyapis::device::v1::SyncStatus(*from._impl_.sync_status_);
  }
  _this->_impl_.device_status_type_ = from._impl_.device_status_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
}

inline void GetDeviceConfigurationStatusesResponse_Statuses::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.device_configuration_statuses_){arena}
    , decltype(_impl_.camera_status_){nullptr}
    , decltype(_impl_.sync_status_){nullptr}
    , decltype(_impl_.device_status_type_) { 0 }

  };
}

GetDeviceConfigurationStatusesResponse_Statuses::~GetDeviceConfigurationStatusesResponse_Statuses() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusesResponse_Statuses::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_device_configuration_statuses()->~RepeatedPtrField();
  if (this != internal_default_instance()) delete _impl_.camera_status_;
  if (this != internal_default_instance()) delete _impl_.sync_status_;
}

void GetDeviceConfigurationStatusesResponse_Statuses::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusesResponse_Statuses::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_device_configuration_statuses()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.camera_status_ != nullptr);
      _impl_.camera_status_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.sync_status_ != nullptr);
      _impl_.sync_status_->Clear();
    }
  }
  _impl_.device_status_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetDeviceConfigurationStatusesResponse_Statuses::_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.DeviceConfigurationStatus device_configuration_statuses = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_device_configuration_statuses(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.CameraStatus camera_status = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_camera_status(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.SyncStatus sync_status = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_sync_status(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Device.StatusType device_status_type = 4;
      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_device_status_type(static_cast<::keyapis::device::v1::Device_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetDeviceConfigurationStatusesResponse_Statuses::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .keyapis.device.v1.DeviceConfigurationStatus device_configuration_statuses = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_device_configuration_statuses_size()); i < n; i++) {
    const auto& repfield = this->_internal_device_configuration_statuses(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.CameraStatus camera_status = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::camera_status(this),
        _Internal::camera_status(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.SyncStatus sync_status = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::sync_status(this),
        _Internal::sync_status(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Device.StatusType device_status_type = 4;
  if (this->_internal_device_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this->_internal_device_status_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  return target;
}

::size_t GetDeviceConfigurationStatusesResponse_Statuses::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  ::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.DeviceConfigurationStatus device_configuration_statuses = 1;
  total_size += 1UL * this->_internal_device_configuration_statuses_size();
  for (const auto& msg : this->_internal_device_configuration_statuses()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .keyapis.device.v1.CameraStatus camera_status = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.camera_status_);
    }

    // .keyapis.device.v1.SyncStatus sync_status = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sync_status_);
    }

  }
  // .keyapis.device.v1.Device.StatusType device_status_type = 4;
  if (this->_internal_device_status_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_device_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 GetDeviceConfigurationStatusesResponse_Statuses::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusesResponse_Statuses*>(
      &from));
}

void GetDeviceConfigurationStatusesResponse_Statuses::MergeFrom(const GetDeviceConfigurationStatusesResponse_Statuses& from) {
  GetDeviceConfigurationStatusesResponse_Statuses* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_mutable_device_configuration_statuses()->MergeFrom(from._internal_device_configuration_statuses());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_camera_status()->::keyapis::device::v1::CameraStatus::MergeFrom(
          from._internal_camera_status());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_sync_status()->::keyapis::device::v1::SyncStatus::MergeFrom(
          from._internal_sync_status());
    }
  }
  if (from._internal_device_status_type() != 0) {
    _this->_internal_set_device_status_type(from._internal_device_status_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusesResponse_Statuses::CopyFrom(const GetDeviceConfigurationStatusesResponse_Statuses& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusesResponse_Statuses::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusesResponse_Statuses::InternalSwap(GetDeviceConfigurationStatusesResponse_Statuses* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _internal_mutable_device_configuration_statuses()->InternalSwap(other->_internal_mutable_device_configuration_statuses());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GetDeviceConfigurationStatusesResponse_Statuses, _impl_.device_status_type_)
      + sizeof(GetDeviceConfigurationStatusesResponse_Statuses::_impl_.device_status_type_)
      - PROTOBUF_FIELD_OFFSET(GetDeviceConfigurationStatusesResponse_Statuses, _impl_.camera_status_)>(
          reinterpret_cast<char*>(&_impl_.camera_status_),
          reinterpret_cast<char*>(&other->_impl_.camera_status_));
}

std::string GetDeviceConfigurationStatusesResponse_Statuses::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Statuses";
}

// ===================================================================

class GetDeviceConfigurationStatusesResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation_error(const GetDeviceConfigurationStatusesResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
GetDeviceConfigurationStatusesResponse_Error::_Internal::validation_error(const GetDeviceConfigurationStatusesResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_error_;
}
void GetDeviceConfigurationStatusesResponse_Error::set_allocated_validation_error(::keyapis::device::v1::ValidationError* validation_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation_error);
    if (message_arena != submessage_arena) {
      validation_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation_error, submessage_arena);
    }
    set_has_validation_error();
    _impl_.reason_.validation_error_ = validation_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error.validation_error)
}
GetDeviceConfigurationStatusesResponse_Error::GetDeviceConfigurationStatusesResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
}
GetDeviceConfigurationStatusesResponse_Error::GetDeviceConfigurationStatusesResponse_Error(const GetDeviceConfigurationStatusesResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusesResponse_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 kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
}

inline void GetDeviceConfigurationStatusesResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetDeviceConfigurationStatusesResponse_Error::~GetDeviceConfigurationStatusesResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusesResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetDeviceConfigurationStatusesResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusesResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
  switch (reason_case()) {
    case kValidationError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_error_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void GetDeviceConfigurationStatusesResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.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* GetDeviceConfigurationStatusesResponse_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_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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetDeviceConfigurationStatusesResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.ValidationError validation_error = 1;
  if (reason_case() == kValidationError) {
    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.GetDeviceConfigurationStatusesResponse.Error)
  return target;
}

::size_t GetDeviceConfigurationStatusesResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.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_error = 1;
    case kValidationError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_error_);
      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 GetDeviceConfigurationStatusesResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusesResponse_Error*>(
      &from));
}

void GetDeviceConfigurationStatusesResponse_Error::MergeFrom(const GetDeviceConfigurationStatusesResponse_Error& from) {
  GetDeviceConfigurationStatusesResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kValidationError: {
      _this->_internal_mutable_validation_error()->::keyapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusesResponse_Error::CopyFrom(const GetDeviceConfigurationStatusesResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusesResponse_Error::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusesResponse_Error::InternalSwap(GetDeviceConfigurationStatusesResponse_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 GetDeviceConfigurationStatusesResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusesResponse.Error";
}

// ===================================================================

class GetDeviceConfigurationStatusesResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusesResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses& data(const GetDeviceConfigurationStatusesResponse* msg);
  static const ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error& error(const GetDeviceConfigurationStatusesResponse* msg);
};

const ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses&
GetDeviceConfigurationStatusesResponse::_Internal::data(const GetDeviceConfigurationStatusesResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error&
GetDeviceConfigurationStatusesResponse::_Internal::error(const GetDeviceConfigurationStatusesResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetDeviceConfigurationStatusesResponse::set_allocated_data(::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses* 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.GetDeviceConfigurationStatusesResponse.data)
}
void GetDeviceConfigurationStatusesResponse::set_allocated_error(::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_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.GetDeviceConfigurationStatusesResponse.error)
}
GetDeviceConfigurationStatusesResponse::GetDeviceConfigurationStatusesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
}
GetDeviceConfigurationStatusesResponse::GetDeviceConfigurationStatusesResponse(const GetDeviceConfigurationStatusesResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusesResponse* 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::GetDeviceConfigurationStatusesResponse_Statuses::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
}

inline void GetDeviceConfigurationStatusesResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetDeviceConfigurationStatusesResponse::~GetDeviceConfigurationStatusesResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusesResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetDeviceConfigurationStatusesResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusesResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  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 GetDeviceConfigurationStatusesResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  ::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* GetDeviceConfigurationStatusesResponse::_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.GetDeviceConfigurationStatusesResponse.Statuses 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.GetDeviceConfigurationStatusesResponse.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* GetDeviceConfigurationStatusesResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  ::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.GetDeviceConfigurationStatusesResponse)
  return target;
}

::size_t GetDeviceConfigurationStatusesResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  ::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.GetDeviceConfigurationStatusesResponse.Statuses data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.GetDeviceConfigurationStatusesResponse.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 GetDeviceConfigurationStatusesResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusesResponse*>(
      &from));
}

void GetDeviceConfigurationStatusesResponse::MergeFrom(const GetDeviceConfigurationStatusesResponse& from) {
  GetDeviceConfigurationStatusesResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  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::GetDeviceConfigurationStatusesResponse_Statuses::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusesResponse::CopyFrom(const GetDeviceConfigurationStatusesResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusesResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusesResponse::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusesResponse::InternalSwap(GetDeviceConfigurationStatusesResponse* 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 GetDeviceConfigurationStatusesResponse::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusesResponse";
}

// ===================================================================

class PostDeviceConfigurationStatusRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<PostDeviceConfigurationStatusRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PostDeviceConfigurationStatusRequest, _impl_._has_bits_);
  static const ::keyapis::device::v1::DeviceConfigurationStatus& data(const PostDeviceConfigurationStatusRequest* msg);
  static void set_has_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::device::v1::DeviceConfigurationStatus&
PostDeviceConfigurationStatusRequest::_Internal::data(const PostDeviceConfigurationStatusRequest* msg) {
  return *msg->_impl_.data_;
}
PostDeviceConfigurationStatusRequest::PostDeviceConfigurationStatusRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
}
PostDeviceConfigurationStatusRequest::PostDeviceConfigurationStatusRequest(const PostDeviceConfigurationStatusRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceConfigurationStatusRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.data_ = new ::keyapis::device::v1::DeviceConfigurationStatus(*from._impl_.data_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
}

inline void PostDeviceConfigurationStatusRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}
  };
}

PostDeviceConfigurationStatusRequest::~PostDeviceConfigurationStatusRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceConfigurationStatusRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.data_;
}

void PostDeviceConfigurationStatusRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceConfigurationStatusRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.data_ != nullptr);
    _impl_.data_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PostDeviceConfigurationStatusRequest::_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.DeviceConfigurationStatus data = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PostDeviceConfigurationStatusRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.DeviceConfigurationStatus data = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  return target;
}

::size_t PostDeviceConfigurationStatusRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  ::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.DeviceConfigurationStatus data = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.data_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PostDeviceConfigurationStatusRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceConfigurationStatusRequest*>(
      &from));
}

void PostDeviceConfigurationStatusRequest::MergeFrom(const PostDeviceConfigurationStatusRequest& from) {
  PostDeviceConfigurationStatusRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_data()->::keyapis::device::v1::DeviceConfigurationStatus::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceConfigurationStatusRequest::CopyFrom(const PostDeviceConfigurationStatusRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceConfigurationStatusRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceConfigurationStatusRequest::IsInitialized() const {
  return true;
}

void PostDeviceConfigurationStatusRequest::InternalSwap(PostDeviceConfigurationStatusRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.data_, other->_impl_.data_);
}

std::string PostDeviceConfigurationStatusRequest::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceConfigurationStatusRequest";
}

// ===================================================================

class PostDeviceConfigurationStatusResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation(const PostDeviceConfigurationStatusResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
PostDeviceConfigurationStatusResponse_Error::_Internal::validation(const PostDeviceConfigurationStatusResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostDeviceConfigurationStatusResponse_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(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.PostDeviceConfigurationStatusResponse.Error.validation)
}
PostDeviceConfigurationStatusResponse_Error::PostDeviceConfigurationStatusResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceConfigurationStatusResponse.Error)
}
PostDeviceConfigurationStatusResponse_Error::PostDeviceConfigurationStatusResponse_Error(const PostDeviceConfigurationStatusResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceConfigurationStatusResponse_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.PostDeviceConfigurationStatusResponse.Error)
}

inline void PostDeviceConfigurationStatusResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PostDeviceConfigurationStatusResponse_Error::~PostDeviceConfigurationStatusResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceConfigurationStatusResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceConfigurationStatusResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PostDeviceConfigurationStatusResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceConfigurationStatusResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.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 PostDeviceConfigurationStatusResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.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* PostDeviceConfigurationStatusResponse_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* PostDeviceConfigurationStatusResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.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.PostDeviceConfigurationStatusResponse.Error)
  return target;
}

::size_t PostDeviceConfigurationStatusResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.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 PostDeviceConfigurationStatusResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceConfigurationStatusResponse_Error*>(
      &from));
}

void PostDeviceConfigurationStatusResponse_Error::MergeFrom(const PostDeviceConfigurationStatusResponse_Error& from) {
  PostDeviceConfigurationStatusResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.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 PostDeviceConfigurationStatusResponse_Error::CopyFrom(const PostDeviceConfigurationStatusResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceConfigurationStatusResponse_Error::IsInitialized() const {
  return true;
}

void PostDeviceConfigurationStatusResponse_Error::InternalSwap(PostDeviceConfigurationStatusResponse_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 PostDeviceConfigurationStatusResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceConfigurationStatusResponse.Error";
}

// ===================================================================

class PostDeviceConfigurationStatusResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::PostDeviceConfigurationStatusResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::DeviceConfigurationStatus& data(const PostDeviceConfigurationStatusResponse* msg);
  static const ::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error& error(const PostDeviceConfigurationStatusResponse* msg);
};

const ::keyapis::device::v1::DeviceConfigurationStatus&
PostDeviceConfigurationStatusResponse::_Internal::data(const PostDeviceConfigurationStatusResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error&
PostDeviceConfigurationStatusResponse::_Internal::error(const PostDeviceConfigurationStatusResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostDeviceConfigurationStatusResponse::set_allocated_data(::keyapis::device::v1::DeviceConfigurationStatus* 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.PostDeviceConfigurationStatusResponse.data)
}
void PostDeviceConfigurationStatusResponse::set_allocated_error(::keyapis::device::v1::PostDeviceConfigurationStatusResponse_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.PostDeviceConfigurationStatusResponse.error)
}
PostDeviceConfigurationStatusResponse::PostDeviceConfigurationStatusResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
}
PostDeviceConfigurationStatusResponse::PostDeviceConfigurationStatusResponse(const PostDeviceConfigurationStatusResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostDeviceConfigurationStatusResponse* 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::DeviceConfigurationStatus::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
}

inline void PostDeviceConfigurationStatusResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

PostDeviceConfigurationStatusResponse::~PostDeviceConfigurationStatusResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PostDeviceConfigurationStatusResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void PostDeviceConfigurationStatusResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PostDeviceConfigurationStatusResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  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 PostDeviceConfigurationStatusResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  ::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* PostDeviceConfigurationStatusResponse::_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.DeviceConfigurationStatus 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.PostDeviceConfigurationStatusResponse.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* PostDeviceConfigurationStatusResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  ::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.PostDeviceConfigurationStatusResponse)
  return target;
}

::size_t PostDeviceConfigurationStatusResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  ::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.DeviceConfigurationStatus data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.PostDeviceConfigurationStatusResponse.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 PostDeviceConfigurationStatusResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostDeviceConfigurationStatusResponse*>(
      &from));
}

void PostDeviceConfigurationStatusResponse::MergeFrom(const PostDeviceConfigurationStatusResponse& from) {
  PostDeviceConfigurationStatusResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  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::DeviceConfigurationStatus::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PostDeviceConfigurationStatusResponse::CopyFrom(const PostDeviceConfigurationStatusResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.PostDeviceConfigurationStatusResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PostDeviceConfigurationStatusResponse::IsInitialized() const {
  return true;
}

void PostDeviceConfigurationStatusResponse::InternalSwap(PostDeviceConfigurationStatusResponse* 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 PostDeviceConfigurationStatusResponse::GetTypeName() const {
  return "keyapis.device.v1.PostDeviceConfigurationStatusResponse";
}

// ===================================================================

class GetDeviceConfigurationStatusGroupedListRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetDeviceConfigurationStatusGroupedListRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetDeviceConfigurationStatusGroupedListRequest, _impl_._has_bits_);
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListRequest, _impl_._oneof_case_);
  static const ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter& filter(const GetDeviceConfigurationStatusGroupedListRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging& paging(const GetDeviceConfigurationStatusGroupedListRequest* msg);
};

const ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter&
GetDeviceConfigurationStatusGroupedListRequest::_Internal::filter(const GetDeviceConfigurationStatusGroupedListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging&
GetDeviceConfigurationStatusGroupedListRequest::_Internal::paging(const GetDeviceConfigurationStatusGroupedListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetDeviceConfigurationStatusGroupedListRequest::set_allocated_paging(::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging* 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.GetDeviceConfigurationStatusGroupedListRequest.paging)
}
GetDeviceConfigurationStatusGroupedListRequest::GetDeviceConfigurationStatusGroupedListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
}
GetDeviceConfigurationStatusGroupedListRequest::GetDeviceConfigurationStatusGroupedListRequest(const GetDeviceConfigurationStatusGroupedListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusGroupedListRequest* 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::DeviceConfigurationStatusGroupedFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
}

inline void GetDeviceConfigurationStatusGroupedListRequest::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();
}

GetDeviceConfigurationStatusGroupedListRequest::~GetDeviceConfigurationStatusGroupedListRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusGroupedListRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
  if (has_pagination()) {
    clear_pagination();
  }
}

void GetDeviceConfigurationStatusGroupedListRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusGroupedListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  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 GetDeviceConfigurationStatusGroupedListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  ::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* GetDeviceConfigurationStatusGroupedListRequest::_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.DeviceConfigurationStatusGroupedFilter 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.DeviceConfigurationStatusGroupedPaging 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* GetDeviceConfigurationStatusGroupedListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.DeviceConfigurationStatusGroupedFilter 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.DeviceConfigurationStatusGroupedPaging 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.GetDeviceConfigurationStatusGroupedListRequest)
  return target;
}

::size_t GetDeviceConfigurationStatusGroupedListRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  ::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.DeviceConfigurationStatusGroupedFilter 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.DeviceConfigurationStatusGroupedPaging 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 GetDeviceConfigurationStatusGroupedListRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusGroupedListRequest*>(
      &from));
}

void GetDeviceConfigurationStatusGroupedListRequest::MergeFrom(const GetDeviceConfigurationStatusGroupedListRequest& from) {
  GetDeviceConfigurationStatusGroupedListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  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::DeviceConfigurationStatusGroupedFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusGroupedListRequest::CopyFrom(const GetDeviceConfigurationStatusGroupedListRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusGroupedListRequest::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusGroupedListRequest::InternalSwap(GetDeviceConfigurationStatusGroupedListRequest* 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 GetDeviceConfigurationStatusGroupedListRequest::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusGroupedListRequest";
}

// ===================================================================

class GetDeviceConfigurationStatusGroupedListResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ValidationError& validation(const GetDeviceConfigurationStatusGroupedListResponse_Error* msg);
};

const ::keyapis::device::v1::ValidationError&
GetDeviceConfigurationStatusGroupedListResponse_Error::_Internal::validation(const GetDeviceConfigurationStatusGroupedListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetDeviceConfigurationStatusGroupedListResponse_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(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.GetDeviceConfigurationStatusGroupedListResponse.Error.validation)
}
GetDeviceConfigurationStatusGroupedListResponse_Error::GetDeviceConfigurationStatusGroupedListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.Error)
}
GetDeviceConfigurationStatusGroupedListResponse_Error::GetDeviceConfigurationStatusGroupedListResponse_Error(const GetDeviceConfigurationStatusGroupedListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusGroupedListResponse_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.GetDeviceConfigurationStatusGroupedListResponse.Error)
}

inline void GetDeviceConfigurationStatusGroupedListResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetDeviceConfigurationStatusGroupedListResponse_Error::~GetDeviceConfigurationStatusGroupedListResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusGroupedListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetDeviceConfigurationStatusGroupedListResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusGroupedListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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 GetDeviceConfigurationStatusGroupedListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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* GetDeviceConfigurationStatusGroupedListResponse_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* GetDeviceConfigurationStatusGroupedListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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.GetDeviceConfigurationStatusGroupedListResponse.Error)
  return target;
}

::size_t GetDeviceConfigurationStatusGroupedListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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 GetDeviceConfigurationStatusGroupedListResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusGroupedListResponse_Error*>(
      &from));
}

void GetDeviceConfigurationStatusGroupedListResponse_Error::MergeFrom(const GetDeviceConfigurationStatusGroupedListResponse_Error& from) {
  GetDeviceConfigurationStatusGroupedListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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 GetDeviceConfigurationStatusGroupedListResponse_Error::CopyFrom(const GetDeviceConfigurationStatusGroupedListResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusGroupedListResponse_Error::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusGroupedListResponse_Error::InternalSwap(GetDeviceConfigurationStatusGroupedListResponse_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 GetDeviceConfigurationStatusGroupedListResponse_Error::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.Error";
}

// ===================================================================

class GetDeviceConfigurationStatusGroupedListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse, _impl_._oneof_case_);
  static const ::keyapis::device::v1::DeviceConfigurationStatusGrouped& data(const GetDeviceConfigurationStatusGroupedListResponse* msg);
  static const ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error& error(const GetDeviceConfigurationStatusGroupedListResponse* msg);
};

const ::keyapis::device::v1::DeviceConfigurationStatusGrouped&
GetDeviceConfigurationStatusGroupedListResponse::_Internal::data(const GetDeviceConfigurationStatusGroupedListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error&
GetDeviceConfigurationStatusGroupedListResponse::_Internal::error(const GetDeviceConfigurationStatusGroupedListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetDeviceConfigurationStatusGroupedListResponse::set_allocated_data(::keyapis::device::v1::DeviceConfigurationStatusGrouped* 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.GetDeviceConfigurationStatusGroupedListResponse.data)
}
void GetDeviceConfigurationStatusGroupedListResponse::set_allocated_error(::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_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.GetDeviceConfigurationStatusGroupedListResponse.error)
}
GetDeviceConfigurationStatusGroupedListResponse::GetDeviceConfigurationStatusGroupedListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
}
GetDeviceConfigurationStatusGroupedListResponse::GetDeviceConfigurationStatusGroupedListResponse(const GetDeviceConfigurationStatusGroupedListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusGroupedListResponse* 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::DeviceConfigurationStatusGrouped::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
}

inline void GetDeviceConfigurationStatusGroupedListResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetDeviceConfigurationStatusGroupedListResponse::~GetDeviceConfigurationStatusGroupedListResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusGroupedListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetDeviceConfigurationStatusGroupedListResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusGroupedListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  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 GetDeviceConfigurationStatusGroupedListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  ::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* GetDeviceConfigurationStatusGroupedListResponse::_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.DeviceConfigurationStatusGrouped 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.GetDeviceConfigurationStatusGroupedListResponse.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* GetDeviceConfigurationStatusGroupedListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  ::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.GetDeviceConfigurationStatusGroupedListResponse)
  return target;
}

::size_t GetDeviceConfigurationStatusGroupedListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  ::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.DeviceConfigurationStatusGrouped data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse.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 GetDeviceConfigurationStatusGroupedListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusGroupedListResponse*>(
      &from));
}

void GetDeviceConfigurationStatusGroupedListResponse::MergeFrom(const GetDeviceConfigurationStatusGroupedListResponse& from) {
  GetDeviceConfigurationStatusGroupedListResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  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::DeviceConfigurationStatusGrouped::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusGroupedListResponse::CopyFrom(const GetDeviceConfigurationStatusGroupedListResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusGroupedListResponse::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusGroupedListResponse::InternalSwap(GetDeviceConfigurationStatusGroupedListResponse* 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 GetDeviceConfigurationStatusGroupedListResponse::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusGroupedListResponse";
}

// ===================================================================

class GetDeviceConfigurationStatusGroupedCountRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetDeviceConfigurationStatusGroupedCountRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetDeviceConfigurationStatusGroupedCountRequest, _impl_._has_bits_);
  static const ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter& filter(const GetDeviceConfigurationStatusGroupedCountRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter&
GetDeviceConfigurationStatusGroupedCountRequest::_Internal::filter(const GetDeviceConfigurationStatusGroupedCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetDeviceConfigurationStatusGroupedCountRequest::GetDeviceConfigurationStatusGroupedCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
}
GetDeviceConfigurationStatusGroupedCountRequest::GetDeviceConfigurationStatusGroupedCountRequest(const GetDeviceConfigurationStatusGroupedCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusGroupedCountRequest* 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::DeviceConfigurationStatusGroupedFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
}

inline void GetDeviceConfigurationStatusGroupedCountRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
  };
}

GetDeviceConfigurationStatusGroupedCountRequest::~GetDeviceConfigurationStatusGroupedCountRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusGroupedCountRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
}

void GetDeviceConfigurationStatusGroupedCountRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusGroupedCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  ::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* GetDeviceConfigurationStatusGroupedCountRequest::_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.DeviceConfigurationStatusGroupedFilter 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* GetDeviceConfigurationStatusGroupedCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.DeviceConfigurationStatusGroupedFilter 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.GetDeviceConfigurationStatusGroupedCountRequest)
  return target;
}

::size_t GetDeviceConfigurationStatusGroupedCountRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  ::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.DeviceConfigurationStatusGroupedFilter 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 GetDeviceConfigurationStatusGroupedCountRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusGroupedCountRequest*>(
      &from));
}

void GetDeviceConfigurationStatusGroupedCountRequest::MergeFrom(const GetDeviceConfigurationStatusGroupedCountRequest& from) {
  GetDeviceConfigurationStatusGroupedCountRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  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::DeviceConfigurationStatusGroupedFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusGroupedCountRequest::CopyFrom(const GetDeviceConfigurationStatusGroupedCountRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusGroupedCountRequest::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusGroupedCountRequest::InternalSwap(GetDeviceConfigurationStatusGroupedCountRequest* 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 GetDeviceConfigurationStatusGroupedCountRequest::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountRequest";
}

// ===================================================================

class GetDeviceConfigurationStatusGroupedCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountResponse, _impl_._oneof_case_);
};

GetDeviceConfigurationStatusGroupedCountResponse::GetDeviceConfigurationStatusGroupedCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
}
GetDeviceConfigurationStatusGroupedCountResponse::GetDeviceConfigurationStatusGroupedCountResponse(const GetDeviceConfigurationStatusGroupedCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetDeviceConfigurationStatusGroupedCountResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
}

inline void GetDeviceConfigurationStatusGroupedCountResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetDeviceConfigurationStatusGroupedCountResponse::~GetDeviceConfigurationStatusGroupedCountResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetDeviceConfigurationStatusGroupedCountResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetDeviceConfigurationStatusGroupedCountResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetDeviceConfigurationStatusGroupedCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetDeviceConfigurationStatusGroupedCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  ::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* GetDeviceConfigurationStatusGroupedCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetDeviceConfigurationStatusGroupedCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 data = 1;
  if (type_case() == kData) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_data(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  return target;
}

::size_t GetDeviceConfigurationStatusGroupedCountResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetDeviceConfigurationStatusGroupedCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetDeviceConfigurationStatusGroupedCountResponse*>(
      &from));
}

void GetDeviceConfigurationStatusGroupedCountResponse::MergeFrom(const GetDeviceConfigurationStatusGroupedCountResponse& from) {
  GetDeviceConfigurationStatusGroupedCountResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetDeviceConfigurationStatusGroupedCountResponse::CopyFrom(const GetDeviceConfigurationStatusGroupedCountResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDeviceConfigurationStatusGroupedCountResponse::IsInitialized() const {
  return true;
}

void GetDeviceConfigurationStatusGroupedCountResponse::InternalSwap(GetDeviceConfigurationStatusGroupedCountResponse* 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 GetDeviceConfigurationStatusGroupedCountResponse::GetTypeName() const {
  return "keyapis.device.v1.GetDeviceConfigurationStatusGroupedCountResponse";
}

// ===================================================================

class DeleteDeviceRequest::_Internal {
 public:
};

DeleteDeviceRequest::DeleteDeviceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeleteDeviceRequest)
}
DeleteDeviceRequest::DeleteDeviceRequest(const DeleteDeviceRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeleteDeviceRequest)
}

inline void DeleteDeviceRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

DeleteDeviceRequest::~DeleteDeviceRequest() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DeleteDeviceRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeleteDeviceRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void DeleteDeviceRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeleteDeviceRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeleteDeviceRequest)
  ::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* DeleteDeviceRequest::_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* DeleteDeviceRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeleteDeviceRequest)
  ::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.DeleteDeviceRequest)
  return target;
}

::size_t DeleteDeviceRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeleteDeviceRequest)
  ::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 DeleteDeviceRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeleteDeviceRequest*>(
      &from));
}

void DeleteDeviceRequest::MergeFrom(const DeleteDeviceRequest& from) {
  DeleteDeviceRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DeleteDeviceRequest)
  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 DeleteDeviceRequest::CopyFrom(const DeleteDeviceRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeleteDeviceRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeleteDeviceRequest::IsInitialized() const {
  return true;
}

void DeleteDeviceRequest::InternalSwap(DeleteDeviceRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string DeleteDeviceRequest::GetTypeName() const {
  return "keyapis.device.v1.DeleteDeviceRequest";
}

// ===================================================================

class DeleteDeviceResponse::_Internal {
 public:
};

DeleteDeviceResponse::DeleteDeviceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeleteDeviceResponse)
}
DeleteDeviceResponse::DeleteDeviceResponse(const DeleteDeviceResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeleteDeviceResponse)
}

inline void DeleteDeviceResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

DeleteDeviceResponse::~DeleteDeviceResponse() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DeleteDeviceResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeleteDeviceResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void DeleteDeviceResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeleteDeviceResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeleteDeviceResponse)
  ::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* DeleteDeviceResponse::_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* DeleteDeviceResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeleteDeviceResponse)
  ::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.DeleteDeviceResponse)
  return target;
}

::size_t DeleteDeviceResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeleteDeviceResponse)
  ::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 DeleteDeviceResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeleteDeviceResponse*>(
      &from));
}

void DeleteDeviceResponse::MergeFrom(const DeleteDeviceResponse& from) {
  DeleteDeviceResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DeleteDeviceResponse)
  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 DeleteDeviceResponse::CopyFrom(const DeleteDeviceResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeleteDeviceResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeleteDeviceResponse::IsInitialized() const {
  return true;
}

void DeleteDeviceResponse::InternalSwap(DeleteDeviceResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string DeleteDeviceResponse::GetTypeName() const {
  return "keyapis.device.v1.DeleteDeviceResponse";
}

// ===================================================================

class ReinstallError_SipLoginIsMissing::_Internal {
 public:
};

ReinstallError_SipLoginIsMissing::ReinstallError_SipLoginIsMissing(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
}
ReinstallError_SipLoginIsMissing::ReinstallError_SipLoginIsMissing(const ReinstallError_SipLoginIsMissing& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
}

inline void ReinstallError_SipLoginIsMissing::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

ReinstallError_SipLoginIsMissing::~ReinstallError_SipLoginIsMissing() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ReinstallError_SipLoginIsMissing::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void ReinstallError_SipLoginIsMissing::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ReinstallError_SipLoginIsMissing::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  ::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* ReinstallError_SipLoginIsMissing::_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* ReinstallError_SipLoginIsMissing::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  ::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.ReinstallError.SipLoginIsMissing)
  return target;
}

::size_t ReinstallError_SipLoginIsMissing::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  ::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 ReinstallError_SipLoginIsMissing::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const ReinstallError_SipLoginIsMissing*>(
      &from));
}

void ReinstallError_SipLoginIsMissing::MergeFrom(const ReinstallError_SipLoginIsMissing& from) {
  ReinstallError_SipLoginIsMissing* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  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 ReinstallError_SipLoginIsMissing::CopyFrom(const ReinstallError_SipLoginIsMissing& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.ReinstallError.SipLoginIsMissing)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ReinstallError_SipLoginIsMissing::IsInitialized() const {
  return true;
}

void ReinstallError_SipLoginIsMissing::InternalSwap(ReinstallError_SipLoginIsMissing* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string ReinstallError_SipLoginIsMissing::GetTypeName() const {
  return "keyapis.device.v1.ReinstallError.SipLoginIsMissing";
}

// ===================================================================

class ReinstallError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::ReinstallError, _impl_._oneof_case_);
  static const ::keyapis::device::v1::ReinstallError_SipLoginIsMissing& sip_login_is_missing(const ReinstallError* msg);
};

const ::keyapis::device::v1::ReinstallError_SipLoginIsMissing&
ReinstallError::_Internal::sip_login_is_missing(const ReinstallError* msg) {
  return *msg->_impl_.reason_.sip_login_is_missing_;
}
void ReinstallError::set_allocated_sip_login_is_missing(::keyapis::device::v1::ReinstallError_SipLoginIsMissing* sip_login_is_missing) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (sip_login_is_missing) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(sip_login_is_missing);
    if (message_arena != submessage_arena) {
      sip_login_is_missing = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, sip_login_is_missing, submessage_arena);
    }
    set_has_sip_login_is_missing();
    _impl_.reason_.sip_login_is_missing_ = sip_login_is_missing;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.ReinstallError.sip_login_is_missing)
}
ReinstallError::ReinstallError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.ReinstallError)
}
ReinstallError::ReinstallError(const ReinstallError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ReinstallError* 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 kSipLoginIsMissing: {
      _this->_internal_mutable_sip_login_is_missing()->::keyapis::device::v1::ReinstallError_SipLoginIsMissing::MergeFrom(
          from._internal_sip_login_is_missing());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.ReinstallError)
}

inline void ReinstallError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

ReinstallError::~ReinstallError() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.ReinstallError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ReinstallError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void ReinstallError::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ReinstallError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.ReinstallError)
  switch (reason_case()) {
    case kSipLoginIsMissing: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.sip_login_is_missing_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void ReinstallError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.ReinstallError)
  ::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* ReinstallError::_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.ReinstallError.SipLoginIsMissing sip_login_is_missing = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_sip_login_is_missing(), 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* ReinstallError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.ReinstallError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.ReinstallError.SipLoginIsMissing sip_login_is_missing = 1;
  if (reason_case() == kSipLoginIsMissing) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::sip_login_is_missing(this),
        _Internal::sip_login_is_missing(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.ReinstallError)
  return target;
}

::size_t ReinstallError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.ReinstallError)
  ::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.ReinstallError.SipLoginIsMissing sip_login_is_missing = 1;
    case kSipLoginIsMissing: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.sip_login_is_missing_);
      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 ReinstallError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const ReinstallError*>(
      &from));
}

void ReinstallError::MergeFrom(const ReinstallError& from) {
  ReinstallError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.ReinstallError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kSipLoginIsMissing: {
      _this->_internal_mutable_sip_login_is_missing()->::keyapis::device::v1::ReinstallError_SipLoginIsMissing::MergeFrom(
          from._internal_sip_login_is_missing());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void ReinstallError::CopyFrom(const ReinstallError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.ReinstallError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ReinstallError::IsInitialized() const {
  return true;
}

void ReinstallError::InternalSwap(ReinstallError* 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 ReinstallError::GetTypeName() const {
  return "keyapis.device.v1.ReinstallError";
}

// ===================================================================

class DeviceFilter::_Internal {
 public:
  using HasBits = decltype(std::declval<DeviceFilter>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(DeviceFilter, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& text(const DeviceFilter* msg);
  static void set_has_text(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::BoolValue& is_concierge_enabled(const DeviceFilter* msg);
  static void set_has_is_concierge_enabled(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::BoolValue& is_dispatching_enabled(const DeviceFilter* msg);
  static void set_has_is_dispatching_enabled(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& dispatching_public_number(const DeviceFilter* msg);
  static void set_has_dispatching_public_number(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& hardware_version(const DeviceFilter* msg);
  static void set_has_hardware_version(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& software_version(const DeviceFilter* msg);
  static void set_has_software_version(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::BoolValue& is_autochange_password_enabled(const DeviceFilter* msg);
  static void set_has_is_autochange_password_enabled(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& sync_retry_count_less_then(const DeviceFilter* msg);
  static void set_has_sync_retry_count_less_then(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& begin_sync_successful_at(const DeviceFilter* msg);
  static void set_has_begin_sync_successful_at(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& end_sync_successful_at(const DeviceFilter* msg);
  static void set_has_end_sync_successful_at(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& begin_sync_at(const DeviceFilter* msg);
  static void set_has_begin_sync_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& end_sync_at(const DeviceFilter* msg);
  static void set_has_end_sync_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
DeviceFilter::_Internal::text(const DeviceFilter* msg) {
  return *msg->_impl_.text_;
}
const ::PROTOBUF_NAMESPACE_ID::BoolValue&
DeviceFilter::_Internal::is_concierge_enabled(const DeviceFilter* msg) {
  return *msg->_impl_.is_concierge_enabled_;
}
const ::PROTOBUF_NAMESPACE_ID::BoolValue&
DeviceFilter::_Internal::is_dispatching_enabled(const DeviceFilter* msg) {
  return *msg->_impl_.is_dispatching_enabled_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
DeviceFilter::_Internal::dispatching_public_number(const DeviceFilter* msg) {
  return *msg->_impl_.dispatching_public_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
DeviceFilter::_Internal::hardware_version(const DeviceFilter* msg) {
  return *msg->_impl_.hardware_version_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
DeviceFilter::_Internal::software_version(const DeviceFilter* msg) {
  return *msg->_impl_.software_version_;
}
const ::PROTOBUF_NAMESPACE_ID::BoolValue&
DeviceFilter::_Internal::is_autochange_password_enabled(const DeviceFilter* msg) {
  return *msg->_impl_.is_autochange_password_enabled_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
DeviceFilter::_Internal::sync_retry_count_less_then(const DeviceFilter* msg) {
  return *msg->_impl_.sync_retry_count_less_then_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceFilter::_Internal::begin_sync_successful_at(const DeviceFilter* msg) {
  return *msg->_impl_.begin_sync_successful_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceFilter::_Internal::end_sync_successful_at(const DeviceFilter* msg) {
  return *msg->_impl_.end_sync_successful_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceFilter::_Internal::begin_sync_at(const DeviceFilter* msg) {
  return *msg->_impl_.begin_sync_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
DeviceFilter::_Internal::end_sync_at(const DeviceFilter* msg) {
  return *msg->_impl_.end_sync_at_;
}
void DeviceFilter::clear_text() {
  if (_impl_.text_ != nullptr) _impl_.text_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void DeviceFilter::clear_is_concierge_enabled() {
  if (_impl_.is_concierge_enabled_ != nullptr) _impl_.is_concierge_enabled_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void DeviceFilter::clear_is_dispatching_enabled() {
  if (_impl_.is_dispatching_enabled_ != nullptr) _impl_.is_dispatching_enabled_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void DeviceFilter::clear_dispatching_public_number() {
  if (_impl_.dispatching_public_number_ != nullptr) _impl_.dispatching_public_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
void DeviceFilter::clear_hardware_version() {
  if (_impl_.hardware_version_ != nullptr) _impl_.hardware_version_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
void DeviceFilter::clear_software_version() {
  if (_impl_.software_version_ != nullptr) _impl_.software_version_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void DeviceFilter::clear_is_autochange_password_enabled() {
  if (_impl_.is_autochange_password_enabled_ != nullptr) _impl_.is_autochange_password_enabled_->Clear();
  _impl_._has_bits_[0] &= ~0x00000040u;
}
void DeviceFilter::clear_sync_retry_count_less_then() {
  if (_impl_.sync_retry_count_less_then_ != nullptr) _impl_.sync_retry_count_less_then_->Clear();
  _impl_._has_bits_[0] &= ~0x00000080u;
}
void DeviceFilter::clear_begin_sync_successful_at() {
  if (_impl_.begin_sync_successful_at_ != nullptr) _impl_.begin_sync_successful_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000100u;
}
void DeviceFilter::clear_end_sync_successful_at() {
  if (_impl_.end_sync_successful_at_ != nullptr) _impl_.end_sync_successful_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000200u;
}
void DeviceFilter::clear_begin_sync_at() {
  if (_impl_.begin_sync_at_ != nullptr) _impl_.begin_sync_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000400u;
}
void DeviceFilter::clear_end_sync_at() {
  if (_impl_.end_sync_at_ != nullptr) _impl_.end_sync_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000800u;
}
DeviceFilter::DeviceFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceFilter)
}
DeviceFilter::DeviceFilter(const DeviceFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.owner_company_ids_) { from._impl_.owner_company_ids_ }
    ,/* _impl_._owner_company_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.flatgramm_ids_) { from._impl_.flatgramm_ids_ }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.serial_numbers_){from._impl_.serial_numbers_}
    , decltype(_impl_.device_status_types_) { from._internal_device_status_types() }
    , /*decltype(_impl_._device_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.device_types_) { from._internal_device_types() }
    , /*decltype(_impl_._device_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.device_model_types_) { from._internal_device_model_types() }
    , /*decltype(_impl_._device_model_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.abc_number_){from._impl_.abc_number_}
    , decltype(_impl_.camera_ids_){from._impl_.camera_ids_}
    , decltype(_impl_.sync_status_status_types_) { from._internal_sync_status_status_types() }
    , /*decltype(_impl_._sync_status_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.is_concierge_enabled_){nullptr}
    , decltype(_impl_.is_dispatching_enabled_){nullptr}
    , decltype(_impl_.dispatching_public_number_){nullptr}
    , decltype(_impl_.hardware_version_){nullptr}
    , decltype(_impl_.software_version_){nullptr}
    , decltype(_impl_.is_autochange_password_enabled_){nullptr}
    , decltype(_impl_.sync_retry_count_less_then_){nullptr}
    , decltype(_impl_.begin_sync_successful_at_){nullptr}
    , decltype(_impl_.end_sync_successful_at_){nullptr}
    , decltype(_impl_.begin_sync_at_){nullptr}
    , decltype(_impl_.end_sync_at_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.text_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.text_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.is_concierge_enabled_ = new ::PROTOBUF_NAMESPACE_ID::BoolValue(*from._impl_.is_concierge_enabled_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.is_dispatching_enabled_ = new ::PROTOBUF_NAMESPACE_ID::BoolValue(*from._impl_.is_dispatching_enabled_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.dispatching_public_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.dispatching_public_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.hardware_version_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.hardware_version_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.software_version_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.software_version_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.is_autochange_password_enabled_ = new ::PROTOBUF_NAMESPACE_ID::BoolValue(*from._impl_.is_autochange_password_enabled_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.sync_retry_count_less_then_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.sync_retry_count_less_then_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.begin_sync_successful_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.begin_sync_successful_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.end_sync_successful_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.end_sync_successful_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000400u) != 0) {
    _this->_impl_.begin_sync_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.begin_sync_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000800u) != 0) {
    _this->_impl_.end_sync_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.end_sync_at_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceFilter)
}

inline void DeviceFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.owner_company_ids_) { arena }
    ,/* _impl_._owner_company_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.flatgramm_ids_) { arena }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.serial_numbers_){arena}
    , decltype(_impl_.device_status_types_) { arena }
    , /*decltype(_impl_._device_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.device_types_) { arena }
    , /*decltype(_impl_._device_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.device_model_types_) { arena }
    , /*decltype(_impl_._device_model_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.abc_number_){arena}
    , decltype(_impl_.camera_ids_){arena}
    , decltype(_impl_.sync_status_status_types_) { arena }
    , /*decltype(_impl_._sync_status_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.is_concierge_enabled_){nullptr}
    , decltype(_impl_.is_dispatching_enabled_){nullptr}
    , decltype(_impl_.dispatching_public_number_){nullptr}
    , decltype(_impl_.hardware_version_){nullptr}
    , decltype(_impl_.software_version_){nullptr}
    , decltype(_impl_.is_autochange_password_enabled_){nullptr}
    , decltype(_impl_.sync_retry_count_less_then_){nullptr}
    , decltype(_impl_.begin_sync_successful_at_){nullptr}
    , decltype(_impl_.end_sync_successful_at_){nullptr}
    , decltype(_impl_.begin_sync_at_){nullptr}
    , decltype(_impl_.end_sync_at_){nullptr}
  };
}

DeviceFilter::~DeviceFilter() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DeviceFilter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeviceFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.owner_company_ids_.~RepeatedField();
  _impl_.flatgramm_ids_.~RepeatedField();
  _internal_mutable_serial_numbers()->~RepeatedPtrField();
  _internal_mutable_device_status_types()->~RepeatedField();
  _internal_mutable_device_types()->~RepeatedField();
  _internal_mutable_device_model_types()->~RepeatedField();
  _internal_mutable_abc_number()->~RepeatedPtrField();
  _internal_mutable_camera_ids()->~RepeatedPtrField();
  _internal_mutable_sync_status_status_types()->~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.text_;
  if (this != internal_default_instance()) delete _impl_.is_concierge_enabled_;
  if (this != internal_default_instance()) delete _impl_.is_dispatching_enabled_;
  if (this != internal_default_instance()) delete _impl_.dispatching_public_number_;
  if (this != internal_default_instance()) delete _impl_.hardware_version_;
  if (this != internal_default_instance()) delete _impl_.software_version_;
  if (this != internal_default_instance()) delete _impl_.is_autochange_password_enabled_;
  if (this != internal_default_instance()) delete _impl_.sync_retry_count_less_then_;
  if (this != internal_default_instance()) delete _impl_.begin_sync_successful_at_;
  if (this != internal_default_instance()) delete _impl_.end_sync_successful_at_;
  if (this != internal_default_instance()) delete _impl_.begin_sync_at_;
  if (this != internal_default_instance()) delete _impl_.end_sync_at_;
}

void DeviceFilter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeviceFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeviceFilter)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_owner_company_ids()->Clear();
  _internal_mutable_flatgramm_ids()->Clear();
  _internal_mutable_serial_numbers()->Clear();
  _internal_mutable_device_status_types()->Clear();
  _internal_mutable_device_types()->Clear();
  _internal_mutable_device_model_types()->Clear();
  _internal_mutable_abc_number()->Clear();
  _internal_mutable_camera_ids()->Clear();
  _internal_mutable_sync_status_status_types()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.text_ != nullptr);
      _impl_.text_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.is_concierge_enabled_ != nullptr);
      _impl_.is_concierge_enabled_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.is_dispatching_enabled_ != nullptr);
      _impl_.is_dispatching_enabled_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.dispatching_public_number_ != nullptr);
      _impl_.dispatching_public_number_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.hardware_version_ != nullptr);
      _impl_.hardware_version_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.software_version_ != nullptr);
      _impl_.software_version_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.is_autochange_password_enabled_ != nullptr);
      _impl_.is_autochange_password_enabled_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.sync_retry_count_less_then_ != nullptr);
      _impl_.sync_retry_count_less_then_->Clear();
    }
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.begin_sync_successful_at_ != nullptr);
      _impl_.begin_sync_successful_at_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.end_sync_successful_at_ != nullptr);
      _impl_.end_sync_successful_at_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      ABSL_DCHECK(_impl_.begin_sync_at_ != nullptr);
      _impl_.begin_sync_at_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      ABSL_DCHECK(_impl_.end_sync_at_ != nullptr);
      _impl_.end_sync_at_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceFilter::_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 int32 owner_company_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_owner_company_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          _internal_add_owner_company_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue text = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 flatgramm_ids = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_flatgramm_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          _internal_add_flatgramm_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string serial_numbers = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_serial_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<34>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Device.StatusType device_status_types = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_device_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 40) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_device_status_types(static_cast<::keyapis::device::v1::Device_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Device.Type device_types = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_device_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 48) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_device_types(static_cast<::keyapis::device::v1::Device_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Device.ModelType device_model_types = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_device_model_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 56) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_device_model_types(static_cast<::keyapis::device::v1::Device_ModelType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.BoolValue is_concierge_enabled = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_is_concierge_enabled(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.BoolValue is_dispatching_enabled = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_is_dispatching_enabled(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue dispatching_public_number = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_dispatching_public_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue hardware_version = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_hardware_version(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue software_version = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_software_version(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.BoolValue is_autochange_password_enabled = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_is_autochange_password_enabled(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string abc_number = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_abc_number();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string camera_ids = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_camera_ids();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.SyncStatus.StatusType sync_status_status_types = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_sync_status_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 128) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_sync_status_status_types(static_cast<::keyapis::device::v1::SyncStatus_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value sync_retry_count_less_then = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_sync_retry_count_less_then(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp begin_sync_successful_at = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_begin_sync_successful_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp end_sync_successful_at = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_end_sync_successful_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp begin_sync_at = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_begin_sync_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp end_sync_at = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_end_sync_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* DeviceFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 owner_company_ids = 1;
  {
    int byte_size = _impl_._owner_company_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(1, _internal_owner_company_ids(),
                                                 byte_size, target);
    }
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue text = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::text(this),
        _Internal::text(this).GetCachedSize(), target, stream);
  }

  // repeated int32 flatgramm_ids = 3;
  {
    int byte_size = _impl_._flatgramm_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(3, _internal_flatgramm_ids(),
                                                 byte_size, target);
    }
  }

  // repeated string serial_numbers = 4;
  for (int i = 0, n = this->_internal_serial_numbers_size(); i < n; ++i) {
    const auto& s = this->_internal_serial_numbers(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.DeviceFilter.serial_numbers");
    target = stream->WriteString(4, s, target);
  }

  // repeated .keyapis.device.v1.Device.StatusType device_status_types = 5;
  {
    int byte_size = _impl_._device_status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(5, _internal_device_status_types(),
                                       byte_size, target);
    }
  }

  // repeated .keyapis.device.v1.Device.Type device_types = 6;
  {
    int byte_size = _impl_._device_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(6, _internal_device_types(),
                                       byte_size, target);
    }
  }

  // repeated .keyapis.device.v1.Device.ModelType device_model_types = 7;
  {
    int byte_size = _impl_._device_model_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(7, _internal_device_model_types(),
                                       byte_size, target);
    }
  }

  // .google.protobuf.BoolValue is_concierge_enabled = 8;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::is_concierge_enabled(this),
        _Internal::is_concierge_enabled(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.BoolValue is_dispatching_enabled = 9;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::is_dispatching_enabled(this),
        _Internal::is_dispatching_enabled(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue dispatching_public_number = 10;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::dispatching_public_number(this),
        _Internal::dispatching_public_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue hardware_version = 11;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::hardware_version(this),
        _Internal::hardware_version(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue software_version = 12;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::software_version(this),
        _Internal::software_version(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.BoolValue is_autochange_password_enabled = 13;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, _Internal::is_autochange_password_enabled(this),
        _Internal::is_autochange_password_enabled(this).GetCachedSize(), target, stream);
  }

  // repeated string abc_number = 14;
  for (int i = 0, n = this->_internal_abc_number_size(); i < n; ++i) {
    const auto& s = this->_internal_abc_number(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.DeviceFilter.abc_number");
    target = stream->WriteString(14, s, target);
  }

  // repeated string camera_ids = 15;
  for (int i = 0, n = this->_internal_camera_ids_size(); i < n; ++i) {
    const auto& s = this->_internal_camera_ids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.DeviceFilter.camera_ids");
    target = stream->WriteString(15, s, target);
  }

  // repeated .keyapis.device.v1.SyncStatus.StatusType sync_status_status_types = 16;
  {
    int byte_size = _impl_._sync_status_status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(16, _internal_sync_status_status_types(),
                                       byte_size, target);
    }
  }

  // .google.protobuf.Int32Value sync_retry_count_less_then = 17;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::sync_retry_count_less_then(this),
        _Internal::sync_retry_count_less_then(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp begin_sync_successful_at = 18;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(18, _Internal::begin_sync_successful_at(this),
        _Internal::begin_sync_successful_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp end_sync_successful_at = 19;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(19, _Internal::end_sync_successful_at(this),
        _Internal::end_sync_successful_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp begin_sync_at = 20;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, _Internal::begin_sync_at(this),
        _Internal::begin_sync_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp end_sync_at = 21;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(21, _Internal::end_sync_at(this),
        _Internal::end_sync_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.DeviceFilter)
  return target;
}

::size_t DeviceFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceFilter)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 owner_company_ids = 1;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_owner_company_ids())
    ;
    _impl_._owner_company_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 flatgramm_ids = 3;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_flatgramm_ids())
    ;
    _impl_._flatgramm_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated string serial_numbers = 4;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_serial_numbers().size());
  for (int i = 0, n = _internal_serial_numbers().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_serial_numbers().Get(i));
  }

  // repeated .keyapis.device.v1.Device.StatusType device_status_types = 5;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_device_status_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_device_status_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._device_status_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated .keyapis.device.v1.Device.Type device_types = 6;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_device_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_device_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._device_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated .keyapis.device.v1.Device.ModelType device_model_types = 7;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_device_model_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_device_model_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._device_model_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated string abc_number = 14;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_abc_number().size());
  for (int i = 0, n = _internal_abc_number().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_abc_number().Get(i));
  }

  // repeated string camera_ids = 15;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_camera_ids().size());
  for (int i = 0, n = _internal_camera_ids().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_camera_ids().Get(i));
  }

  // repeated .keyapis.device.v1.SyncStatus.StatusType sync_status_status_types = 16;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_sync_status_status_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_sync_status_status_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 2;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._sync_status_status_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.StringValue text = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.text_);
    }

    // .google.protobuf.BoolValue is_concierge_enabled = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.is_concierge_enabled_);
    }

    // .google.protobuf.BoolValue is_dispatching_enabled = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.is_dispatching_enabled_);
    }

    // .google.protobuf.StringValue dispatching_public_number = 10;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dispatching_public_number_);
    }

    // .google.protobuf.StringValue hardware_version = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hardware_version_);
    }

    // .google.protobuf.StringValue software_version = 12;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.software_version_);
    }

    // .google.protobuf.BoolValue is_autochange_password_enabled = 13;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.is_autochange_password_enabled_);
    }

    // .google.protobuf.Int32Value sync_retry_count_less_then = 17;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sync_retry_count_less_then_);
    }

  }
  if (cached_has_bits & 0x00000f00u) {
    // .google.protobuf.Timestamp begin_sync_successful_at = 18;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.begin_sync_successful_at_);
    }

    // .google.protobuf.Timestamp end_sync_successful_at = 19;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.end_sync_successful_at_);
    }

    // .google.protobuf.Timestamp begin_sync_at = 20;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.begin_sync_at_);
    }

    // .google.protobuf.Timestamp end_sync_at = 21;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.end_sync_at_);
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DeviceFilter::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceFilter*>(
      &from));
}

void DeviceFilter::MergeFrom(const DeviceFilter& from) {
  DeviceFilter* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DeviceFilter)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.owner_company_ids_.MergeFrom(from._impl_.owner_company_ids_);
  _this->_impl_.flatgramm_ids_.MergeFrom(from._impl_.flatgramm_ids_);
  _this->_internal_mutable_serial_numbers()->MergeFrom(from._internal_serial_numbers());
  _this->_internal_mutable_device_status_types()->MergeFrom(from._internal_device_status_types());
  _this->_internal_mutable_device_types()->MergeFrom(from._internal_device_types());
  _this->_internal_mutable_device_model_types()->MergeFrom(from._internal_device_model_types());
  _this->_internal_mutable_abc_number()->MergeFrom(from._internal_abc_number());
  _this->_internal_mutable_camera_ids()->MergeFrom(from._internal_camera_ids());
  _this->_internal_mutable_sync_status_status_types()->MergeFrom(from._internal_sync_status_status_types());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_text()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_text());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_is_concierge_enabled()->::PROTOBUF_NAMESPACE_ID::BoolValue::MergeFrom(
          from._internal_is_concierge_enabled());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_is_dispatching_enabled()->::PROTOBUF_NAMESPACE_ID::BoolValue::MergeFrom(
          from._internal_is_dispatching_enabled());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_dispatching_public_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_dispatching_public_number());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_hardware_version()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_hardware_version());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_software_version()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_software_version());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_is_autochange_password_enabled()->::PROTOBUF_NAMESPACE_ID::BoolValue::MergeFrom(
          from._internal_is_autochange_password_enabled());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_sync_retry_count_less_then()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_sync_retry_count_less_then());
    }
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_begin_sync_successful_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_begin_sync_successful_at());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_end_sync_successful_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_end_sync_successful_at());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_begin_sync_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_begin_sync_at());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_end_sync_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_end_sync_at());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void DeviceFilter::CopyFrom(const DeviceFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeviceFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeviceFilter::IsInitialized() const {
  return true;
}

void DeviceFilter::InternalSwap(DeviceFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.owner_company_ids_.InternalSwap(&other->_impl_.owner_company_ids_);
  _impl_.flatgramm_ids_.InternalSwap(&other->_impl_.flatgramm_ids_);
  _internal_mutable_serial_numbers()->InternalSwap(
      other->_internal_mutable_serial_numbers());
  _internal_mutable_device_status_types()->InternalSwap(
      other->_internal_mutable_device_status_types());
  _internal_mutable_device_types()->InternalSwap(
      other->_internal_mutable_device_types());
  _internal_mutable_device_model_types()->InternalSwap(
      other->_internal_mutable_device_model_types());
  _internal_mutable_abc_number()->InternalSwap(
      other->_internal_mutable_abc_number());
  _internal_mutable_camera_ids()->InternalSwap(
      other->_internal_mutable_camera_ids());
  _internal_mutable_sync_status_status_types()->InternalSwap(
      other->_internal_mutable_sync_status_status_types());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceFilter, _impl_.end_sync_at_)
      + sizeof(DeviceFilter::_impl_.end_sync_at_)
      - PROTOBUF_FIELD_OFFSET(DeviceFilter, _impl_.text_)>(
          reinterpret_cast<char*>(&_impl_.text_),
          reinterpret_cast<char*>(&other->_impl_.text_));
}

std::string DeviceFilter::GetTypeName() const {
  return "keyapis.device.v1.DeviceFilter";
}

// ===================================================================

class DevicePaging::_Internal {
 public:
};

DevicePaging::DevicePaging(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DevicePaging)
}
DevicePaging::DevicePaging(const DevicePaging& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DevicePaging)
}

inline void DevicePaging::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_)*/{}
  };
}

DevicePaging::~DevicePaging() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DevicePaging)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DevicePaging::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void DevicePaging::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DevicePaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DevicePaging)
  ::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* DevicePaging::_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.DevicePaging.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::DevicePaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.DevicePaging.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::DevicePaging_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* DevicePaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DevicePaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.DevicePaging.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.DevicePaging.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.DevicePaging)
  return target;
}

::size_t DevicePaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DevicePaging)
  ::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.DevicePaging.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.DevicePaging.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 DevicePaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DevicePaging*>(
      &from));
}

void DevicePaging::MergeFrom(const DevicePaging& from) {
  DevicePaging* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DevicePaging)
  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 DevicePaging::CopyFrom(const DevicePaging& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DevicePaging)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DevicePaging::IsInitialized() const {
  return true;
}

void DevicePaging::InternalSwap(DevicePaging* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DevicePaging, _impl_.offset_)
      + sizeof(DevicePaging::_impl_.offset_)
      - PROTOBUF_FIELD_OFFSET(DevicePaging, _impl_.order_by_type_)>(
          reinterpret_cast<char*>(&_impl_.order_by_type_),
          reinterpret_cast<char*>(&other->_impl_.order_by_type_));
}

std::string DevicePaging::GetTypeName() const {
  return "keyapis.device.v1.DevicePaging";
}

// ===================================================================

class DeviceConfigurationStatusGroupedFilter::_Internal {
 public:
  using HasBits = decltype(std::declval<DeviceConfigurationStatusGroupedFilter>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatusGroupedFilter, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::BoolValue& is_ready_for_retry(const DeviceConfigurationStatusGroupedFilter* msg);
  static void set_has_is_ready_for_retry(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& retry_count_less_then(const DeviceConfigurationStatusGroupedFilter* msg);
  static void set_has_retry_count_less_then(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::BoolValue&
DeviceConfigurationStatusGroupedFilter::_Internal::is_ready_for_retry(const DeviceConfigurationStatusGroupedFilter* msg) {
  return *msg->_impl_.is_ready_for_retry_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
DeviceConfigurationStatusGroupedFilter::_Internal::retry_count_less_then(const DeviceConfigurationStatusGroupedFilter* msg) {
  return *msg->_impl_.retry_count_less_then_;
}
void DeviceConfigurationStatusGroupedFilter::clear_is_ready_for_retry() {
  if (_impl_.is_ready_for_retry_ != nullptr) _impl_.is_ready_for_retry_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void DeviceConfigurationStatusGroupedFilter::clear_retry_count_less_then() {
  if (_impl_.retry_count_less_then_ != nullptr) _impl_.retry_count_less_then_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
DeviceConfigurationStatusGroupedFilter::DeviceConfigurationStatusGroupedFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
}
DeviceConfigurationStatusGroupedFilter::DeviceConfigurationStatusGroupedFilter(const DeviceConfigurationStatusGroupedFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceConfigurationStatusGroupedFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.device_ids_) { from._impl_.device_ids_ }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.configuration_types_) { from._internal_configuration_types() }
    , /*decltype(_impl_._configuration_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.status_types_) { from._internal_status_types() }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.is_ready_for_retry_){nullptr}
    , decltype(_impl_.retry_count_less_then_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.is_ready_for_retry_ = new ::PROTOBUF_NAMESPACE_ID::BoolValue(*from._impl_.is_ready_for_retry_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.retry_count_less_then_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.retry_count_less_then_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
}

inline void DeviceConfigurationStatusGroupedFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.device_ids_) { arena }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.configuration_types_) { arena }
    , /*decltype(_impl_._configuration_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.status_types_) { arena }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.is_ready_for_retry_){nullptr}
    , decltype(_impl_.retry_count_less_then_){nullptr}
  };
}

DeviceConfigurationStatusGroupedFilter::~DeviceConfigurationStatusGroupedFilter() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeviceConfigurationStatusGroupedFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.device_ids_.~RepeatedField();
  _internal_mutable_configuration_types()->~RepeatedField();
  _internal_mutable_status_types()->~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.is_ready_for_retry_;
  if (this != internal_default_instance()) delete _impl_.retry_count_less_then_;
}

void DeviceConfigurationStatusGroupedFilter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeviceConfigurationStatusGroupedFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_device_ids()->Clear();
  _internal_mutable_configuration_types()->Clear();
  _internal_mutable_status_types()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.is_ready_for_retry_ != nullptr);
      _impl_.is_ready_for_retry_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.retry_count_less_then_ != nullptr);
      _impl_.retry_count_less_then_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceConfigurationStatusGroupedFilter::_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 int32 device_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_device_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          _internal_add_device_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_types = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_configuration_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_configuration_types(static_cast<::keyapis::device::v1::DeviceConfigurationStatus_ConfigurationType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.DeviceConfigurationStatus.StatusType status_types = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_status_types(static_cast<::keyapis::device::v1::DeviceConfigurationStatus_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.BoolValue is_ready_for_retry = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_is_ready_for_retry(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value retry_count_less_then = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_retry_count_less_then(), 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* DeviceConfigurationStatusGroupedFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 device_ids = 1;
  {
    int byte_size = _impl_._device_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(1, _internal_device_ids(),
                                                 byte_size, target);
    }
  }

  // repeated .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_types = 2;
  {
    int byte_size = _impl_._configuration_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(2, _internal_configuration_types(),
                                       byte_size, target);
    }
  }

  // repeated .keyapis.device.v1.DeviceConfigurationStatus.StatusType status_types = 3;
  {
    int byte_size = _impl_._status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(3, _internal_status_types(),
                                       byte_size, target);
    }
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.BoolValue is_ready_for_retry = 4;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::is_ready_for_retry(this),
        _Internal::is_ready_for_retry(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value retry_count_less_then = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::retry_count_less_then(this),
        _Internal::retry_count_less_then(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.DeviceConfigurationStatusGroupedFilter)
  return target;
}

::size_t DeviceConfigurationStatusGroupedFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 device_ids = 1;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_device_ids())
    ;
    _impl_._device_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated .keyapis.device.v1.DeviceConfigurationStatus.ConfigurationType configuration_types = 2;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_configuration_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_configuration_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._configuration_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // repeated .keyapis.device.v1.DeviceConfigurationStatus.StatusType status_types = 3;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_status_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_status_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._status_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .google.protobuf.BoolValue is_ready_for_retry = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.is_ready_for_retry_);
    }

    // .google.protobuf.Int32Value retry_count_less_then = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.retry_count_less_then_);
    }

  }
  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 DeviceConfigurationStatusGroupedFilter::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceConfigurationStatusGroupedFilter*>(
      &from));
}

void DeviceConfigurationStatusGroupedFilter::MergeFrom(const DeviceConfigurationStatusGroupedFilter& from) {
  DeviceConfigurationStatusGroupedFilter* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.device_ids_.MergeFrom(from._impl_.device_ids_);
  _this->_internal_mutable_configuration_types()->MergeFrom(from._internal_configuration_types());
  _this->_internal_mutable_status_types()->MergeFrom(from._internal_status_types());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_is_ready_for_retry()->::PROTOBUF_NAMESPACE_ID::BoolValue::MergeFrom(
          from._internal_is_ready_for_retry());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_retry_count_less_then()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_retry_count_less_then());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void DeviceConfigurationStatusGroupedFilter::CopyFrom(const DeviceConfigurationStatusGroupedFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeviceConfigurationStatusGroupedFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeviceConfigurationStatusGroupedFilter::IsInitialized() const {
  return true;
}

void DeviceConfigurationStatusGroupedFilter::InternalSwap(DeviceConfigurationStatusGroupedFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.device_ids_.InternalSwap(&other->_impl_.device_ids_);
  _internal_mutable_configuration_types()->InternalSwap(
      other->_internal_mutable_configuration_types());
  _internal_mutable_status_types()->InternalSwap(
      other->_internal_mutable_status_types());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatusGroupedFilter, _impl_.retry_count_less_then_)
      + sizeof(DeviceConfigurationStatusGroupedFilter::_impl_.retry_count_less_then_)
      - PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatusGroupedFilter, _impl_.is_ready_for_retry_)>(
          reinterpret_cast<char*>(&_impl_.is_ready_for_retry_),
          reinterpret_cast<char*>(&other->_impl_.is_ready_for_retry_));
}

std::string DeviceConfigurationStatusGroupedFilter::GetTypeName() const {
  return "keyapis.device.v1.DeviceConfigurationStatusGroupedFilter";
}

// ===================================================================

class DeviceConfigurationStatusGroupedPaging::_Internal {
 public:
};

DeviceConfigurationStatusGroupedPaging::DeviceConfigurationStatusGroupedPaging(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
}
DeviceConfigurationStatusGroupedPaging::DeviceConfigurationStatusGroupedPaging(const DeviceConfigurationStatusGroupedPaging& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
}

inline void DeviceConfigurationStatusGroupedPaging::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_)*/{}
  };
}

DeviceConfigurationStatusGroupedPaging::~DeviceConfigurationStatusGroupedPaging() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeviceConfigurationStatusGroupedPaging::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void DeviceConfigurationStatusGroupedPaging::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeviceConfigurationStatusGroupedPaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  ::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* DeviceConfigurationStatusGroupedPaging::_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.DeviceConfigurationStatusGroupedPaging.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::DeviceConfigurationStatusGroupedPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.DeviceConfigurationStatusGroupedPaging.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::DeviceConfigurationStatusGroupedPaging_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* DeviceConfigurationStatusGroupedPaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.DeviceConfigurationStatusGroupedPaging.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.DeviceConfigurationStatusGroupedPaging.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.DeviceConfigurationStatusGroupedPaging)
  return target;
}

::size_t DeviceConfigurationStatusGroupedPaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  ::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.DeviceConfigurationStatusGroupedPaging.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.DeviceConfigurationStatusGroupedPaging.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 DeviceConfigurationStatusGroupedPaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceConfigurationStatusGroupedPaging*>(
      &from));
}

void DeviceConfigurationStatusGroupedPaging::MergeFrom(const DeviceConfigurationStatusGroupedPaging& from) {
  DeviceConfigurationStatusGroupedPaging* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  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 DeviceConfigurationStatusGroupedPaging::CopyFrom(const DeviceConfigurationStatusGroupedPaging& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.DeviceConfigurationStatusGroupedPaging)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeviceConfigurationStatusGroupedPaging::IsInitialized() const {
  return true;
}

void DeviceConfigurationStatusGroupedPaging::InternalSwap(DeviceConfigurationStatusGroupedPaging* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatusGroupedPaging, _impl_.offset_)
      + sizeof(DeviceConfigurationStatusGroupedPaging::_impl_.offset_)
      - PROTOBUF_FIELD_OFFSET(DeviceConfigurationStatusGroupedPaging, _impl_.order_by_type_)>(
          reinterpret_cast<char*>(&_impl_.order_by_type_),
          reinterpret_cast<char*>(&other->_impl_.order_by_type_));
}

std::string DeviceConfigurationStatusGroupedPaging::GetTypeName() const {
  return "keyapis.device.v1.DeviceConfigurationStatusGroupedPaging";
}

// ===================================================================

class ValidationError::_Internal {
 public:
};

ValidationError::ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.ValidationError)
}
ValidationError::ValidationError(const ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_path().empty()) {
    _this->_impl_.path_.Set(from._internal_path(), _this->GetArenaForAllocation());
  }
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_message().empty()) {
    _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.ValidationError)
}

inline void ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ValidationError::~ValidationError() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.ValidationError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.path_.Destroy();
  _impl_.message_.Destroy();
}

void ValidationError::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ValidationError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.path_.ClearToEmpty();
  _impl_.message_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* ValidationError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string path = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string message = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string path = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_path().empty()) {
    const std::string& _s = this->_internal_path();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.ValidationError.path");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    const std::string& _s = this->_internal_message();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.ValidationError.message");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.ValidationError)
  return target;
}

::size_t ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.ValidationError)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string path = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_path().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_path());
  }

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_message());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ValidationError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const ValidationError*>(
      &from));
}

void ValidationError::MergeFrom(const ValidationError& from) {
  ValidationError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.ValidationError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_path().empty()) {
    _this->_internal_set_path(from._internal_path());
  }
  if (!from._internal_message().empty()) {
    _this->_internal_set_message(from._internal_message());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void ValidationError::CopyFrom(const ValidationError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.ValidationError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ValidationError::IsInitialized() const {
  return true;
}

void ValidationError::InternalSwap(ValidationError* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.path_, lhs_arena,
                                       &other->_impl_.path_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, lhs_arena,
                                       &other->_impl_.message_, rhs_arena);
}

std::string ValidationError::GetTypeName() const {
  return "keyapis.device.v1.ValidationError";
}

// ===================================================================

class Preset_Sip::_Internal {
 public:
};

Preset_Sip::Preset_Sip(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.Sip)
}
Preset_Sip::Preset_Sip(const Preset_Sip& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Sip* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.reg_host_) {}

    , decltype(_impl_.proxy_host_) {}

    , decltype(_impl_.port_) {}

    , decltype(_impl_.reg_port_) {}

    , decltype(_impl_.proxy_port_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _impl_.reg_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.reg_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_reg_host().empty()) {
    _this->_impl_.reg_host_.Set(from._internal_reg_host(), _this->GetArenaForAllocation());
  }
  _impl_.proxy_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.proxy_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_proxy_host().empty()) {
    _this->_impl_.proxy_host_.Set(from._internal_proxy_host(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.port_, &from._impl_.port_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.proxy_port_) -
    reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.proxy_port_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.Sip)
}

inline void Preset_Sip::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.reg_host_) {}

    , decltype(_impl_.proxy_host_) {}

    , decltype(_impl_.port_) { 0 }

    , decltype(_impl_.reg_port_) { 0 }

    , decltype(_impl_.proxy_port_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.reg_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.reg_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.proxy_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.proxy_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_Sip::~Preset_Sip() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.Sip)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_Sip::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
  _impl_.reg_host_.Destroy();
  _impl_.proxy_host_.Destroy();
}

void Preset_Sip::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_Sip::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.Sip)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.host_.ClearToEmpty();
  _impl_.reg_host_.ClearToEmpty();
  _impl_.proxy_host_.ClearToEmpty();
  ::memset(&_impl_.port_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.proxy_port_) -
      reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.proxy_port_));
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Sip::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string reg_host = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_reg_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 reg_port = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.reg_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string proxy_host = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_proxy_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 proxy_port = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
          _impl_.proxy_port_ = ::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* Preset_Sip::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.Sip)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Sip.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_port(), target);
  }

  // string reg_host = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_reg_host().empty()) {
    const std::string& _s = this->_internal_reg_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Sip.reg_host");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // int32 reg_port = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_reg_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_reg_port(), target);
  }

  // string proxy_host = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_proxy_host().empty()) {
    const std::string& _s = this->_internal_proxy_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Sip.proxy_host");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  // int32 proxy_port = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_proxy_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        6, this->_internal_proxy_port(), 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.Preset.Sip)
  return target;
}

::size_t Preset_Sip::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.Sip)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

  // string reg_host = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_reg_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_reg_host());
  }

  // string proxy_host = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_proxy_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_proxy_host());
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_port());
  }

  // int32 reg_port = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_reg_port() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_reg_port());
  }

  // int32 proxy_port = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_proxy_port() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_proxy_port());
  }

  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 Preset_Sip::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Sip*>(
      &from));
}

void Preset_Sip::MergeFrom(const Preset_Sip& from) {
  Preset_Sip* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.Sip)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (!from._internal_reg_host().empty()) {
    _this->_internal_set_reg_host(from._internal_reg_host());
  }
  if (!from._internal_proxy_host().empty()) {
    _this->_internal_set_proxy_host(from._internal_proxy_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  if (from._internal_reg_port() != 0) {
    _this->_internal_set_reg_port(from._internal_reg_port());
  }
  if (from._internal_proxy_port() != 0) {
    _this->_internal_set_proxy_port(from._internal_proxy_port());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_Sip::CopyFrom(const Preset_Sip& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.Sip)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_Sip::IsInitialized() const {
  return true;
}

void Preset_Sip::InternalSwap(Preset_Sip* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.reg_host_, lhs_arena,
                                       &other->_impl_.reg_host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.proxy_host_, lhs_arena,
                                       &other->_impl_.proxy_host_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset_Sip, _impl_.proxy_port_)
      + sizeof(Preset_Sip::_impl_.proxy_port_)
      - PROTOBUF_FIELD_OFFSET(Preset_Sip, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string Preset_Sip::GetTypeName() const {
  return "keyapis.device.v1.Preset.Sip";
}

// ===================================================================

class Preset_Ntp::_Internal {
 public:
};

Preset_Ntp::Preset_Ntp(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.Ntp)
}
Preset_Ntp::Preset_Ntp(const Preset_Ntp& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Ntp* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _this->_impl_.port_ = from._impl_.port_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.Ntp)
}

inline void Preset_Ntp::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_Ntp::~Preset_Ntp() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.Ntp)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_Ntp::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
}

void Preset_Ntp::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_Ntp::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.Ntp)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.host_.ClearToEmpty();
  _impl_.port_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Ntp::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::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* Preset_Ntp::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.Ntp)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Ntp.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_port(), 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.Preset.Ntp)
  return target;
}

::size_t Preset_Ntp::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.Ntp)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_port());
  }

  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 Preset_Ntp::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Ntp*>(
      &from));
}

void Preset_Ntp::MergeFrom(const Preset_Ntp& from) {
  Preset_Ntp* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.Ntp)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_Ntp::CopyFrom(const Preset_Ntp& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.Ntp)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_Ntp::IsInitialized() const {
  return true;
}

void Preset_Ntp::InternalSwap(Preset_Ntp* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);

  swap(_impl_.port_, other->_impl_.port_);
}

std::string Preset_Ntp::GetTypeName() const {
  return "keyapis.device.v1.Preset.Ntp";
}

// ===================================================================

class Preset_Syslog::_Internal {
 public:
};

Preset_Syslog::Preset_Syslog(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.Syslog)
}
Preset_Syslog::Preset_Syslog(const Preset_Syslog& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Syslog* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) {}

    , decltype(_impl_.protocol_type_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.port_, &from._impl_.port_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.protocol_type_) -
    reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.protocol_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.Syslog)
}

inline void Preset_Syslog::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) { 0 }

    , decltype(_impl_.protocol_type_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_Syslog::~Preset_Syslog() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.Syslog)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_Syslog::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
}

void Preset_Syslog::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_Syslog::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.Syslog)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.host_.ClearToEmpty();
  ::memset(&_impl_.port_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.protocol_type_) -
      reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.protocol_type_));
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Syslog::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_protocol_type(static_cast<::keyapis::device::v1::Preset_Syslog_ProtocolType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Preset_Syslog::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.Syslog)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Syslog.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_port(), target);
  }

  // .keyapis.device.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_protocol_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_protocol_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.Preset.Syslog)
  return target;
}

::size_t Preset_Syslog::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.Syslog)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_port());
  }

  // .keyapis.device.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_protocol_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_protocol_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 Preset_Syslog::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Syslog*>(
      &from));
}

void Preset_Syslog::MergeFrom(const Preset_Syslog& from) {
  Preset_Syslog* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.Syslog)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  if (from._internal_protocol_type() != 0) {
    _this->_internal_set_protocol_type(from._internal_protocol_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_Syslog::CopyFrom(const Preset_Syslog& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.Syslog)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_Syslog::IsInitialized() const {
  return true;
}

void Preset_Syslog::InternalSwap(Preset_Syslog* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset_Syslog, _impl_.protocol_type_)
      + sizeof(Preset_Syslog::_impl_.protocol_type_)
      - PROTOBUF_FIELD_OFFSET(Preset_Syslog, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string Preset_Syslog::GetTypeName() const {
  return "keyapis.device.v1.Preset.Syslog";
}

// ===================================================================

class Preset_Room::_Internal {
 public:
};

Preset_Room::Preset_Room(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.Room)
}
Preset_Room::Preset_Room(const Preset_Room& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Room* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.phone_) {}

    , decltype(_impl_.num_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.phone_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.phone_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_phone().empty()) {
    _this->_impl_.phone_.Set(from._internal_phone(), _this->GetArenaForAllocation());
  }
  _this->_impl_.num_ = from._impl_.num_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.Room)
}

inline void Preset_Room::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.phone_) {}

    , decltype(_impl_.num_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.phone_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.phone_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_Room::~Preset_Room() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.Room)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_Room::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.phone_.Destroy();
}

void Preset_Room::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_Room::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.Room)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.phone_.ClearToEmpty();
  _impl_.num_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Room::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string phone = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_phone();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 num = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.num_ = ::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* Preset_Room::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.Room)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string phone = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_phone().empty()) {
    const std::string& _s = this->_internal_phone();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Room.phone");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 num = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_num() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_num(), 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.Preset.Room)
  return target;
}

::size_t Preset_Room::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.Room)
  ::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 phone = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_phone().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_phone());
  }

  // int32 num = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_num() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_num());
  }

  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 Preset_Room::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Room*>(
      &from));
}

void Preset_Room::MergeFrom(const Preset_Room& from) {
  Preset_Room* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.Room)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_phone().empty()) {
    _this->_internal_set_phone(from._internal_phone());
  }
  if (from._internal_num() != 0) {
    _this->_internal_set_num(from._internal_num());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_Room::CopyFrom(const Preset_Room& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.Room)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_Room::IsInitialized() const {
  return true;
}

void Preset_Room::InternalSwap(Preset_Room* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.phone_, lhs_arena,
                                       &other->_impl_.phone_, rhs_arena);

  swap(_impl_.num_, other->_impl_.num_);
}

std::string Preset_Room::GetTypeName() const {
  return "keyapis.device.v1.Preset.Room";
}

// ===================================================================

class Preset_VideoConfig_RtspUser::_Internal {
 public:
};

Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.VideoConfig.RtspUser)
}
Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(const Preset_VideoConfig_RtspUser& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_VideoConfig_RtspUser* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.username_) {}

    , decltype(_impl_.password_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.username_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.username_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_username().empty()) {
    _this->_impl_.username_.Set(from._internal_username(), _this->GetArenaForAllocation());
  }
  _impl_.password_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.password_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_password().empty()) {
    _this->_impl_.password_.Set(from._internal_password(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.VideoConfig.RtspUser)
}

inline void Preset_VideoConfig_RtspUser::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.username_) {}

    , decltype(_impl_.password_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.username_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.username_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.password_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.password_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_VideoConfig_RtspUser::~Preset_VideoConfig_RtspUser() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_VideoConfig_RtspUser::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.username_.Destroy();
  _impl_.password_.Destroy();
}

void Preset_VideoConfig_RtspUser::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_VideoConfig_RtspUser::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.username_.ClearToEmpty();
  _impl_.password_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_VideoConfig_RtspUser::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string username = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_username();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string password = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_password();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Preset_VideoConfig_RtspUser::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string username = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_username().empty()) {
    const std::string& _s = this->_internal_username();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.VideoConfig.RtspUser.username");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string password = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_password().empty()) {
    const std::string& _s = this->_internal_password();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.VideoConfig.RtspUser.password");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  return target;
}

::size_t Preset_VideoConfig_RtspUser::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  ::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 username = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_username().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_username());
  }

  // string password = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_password().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_password());
  }

  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 Preset_VideoConfig_RtspUser::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_VideoConfig_RtspUser*>(
      &from));
}

void Preset_VideoConfig_RtspUser::MergeFrom(const Preset_VideoConfig_RtspUser& from) {
  Preset_VideoConfig_RtspUser* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_username().empty()) {
    _this->_internal_set_username(from._internal_username());
  }
  if (!from._internal_password().empty()) {
    _this->_internal_set_password(from._internal_password());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_VideoConfig_RtspUser::CopyFrom(const Preset_VideoConfig_RtspUser& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.VideoConfig.RtspUser)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_VideoConfig_RtspUser::IsInitialized() const {
  return true;
}

void Preset_VideoConfig_RtspUser::InternalSwap(Preset_VideoConfig_RtspUser* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.username_, lhs_arena,
                                       &other->_impl_.username_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.password_, lhs_arena,
                                       &other->_impl_.password_, rhs_arena);
}

std::string Preset_VideoConfig_RtspUser::GetTypeName() const {
  return "keyapis.device.v1.Preset.VideoConfig.RtspUser";
}

// ===================================================================

class Preset_VideoConfig::_Internal {
 public:
  using HasBits = decltype(std::declval<Preset_VideoConfig>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Preset_VideoConfig, _impl_._has_bits_);
  static const ::keyapis::device::v1::Preset_VideoConfig_RtspUser& rtsp_user(const Preset_VideoConfig* msg);
  static void set_has_rtsp_user(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::device::v1::Preset_VideoConfig_RtspUser&
Preset_VideoConfig::_Internal::rtsp_user(const Preset_VideoConfig* msg) {
  return *msg->_impl_.rtsp_user_;
}
Preset_VideoConfig::Preset_VideoConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.VideoConfig)
}
Preset_VideoConfig::Preset_VideoConfig(const Preset_VideoConfig& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_VideoConfig* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rtsp_user_){nullptr}
    , decltype(_impl_.quality_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.rtsp_user_ = new ::keyapis::device::v1::Preset_VideoConfig_RtspUser(*from._impl_.rtsp_user_);
  }
  _this->_impl_.quality_type_ = from._impl_.quality_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.VideoConfig)
}

inline void Preset_VideoConfig::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rtsp_user_){nullptr}
    , decltype(_impl_.quality_type_) { 0 }

  };
}

Preset_VideoConfig::~Preset_VideoConfig() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.VideoConfig)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_VideoConfig::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.rtsp_user_;
}

void Preset_VideoConfig::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_VideoConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.VideoConfig)
  ::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_.rtsp_user_ != nullptr);
    _impl_.rtsp_user_->Clear();
  }
  _impl_.quality_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_VideoConfig::_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.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
      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_quality_type(static_cast<::keyapis::device::v1::Preset_VideoConfig_QualityType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_rtsp_user(), 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* Preset_VideoConfig::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.VideoConfig)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.device.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_quality_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_quality_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.device.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::rtsp_user(this),
        _Internal::rtsp_user(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.Preset.VideoConfig)
  return target;
}

::size_t Preset_VideoConfig::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.VideoConfig)
  ::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.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.rtsp_user_);
  }

  // .keyapis.device.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_quality_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_quality_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 Preset_VideoConfig::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_VideoConfig*>(
      &from));
}

void Preset_VideoConfig::MergeFrom(const Preset_VideoConfig& from) {
  Preset_VideoConfig* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.VideoConfig)
  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_rtsp_user()->::keyapis::device::v1::Preset_VideoConfig_RtspUser::MergeFrom(
        from._internal_rtsp_user());
  }
  if (from._internal_quality_type() != 0) {
    _this->_internal_set_quality_type(from._internal_quality_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_VideoConfig::CopyFrom(const Preset_VideoConfig& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.VideoConfig)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_VideoConfig::IsInitialized() const {
  return true;
}

void Preset_VideoConfig::InternalSwap(Preset_VideoConfig* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset_VideoConfig, _impl_.quality_type_)
      + sizeof(Preset_VideoConfig::_impl_.quality_type_)
      - PROTOBUF_FIELD_OFFSET(Preset_VideoConfig, _impl_.rtsp_user_)>(
          reinterpret_cast<char*>(&_impl_.rtsp_user_),
          reinterpret_cast<char*>(&other->_impl_.rtsp_user_));
}

std::string Preset_VideoConfig::GetTypeName() const {
  return "keyapis.device.v1.Preset.VideoConfig";
}

// ===================================================================

class Preset_Dtmf::_Internal {
 public:
};

Preset_Dtmf::Preset_Dtmf(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.Dtmf)
}
Preset_Dtmf::Preset_Dtmf(const Preset_Dtmf& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Dtmf* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.code_) {}

    , decltype(_impl_.relay_index_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_code().empty()) {
    _this->_impl_.code_.Set(from._internal_code(), _this->GetArenaForAllocation());
  }
  _this->_impl_.relay_index_ = from._impl_.relay_index_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.Dtmf)
}

inline void Preset_Dtmf::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.code_) {}

    , decltype(_impl_.relay_index_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_Dtmf::~Preset_Dtmf() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.Dtmf)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_Dtmf::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.code_.Destroy();
}

void Preset_Dtmf::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_Dtmf::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.Dtmf)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.code_.ClearToEmpty();
  _impl_.relay_index_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Dtmf::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string code = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 relay_index = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.relay_index_ = ::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* Preset_Dtmf::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.Dtmf)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string code = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.Dtmf.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 relay_index = 2;
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_relay_index(), 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.Preset.Dtmf)
  return target;
}

::size_t Preset_Dtmf::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.Dtmf)
  ::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 code = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

  // int32 relay_index = 2;
  if (this->_internal_relay_index() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_relay_index());
  }

  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 Preset_Dtmf::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Dtmf*>(
      &from));
}

void Preset_Dtmf::MergeFrom(const Preset_Dtmf& from) {
  Preset_Dtmf* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.Dtmf)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  if (from._internal_relay_index() != 0) {
    _this->_internal_set_relay_index(from._internal_relay_index());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_Dtmf::CopyFrom(const Preset_Dtmf& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.Dtmf)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_Dtmf::IsInitialized() const {
  return true;
}

void Preset_Dtmf::InternalSwap(Preset_Dtmf* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.code_, lhs_arena,
                                       &other->_impl_.code_, rhs_arena);

  swap(_impl_.relay_index_, other->_impl_.relay_index_);
}

std::string Preset_Dtmf::GetTypeName() const {
  return "keyapis.device.v1.Preset.Dtmf";
}

// ===================================================================

class Preset_FaceRecognition::_Internal {
 public:
};

Preset_FaceRecognition::Preset_FaceRecognition(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.FaceRecognition)
}
Preset_FaceRecognition::Preset_FaceRecognition(const Preset_FaceRecognition& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_FaceRecognition* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.group_ids_) { from._impl_.group_ids_ }
    ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.host_) {}

    , decltype(_impl_.alt_host_) {}

    , decltype(_impl_.endpoint_) {}

    , decltype(_impl_.auth_token_) {}

    , decltype(_impl_.origin_id_) {}

    , decltype(_impl_.configuration_type_) {}

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _impl_.alt_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.alt_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_alt_host().empty()) {
    _this->_impl_.alt_host_.Set(from._internal_alt_host(), _this->GetArenaForAllocation());
  }
  _impl_.endpoint_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.endpoint_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_endpoint().empty()) {
    _this->_impl_.endpoint_.Set(from._internal_endpoint(), _this->GetArenaForAllocation());
  }
  _impl_.auth_token_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.auth_token_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_auth_token().empty()) {
    _this->_impl_.auth_token_.Set(from._internal_auth_token(), _this->GetArenaForAllocation());
  }
  _impl_.origin_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.origin_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_origin_id().empty()) {
    _this->_impl_.origin_id_.Set(from._internal_origin_id(), _this->GetArenaForAllocation());
  }
  _this->_impl_.configuration_type_ = from._impl_.configuration_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.FaceRecognition)
}

inline void Preset_FaceRecognition::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.group_ids_) { arena }
    ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.host_) {}

    , decltype(_impl_.alt_host_) {}

    , decltype(_impl_.endpoint_) {}

    , decltype(_impl_.auth_token_) {}

    , decltype(_impl_.origin_id_) {}

    , decltype(_impl_.configuration_type_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.alt_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.alt_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.endpoint_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.endpoint_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.auth_token_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.auth_token_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.origin_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.origin_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset_FaceRecognition::~Preset_FaceRecognition() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.FaceRecognition)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_FaceRecognition::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.group_ids_.~RepeatedField();
  _impl_.host_.Destroy();
  _impl_.alt_host_.Destroy();
  _impl_.endpoint_.Destroy();
  _impl_.auth_token_.Destroy();
  _impl_.origin_id_.Destroy();
}

void Preset_FaceRecognition::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_FaceRecognition::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.FaceRecognition)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_group_ids()->Clear();
  _impl_.host_.ClearToEmpty();
  _impl_.alt_host_.ClearToEmpty();
  _impl_.endpoint_.ClearToEmpty();
  _impl_.auth_token_.ClearToEmpty();
  _impl_.origin_id_.ClearToEmpty();
  _impl_.configuration_type_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_FaceRecognition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string alt_host = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_alt_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_endpoint();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string auth_token = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_auth_token();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_configuration_type(static_cast<::keyapis::device::v1::Preset_FaceRecognition_ConfigurationType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string origin_id = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_origin_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 group_ids = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_group_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 56) {
          _internal_add_group_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* Preset_FaceRecognition::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.FaceRecognition)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.FaceRecognition.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string alt_host = 2;
  if (!this->_internal_alt_host().empty()) {
    const std::string& _s = this->_internal_alt_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.FaceRecognition.alt_host");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // string endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_endpoint().empty()) {
    const std::string& _s = this->_internal_endpoint();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.FaceRecognition.endpoint");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // string auth_token = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_auth_token().empty()) {
    const std::string& _s = this->_internal_auth_token();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.FaceRecognition.auth_token");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // .keyapis.device.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this->_internal_configuration_type(), target);
  }

  // string origin_id = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_origin_id().empty()) {
    const std::string& _s = this->_internal_origin_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.FaceRecognition.origin_id");
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // repeated int32 group_ids = 7;
  {
    int byte_size = _impl_._group_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(7, _internal_group_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.Preset.FaceRecognition)
  return target;
}

::size_t Preset_FaceRecognition::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.FaceRecognition)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 group_ids = 7;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_group_ids())
    ;
    _impl_._group_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;
  }

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

  // string alt_host = 2;
  if (!this->_internal_alt_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_alt_host());
  }

  // string endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_endpoint().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_endpoint());
  }

  // string auth_token = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_auth_token().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_auth_token());
  }

  // string origin_id = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_origin_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_origin_id());
  }

  // .keyapis.device.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_configuration_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 Preset_FaceRecognition::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_FaceRecognition*>(
      &from));
}

void Preset_FaceRecognition::MergeFrom(const Preset_FaceRecognition& from) {
  Preset_FaceRecognition* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.FaceRecognition)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.group_ids_.MergeFrom(from._impl_.group_ids_);
  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (!from._internal_alt_host().empty()) {
    _this->_internal_set_alt_host(from._internal_alt_host());
  }
  if (!from._internal_endpoint().empty()) {
    _this->_internal_set_endpoint(from._internal_endpoint());
  }
  if (!from._internal_auth_token().empty()) {
    _this->_internal_set_auth_token(from._internal_auth_token());
  }
  if (!from._internal_origin_id().empty()) {
    _this->_internal_set_origin_id(from._internal_origin_id());
  }
  if (from._internal_configuration_type() != 0) {
    _this->_internal_set_configuration_type(from._internal_configuration_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_FaceRecognition::CopyFrom(const Preset_FaceRecognition& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.FaceRecognition)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_FaceRecognition::IsInitialized() const {
  return true;
}

void Preset_FaceRecognition::InternalSwap(Preset_FaceRecognition* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.group_ids_.InternalSwap(&other->_impl_.group_ids_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.alt_host_, lhs_arena,
                                       &other->_impl_.alt_host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.endpoint_, lhs_arena,
                                       &other->_impl_.endpoint_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.auth_token_, lhs_arena,
                                       &other->_impl_.auth_token_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.origin_id_, lhs_arena,
                                       &other->_impl_.origin_id_, rhs_arena);
  swap(_impl_.configuration_type_, other->_impl_.configuration_type_);
}

std::string Preset_FaceRecognition::GetTypeName() const {
  return "keyapis.device.v1.Preset.FaceRecognition";
}

// ===================================================================

class Preset_SavingError_Conflict::_Internal {
 public:
};

Preset_SavingError_Conflict::Preset_SavingError_Conflict(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.SavingError.Conflict)
}
Preset_SavingError_Conflict::Preset_SavingError_Conflict(const Preset_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.Preset.SavingError.Conflict)
}

inline void Preset_SavingError_Conflict::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Preset_SavingError_Conflict::~Preset_SavingError_Conflict() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.SavingError.Conflict)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_SavingError_Conflict::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void Preset_SavingError_Conflict::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_SavingError_Conflict::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.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* Preset_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* Preset_SavingError_Conflict::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.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.Preset.SavingError.Conflict)
  return target;
}

::size_t Preset_SavingError_Conflict::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.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 Preset_SavingError_Conflict::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_SavingError_Conflict*>(
      &from));
}

void Preset_SavingError_Conflict::MergeFrom(const Preset_SavingError_Conflict& from) {
  Preset_SavingError_Conflict* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.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 Preset_SavingError_Conflict::CopyFrom(const Preset_SavingError_Conflict& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.SavingError.Conflict)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_SavingError_Conflict::IsInitialized() const {
  return true;
}

void Preset_SavingError_Conflict::InternalSwap(Preset_SavingError_Conflict* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Preset_SavingError_Conflict::GetTypeName() const {
  return "keyapis.device.v1.Preset.SavingError.Conflict";
}

// ===================================================================

class Preset_SavingError_NotAllowedForDefault::_Internal {
 public:
};

Preset_SavingError_NotAllowedForDefault::Preset_SavingError_NotAllowedForDefault(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
}
Preset_SavingError_NotAllowedForDefault::Preset_SavingError_NotAllowedForDefault(const Preset_SavingError_NotAllowedForDefault& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
}

inline void Preset_SavingError_NotAllowedForDefault::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

Preset_SavingError_NotAllowedForDefault::~Preset_SavingError_NotAllowedForDefault() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_SavingError_NotAllowedForDefault::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void Preset_SavingError_NotAllowedForDefault::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_SavingError_NotAllowedForDefault::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  ::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* Preset_SavingError_NotAllowedForDefault::_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* Preset_SavingError_NotAllowedForDefault::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  ::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.Preset.SavingError.NotAllowedForDefault)
  return target;
}

::size_t Preset_SavingError_NotAllowedForDefault::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  ::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 Preset_SavingError_NotAllowedForDefault::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_SavingError_NotAllowedForDefault*>(
      &from));
}

void Preset_SavingError_NotAllowedForDefault::MergeFrom(const Preset_SavingError_NotAllowedForDefault& from) {
  Preset_SavingError_NotAllowedForDefault* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  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 Preset_SavingError_NotAllowedForDefault::CopyFrom(const Preset_SavingError_NotAllowedForDefault& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.SavingError.NotAllowedForDefault)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_SavingError_NotAllowedForDefault::IsInitialized() const {
  return true;
}

void Preset_SavingError_NotAllowedForDefault::InternalSwap(Preset_SavingError_NotAllowedForDefault* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Preset_SavingError_NotAllowedForDefault::GetTypeName() const {
  return "keyapis.device.v1.Preset.SavingError.NotAllowedForDefault";
}

// ===================================================================

class Preset_SavingError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::device::v1::Preset_SavingError, _impl_._oneof_case_);
  static const ::keyapis::device::v1::Preset_SavingError_Conflict& conflict(const Preset_SavingError* msg);
  static const ::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault& not_allowed_for_default(const Preset_SavingError* msg);
};

const ::keyapis::device::v1::Preset_SavingError_Conflict&
Preset_SavingError::_Internal::conflict(const Preset_SavingError* msg) {
  return *msg->_impl_.reason_.conflict_;
}
const ::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault&
Preset_SavingError::_Internal::not_allowed_for_default(const Preset_SavingError* msg) {
  return *msg->_impl_.reason_.not_allowed_for_default_;
}
void Preset_SavingError::set_allocated_conflict(::keyapis::device::v1::Preset_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.Preset.SavingError.conflict)
}
void Preset_SavingError::set_allocated_not_allowed_for_default(::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault* not_allowed_for_default) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (not_allowed_for_default) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_allowed_for_default);
    if (message_arena != submessage_arena) {
      not_allowed_for_default = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, not_allowed_for_default, submessage_arena);
    }
    set_has_not_allowed_for_default();
    _impl_.reason_.not_allowed_for_default_ = not_allowed_for_default;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.device.v1.Preset.SavingError.not_allowed_for_default)
}
Preset_SavingError::Preset_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset.SavingError)
}
Preset_SavingError::Preset_SavingError(const Preset_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_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::Preset_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.Preset.SavingError)
}

inline void Preset_SavingError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

Preset_SavingError::~Preset_SavingError() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset.SavingError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset_SavingError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void Preset_SavingError::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.device.v1.Preset.SavingError)
  switch (reason_case()) {
    case kConflict: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.conflict_;
      }
      break;
    }
    case kNotAllowedForDefault: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.not_allowed_for_default_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void Preset_SavingError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset.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* Preset_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.Preset.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;
      // .keyapis.device.v1.Preset.SavingError.NotAllowedForDefault not_allowed_for_default = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_not_allowed_for_default(), 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* Preset_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kConflict: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::conflict(this),
          _Internal::conflict(this).GetCachedSize(), target, stream);
      break;
    }
    case kNotAllowedForDefault: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::not_allowed_for_default(this),
          _Internal::not_allowed_for_default(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.Preset.SavingError)
  return target;
}

::size_t Preset_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset.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.Preset.SavingError.Conflict conflict = 1;
    case kConflict: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.conflict_);
      break;
    }
    // .keyapis.device.v1.Preset.SavingError.NotAllowedForDefault not_allowed_for_default = 2;
    case kNotAllowedForDefault: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.not_allowed_for_default_);
      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 Preset_SavingError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_SavingError*>(
      &from));
}

void Preset_SavingError::MergeFrom(const Preset_SavingError& from) {
  Preset_SavingError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset.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::Preset_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_SavingError::CopyFrom(const Preset_SavingError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset.SavingError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset_SavingError::IsInitialized() const {
  return true;
}

void Preset_SavingError::InternalSwap(Preset_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 Preset_SavingError::GetTypeName() const {
  return "keyapis.device.v1.Preset.SavingError";
}

// ===================================================================

class Preset::_Internal {
 public:
  using HasBits = decltype(std::declval<Preset>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Preset, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& description(const Preset* msg);
  static void set_has_description(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const Preset* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const Preset* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::keyapis::device::v1::Preset_Sip& sip(const Preset* msg);
  static void set_has_sip(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::keyapis::device::v1::Preset_Ntp& ntp(const Preset* msg);
  static void set_has_ntp(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::keyapis::device::v1::Preset_Syslog& syslog(const Preset* msg);
  static void set_has_syslog(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::keyapis::device::v1::Preset_VideoConfig& video_config(const Preset* msg);
  static void set_has_video_config(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::keyapis::device::v1::Preset_FaceRecognition& face_recognition(const Preset* msg);
  static void set_has_face_recognition(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Preset::_Internal::description(const Preset* msg) {
  return *msg->_impl_.description_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Preset::_Internal::created_at(const Preset* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Preset::_Internal::changed_at(const Preset* msg) {
  return *msg->_impl_.changed_at_;
}
const ::keyapis::device::v1::Preset_Sip&
Preset::_Internal::sip(const Preset* msg) {
  return *msg->_impl_.sip_;
}
const ::keyapis::device::v1::Preset_Ntp&
Preset::_Internal::ntp(const Preset* msg) {
  return *msg->_impl_.ntp_;
}
const ::keyapis::device::v1::Preset_Syslog&
Preset::_Internal::syslog(const Preset* msg) {
  return *msg->_impl_.syslog_;
}
const ::keyapis::device::v1::Preset_VideoConfig&
Preset::_Internal::video_config(const Preset* msg) {
  return *msg->_impl_.video_config_;
}
const ::keyapis::device::v1::Preset_FaceRecognition&
Preset::_Internal::face_recognition(const Preset* msg) {
  return *msg->_impl_.face_recognition_;
}
void Preset::clear_description() {
  if (_impl_.description_ != nullptr) _impl_.description_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Preset::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Preset::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
Preset::Preset(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.Preset)
}
Preset::Preset(const Preset& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.mrf_ids_) { from._impl_.mrf_ids_ }
    ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { from._impl_.rf_ids_ }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rooms_){from._impl_.rooms_}
    , decltype(_impl_.dtmf_){from._impl_.dtmf_}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.sip_){nullptr}
    , decltype(_impl_.ntp_){nullptr}
    , decltype(_impl_.syslog_){nullptr}
    , decltype(_impl_.video_config_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.description_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.description_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.sip_ = new ::keyapis::device::v1::Preset_Sip(*from._impl_.sip_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.ntp_ = new ::keyapis::device::v1::Preset_Ntp(*from._impl_.ntp_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.syslog_ = new ::keyapis::device::v1::Preset_Syslog(*from._impl_.syslog_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.video_config_ = new ::keyapis::device::v1::Preset_VideoConfig(*from._impl_.video_config_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.face_recognition_ = new ::keyapis::device::v1::Preset_FaceRecognition(*from._impl_.face_recognition_);
  }
  ::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.Preset)
}

inline void Preset::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.mrf_ids_) { arena }
    ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { arena }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rooms_){arena}
    , decltype(_impl_.dtmf_){arena}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.sip_){nullptr}
    , decltype(_impl_.ntp_){nullptr}
    , decltype(_impl_.syslog_){nullptr}
    , decltype(_impl_.video_config_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Preset::~Preset() {
  // @@protoc_insertion_point(destructor:keyapis.device.v1.Preset)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Preset::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.mrf_ids_.~RepeatedField();
  _impl_.rf_ids_.~RepeatedField();
  _internal_mutable_rooms()->~RepeatedPtrField();
  _internal_mutable_dtmf()->~RepeatedPtrField();
  _impl_.title_.Destroy();
  if (this != internal_default_instance()) delete _impl_.description_;
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
  if (this != internal_default_instance()) delete _impl_.sip_;
  if (this != internal_default_instance()) delete _impl_.ntp_;
  if (this != internal_default_instance()) delete _impl_.syslog_;
  if (this != internal_default_instance()) delete _impl_.video_config_;
  if (this != internal_default_instance()) delete _impl_.face_recognition_;
}

void Preset::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Preset::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.device.v1.Preset)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_mrf_ids()->Clear();
  _internal_mutable_rf_ids()->Clear();
  _internal_mutable_rooms()->Clear();
  _internal_mutable_dtmf()->Clear();
  _impl_.title_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.description_ != nullptr);
      _impl_.description_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.sip_ != nullptr);
      _impl_.sip_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.ntp_ != nullptr);
      _impl_.ntp_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.syslog_ != nullptr);
      _impl_.syslog_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.video_config_ != nullptr);
      _impl_.video_config_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.face_recognition_ != nullptr);
      _impl_.face_recognition_->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* Preset::_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;
      // string title = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_mrf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          _internal_add_mrf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_rf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 32) {
          _internal_add_rf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_description(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_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_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::device::v1::Preset_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_sip(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_ntp(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_syslog(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_rooms(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_video_config(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_dtmf(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_face_recognition(), 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* Preset::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.Preset)
  ::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);
  }

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    const std::string& _s = this->_internal_title();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.Preset.title");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];
  {
    int byte_size = _impl_._mrf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(3, _internal_mrf_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];
  {
    int byte_size = _impl_._rf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(4, _internal_rf_ids(),
                                                 byte_size, target);
    }
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::description(this),
        _Internal::description(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::created_at(this),
        _Internal::created_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::changed_at(this),
        _Internal::changed_at(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        8, this->_internal_status_type(), target);
  }

  // .keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::sip(this),
        _Internal::sip(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::ntp(this),
        _Internal::ntp(this).GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::syslog(this),
        _Internal::syslog(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_rooms_size()); i < n; i++) {
    const auto& repfield = this->_internal_rooms(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, _Internal::video_config(this),
        _Internal::video_config(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_dtmf_size()); i < n; i++) {
    const auto& repfield = this->_internal_dtmf(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
  }

  // .keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::face_recognition(this),
        _Internal::face_recognition(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.Preset)
  return target;
}

::size_t Preset::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.Preset)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_mrf_ids())
    ;
    _impl_._mrf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_rf_ids())
    ;
    _impl_._rf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
  total_size += 1UL * this->_internal_rooms_size();
  for (const auto& msg : this->_internal_rooms()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
  total_size += 1UL * this->_internal_dtmf_size();
  for (const auto& msg : this->_internal_dtmf()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_title());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.description_);
    }

    // .google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.created_at_);
    }

    // .google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.changed_at_);
    }

    // .keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sip_);
    }

    // .keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.ntp_);
    }

    // .keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.syslog_);
    }

    // .keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.video_config_);
    }

    // .keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.face_recognition_);
    }

  }
  // int32 id = 1;
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  // .keyapis.device.v1.Preset.StatusType status_type = 8 [(.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 Preset::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset*>(
      &from));
}

void Preset::MergeFrom(const Preset& from) {
  Preset* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.device.v1.Preset)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.mrf_ids_.MergeFrom(from._impl_.mrf_ids_);
  _this->_impl_.rf_ids_.MergeFrom(from._impl_.rf_ids_);
  _this->_internal_mutable_rooms()->MergeFrom(from._internal_rooms());
  _this->_internal_mutable_dtmf()->MergeFrom(from._internal_dtmf());
  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_description()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_description());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_sip()->::keyapis::device::v1::Preset_Sip::MergeFrom(
          from._internal_sip());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_ntp()->::keyapis::device::v1::Preset_Ntp::MergeFrom(
          from._internal_ntp());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_syslog()->::keyapis::device::v1::Preset_Syslog::MergeFrom(
          from._internal_syslog());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_video_config()->::keyapis::device::v1::Preset_VideoConfig::MergeFrom(
          from._internal_video_config());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_face_recognition()->::keyapis::device::v1::Preset_FaceRecognition::MergeFrom(
          from._internal_face_recognition());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_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 Preset::CopyFrom(const Preset& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.device.v1.Preset)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Preset::IsInitialized() const {
  return true;
}

void Preset::InternalSwap(Preset* 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]);
  _impl_.mrf_ids_.InternalSwap(&other->_impl_.mrf_ids_);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  _internal_mutable_rooms()->InternalSwap(other->_internal_mutable_rooms());
  _internal_mutable_dtmf()->InternalSwap(other->_internal_mutable_dtmf());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset, _impl_.status_type_)
      + sizeof(Preset::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(Preset, _impl_.description_)>(
          reinterpret_cast<char*>(&_impl_.description_),
          reinterpret_cast<char*>(&other->_impl_.description_));
}

std::string Preset::GetTypeName() const {
  return "keyapis.device.v1.Preset";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SputnikCredentials*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SputnikCredentials >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SputnikCredentials >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Location*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Location >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Location >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_CoordinateMatrixSwitch >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_ConciergeCall*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_ConciergeCall >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_ConciergeCall >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_Autocollect*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_Autocollect >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_Autocollect >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_FaceRecognition*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_FaceRecognition >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_FaceRecognition >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_Sl3Mode*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_Sl3Mode >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_Sl3Mode >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings_EmergencyCall*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings_EmergencyCall >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings_EmergencyCall >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Settings*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Settings >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Settings >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Dispatching*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Dispatching >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Dispatching >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SipTrunk*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SipTrunk >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SipTrunk >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Redirect*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Redirect >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Redirect >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_AutochangePasswordSettings*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_AutochangePasswordSettings >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_AutochangePasswordSettings >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_Credentials*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_Credentials >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_Credentials >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_MacAddressInvalid*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_MacAddressInvalid >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_MacAddressInvalid >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_SerialNumberInvalid*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_SerialNumberInvalid >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_SerialNumberInvalid >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_NotAllowedForType*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_NotAllowedForType >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_NotAllowedForType >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_NotAllowedForModel*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_NotAllowedForModel >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_NotAllowedForModel >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_SerialNumberForModelIsExist >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_MacAddressIsExist*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_MacAddressIsExist >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_MacAddressIsExist >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_CapabilityIsNotSupported >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_AbcNumberIsExistOnAnotherDevice >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_PublicIdentityIsExist >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_ConciergeRoomNotFound >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_LoginIsExist*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_LoginIsExist >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_LoginIsExist >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_CredentialsAreRequired*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_CredentialsAreRequired >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_CredentialsAreRequired >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError_FieldIsNotSupported*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError_FieldIsNotSupported >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError_FieldIsNotSupported >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device_SavingError*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Device*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Device >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Device >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceLite*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceLite >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceLite >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatus_Payload_Autocollect >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatus_Payload*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatus_Payload >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatus_Payload >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatus*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatus >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatus >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatusGrouped*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatusGrouped >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatusGrouped >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::CameraStatus*
Arena::CreateMaybeMessage< ::keyapis::device::v1::CameraStatus >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::CameraStatus >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::SyncStatus*
Arena::CreateMaybeMessage< ::keyapis::device::v1::SyncStatus >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::SyncStatus >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceLiteRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceLiteRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceLiteRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceLiteResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceLiteResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceLiteResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceListRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceListResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceCountRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceCountResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PutDeviceRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PutDeviceRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PutDeviceRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PutDeviceResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PutDeviceResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PutDeviceResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceInstallPresetRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceInstallPresetRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceInstallPresetRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error_PresetStatusIsProcessing >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceInstallPresetResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceInstallPresetResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceInstallPresetResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceInstallPresetResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_HostExists >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_MacAddressExists >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_SerialNumberExists >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginExists >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error_LoginIsRequired >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReplaceResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReplaceResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReplaceResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReconfigureRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReconfigureRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReconfigureRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReconfigureResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReconfigureResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReconfigureResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceReconfigureResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceReconfigureResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceReconfigureResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusesRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusesRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusesRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Statuses >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusesResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceConfigurationStatusRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceConfigurationStatusRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceConfigurationStatusRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceConfigurationStatusResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PostDeviceConfigurationStatusResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PostDeviceConfigurationStatusResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PostDeviceConfigurationStatusResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::GetDeviceConfigurationStatusGroupedCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeleteDeviceRequest*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeleteDeviceRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeleteDeviceRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeleteDeviceResponse*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeleteDeviceResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeleteDeviceResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::ReinstallError_SipLoginIsMissing*
Arena::CreateMaybeMessage< ::keyapis::device::v1::ReinstallError_SipLoginIsMissing >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::ReinstallError_SipLoginIsMissing >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::ReinstallError*
Arena::CreateMaybeMessage< ::keyapis::device::v1::ReinstallError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::ReinstallError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceFilter*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DevicePaging*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DevicePaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DevicePaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatusGroupedFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging*
Arena::CreateMaybeMessage< ::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::DeviceConfigurationStatusGroupedPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::ValidationError*
Arena::CreateMaybeMessage< ::keyapis::device::v1::ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::ValidationError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_Sip*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_Sip >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_Sip >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_Ntp*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_Ntp >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_Ntp >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_Syslog*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_Syslog >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_Syslog >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_Room*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_Room >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_Room >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_VideoConfig_RtspUser*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_VideoConfig_RtspUser >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_VideoConfig_RtspUser >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_VideoConfig*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_VideoConfig >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_VideoConfig >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_Dtmf*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_Dtmf >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_Dtmf >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_FaceRecognition*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_FaceRecognition >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_FaceRecognition >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_SavingError_Conflict*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_SavingError_Conflict >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_SavingError_Conflict >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_SavingError_NotAllowedForDefault >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset_SavingError*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::Preset*
Arena::CreateMaybeMessage< ::keyapis::device::v1::Preset >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::Preset >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
