// 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 {
namespace 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 GetV1DevicesRequest::GetV1DevicesRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetV1DevicesRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetV1DevicesRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetV1DevicesRequestDefaultTypeInternal() {}
  union {
    GetV1DevicesRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetV1DevicesRequestDefaultTypeInternal _GetV1DevicesRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetV1DevicesResponse::GetV1DevicesResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetV1DevicesResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetV1DevicesResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetV1DevicesResponseDefaultTypeInternal() {}
  union {
    GetV1DevicesResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetV1DevicesResponseDefaultTypeInternal _GetV1DevicesResponse_default_instance_;
}  // namespace v1
}  // namespace sber
}  // namespace iot_connect
}  // namespace keyapis
namespace keyapis {
namespace iot_connect {
namespace 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))
// ===================================================================

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 [json_name = "hw_version"];
      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 [json_name = "sw_version"];
      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 [json_name = "hw_version"];
  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 [json_name = "sw_version"];
  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 [json_name = "hw_version"];
  if (!this->_internal_hw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_hw_version());
  }

  // string sw_version = 5 [json_name = "sw_version"];
  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 [json_name = "default_name"];
      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 [json_name = "hw_version"];
      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 [json_name = "sw_version"];
      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 [json_name = "default_name"];
  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 [json_name = "hw_version"];
  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 [json_name = "sw_version"];
  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 [json_name = "default_name"];
  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 [json_name = "hw_version"];
  if (!this->_internal_hw_version().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_hw_version());
  }

  // string sw_version = 8 [json_name = "sw_version"];
  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 GetV1DevicesRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string GetV1DevicesRequest::GetTypeName() const {
  return "keyapis.iot_connect.sber.v1.GetV1DevicesRequest";
}

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

class GetV1DevicesResponse::_Internal {
 public:
};

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

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

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

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

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

void GetV1DevicesResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.iot_connect.sber.v1.GetV1DevicesResponse)
  ::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* GetV1DevicesResponse::_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 [json_name = "devices"];
      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* GetV1DevicesResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.iot_connect.sber.v1.GetV1DevicesResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .keyapis.iot_connect.sber.v1.Device data = 1 [json_name = "devices"];
  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.GetV1DevicesResponse)
  return target;
}

::size_t GetV1DevicesResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.iot_connect.sber.v1.GetV1DevicesResponse)
  ::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 [json_name = "devices"];
  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 GetV1DevicesResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetV1DevicesResponse*>(
      &from));
}

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

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

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

std::string GetV1DevicesResponse::GetTypeName() const {
  return "keyapis.iot_connect.sber.v1.GetV1DevicesResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace sber
}  // namespace iot_connect
}  // 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::GetV1DevicesRequest*
Arena::CreateMaybeMessage< ::keyapis::iot_connect::sber::v1::GetV1DevicesRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect::sber::v1::GetV1DevicesRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::iot_connect::sber::v1::GetV1DevicesResponse*
Arena::CreateMaybeMessage< ::keyapis::iot_connect::sber::v1::GetV1DevicesResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::iot_connect::sber::v1::GetV1DevicesResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
