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

#include "deviceapis/device/v1/deviceapis_device_update_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 PostUpdateDownloadRequest::PostUpdateDownloadRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.ftp_path_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUpdateDownloadRequestDefaultTypeInternal _PostUpdateDownloadRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUpdateDownloadResponse_Error::PostUpdateDownloadResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUpdateDownloadResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUpdateDownloadResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUpdateDownloadResponse_ErrorDefaultTypeInternal() {}
  union {
    PostUpdateDownloadResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUpdateDownloadResponse_ErrorDefaultTypeInternal _PostUpdateDownloadResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUpdateDownloadResponse::PostUpdateDownloadResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUpdateDownloadResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUpdateDownloadResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUpdateDownloadResponseDefaultTypeInternal() {}
  union {
    PostUpdateDownloadResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUpdateDownloadResponseDefaultTypeInternal _PostUpdateDownloadResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUpdateApplyRequest::PostUpdateApplyRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostUpdateApplyRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUpdateApplyRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUpdateApplyRequestDefaultTypeInternal() {}
  union {
    PostUpdateApplyRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUpdateApplyRequestDefaultTypeInternal _PostUpdateApplyRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUpdateApplyResponse::PostUpdateApplyResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostUpdateApplyResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUpdateApplyResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUpdateApplyResponseDefaultTypeInternal() {}
  union {
    PostUpdateApplyResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUpdateApplyResponseDefaultTypeInternal _PostUpdateApplyResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
namespace deviceapis {
namespace device {
namespace v1 {
// ===================================================================

class PostUpdateDownloadRequest::_Internal {
 public:
};

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

    , decltype(_impl_.file_name_) {}

    , decltype(_impl_.update_mode_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.ftp_path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.ftp_path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_ftp_path().empty()) {
    _this->_impl_.ftp_path_.Set(from._internal_ftp_path(), _this->GetArenaForAllocation());
  }
  _impl_.file_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.file_name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_file_name().empty()) {
    _this->_impl_.file_name_.Set(from._internal_file_name(), _this->GetArenaForAllocation());
  }
  _impl_.update_mode_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.update_mode_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_update_mode().empty()) {
    _this->_impl_.update_mode_.Set(from._internal_update_mode(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:deviceapis.device.v1.PostUpdateDownloadRequest)
}

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

    , decltype(_impl_.file_name_) {}

    , decltype(_impl_.update_mode_) {}

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

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

inline void PostUpdateDownloadRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.ftp_path_.Destroy();
  _impl_.file_name_.Destroy();
  _impl_.update_mode_.Destroy();
}

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

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

  _impl_.ftp_path_.ClearToEmpty();
  _impl_.file_name_.ClearToEmpty();
  _impl_.update_mode_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* PostUpdateDownloadRequest::_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 ftp_path = 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_ftp_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string file_name = 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_file_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string update_mode = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_update_mode();
          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* PostUpdateDownloadRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.PostUpdateDownloadRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

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

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

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

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

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

  if (!from._internal_ftp_path().empty()) {
    _this->_internal_set_ftp_path(from._internal_ftp_path());
  }
  if (!from._internal_file_name().empty()) {
    _this->_internal_set_file_name(from._internal_file_name());
  }
  if (!from._internal_update_mode().empty()) {
    _this->_internal_set_update_mode(from._internal_update_mode());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

const ::deviceapis::device::v1::ValidationError&
PostUpdateDownloadResponse_Error::_Internal::validation(const PostUpdateDownloadResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostUpdateDownloadResponse_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.PostUpdateDownloadResponse.Error.validation)
}
void PostUpdateDownloadResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
PostUpdateDownloadResponse_Error::PostUpdateDownloadResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.PostUpdateDownloadResponse.Error)
}
PostUpdateDownloadResponse_Error::PostUpdateDownloadResponse_Error(const PostUpdateDownloadResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUpdateDownloadResponse_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.PostUpdateDownloadResponse.Error)
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class PostUpdateApplyRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

class PostUpdateApplyResponse::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostUpdateDownloadRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostUpdateDownloadRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostUpdateDownloadRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostUpdateDownloadResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostUpdateDownloadResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostUpdateDownloadResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostUpdateDownloadResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostUpdateDownloadResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostUpdateDownloadResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostUpdateApplyRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostUpdateApplyRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostUpdateApplyRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::PostUpdateApplyResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::PostUpdateApplyResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::PostUpdateApplyResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
