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

#include "deviceapis/device/v1/deviceapis_device_code_v1.pb.h"

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Code_SavingError_RelayNotFoundDefaultTypeInternal _Code_SavingError_RelayNotFound_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Code_SavingError::Code_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct Code_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Code_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Code_SavingErrorDefaultTypeInternal() {}
  union {
    Code_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Code_SavingErrorDefaultTypeInternal _Code_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Code::Code(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.relay_indexes_)*/ {}
  ,/* _impl_._relay_indexes_cached_byte_size_ = */ { 0 }

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeDefaultTypeInternal _Code_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR CodePaging::CodePaging(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.limit_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodePagingDefaultTypeInternal _CodePaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteCodeListRequest::DeleteCodeListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct DeleteCodeListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteCodeListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteCodeListRequestDefaultTypeInternal() {}
  union {
    DeleteCodeListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteCodeListRequestDefaultTypeInternal _DeleteCodeListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteCodeListResponse::DeleteCodeListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteCodeListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteCodeListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteCodeListResponseDefaultTypeInternal() {}
  union {
    DeleteCodeListResponse _instance;
  };
};

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteCodeRequestDefaultTypeInternal _DeleteCodeRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteCodeResponse_Error::DeleteCodeResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteCodeResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteCodeResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteCodeResponse_ErrorDefaultTypeInternal() {}
  union {
    DeleteCodeResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteCodeResponse_ErrorDefaultTypeInternal _DeleteCodeResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteCodeResponse::DeleteCodeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteCodeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteCodeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteCodeResponseDefaultTypeInternal() {}
  union {
    DeleteCodeResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteCodeResponseDefaultTypeInternal _DeleteCodeResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetCodeCountRequest::GetCodeCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetCodeCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetCodeCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetCodeCountRequestDefaultTypeInternal() {}
  union {
    GetCodeCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCodeCountRequestDefaultTypeInternal _GetCodeCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetCodeCountResponse::GetCodeCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetCodeCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetCodeCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetCodeCountResponseDefaultTypeInternal() {}
  union {
    GetCodeCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCodeCountResponseDefaultTypeInternal _GetCodeCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetCodeListRequest::GetCodeListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.pagination_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetCodeListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetCodeListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetCodeListRequestDefaultTypeInternal() {}
  union {
    GetCodeListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCodeListRequestDefaultTypeInternal _GetCodeListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetCodeListResponse::GetCodeListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetCodeListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetCodeListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetCodeListResponseDefaultTypeInternal() {}
  union {
    GetCodeListResponse _instance;
  };
};

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCodeRequestDefaultTypeInternal _GetCodeRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetCodeResponse::GetCodeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetCodeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetCodeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetCodeResponseDefaultTypeInternal() {}
  union {
    GetCodeResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCodeResponseDefaultTypeInternal _GetCodeResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SaveCodeListRequest::SaveCodeListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct SaveCodeListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeListRequestDefaultTypeInternal() {}
  union {
    SaveCodeListRequest _instance;
  };
};

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

  , /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct SaveCodeListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeListResponse_ErrorDefaultTypeInternal() {}
  union {
    SaveCodeListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveCodeListResponse_ErrorDefaultTypeInternal _SaveCodeListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SaveCodeListResponse::SaveCodeListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_.errors_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct SaveCodeListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeListResponseDefaultTypeInternal() {}
  union {
    SaveCodeListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveCodeListResponseDefaultTypeInternal _SaveCodeListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SaveCodeRequest::SaveCodeRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct SaveCodeRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeRequestDefaultTypeInternal() {}
  union {
    SaveCodeRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveCodeRequestDefaultTypeInternal _SaveCodeRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SaveCodeResponse_Error::SaveCodeResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct SaveCodeResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeResponse_ErrorDefaultTypeInternal() {}
  union {
    SaveCodeResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveCodeResponse_ErrorDefaultTypeInternal _SaveCodeResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR SaveCodeResponse::SaveCodeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct SaveCodeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveCodeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveCodeResponseDefaultTypeInternal() {}
  union {
    SaveCodeResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveCodeResponseDefaultTypeInternal _SaveCodeResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
namespace deviceapis {
namespace device {
namespace v1 {
// ===================================================================

class Code_SavingError_RelayNotFound::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

std::string Code_SavingError_RelayNotFound::GetTypeName() const {
  return "deviceapis.device.v1.Code.SavingError.RelayNotFound";
}

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

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

const ::deviceapis::device::v1::Code_SavingError_RelayNotFound&
Code_SavingError::_Internal::relay_not_found(const Code_SavingError* msg) {
  return *msg->_impl_.reason_.relay_not_found_;
}
void Code_SavingError::set_allocated_relay_not_found(::deviceapis::device::v1::Code_SavingError_RelayNotFound* relay_not_found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (relay_not_found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(relay_not_found);
    if (message_arena != submessage_arena) {
      relay_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, relay_not_found, submessage_arena);
    }
    set_has_relay_not_found();
    _impl_.reason_.relay_not_found_ = relay_not_found;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.Code.SavingError.relay_not_found)
}
Code_SavingError::Code_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.Code.SavingError)
}
Code_SavingError::Code_SavingError(const Code_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Code_SavingError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kRelayNotFound: {
      _this->_internal_mutable_relay_not_found()->::deviceapis::device::v1::Code_SavingError_RelayNotFound::MergeFrom(
          from._internal_relay_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.Code.SavingError)
}

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

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

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

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

void Code_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.Code.SavingError)
  switch (reason_case()) {
    case kRelayNotFound: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.relay_not_found_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* Code_SavingError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .deviceapis.device.v1.Code.SavingError.RelayNotFound relay_not_found = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_relay_not_found(), 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* Code_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.Code.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .deviceapis.device.v1.Code.SavingError.RelayNotFound relay_not_found = 1;
  if (reason_case() == kRelayNotFound) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::relay_not_found(this),
        _Internal::relay_not_found(this).GetCachedSize(), target, stream);
  }

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

::size_t Code_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.Code.SavingError)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .deviceapis.device.v1.Code.SavingError.RelayNotFound relay_not_found = 1;
    case kRelayNotFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.relay_not_found_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.reason_case()) {
    case kRelayNotFound: {
      _this->_internal_mutable_relay_not_found()->::deviceapis::device::v1::Code_SavingError_RelayNotFound::MergeFrom(
          from._internal_relay_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class Code::_Internal {
 public:
};

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

    , decltype(_impl_.code_) {}

    , decltype(_impl_.description_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_code().empty()) {
    _this->_impl_.code_.Set(from._internal_code(), _this->GetArenaForAllocation());
  }
  _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());
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.Code)
}

inline void Code::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.relay_indexes_) { arena }
    ,/* _impl_._relay_indexes_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.code_) {}

    , decltype(_impl_.description_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.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
}

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

inline void Code::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.relay_indexes_.~RepeatedField();
  _impl_.code_.Destroy();
  _impl_.description_.Destroy();
}

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

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

  _internal_mutable_relay_indexes()->Clear();
  _impl_.code_.ClearToEmpty();
  _impl_.description_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* Code::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string description = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_description();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 relay_indexes = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_relay_indexes(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          _internal_add_relay_indexes(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "deviceapis.device.v1.Code.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string description = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  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, "deviceapis.device.v1.Code.description");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // repeated int32 relay_indexes = 3;
  {
    int byte_size = _impl_._relay_indexes_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(3, _internal_relay_indexes(),
                                                 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:deviceapis.device.v1.Code)
  return target;
}

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

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

  // repeated int32 relay_indexes = 3;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_relay_indexes())
    ;
    _impl_._relay_indexes_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

  // string description = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_description().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_description());
  }

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

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

  _this->_impl_.relay_indexes_.MergeFrom(from._impl_.relay_indexes_);
  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  if (!from._internal_description().empty()) {
    _this->_internal_set_description(from._internal_description());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Code::InternalSwap(Code* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.relay_indexes_.InternalSwap(&other->_impl_.relay_indexes_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.code_, lhs_arena,
                                       &other->_impl_.code_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, lhs_arena,
                                       &other->_impl_.description_, rhs_arena);
}

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

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

class CodePaging::_Internal {
 public:
};

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

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

    , decltype(_impl_.offset_) { 0 }

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

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

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

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

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

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

const char* CodePaging::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 limit = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 offset = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

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

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

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

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

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

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

  if (from._internal_limit() != 0) {
    _this->_internal_set_limit(from._internal_limit());
  }
  if (from._internal_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class DeleteCodeListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

class DeleteCodeListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::deviceapis::device::v1::DeleteCodeListResponse, _impl_._oneof_case_);
};

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.DeleteCodeListResponse)
}

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

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

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

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

void DeleteCodeListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.DeleteCodeListResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* DeleteCodeListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int32 data = 1;
  if (type_case() == kData) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_data(), target);
  }

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

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

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class DeleteCodeRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

const char* DeleteCodeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      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* DeleteCodeRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.DeleteCodeRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "deviceapis.device.v1.DeleteCodeRequest.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

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

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

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

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

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

  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

void DeleteCodeResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.DeleteCodeResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

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

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

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

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

::size_t DeleteCodeResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.DeleteCodeResponse.Error)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

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

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::deviceapis::device::v1::DeleteCodeResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.DeleteCodeResponse)
}

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

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

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

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

void DeleteCodeResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.DeleteCodeResponse)
  switch (type_case()) {
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

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

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

  // .deviceapis.device.v1.DeleteCodeResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(this).GetCachedSize(), target, stream);
  }

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

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

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

  switch (type_case()) {
    // .deviceapis.device.v1.DeleteCodeResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::deviceapis::device::v1::DeleteCodeResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class GetCodeCountRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

class GetCodeCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::deviceapis::device::v1::GetCodeCountResponse, _impl_._oneof_case_);
};

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.GetCodeCountResponse)
}

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

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

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

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

void GetCodeCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.GetCodeCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetCodeCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int32 data = 1;
  if (type_case() == kData) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_data(), target);
  }

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

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

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

const ::deviceapis::device::v1::CodePaging&
GetCodeListRequest::_Internal::paging(const GetCodeListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetCodeListRequest::set_allocated_paging(::deviceapis::device::v1::CodePaging* paging) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_pagination();
  if (paging) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(paging);
    if (message_arena != submessage_arena) {
      paging = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, paging, submessage_arena);
    }
    set_has_paging();
    _impl_.pagination_.paging_ = paging;
  }
  // @@protoc_insertion_point(field_set_allocated:deviceapis.device.v1.GetCodeListRequest.paging)
}
GetCodeListRequest::GetCodeListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.GetCodeListRequest)
}
GetCodeListRequest::GetCodeListRequest(const GetCodeListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetCodeListRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.pagination_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::deviceapis::device::v1::CodePaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.GetCodeListRequest)
}

inline void GetCodeListRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.pagination_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_pagination();
}

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

inline void GetCodeListRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_pagination()) {
    clear_pagination();
  }
}

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

void GetCodeListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.GetCodeListRequest)
  switch (pagination_case()) {
    case kPaging: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.pagination_.paging_;
      }
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = PAGINATION_NOT_SET;
}


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

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

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

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

  // .deviceapis.device.v1.CodePaging paging = 1;
  if (pagination_case() == kPaging) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::paging(this),
        _Internal::paging(this).GetCachedSize(), target, stream);
  }

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

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

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

  switch (pagination_case()) {
    // .deviceapis.device.v1.CodePaging paging = 1;
    case kPaging: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pagination_.paging_);
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::deviceapis::device::v1::CodePaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class GetCodeListResponse::_Internal {
 public:
};

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

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

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

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

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

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

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

  // repeated .deviceapis.device.v1.Code data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

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

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

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

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

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

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

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

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

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

class GetCodeRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

const char* GetCodeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      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* GetCodeRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.GetCodeRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "deviceapis.device.v1.GetCodeRequest.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

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

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

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

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

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

  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::deviceapis::device::v1::Code::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.GetCodeResponse)
}

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

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

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

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

void GetCodeResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.GetCodeResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

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

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

  // .deviceapis.device.v1.Code data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

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

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

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

  switch (type_case()) {
    // .deviceapis.device.v1.Code data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::deviceapis::device::v1::Code::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

class SaveCodeListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

  // repeated .deviceapis.device.v1.Code data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

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

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

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

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

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

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

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

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

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

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

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

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_code().empty()) {
    _this->_impl_.code_.Set(from._internal_code(), _this->GetArenaForAllocation());
  }
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::deviceapis::device::v1::Code_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.SaveCodeListResponse.Error)
}

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

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

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

inline void SaveCodeListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.code_.Destroy();
  if (has_reason()) {
    clear_reason();
  }
}

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

void SaveCodeListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.SaveCodeListResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case kSaving: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.saving_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* SaveCodeListResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .deviceapis.device.v1.ValidationError validation = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .deviceapis.device.v1.Code.SavingError saving = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "deviceapis.device.v1.SaveCodeListResponse.Error.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::saving(this),
          _Internal::saving(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:deviceapis.device.v1.SaveCodeListResponse.Error)
  return target;
}

::size_t SaveCodeListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.SaveCodeListResponse.Error)
  ::size_t total_size = 0;

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

  // string code = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

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

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

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

  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::deviceapis::device::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::deviceapis::device::v1::Code_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SaveCodeListResponse_Error::InternalSwap(SaveCodeListResponse_Error* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.code_, lhs_arena,
                                       &other->_impl_.code_, rhs_arena);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

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

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

class SaveCodeListResponse::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* SaveCodeListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .deviceapis.device.v1.Code 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;
      // repeated .deviceapis.device.v1.SaveCodeListResponse.Error errors = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_errors(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated .deviceapis.device.v1.Code 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);
  }

  // repeated .deviceapis.device.v1.SaveCodeListResponse.Error errors = 2;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_errors_size()); i < n; i++) {
    const auto& repfield = this->_internal_errors(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  }

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

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

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

  // repeated .deviceapis.device.v1.Code 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);
  }

  // repeated .deviceapis.device.v1.SaveCodeListResponse.Error errors = 2;
  total_size += 1UL * this->_internal_errors_size();
  for (const auto& msg : this->_internal_errors()) {
    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 SaveCodeListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const SaveCodeListResponse*>(
      &from));
}

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

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

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

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

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

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

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

const ::deviceapis::device::v1::Code&
SaveCodeRequest::_Internal::data(const SaveCodeRequest* msg) {
  return *msg->_impl_.data_;
}
SaveCodeRequest::SaveCodeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.SaveCodeRequest)
}
SaveCodeRequest::SaveCodeRequest(const SaveCodeRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SaveCodeRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}};

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

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

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

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

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

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

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

const char* SaveCodeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .deviceapis.device.v1.Code data = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // .deviceapis.device.v1.Code data = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

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

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

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

  // .deviceapis.device.v1.Code data = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.data_);
  }

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

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

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_data()->::deviceapis::device::v1::Code::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

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

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

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

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

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

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

void SaveCodeResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.SaveCodeResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case kSaving: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.saving_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

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

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

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::saving(this),
          _Internal::saving(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:deviceapis.device.v1.SaveCodeResponse.Error)
  return target;
}

::size_t SaveCodeResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.SaveCodeResponse.Error)
  ::size_t total_size = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void SaveCodeResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:deviceapis.device.v1.SaveCodeResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* SaveCodeResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .deviceapis.device.v1.Code data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .deviceapis.device.v1.SaveCodeResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

  switch (type_case()) {
    // .deviceapis.device.v1.Code data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .deviceapis.device.v1.SaveCodeResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::Code_SavingError_RelayNotFound*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::Code_SavingError_RelayNotFound >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::Code_SavingError_RelayNotFound >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::Code_SavingError*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::Code_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::Code_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::Code*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::Code >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::Code >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::CodePaging*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::CodePaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::CodePaging >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DeleteCodeListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DeleteCodeListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DeleteCodeListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DeleteCodeListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DeleteCodeListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DeleteCodeListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DeleteCodeRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DeleteCodeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DeleteCodeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DeleteCodeResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DeleteCodeResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DeleteCodeResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DeleteCodeResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DeleteCodeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DeleteCodeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeCountRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeCountResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetCodeResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetCodeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetCodeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeListRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeListResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeListResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::SaveCodeResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::SaveCodeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::SaveCodeResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
