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

#include "keyapis/iot_connect_sber/v1/keyapis_iot_connect_devices_v1.pb.h"

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

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace iot_connect_sber {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Model::Model(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.feature_types_)*/ {}
  , /*decltype(_impl_._feature_types_cached_byte_size_)*/ { 0 }

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

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModelDefaultTypeInternal _Model_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Device::Device(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceDefaultTypeInternal _Device_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceStateArray::DeviceStateArray(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.states_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct DeviceStateArrayDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceStateArrayDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceStateArrayDefaultTypeInternal() {}
  union {
    DeviceStateArray _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceStateArrayDefaultTypeInternal _DeviceStateArray_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceState_Value::DeviceState_Value(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/ 0

  , /*decltype(_impl_.value_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeviceState_ValueDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceState_ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceState_ValueDefaultTypeInternal() {}
  union {
    DeviceState_Value _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceState_ValueDefaultTypeInternal _DeviceState_Value_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeviceState::DeviceState(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.value_)*/nullptr
  , /*decltype(_impl_.state_key_type_)*/ 0
} {}
struct DeviceStateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeviceStateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceStateDefaultTypeInternal() {}
  union {
    DeviceState _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceStateDefaultTypeInternal _DeviceState_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDevicesRequest::GetDevicesRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetDevicesRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDevicesRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDevicesRequestDefaultTypeInternal() {}
  union {
    GetDevicesRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDevicesRequestDefaultTypeInternal _GetDevicesRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDevicesResponse::GetDevicesResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetDevicesResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDevicesResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDevicesResponseDefaultTypeInternal() {}
  union {
    GetDevicesResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDevicesResponseDefaultTypeInternal _GetDevicesResponse_default_instance_;
}  // namespace v1
}  // namespace iot_connect_sber
}  // namespace keyapis
namespace keyapis {
namespace iot_connect_sber {
namespace v1 {
bool Model_FeatureType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Model_FeatureType_strings[5] = {};

static const char Model_FeatureType_names[] = {
    "FEATURE_TYPE_UNKNOWN"
    "INCOMING_CALL"
    "ONLINE"
    "REJECT_CALL"
    "UNLOCK"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Model_FeatureType_entries[] =
    {
        {{&Model_FeatureType_names[0], 20}, 0},
        {{&Model_FeatureType_names[20], 13}, 1},
        {{&Model_FeatureType_names[33], 6}, 2},
        {{&Model_FeatureType_names[39], 11}, 3},
        {{&Model_FeatureType_names[50], 6}, 4},
};

static const int Model_FeatureType_entries_by_number[] = {
    0,  // 0 -> FEATURE_TYPE_UNKNOWN
    1,  // 1 -> INCOMING_CALL
    2,  // 2 -> ONLINE
    3,  // 3 -> REJECT_CALL
    4,  // 4 -> UNLOCK
};

const std::string& Model_FeatureType_Name(Model_FeatureType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Model_FeatureType_entries, Model_FeatureType_entries_by_number,
          5, Model_FeatureType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Model_FeatureType_entries, Model_FeatureType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Model_FeatureType_strings[idx].get();
}

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

constexpr Model_FeatureType Model::FEATURE_TYPE_UNKNOWN;
constexpr Model_FeatureType Model::INCOMING_CALL;
constexpr Model_FeatureType Model::ONLINE;
constexpr Model_FeatureType Model::REJECT_CALL;
constexpr Model_FeatureType Model::UNLOCK;
constexpr Model_FeatureType Model::FeatureType_MIN;
constexpr Model_FeatureType Model::FeatureType_MAX;
constexpr int Model::FeatureType_ARRAYSIZE;

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

static const char DeviceState_Value_Type_names[] = {
    "BOOL"
    "TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceState_Value_Type_entries[] =
    {
        {{&DeviceState_Value_Type_names[0], 4}, 1},
        {{&DeviceState_Value_Type_names[4], 12}, 0},
};

static const int DeviceState_Value_Type_entries_by_number[] = {
    1,  // 0 -> TYPE_UNKNOWN
    0,  // 1 -> BOOL
};

const std::string& DeviceState_Value_Type_Name(DeviceState_Value_Type value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceState_Value_Type_entries, DeviceState_Value_Type_entries_by_number,
          2, DeviceState_Value_Type_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceState_Value_Type_entries, DeviceState_Value_Type_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceState_Value_Type_strings[idx].get();
}

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

constexpr DeviceState_Value_Type DeviceState_Value::TYPE_UNKNOWN;
constexpr DeviceState_Value_Type DeviceState_Value::BOOL;
constexpr DeviceState_Value_Type DeviceState_Value::Type_MIN;
constexpr DeviceState_Value_Type DeviceState_Value::Type_MAX;
constexpr int DeviceState_Value::Type_ARRAYSIZE;

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

static const char DeviceState_KeyType_names[] = {
    "KEY_TYPE_UNKNOWN"
    "ONLINE"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceState_KeyType_entries[] =
    {
        {{&DeviceState_KeyType_names[0], 16}, 0},
        {{&DeviceState_KeyType_names[16], 6}, 1},
};

static const int DeviceState_KeyType_entries_by_number[] = {
    0,  // 0 -> KEY_TYPE_UNKNOWN
    1,  // 1 -> ONLINE
};

const std::string& DeviceState_KeyType_Name(DeviceState_KeyType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          DeviceState_KeyType_entries, DeviceState_KeyType_entries_by_number,
          2, DeviceState_KeyType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      DeviceState_KeyType_entries, DeviceState_KeyType_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : DeviceState_KeyType_strings[idx].get();
}

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

constexpr DeviceState_KeyType DeviceState::KEY_TYPE_UNKNOWN;
constexpr DeviceState_KeyType DeviceState::ONLINE;
constexpr DeviceState_KeyType DeviceState::KeyType_MIN;
constexpr DeviceState_KeyType DeviceState::KeyType_MAX;
constexpr int DeviceState::KeyType_ARRAYSIZE;

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

class Model::_Internal {
 public:
};

Model::Model(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.iot_connect_sber.v1.Model)
}
Model::Model(const Model& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Model* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.feature_types_) { from._internal_feature_types() }
    , /*decltype(_impl_._feature_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.id_) {}

    , decltype(_impl_.manufacturer_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.hw_version_) {}

    , decltype(_impl_.sw_version_) {}

    , decltype(_impl_.description_) {}

    , decltype(_impl_.category_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_id().empty()) {
    _this->_impl_.id_.Set(from._internal_id(), _this->GetArenaForAllocation());
  }
  _impl_.manufacturer_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.manufacturer_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_manufacturer().empty()) {
    _this->_impl_.manufacturer_.Set(from._internal_manufacturer(), _this->GetArenaForAllocation());
  }
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_model().empty()) {
    _this->_impl_.model_.Set(from._internal_model(), _this->GetArenaForAllocation());
  }
  _impl_.hw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_hw_version().empty()) {
    _this->_impl_.hw_version_.Set(from._internal_hw_version(), _this->GetArenaForAllocation());
  }
  _impl_.sw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sw_version().empty()) {
    _this->_impl_.sw_version_.Set(from._internal_sw_version(), _this->GetArenaForAllocation());
  }
  _impl_.description_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.description_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_description().empty()) {
    _this->_impl_.description_.Set(from._internal_description(), _this->GetArenaForAllocation());
  }
  _impl_.category_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.category_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_category().empty()) {
    _this->_impl_.category_.Set(from._internal_category(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.iot_connect_sber.v1.Model)
}

inline void Model::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.feature_types_) { arena }
    , /*decltype(_impl_._feature_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.id_) {}

    , decltype(_impl_.manufacturer_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.hw_version_) {}

    , decltype(_impl_.sw_version_) {}

    , decltype(_impl_.description_) {}

    , decltype(_impl_.category_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.manufacturer_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.manufacturer_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.hw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.sw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.description_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.description_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.category_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.category_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Model::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_feature_types()->~RepeatedField();
  _impl_.id_.Destroy();
  _impl_.manufacturer_.Destroy();
  _impl_.model_.Destroy();
  _impl_.hw_version_.Destroy();
  _impl_.sw_version_.Destroy();
  _impl_.description_.Destroy();
  _impl_.category_.Destroy();
}

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

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

  _internal_mutable_feature_types()->Clear();
  _impl_.id_.ClearToEmpty();
  _impl_.manufacturer_.ClearToEmpty();
  _impl_.model_.ClearToEmpty();
  _impl_.hw_version_.ClearToEmpty();
  _impl_.sw_version_.ClearToEmpty();
  _impl_.description_.ClearToEmpty();
  _impl_.category_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* Model::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string manufacturer = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_manufacturer();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string model = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_model();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string hw_version = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_hw_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string sw_version = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_sw_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string description = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_description();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string category = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_category();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.iot_connect_sber.v1.Model.FeatureType feature_types = 8 [json_name = "features"];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_feature_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 64) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_feature_types(static_cast<::keyapis::iot_connect_sber::v1::Model_FeatureType>(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* Model::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.iot_connect_sber.v1.Model)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string id = 1;
  if (!this->_internal_id().empty()) {
    const std::string& _s = this->_internal_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string manufacturer = 2;
  if (!this->_internal_manufacturer().empty()) {
    const std::string& _s = this->_internal_manufacturer();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.manufacturer");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

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

  // string hw_version = 4;
  if (!this->_internal_hw_version().empty()) {
    const std::string& _s = this->_internal_hw_version();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.hw_version");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // string sw_version = 5;
  if (!this->_internal_sw_version().empty()) {
    const std::string& _s = this->_internal_sw_version();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.sw_version");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  // string description = 6;
  if (!this->_internal_description().empty()) {
    const std::string& _s = this->_internal_description();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.description");
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // string category = 7;
  if (!this->_internal_category().empty()) {
    const std::string& _s = this->_internal_category();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Model.category");
    target = stream->WriteStringMaybeAliased(7, _s, target);
  }

  // repeated .keyapis.iot_connect_sber.v1.Model.FeatureType feature_types = 8 [json_name = "features"];
  {
    int byte_size = _impl_._feature_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(8, _internal_feature_types(),
                                       byte_size, target);
    }
  }

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

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

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

  // repeated .keyapis.iot_connect_sber.v1.Model.FeatureType feature_types = 8 [json_name = "features"];
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_feature_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_feature_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._feature_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // string id = 1;
  if (!this->_internal_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_id());
  }

  // string manufacturer = 2;
  if (!this->_internal_manufacturer().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_manufacturer());
  }

  // string model = 3;
  if (!this->_internal_model().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_model());
  }

  // string hw_version = 4;
  if (!this->_internal_hw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_hw_version());
  }

  // string sw_version = 5;
  if (!this->_internal_sw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sw_version());
  }

  // string description = 6;
  if (!this->_internal_description().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_description());
  }

  // string category = 7;
  if (!this->_internal_category().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_category());
  }

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

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

  _this->_internal_mutable_feature_types()->MergeFrom(from._internal_feature_types());
  if (!from._internal_id().empty()) {
    _this->_internal_set_id(from._internal_id());
  }
  if (!from._internal_manufacturer().empty()) {
    _this->_internal_set_manufacturer(from._internal_manufacturer());
  }
  if (!from._internal_model().empty()) {
    _this->_internal_set_model(from._internal_model());
  }
  if (!from._internal_hw_version().empty()) {
    _this->_internal_set_hw_version(from._internal_hw_version());
  }
  if (!from._internal_sw_version().empty()) {
    _this->_internal_set_sw_version(from._internal_sw_version());
  }
  if (!from._internal_description().empty()) {
    _this->_internal_set_description(from._internal_description());
  }
  if (!from._internal_category().empty()) {
    _this->_internal_set_category(from._internal_category());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Model::InternalSwap(Model* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _internal_mutable_feature_types()->InternalSwap(
      other->_internal_mutable_feature_types());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena,
                                       &other->_impl_.id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.manufacturer_, lhs_arena,
                                       &other->_impl_.manufacturer_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.model_, lhs_arena,
                                       &other->_impl_.model_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hw_version_, lhs_arena,
                                       &other->_impl_.hw_version_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sw_version_, lhs_arena,
                                       &other->_impl_.sw_version_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, lhs_arena,
                                       &other->_impl_.description_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.category_, lhs_arena,
                                       &other->_impl_.category_, rhs_arena);
}

std::string Model::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.Model";
}

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

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

const ::keyapis::iot_connect_sber::v1::Model&
Device::_Internal::model(const Device* msg) {
  return *msg->_impl_.model_;
}
Device::Device(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.iot_connect_sber.v1.Device)
}
Device::Device(const Device& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Device* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.name_) {}

    , decltype(_impl_.default_name_) {}

    , decltype(_impl_.home_) {}

    , decltype(_impl_.room_) {}

    , decltype(_impl_.hw_version_) {}

    , decltype(_impl_.sw_version_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_id().empty()) {
    _this->_impl_.id_.Set(from._internal_id(), _this->GetArenaForAllocation());
  }
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation());
  }
  _impl_.default_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.default_name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_default_name().empty()) {
    _this->_impl_.default_name_.Set(from._internal_default_name(), _this->GetArenaForAllocation());
  }
  _impl_.home_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.home_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_home().empty()) {
    _this->_impl_.home_.Set(from._internal_home(), _this->GetArenaForAllocation());
  }
  _impl_.room_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.room_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_room().empty()) {
    _this->_impl_.room_.Set(from._internal_room(), _this->GetArenaForAllocation());
  }
  _impl_.hw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_hw_version().empty()) {
    _this->_impl_.hw_version_.Set(from._internal_hw_version(), _this->GetArenaForAllocation());
  }
  _impl_.sw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sw_version().empty()) {
    _this->_impl_.sw_version_.Set(from._internal_sw_version(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.model_ = new ::keyapis::iot_connect_sber::v1::Model(*from._impl_.model_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.iot_connect_sber.v1.Device)
}

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

    , decltype(_impl_.name_) {}

    , decltype(_impl_.default_name_) {}

    , decltype(_impl_.home_) {}

    , decltype(_impl_.room_) {}

    , decltype(_impl_.hw_version_) {}

    , decltype(_impl_.sw_version_) {}

    , decltype(_impl_.model_){nullptr}
  };
  _impl_.id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.default_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.default_name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.home_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.home_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.room_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.room_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.hw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.hw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.sw_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sw_version_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Device::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.id_.Destroy();
  _impl_.name_.Destroy();
  _impl_.default_name_.Destroy();
  _impl_.home_.Destroy();
  _impl_.room_.Destroy();
  _impl_.hw_version_.Destroy();
  _impl_.sw_version_.Destroy();
  if (this != internal_default_instance()) delete _impl_.model_;
}

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

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

  _impl_.id_.ClearToEmpty();
  _impl_.name_.ClearToEmpty();
  _impl_.default_name_.ClearToEmpty();
  _impl_.home_.ClearToEmpty();
  _impl_.room_.ClearToEmpty();
  _impl_.hw_version_.ClearToEmpty();
  _impl_.sw_version_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.model_ != nullptr);
    _impl_.model_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Device::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string default_name = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_default_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string home = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_home();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string room = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_room();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.iot_connect_sber.v1.Model model = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_model(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string hw_version = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_hw_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string sw_version = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_sw_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // string id = 1;
  if (!this->_internal_id().empty()) {
    const std::string& _s = this->_internal_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string name = 2;
  if (!this->_internal_name().empty()) {
    const std::string& _s = this->_internal_name();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.name");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

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

  // string home = 4;
  if (!this->_internal_home().empty()) {
    const std::string& _s = this->_internal_home();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.home");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // string room = 5;
  if (!this->_internal_room().empty()) {
    const std::string& _s = this->_internal_room();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.room");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.iot_connect_sber.v1.Model model = 6;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::model(this),
        _Internal::model(this).GetCachedSize(), target, stream);
  }

  // string hw_version = 7;
  if (!this->_internal_hw_version().empty()) {
    const std::string& _s = this->_internal_hw_version();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.hw_version");
    target = stream->WriteStringMaybeAliased(7, _s, target);
  }

  // string sw_version = 8;
  if (!this->_internal_sw_version().empty()) {
    const std::string& _s = this->_internal_sw_version();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.iot_connect_sber.v1.Device.sw_version");
    target = stream->WriteStringMaybeAliased(8, _s, target);
  }

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

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

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

  // string id = 1;
  if (!this->_internal_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_id());
  }

  // string name = 2;
  if (!this->_internal_name().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_name());
  }

  // string default_name = 3;
  if (!this->_internal_default_name().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_default_name());
  }

  // string home = 4;
  if (!this->_internal_home().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_home());
  }

  // string room = 5;
  if (!this->_internal_room().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_room());
  }

  // string hw_version = 7;
  if (!this->_internal_hw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_hw_version());
  }

  // string sw_version = 8;
  if (!this->_internal_sw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sw_version());
  }

  // .keyapis.iot_connect_sber.v1.Model model = 6;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.model_);
  }

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

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

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

  if (!from._internal_id().empty()) {
    _this->_internal_set_id(from._internal_id());
  }
  if (!from._internal_name().empty()) {
    _this->_internal_set_name(from._internal_name());
  }
  if (!from._internal_default_name().empty()) {
    _this->_internal_set_default_name(from._internal_default_name());
  }
  if (!from._internal_home().empty()) {
    _this->_internal_set_home(from._internal_home());
  }
  if (!from._internal_room().empty()) {
    _this->_internal_set_room(from._internal_room());
  }
  if (!from._internal_hw_version().empty()) {
    _this->_internal_set_hw_version(from._internal_hw_version());
  }
  if (!from._internal_sw_version().empty()) {
    _this->_internal_set_sw_version(from._internal_sw_version());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_model()->::keyapis::iot_connect_sber::v1::Model::MergeFrom(
        from._internal_model());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Device::InternalSwap(Device* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena,
                                       &other->_impl_.id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena,
                                       &other->_impl_.name_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.default_name_, lhs_arena,
                                       &other->_impl_.default_name_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.home_, lhs_arena,
                                       &other->_impl_.home_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.room_, lhs_arena,
                                       &other->_impl_.room_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hw_version_, lhs_arena,
                                       &other->_impl_.hw_version_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sw_version_, lhs_arena,
                                       &other->_impl_.sw_version_, rhs_arena);
  swap(_impl_.model_, other->_impl_.model_);
}

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

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

class DeviceStateArray::_Internal {
 public:
};

DeviceStateArray::DeviceStateArray(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.iot_connect_sber.v1.DeviceStateArray)
}
DeviceStateArray::DeviceStateArray(const DeviceStateArray& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceStateArray* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.states_){from._impl_.states_}
    , /*decltype(_impl_._cached_size_)*/{}};

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

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

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

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

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

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

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

const char* DeviceStateArray::_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 .keyapis.iot_connect_sber.v1.DeviceState states = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_states(), 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* DeviceStateArray::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.iot_connect_sber.v1.DeviceStateArray)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .keyapis.iot_connect_sber.v1.DeviceState states = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_states_size()); i < n; i++) {
    const auto& repfield = this->_internal_states(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:keyapis.iot_connect_sber.v1.DeviceStateArray)
  return target;
}

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

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

  // repeated .keyapis.iot_connect_sber.v1.DeviceState states = 1;
  total_size += 1UL * this->_internal_states_size();
  for (const auto& msg : this->_internal_states()) {
    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 DeviceStateArray::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceStateArray*>(
      &from));
}

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

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

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

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

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

std::string DeviceStateArray::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.DeviceStateArray";
}

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

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

DeviceState_Value::DeviceState_Value(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.iot_connect_sber.v1.DeviceState.Value)
}
DeviceState_Value::DeviceState_Value(const DeviceState_Value& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceState_Value* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _this->_impl_.type_ = from._impl_.type_;
  clear_has_value();
  switch (from.value_case()) {
    case kIsValue: {
      _this->_internal_set_is_value(from._internal_is_value());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.iot_connect_sber.v1.DeviceState.Value)
}

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

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

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

inline void DeviceState_Value::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_value()) {
    clear_value();
  }
}

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

void DeviceState_Value::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.iot_connect_sber.v1.DeviceState.Value)
  switch (value_case()) {
    case kIsValue: {
      // No need to clear
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = VALUE_NOT_SET;
}


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

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

const char* DeviceState_Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.iot_connect_sber.v1.DeviceState.Value.Type type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::iot_connect_sber::v1::DeviceState_Value_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_value = 2 [json_name = "bool_value"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _internal_set_is_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.iot_connect_sber.v1.DeviceState.Value.Type type = 1;
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_type(), target);
  }

  // bool is_value = 2 [json_name = "bool_value"];
  if (value_case() == kIsValue) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        2, this->_internal_is_value(), target);
  }

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

::size_t DeviceState_Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.iot_connect_sber.v1.DeviceState.Value)
  ::size_t total_size = 0;

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

  // .keyapis.iot_connect_sber.v1.DeviceState.Value.Type type = 1;
  if (this->_internal_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  switch (value_case()) {
    // bool is_value = 2 [json_name = "bool_value"];
    case kIsValue: {
      total_size += 2;
      break;
    }
    case VALUE_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 DeviceState_Value::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceState_Value*>(
      &from));
}

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

  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  switch (from.value_case()) {
    case kIsValue: {
      _this->_internal_set_is_value(from._internal_is_value());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string DeviceState_Value::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.DeviceState.Value";
}

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

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

const ::keyapis::iot_connect_sber::v1::DeviceState_Value&
DeviceState::_Internal::value(const DeviceState* msg) {
  return *msg->_impl_.value_;
}
DeviceState::DeviceState(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.iot_connect_sber.v1.DeviceState)
}
DeviceState::DeviceState(const DeviceState& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeviceState* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.value_){nullptr}
    , decltype(_impl_.state_key_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.value_ = new ::keyapis::iot_connect_sber::v1::DeviceState_Value(*from._impl_.value_);
  }
  _this->_impl_.state_key_type_ = from._impl_.state_key_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.iot_connect_sber.v1.DeviceState)
}

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

  };
}

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

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

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

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

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

const char* DeviceState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.iot_connect_sber.v1.DeviceState.KeyType state_key_type = 1 [json_name = "key"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_state_key_type(static_cast<::keyapis::iot_connect_sber::v1::DeviceState_KeyType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.iot_connect_sber.v1.DeviceState.Value value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_value(), 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* DeviceState::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.iot_connect_sber.v1.DeviceState)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.iot_connect_sber.v1.DeviceState.KeyType state_key_type = 1 [json_name = "key"];
  if (this->_internal_state_key_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_state_key_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.iot_connect_sber.v1.DeviceState.Value value = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::value(this),
        _Internal::value(this).GetCachedSize(), target, stream);
  }

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

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

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

  // .keyapis.iot_connect_sber.v1.DeviceState.Value value = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.value_);
  }

  // .keyapis.iot_connect_sber.v1.DeviceState.KeyType state_key_type = 1 [json_name = "key"];
  if (this->_internal_state_key_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_state_key_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 DeviceState::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeviceState*>(
      &from));
}

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_value()->::keyapis::iot_connect_sber::v1::DeviceState_Value::MergeFrom(
        from._internal_value());
  }
  if (from._internal_state_key_type() != 0) {
    _this->_internal_set_state_key_type(from._internal_state_key_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string DeviceState::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.DeviceState";
}

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

class GetDevicesRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

std::string GetDevicesRequest::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.GetDevicesRequest";
}

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

class GetDevicesResponse::_Internal {
 public:
};

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

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

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

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

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

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

  // repeated .keyapis.iot_connect_sber.v1.Device 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:keyapis.iot_connect_sber.v1.GetDevicesResponse)
  return target;
}

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

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

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

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

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

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

std::string GetDevicesResponse::GetTypeName() const {
  return "keyapis.iot_connect_sber.v1.GetDevicesResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace iot_connect_sber
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::Model*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::Model >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::Model >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::Device*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::Device >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::Device >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::DeviceStateArray*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::DeviceStateArray >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::DeviceStateArray >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::DeviceState_Value*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::DeviceState_Value >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::DeviceState_Value >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::DeviceState*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::DeviceState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::DeviceState >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::GetDevicesRequest*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::GetDevicesRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::GetDevicesRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect_sber::v1::GetDevicesResponse*
Arena::CreateMaybeMessage< ::keyapis::iot_connect_sber::v1::GetDevicesResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect_sber::v1::GetDevicesResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
