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

#include "deviceapis/device/v1/deviceapis_device_relay_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 deviceapis {
namespace device {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR PostRelayCloseRequest::PostRelayCloseRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_index_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayCloseRequestDefaultTypeInternal _PostRelayCloseRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayCloseResponse_Error::PostRelayCloseResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayCloseResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayCloseResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayCloseResponse_ErrorDefaultTypeInternal() {}
  union {
    PostRelayCloseResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayCloseResponse_ErrorDefaultTypeInternal _PostRelayCloseResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayCloseResponse::PostRelayCloseResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayCloseResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayCloseResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayCloseResponseDefaultTypeInternal() {}
  union {
    PostRelayCloseResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayCloseResponseDefaultTypeInternal _PostRelayCloseResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenPermanentlyRequest::PostRelayOpenPermanentlyRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_index_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenPermanentlyRequestDefaultTypeInternal _PostRelayOpenPermanentlyRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenPermanentlyResponse_Error::PostRelayOpenPermanentlyResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayOpenPermanentlyResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayOpenPermanentlyResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayOpenPermanentlyResponse_ErrorDefaultTypeInternal() {}
  union {
    PostRelayOpenPermanentlyResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenPermanentlyResponse_ErrorDefaultTypeInternal _PostRelayOpenPermanentlyResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenPermanentlyResponse::PostRelayOpenPermanentlyResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayOpenPermanentlyResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayOpenPermanentlyResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayOpenPermanentlyResponseDefaultTypeInternal() {}
  union {
    PostRelayOpenPermanentlyResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenPermanentlyResponseDefaultTypeInternal _PostRelayOpenPermanentlyResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenRequest::PostRelayOpenRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_index_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenRequestDefaultTypeInternal _PostRelayOpenRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenResponse_Error::PostRelayOpenResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayOpenResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayOpenResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayOpenResponse_ErrorDefaultTypeInternal() {}
  union {
    PostRelayOpenResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenResponse_ErrorDefaultTypeInternal _PostRelayOpenResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostRelayOpenResponse::PostRelayOpenResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostRelayOpenResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostRelayOpenResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostRelayOpenResponseDefaultTypeInternal() {}
  union {
    PostRelayOpenResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostRelayOpenResponseDefaultTypeInternal _PostRelayOpenResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsOpenRequest::EditRelayPropsOpenRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr
  , /*decltype(_impl_.update_mask_)*/nullptr} {}
struct EditRelayPropsOpenRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsOpenRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsOpenRequestDefaultTypeInternal() {}
  union {
    EditRelayPropsOpenRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsOpenRequestDefaultTypeInternal _EditRelayPropsOpenRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsDtmfRequest::EditRelayPropsDtmfRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr
  , /*decltype(_impl_.update_mask_)*/nullptr} {}
struct EditRelayPropsDtmfRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsDtmfRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsDtmfRequestDefaultTypeInternal() {}
  union {
    EditRelayPropsDtmfRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsDtmfRequestDefaultTypeInternal _EditRelayPropsDtmfRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsOpenResponse_Error::EditRelayPropsOpenResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditRelayPropsOpenResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsOpenResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsOpenResponse_ErrorDefaultTypeInternal() {}
  union {
    EditRelayPropsOpenResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsOpenResponse_ErrorDefaultTypeInternal _EditRelayPropsOpenResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsOpenResponse::EditRelayPropsOpenResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditRelayPropsOpenResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsOpenResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsOpenResponseDefaultTypeInternal() {}
  union {
    EditRelayPropsOpenResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsOpenResponseDefaultTypeInternal _EditRelayPropsOpenResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsDtmfResponse_Error::EditRelayPropsDtmfResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditRelayPropsDtmfResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsDtmfResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsDtmfResponse_ErrorDefaultTypeInternal() {}
  union {
    EditRelayPropsDtmfResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsDtmfResponse_ErrorDefaultTypeInternal _EditRelayPropsDtmfResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditRelayPropsDtmfResponse::EditRelayPropsDtmfResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditRelayPropsDtmfResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditRelayPropsDtmfResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditRelayPropsDtmfResponseDefaultTypeInternal() {}
  union {
    EditRelayPropsDtmfResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditRelayPropsDtmfResponseDefaultTypeInternal _EditRelayPropsDtmfResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayStatusListRequest::GetRelayStatusListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayStatusListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayStatusListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayStatusListRequestDefaultTypeInternal() {}
  union {
    GetRelayStatusListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayStatusListRequestDefaultTypeInternal _GetRelayStatusListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RelayState::RelayState(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_index_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelayStateDefaultTypeInternal _RelayState_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayStatusListResponse::GetRelayStatusListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayStatusListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayStatusListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayStatusListResponseDefaultTypeInternal() {}
  union {
    GetRelayStatusListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayStatusListResponseDefaultTypeInternal _GetRelayStatusListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayOpenListRequest::GetRelayOpenListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayOpenListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayOpenListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayOpenListRequestDefaultTypeInternal() {}
  union {
    GetRelayOpenListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayOpenListRequestDefaultTypeInternal _GetRelayOpenListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayDtmfListRequest::GetRelayDtmfListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayDtmfListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayDtmfListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayDtmfListRequestDefaultTypeInternal() {}
  union {
    GetRelayDtmfListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayDtmfListRequestDefaultTypeInternal _GetRelayDtmfListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RelayOpen::RelayOpen(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_index_)*/ 0

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelayOpenDefaultTypeInternal _RelayOpen_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayOpenListResponse::GetRelayOpenListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayOpenListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayOpenListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayOpenListResponseDefaultTypeInternal() {}
  union {
    GetRelayOpenListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayOpenListResponseDefaultTypeInternal _GetRelayOpenListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR RelayDtmf::RelayDtmf(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.dtmf_code_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelayDtmfDefaultTypeInternal _RelayDtmf_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetRelayDtmfListResponse::GetRelayDtmfListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetRelayDtmfListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetRelayDtmfListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetRelayDtmfListResponseDefaultTypeInternal() {}
  union {
    GetRelayDtmfListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRelayDtmfListResponseDefaultTypeInternal _GetRelayDtmfListResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
namespace deviceapis {
namespace device {
namespace v1 {
bool RelayState_StateType_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>
    RelayState_StateType_strings[4] = {};

static const char RelayState_StateType_names[] = {
    "CLOSED"
    "OPEN_PERMANENT"
    "OPEN_TEMPORARY"
    "STATE_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry RelayState_StateType_entries[] =
    {
        {{&RelayState_StateType_names[0], 6}, 2},
        {{&RelayState_StateType_names[6], 14}, 3},
        {{&RelayState_StateType_names[20], 14}, 1},
        {{&RelayState_StateType_names[34], 18}, 0},
};

static const int RelayState_StateType_entries_by_number[] = {
    3,  // 0 -> STATE_TYPE_UNKNOWN
    2,  // 1 -> OPEN_TEMPORARY
    0,  // 2 -> CLOSED
    1,  // 3 -> OPEN_PERMANENT
};

const std::string& RelayState_StateType_Name(RelayState_StateType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RelayState_StateType_entries, RelayState_StateType_entries_by_number,
          4, RelayState_StateType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RelayState_StateType_entries, RelayState_StateType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RelayState_StateType_strings[idx].get();
}

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

constexpr RelayState_StateType RelayState::STATE_TYPE_UNKNOWN;
constexpr RelayState_StateType RelayState::OPEN_TEMPORARY;
constexpr RelayState_StateType RelayState::CLOSED;
constexpr RelayState_StateType RelayState::OPEN_PERMANENT;
constexpr RelayState_StateType RelayState::StateType_MIN;
constexpr RelayState_StateType RelayState::StateType_MAX;
constexpr int RelayState::StateType_ARRAYSIZE;

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

static const char RelayOpen_LockType_names[] = {
    "ELECTROMAGNETIC"
    "ELECTROMECHANICAL"
    "LOCK_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry RelayOpen_LockType_entries[] =
    {
        {{&RelayOpen_LockType_names[0], 15}, 1},
        {{&RelayOpen_LockType_names[15], 17}, 2},
        {{&RelayOpen_LockType_names[32], 17}, 0},
};

static const int RelayOpen_LockType_entries_by_number[] = {
    2,  // 0 -> LOCK_TYPE_UNKNOWN
    0,  // 1 -> ELECTROMAGNETIC
    1,  // 2 -> ELECTROMECHANICAL
};

const std::string& RelayOpen_LockType_Name(RelayOpen_LockType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          RelayOpen_LockType_entries, RelayOpen_LockType_entries_by_number,
          3, RelayOpen_LockType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      RelayOpen_LockType_entries, RelayOpen_LockType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : RelayOpen_LockType_strings[idx].get();
}

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

constexpr RelayOpen_LockType RelayOpen::LOCK_TYPE_UNKNOWN;
constexpr RelayOpen_LockType RelayOpen::ELECTROMAGNETIC;
constexpr RelayOpen_LockType RelayOpen::ELECTROMECHANICAL;
constexpr RelayOpen_LockType RelayOpen::LockType_MIN;
constexpr RelayOpen_LockType RelayOpen::LockType_MAX;
constexpr int RelayOpen::LockType_ARRAYSIZE;

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

class PostRelayCloseRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* PostRelayCloseRequest::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _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* PostRelayCloseRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.PostRelayCloseRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, 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:deviceapis.device.v1.PostRelayCloseRequest)
  return target;
}

::size_t PostRelayCloseRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.PostRelayCloseRequest)
  ::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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  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 PostRelayCloseRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostRelayCloseRequest*>(
      &from));
}

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

  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 PostRelayCloseRequest::CopyFrom(const PostRelayCloseRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:deviceapis.device.v1.PostRelayCloseRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

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

std::string PostRelayCloseRequest::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayCloseRequest";
}

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

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

const ::deviceapis::device::v1::ValidationError&
PostRelayCloseResponse_Error::_Internal::validation(const PostRelayCloseResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostRelayCloseResponse_Error::set_allocated_validation(::deviceapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.PostRelayCloseResponse.Error.validation)
}
void PostRelayCloseResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PostRelayCloseResponse_Error::PostRelayCloseResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.PostRelayCloseResponse.Error)
}
PostRelayCloseResponse_Error::PostRelayCloseResponse_Error(const PostRelayCloseResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRelayCloseResponse_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()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.PostRelayCloseResponse.Error)
}

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

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

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

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

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

  // .deviceapis.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:deviceapis.device.v1.PostRelayCloseResponse.Error)
  return target;
}

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

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

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

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

void PostRelayCloseResponse_Error::InternalSwap(PostRelayCloseResponse_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 PostRelayCloseResponse_Error::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayCloseResponse.Error";
}

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

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

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

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

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

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

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

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

  // .deviceapis.device.v1.PostRelayCloseResponse.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:deviceapis.device.v1.PostRelayCloseResponse)
  return target;
}

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

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

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

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

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

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

class PostRelayOpenPermanentlyRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* PostRelayOpenPermanentlyRequest::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _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* PostRelayOpenPermanentlyRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.PostRelayOpenPermanentlyRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, 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:deviceapis.device.v1.PostRelayOpenPermanentlyRequest)
  return target;
}

::size_t PostRelayOpenPermanentlyRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.PostRelayOpenPermanentlyRequest)
  ::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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  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 PostRelayOpenPermanentlyRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostRelayOpenPermanentlyRequest*>(
      &from));
}

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

  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 PostRelayOpenPermanentlyRequest::CopyFrom(const PostRelayOpenPermanentlyRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:deviceapis.device.v1.PostRelayOpenPermanentlyRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

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

std::string PostRelayOpenPermanentlyRequest::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayOpenPermanentlyRequest";
}

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

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

const ::deviceapis::device::v1::ValidationError&
PostRelayOpenPermanentlyResponse_Error::_Internal::validation(const PostRelayOpenPermanentlyResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostRelayOpenPermanentlyResponse_Error::set_allocated_validation(::deviceapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.PostRelayOpenPermanentlyResponse.Error.validation)
}
void PostRelayOpenPermanentlyResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PostRelayOpenPermanentlyResponse_Error::PostRelayOpenPermanentlyResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.PostRelayOpenPermanentlyResponse.Error)
}
PostRelayOpenPermanentlyResponse_Error::PostRelayOpenPermanentlyResponse_Error(const PostRelayOpenPermanentlyResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRelayOpenPermanentlyResponse_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()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.PostRelayOpenPermanentlyResponse.Error)
}

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

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

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

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

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

  // .deviceapis.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:deviceapis.device.v1.PostRelayOpenPermanentlyResponse.Error)
  return target;
}

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

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

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

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

void PostRelayOpenPermanentlyResponse_Error::InternalSwap(PostRelayOpenPermanentlyResponse_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 PostRelayOpenPermanentlyResponse_Error::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayOpenPermanentlyResponse.Error";
}

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

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

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

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

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

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

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

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

  // .deviceapis.device.v1.PostRelayOpenPermanentlyResponse.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:deviceapis.device.v1.PostRelayOpenPermanentlyResponse)
  return target;
}

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

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

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

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

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

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

class PostRelayOpenRequest::_Internal {
 public:
};

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

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

    , decltype(_impl_.current_open_time_) { 0 }

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

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

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

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

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

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

const char* PostRelayOpenRequest::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.relay_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 current_open_time = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.current_open_time_ = ::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* PostRelayOpenRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.PostRelayOpenRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_relay_index(), target);
  }

  // int32 current_open_time = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_current_open_time() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_current_open_time(), 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:deviceapis.device.v1.PostRelayOpenRequest)
  return target;
}

::size_t PostRelayOpenRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.PostRelayOpenRequest)
  ::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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_relay_index());
  }

  // int32 current_open_time = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_current_open_time() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_current_open_time());
  }

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

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

  if (from._internal_relay_index() != 0) {
    _this->_internal_set_relay_index(from._internal_relay_index());
  }
  if (from._internal_current_open_time() != 0) {
    _this->_internal_set_current_open_time(from._internal_current_open_time());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PostRelayOpenRequest::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayOpenRequest";
}

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

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

const ::deviceapis::device::v1::ValidationError&
PostRelayOpenResponse_Error::_Internal::validation(const PostRelayOpenResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostRelayOpenResponse_Error::set_allocated_validation(::deviceapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.PostRelayOpenResponse.Error.validation)
}
void PostRelayOpenResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PostRelayOpenResponse_Error::PostRelayOpenResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.PostRelayOpenResponse.Error)
}
PostRelayOpenResponse_Error::PostRelayOpenResponse_Error(const PostRelayOpenResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostRelayOpenResponse_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()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.PostRelayOpenResponse.Error)
}

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

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

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

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

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

  // .deviceapis.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:deviceapis.device.v1.PostRelayOpenResponse.Error)
  return target;
}

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

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

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

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

void PostRelayOpenResponse_Error::InternalSwap(PostRelayOpenResponse_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 PostRelayOpenResponse_Error::GetTypeName() const {
  return "deviceapis.device.v1.PostRelayOpenResponse.Error";
}

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

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

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

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

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

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

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

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

  // .deviceapis.device.v1.PostRelayOpenResponse.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:deviceapis.device.v1.PostRelayOpenResponse)
  return target;
}

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

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

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

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

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

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

class EditRelayPropsOpenRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<EditRelayPropsOpenRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(EditRelayPropsOpenRequest, _impl_._has_bits_);
  static const ::deviceapis::device::v1::RelayOpen& data(const EditRelayPropsOpenRequest* msg);
  static void set_has_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::FieldMask& update_mask(const EditRelayPropsOpenRequest* msg);
  static void set_has_update_mask(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::deviceapis::device::v1::RelayOpen&
EditRelayPropsOpenRequest::_Internal::data(const EditRelayPropsOpenRequest* msg) {
  return *msg->_impl_.data_;
}
const ::PROTOBUF_NAMESPACE_ID::FieldMask&
EditRelayPropsOpenRequest::_Internal::update_mask(const EditRelayPropsOpenRequest* msg) {
  return *msg->_impl_.update_mask_;
}
void EditRelayPropsOpenRequest::clear_update_mask() {
  if (_impl_.update_mask_ != nullptr) _impl_.update_mask_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
EditRelayPropsOpenRequest::EditRelayPropsOpenRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.EditRelayPropsOpenRequest)
}
EditRelayPropsOpenRequest::EditRelayPropsOpenRequest(const EditRelayPropsOpenRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  EditRelayPropsOpenRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}
    , decltype(_impl_.update_mask_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.data_ = new ::deviceapis::device::v1::RelayOpen(*from._impl_.data_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.update_mask_ = new ::PROTOBUF_NAMESPACE_ID::FieldMask(*from._impl_.update_mask_);
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.EditRelayPropsOpenRequest)
}

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

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

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

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

void EditRelayPropsOpenRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:deviceapis.device.v1.EditRelayPropsOpenRequest)
  ::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_.data_ != nullptr);
      _impl_.data_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.update_mask_ != nullptr);
      _impl_.update_mask_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* EditRelayPropsOpenRequest::_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) {
      // .deviceapis.device.v1.RelayOpen 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;
      // .google.protobuf.FieldMask update_mask = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_mask(), 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* EditRelayPropsOpenRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.EditRelayPropsOpenRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .deviceapis.device.v1.RelayOpen 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);
  }

  // .google.protobuf.FieldMask update_mask = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::update_mask(this),
        _Internal::update_mask(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:deviceapis.device.v1.EditRelayPropsOpenRequest)
  return target;
}

::size_t EditRelayPropsOpenRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.EditRelayPropsOpenRequest)
  ::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) {
    // .deviceapis.device.v1.RelayOpen data = 1 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.data_);
    }

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

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

void EditRelayPropsOpenRequest::MergeFrom(const EditRelayPropsOpenRequest& from) {
  EditRelayPropsOpenRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:deviceapis.device.v1.EditRelayPropsOpenRequest)
  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_data()->::deviceapis::device::v1::RelayOpen::MergeFrom(
          from._internal_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_update_mask()->::PROTOBUF_NAMESPACE_ID::FieldMask::MergeFrom(
          from._internal_update_mask());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void EditRelayPropsOpenRequest::InternalSwap(EditRelayPropsOpenRequest* 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(EditRelayPropsOpenRequest, _impl_.update_mask_)
      + sizeof(EditRelayPropsOpenRequest::_impl_.update_mask_)
      - PROTOBUF_FIELD_OFFSET(EditRelayPropsOpenRequest, _impl_.data_)>(
          reinterpret_cast<char*>(&_impl_.data_),
          reinterpret_cast<char*>(&other->_impl_.data_));
}

std::string EditRelayPropsOpenRequest::GetTypeName() const {
  return "deviceapis.device.v1.EditRelayPropsOpenRequest";
}

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

class EditRelayPropsDtmfRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<EditRelayPropsDtmfRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(EditRelayPropsDtmfRequest, _impl_._has_bits_);
  static const ::deviceapis::device::v1::RelayDtmf& data(const EditRelayPropsDtmfRequest* msg);
  static void set_has_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::FieldMask& update_mask(const EditRelayPropsDtmfRequest* msg);
  static void set_has_update_mask(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::deviceapis::device::v1::RelayDtmf&
EditRelayPropsDtmfRequest::_Internal::data(const EditRelayPropsDtmfRequest* msg) {
  return *msg->_impl_.data_;
}
const ::PROTOBUF_NAMESPACE_ID::FieldMask&
EditRelayPropsDtmfRequest::_Internal::update_mask(const EditRelayPropsDtmfRequest* msg) {
  return *msg->_impl_.update_mask_;
}
void EditRelayPropsDtmfRequest::clear_update_mask() {
  if (_impl_.update_mask_ != nullptr) _impl_.update_mask_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
EditRelayPropsDtmfRequest::EditRelayPropsDtmfRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.EditRelayPropsDtmfRequest)
}
EditRelayPropsDtmfRequest::EditRelayPropsDtmfRequest(const EditRelayPropsDtmfRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  EditRelayPropsDtmfRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}
    , decltype(_impl_.update_mask_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.data_ = new ::deviceapis::device::v1::RelayDtmf(*from._impl_.data_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.update_mask_ = new ::PROTOBUF_NAMESPACE_ID::FieldMask(*from._impl_.update_mask_);
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.EditRelayPropsDtmfRequest)
}

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

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

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

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

void EditRelayPropsDtmfRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:deviceapis.device.v1.EditRelayPropsDtmfRequest)
  ::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_.data_ != nullptr);
      _impl_.data_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.update_mask_ != nullptr);
      _impl_.update_mask_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* EditRelayPropsDtmfRequest::_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) {
      // .deviceapis.device.v1.RelayDtmf 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;
      // .google.protobuf.FieldMask update_mask = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_mask(), 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* EditRelayPropsDtmfRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.EditRelayPropsDtmfRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .deviceapis.device.v1.RelayDtmf 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);
  }

  // .google.protobuf.FieldMask update_mask = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::update_mask(this),
        _Internal::update_mask(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:deviceapis.device.v1.EditRelayPropsDtmfRequest)
  return target;
}

::size_t EditRelayPropsDtmfRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.EditRelayPropsDtmfRequest)
  ::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) {
    // .deviceapis.device.v1.RelayDtmf data = 1 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.data_);
    }

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

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

void EditRelayPropsDtmfRequest::MergeFrom(const EditRelayPropsDtmfRequest& from) {
  EditRelayPropsDtmfRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:deviceapis.device.v1.EditRelayPropsDtmfRequest)
  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_data()->::deviceapis::device::v1::RelayDtmf::MergeFrom(
          from._internal_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_update_mask()->::PROTOBUF_NAMESPACE_ID::FieldMask::MergeFrom(
          from._internal_update_mask());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void EditRelayPropsDtmfRequest::InternalSwap(EditRelayPropsDtmfRequest* 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(EditRelayPropsDtmfRequest, _impl_.update_mask_)
      + sizeof(EditRelayPropsDtmfRequest::_impl_.update_mask_)
      - PROTOBUF_FIELD_OFFSET(EditRelayPropsDtmfRequest, _impl_.data_)>(
          reinterpret_cast<char*>(&_impl_.data_),
          reinterpret_cast<char*>(&other->_impl_.data_));
}

std::string EditRelayPropsDtmfRequest::GetTypeName() const {
  return "deviceapis.device.v1.EditRelayPropsDtmfRequest";
}

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

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

const ::deviceapis::device::v1::ValidationError&
EditRelayPropsOpenResponse_Error::_Internal::validation(const EditRelayPropsOpenResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void EditRelayPropsOpenResponse_Error::set_allocated_validation(::deviceapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.EditRelayPropsOpenResponse.Error.validation)
}
void EditRelayPropsOpenResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
EditRelayPropsOpenResponse_Error::EditRelayPropsOpenResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.EditRelayPropsOpenResponse.Error)
}
EditRelayPropsOpenResponse_Error::EditRelayPropsOpenResponse_Error(const EditRelayPropsOpenResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  EditRelayPropsOpenResponse_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()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.EditRelayPropsOpenResponse.Error)
}

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

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

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

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

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

  // .deviceapis.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:deviceapis.device.v1.EditRelayPropsOpenResponse.Error)
  return target;
}

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

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

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

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

void EditRelayPropsOpenResponse_Error::InternalSwap(EditRelayPropsOpenResponse_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 EditRelayPropsOpenResponse_Error::GetTypeName() const {
  return "deviceapis.device.v1.EditRelayPropsOpenResponse.Error";
}

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

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

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

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

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

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

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

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

  // .deviceapis.device.v1.EditRelayPropsOpenResponse.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:deviceapis.device.v1.EditRelayPropsOpenResponse)
  return target;
}

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

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

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

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

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

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

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

const ::deviceapis::device::v1::ValidationError&
EditRelayPropsDtmfResponse_Error::_Internal::validation(const EditRelayPropsDtmfResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void EditRelayPropsDtmfResponse_Error::set_allocated_validation(::deviceapis::device::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.EditRelayPropsDtmfResponse.Error.validation)
}
void EditRelayPropsDtmfResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
EditRelayPropsDtmfResponse_Error::EditRelayPropsDtmfResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.EditRelayPropsDtmfResponse.Error)
}
EditRelayPropsDtmfResponse_Error::EditRelayPropsDtmfResponse_Error(const EditRelayPropsDtmfResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  EditRelayPropsDtmfResponse_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()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.EditRelayPropsDtmfResponse.Error)
}

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

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

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

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

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

  // .deviceapis.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:deviceapis.device.v1.EditRelayPropsDtmfResponse.Error)
  return target;
}

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

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

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

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

void EditRelayPropsDtmfResponse_Error::InternalSwap(EditRelayPropsDtmfResponse_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 EditRelayPropsDtmfResponse_Error::GetTypeName() const {
  return "deviceapis.device.v1.EditRelayPropsDtmfResponse.Error";
}

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

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

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

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

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

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

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

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

  // .deviceapis.device.v1.EditRelayPropsDtmfResponse.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:deviceapis.device.v1.EditRelayPropsDtmfResponse)
  return target;
}

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

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

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

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

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

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

class GetRelayStatusListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string GetRelayStatusListRequest::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayStatusListRequest";
}

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

class RelayState::_Internal {
 public:
};

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

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

    , decltype(_impl_.state_type_) { 0 }

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

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

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

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

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

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

const char* RelayState::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.relay_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .deviceapis.device.v1.RelayState.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      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_state_type(static_cast<::deviceapis::device::v1::RelayState_StateType>(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* RelayState::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.RelayState)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_relay_index(), target);
  }

  // .deviceapis.device.v1.RelayState.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_state_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_state_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:deviceapis.device.v1.RelayState)
  return target;
}

::size_t RelayState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.RelayState)
  ::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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_relay_index());
  }

  // .deviceapis.device.v1.RelayState.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_state_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_state_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 RelayState::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const RelayState*>(
      &from));
}

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

  if (from._internal_relay_index() != 0) {
    _this->_internal_set_relay_index(from._internal_relay_index());
  }
  if (from._internal_state_type() != 0) {
    _this->_internal_set_state_type(from._internal_state_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string RelayState::GetTypeName() const {
  return "deviceapis.device.v1.RelayState";
}

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

class GetRelayStatusListResponse::_Internal {
 public:
};

GetRelayStatusListResponse::GetRelayStatusListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.GetRelayStatusListResponse)
}
GetRelayStatusListResponse::GetRelayStatusListResponse(const GetRelayStatusListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRelayStatusListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){from._impl_.data_}
    , /*decltype(_impl_._cached_size_)*/{}};

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

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

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

inline void GetRelayStatusListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_data()->~RepeatedPtrField();
}

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

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

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

const char* GetRelayStatusListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .deviceapis.device.v1.RelayState data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* GetRelayStatusListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.GetRelayStatusListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .deviceapis.device.v1.RelayState data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:deviceapis.device.v1.GetRelayStatusListResponse)
  return target;
}

::size_t GetRelayStatusListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.GetRelayStatusListResponse)
  ::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 .deviceapis.device.v1.RelayState data = 1;
  total_size += 1UL * this->_internal_data_size();
  for (const auto& msg : this->_internal_data()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

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

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

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

std::string GetRelayStatusListResponse::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayStatusListResponse";
}

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

class GetRelayOpenListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string GetRelayOpenListRequest::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayOpenListRequest";
}

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

class GetRelayDtmfListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string GetRelayDtmfListRequest::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayDtmfListRequest";
}

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

class RelayOpen::_Internal {
 public:
};

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

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

    , decltype(_impl_.lock_type_) { 0 }

    , decltype(_impl_.open_time_general_) { 0 }

    , decltype(_impl_.open_time_emergency_) { 0 }

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

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

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

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

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

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

const char* RelayOpen::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.relay_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .deviceapis.device.v1.RelayOpen.LockType lock_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      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_lock_type(static_cast<::deviceapis::device::v1::RelayOpen_LockType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 open_time_general = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.open_time_general_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 open_time_emergency = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.open_time_emergency_ = ::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* RelayOpen::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.RelayOpen)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_relay_index(), target);
  }

  // .deviceapis.device.v1.RelayOpen.LockType lock_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_lock_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_lock_type(), target);
  }

  // int32 open_time_general = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_open_time_general() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_open_time_general(), target);
  }

  // int32 open_time_emergency = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_open_time_emergency() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_open_time_emergency(), 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:deviceapis.device.v1.RelayOpen)
  return target;
}

::size_t RelayOpen::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.RelayOpen)
  ::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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_relay_index());
  }

  // .deviceapis.device.v1.RelayOpen.LockType lock_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_lock_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_lock_type());
  }

  // int32 open_time_general = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_open_time_general() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_open_time_general());
  }

  // int32 open_time_emergency = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_open_time_emergency() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_open_time_emergency());
  }

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

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

  if (from._internal_relay_index() != 0) {
    _this->_internal_set_relay_index(from._internal_relay_index());
  }
  if (from._internal_lock_type() != 0) {
    _this->_internal_set_lock_type(from._internal_lock_type());
  }
  if (from._internal_open_time_general() != 0) {
    _this->_internal_set_open_time_general(from._internal_open_time_general());
  }
  if (from._internal_open_time_emergency() != 0) {
    _this->_internal_set_open_time_emergency(from._internal_open_time_emergency());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string RelayOpen::GetTypeName() const {
  return "deviceapis.device.v1.RelayOpen";
}

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

class GetRelayOpenListResponse::_Internal {
 public:
};

GetRelayOpenListResponse::GetRelayOpenListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.GetRelayOpenListResponse)
}
GetRelayOpenListResponse::GetRelayOpenListResponse(const GetRelayOpenListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRelayOpenListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){from._impl_.data_}
    , /*decltype(_impl_._cached_size_)*/{}};

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

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

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

inline void GetRelayOpenListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_data()->~RepeatedPtrField();
}

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

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

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

const char* GetRelayOpenListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .deviceapis.device.v1.RelayOpen data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* GetRelayOpenListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.GetRelayOpenListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .deviceapis.device.v1.RelayOpen data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:deviceapis.device.v1.GetRelayOpenListResponse)
  return target;
}

::size_t GetRelayOpenListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.GetRelayOpenListResponse)
  ::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 .deviceapis.device.v1.RelayOpen data = 1;
  total_size += 1UL * this->_internal_data_size();
  for (const auto& msg : this->_internal_data()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

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

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

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

std::string GetRelayOpenListResponse::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayOpenListResponse";
}

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

class RelayDtmf::_Internal {
 public:
};

RelayDtmf::RelayDtmf(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.RelayDtmf)
}
RelayDtmf::RelayDtmf(const RelayDtmf& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  RelayDtmf* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.dtmf_code_) {}

    , decltype(_impl_.relay_index_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.dtmf_code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.dtmf_code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_dtmf_code().empty()) {
    _this->_impl_.dtmf_code_.Set(from._internal_dtmf_code(), _this->GetArenaForAllocation());
  }
  _this->_impl_.relay_index_ = from._impl_.relay_index_;
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.RelayDtmf)
}

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

    , decltype(_impl_.relay_index_) { 0 }

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

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

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

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

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

  _impl_.dtmf_code_.ClearToEmpty();
  _impl_.relay_index_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* RelayDtmf::_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 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.relay_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string dtmf_code = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_dtmf_code();
          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* RelayDtmf::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.RelayDtmf)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_relay_index(), target);
  }

  // string dtmf_code = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_dtmf_code().empty()) {
    const std::string& _s = this->_internal_dtmf_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "deviceapis.device.v1.RelayDtmf.dtmf_code");
    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:deviceapis.device.v1.RelayDtmf)
  return target;
}

::size_t RelayDtmf::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.RelayDtmf)
  ::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 dtmf_code = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_dtmf_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_dtmf_code());
  }

  // int32 relay_index = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  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 RelayDtmf::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const RelayDtmf*>(
      &from));
}

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

  if (!from._internal_dtmf_code().empty()) {
    _this->_internal_set_dtmf_code(from._internal_dtmf_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 RelayDtmf::CopyFrom(const RelayDtmf& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:deviceapis.device.v1.RelayDtmf)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

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

std::string RelayDtmf::GetTypeName() const {
  return "deviceapis.device.v1.RelayDtmf";
}

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

class GetRelayDtmfListResponse::_Internal {
 public:
};

GetRelayDtmfListResponse::GetRelayDtmfListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.GetRelayDtmfListResponse)
}
GetRelayDtmfListResponse::GetRelayDtmfListResponse(const GetRelayDtmfListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetRelayDtmfListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){from._impl_.data_}
    , /*decltype(_impl_._cached_size_)*/{}};

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

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

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

inline void GetRelayDtmfListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_data()->~RepeatedPtrField();
}

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

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

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

const char* GetRelayDtmfListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .deviceapis.device.v1.RelayDtmf data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* GetRelayDtmfListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.GetRelayDtmfListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .deviceapis.device.v1.RelayDtmf data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:deviceapis.device.v1.GetRelayDtmfListResponse)
  return target;
}

::size_t GetRelayDtmfListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.GetRelayDtmfListResponse)
  ::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 .deviceapis.device.v1.RelayDtmf data = 1;
  total_size += 1UL * this->_internal_data_size();
  for (const auto& msg : this->_internal_data()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

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

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

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

std::string GetRelayDtmfListResponse::GetTypeName() const {
  return "deviceapis.device.v1.GetRelayDtmfListResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayCloseRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayCloseRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayCloseRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayCloseResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayCloseResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayCloseResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayCloseResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayCloseResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayCloseResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenPermanentlyRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenPermanentlyRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenPermanentlyRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenPermanentlyResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostRelayOpenResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostRelayOpenResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostRelayOpenResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsOpenRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsOpenRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsOpenRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsDtmfRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsDtmfRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsDtmfRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsOpenResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsOpenResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsOpenResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsOpenResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsOpenResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsOpenResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsDtmfResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsDtmfResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsDtmfResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditRelayPropsDtmfResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditRelayPropsDtmfResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditRelayPropsDtmfResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayStatusListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayStatusListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayStatusListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::RelayState*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::RelayState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::RelayState >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayStatusListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayStatusListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayStatusListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayOpenListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayOpenListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayOpenListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayDtmfListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayDtmfListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayDtmfListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::RelayOpen*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::RelayOpen >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::RelayOpen >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayOpenListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayOpenListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayOpenListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::RelayDtmf*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::RelayDtmf >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::RelayDtmf >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetRelayDtmfListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetRelayDtmfListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetRelayDtmfListResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
