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

#include "keyapis/device/v1/keyapis_device_event_alert_v1.pb.h"

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

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace device {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR PrepareStartTask::PrepareStartTask(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.request_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PrepareStartTaskDefaultTypeInternal _PrepareStartTask_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PrepareStopTask::PrepareStopTask(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.request_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PrepareStopTaskDefaultTypeInternal _PrepareStopTask_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlayStartTask::PlayStartTask(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.request_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

  , /*decltype(_impl_.port_)*/nullptr
  , /*decltype(_impl_.login_)*/nullptr
  , /*decltype(_impl_.password_)*/nullptr
  , /*decltype(_impl_.device_id_)*/ 0

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

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

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

  , /*decltype(_impl_.play_type_)*/ 0
} {}
struct PlayStartTaskDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlayStartTaskDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlayStartTaskDefaultTypeInternal() {}
  union {
    PlayStartTask _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlayStartTaskDefaultTypeInternal _PlayStartTask_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlayStopTask::PlayStopTask(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.request_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

  , /*decltype(_impl_.port_)*/nullptr
  , /*decltype(_impl_.login_)*/nullptr
  , /*decltype(_impl_.password_)*/nullptr
  , /*decltype(_impl_.device_id_)*/ 0
} {}
struct PlayStopTaskDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlayStopTaskDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlayStopTaskDefaultTypeInternal() {}
  union {
    PlayStopTask _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlayStopTaskDefaultTypeInternal _PlayStopTask_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace keyapis
namespace keyapis {
namespace device {
namespace v1 {
bool PrepareStartTask_PlayType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    PrepareStartTask_PlayType_strings[5] = {};

static const char PrepareStartTask_PlayType_names[] = {
    "HANDSET_AND_SPEAKER"
    "HANDSET_ONLY"
    "PLAY_TYPE_UNKNOWN"
    "SPEAKER_AND_HANDSET"
    "SPEAKER_ONLY"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PrepareStartTask_PlayType_entries[] =
    {
        {{&PrepareStartTask_PlayType_names[0], 19}, 3},
        {{&PrepareStartTask_PlayType_names[19], 12}, 1},
        {{&PrepareStartTask_PlayType_names[31], 17}, 0},
        {{&PrepareStartTask_PlayType_names[48], 19}, 4},
        {{&PrepareStartTask_PlayType_names[67], 12}, 2},
};

static const int PrepareStartTask_PlayType_entries_by_number[] = {
    2,  // 0 -> PLAY_TYPE_UNKNOWN
    1,  // 1 -> HANDSET_ONLY
    4,  // 2 -> SPEAKER_ONLY
    0,  // 3 -> HANDSET_AND_SPEAKER
    3,  // 4 -> SPEAKER_AND_HANDSET
};

const std::string& PrepareStartTask_PlayType_Name(PrepareStartTask_PlayType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PrepareStartTask_PlayType_entries, PrepareStartTask_PlayType_entries_by_number,
          5, PrepareStartTask_PlayType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PrepareStartTask_PlayType_entries, PrepareStartTask_PlayType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PrepareStartTask_PlayType_strings[idx].get();
}

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

constexpr PrepareStartTask_PlayType PrepareStartTask::PLAY_TYPE_UNKNOWN;
constexpr PrepareStartTask_PlayType PrepareStartTask::HANDSET_ONLY;
constexpr PrepareStartTask_PlayType PrepareStartTask::SPEAKER_ONLY;
constexpr PrepareStartTask_PlayType PrepareStartTask::HANDSET_AND_SPEAKER;
constexpr PrepareStartTask_PlayType PrepareStartTask::SPEAKER_AND_HANDSET;
constexpr PrepareStartTask_PlayType PrepareStartTask::PlayType_MIN;
constexpr PrepareStartTask_PlayType PrepareStartTask::PlayType_MAX;
constexpr int PrepareStartTask::PlayType_ARRAYSIZE;

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

static const char PlayStartTask_PlayType_names[] = {
    "HANDSET_AND_SPEAKER"
    "HANDSET_ONLY"
    "PLAY_TYPE_UNKNOWN"
    "SPEAKER_AND_HANDSET"
    "SPEAKER_ONLY"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PlayStartTask_PlayType_entries[] =
    {
        {{&PlayStartTask_PlayType_names[0], 19}, 3},
        {{&PlayStartTask_PlayType_names[19], 12}, 1},
        {{&PlayStartTask_PlayType_names[31], 17}, 0},
        {{&PlayStartTask_PlayType_names[48], 19}, 4},
        {{&PlayStartTask_PlayType_names[67], 12}, 2},
};

static const int PlayStartTask_PlayType_entries_by_number[] = {
    2,  // 0 -> PLAY_TYPE_UNKNOWN
    1,  // 1 -> HANDSET_ONLY
    4,  // 2 -> SPEAKER_ONLY
    0,  // 3 -> HANDSET_AND_SPEAKER
    3,  // 4 -> SPEAKER_AND_HANDSET
};

const std::string& PlayStartTask_PlayType_Name(PlayStartTask_PlayType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PlayStartTask_PlayType_entries, PlayStartTask_PlayType_entries_by_number,
          5, PlayStartTask_PlayType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PlayStartTask_PlayType_entries, PlayStartTask_PlayType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PlayStartTask_PlayType_strings[idx].get();
}

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

constexpr PlayStartTask_PlayType PlayStartTask::PLAY_TYPE_UNKNOWN;
constexpr PlayStartTask_PlayType PlayStartTask::HANDSET_ONLY;
constexpr PlayStartTask_PlayType PlayStartTask::SPEAKER_ONLY;
constexpr PlayStartTask_PlayType PlayStartTask::HANDSET_AND_SPEAKER;
constexpr PlayStartTask_PlayType PlayStartTask::SPEAKER_AND_HANDSET;
constexpr PlayStartTask_PlayType PlayStartTask::PlayType_MIN;
constexpr PlayStartTask_PlayType PlayStartTask::PlayType_MAX;
constexpr int PlayStartTask::PlayType_ARRAYSIZE;

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

class PrepareStartTask::_Internal {
 public:
};

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

    , decltype(_impl_.sound_file_uri_) {}

    , decltype(_impl_.device_id_) {}

    , decltype(_impl_.tact_play_duration_) {}

    , decltype(_impl_.tact_repeat_count_) {}

    , decltype(_impl_.play_repeat_count_) {}

    , decltype(_impl_.play_type_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_request_id().empty()) {
    _this->_impl_.request_id_.Set(from._internal_request_id(), _this->GetArenaForAllocation());
  }
  _impl_.sound_file_uri_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sound_file_uri_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sound_file_uri().empty()) {
    _this->_impl_.sound_file_uri_.Set(from._internal_sound_file_uri(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.device_id_, &from._impl_.device_id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.play_type_) -
    reinterpret_cast<char*>(&_impl_.device_id_)) + sizeof(_impl_.play_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PrepareStartTask)
}

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

    , decltype(_impl_.sound_file_uri_) {}

    , decltype(_impl_.device_id_) { 0 }

    , decltype(_impl_.tact_play_duration_) { 0 }

    , decltype(_impl_.tact_repeat_count_) { 0 }

    , decltype(_impl_.play_repeat_count_) { 0 }

    , decltype(_impl_.play_type_) { 0 }

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

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

inline void PrepareStartTask::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.request_id_.Destroy();
  _impl_.sound_file_uri_.Destroy();
}

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

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

  _impl_.request_id_.ClearToEmpty();
  _impl_.sound_file_uri_.ClearToEmpty();
  ::memset(&_impl_.device_id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.play_type_) -
      reinterpret_cast<char*>(&_impl_.device_id_)) + sizeof(_impl_.play_type_));
  _internal_metadata_.Clear<std::string>();
}

const char* PrepareStartTask::_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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_request_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_sound_file_uri();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.tact_play_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          _impl_.tact_repeat_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
          _impl_.play_repeat_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_play_type(static_cast<::keyapis::device::v1::PrepareStartTask_PlayType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    const std::string& _s = this->_internal_request_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PrepareStartTask.request_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_sound_file_uri().empty()) {
    const std::string& _s = this->_internal_sound_file_uri();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PrepareStartTask.sound_file_uri");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_device_id(), target);
  }

  // int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_play_duration() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_tact_play_duration(), target);
  }

  // int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_repeat_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        5, this->_internal_tact_repeat_count(), target);
  }

  // int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_repeat_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        6, this->_internal_play_repeat_count(), target);
  }

  // .keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        7, this->_internal_play_type(), target);
  }

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

::size_t PrepareStartTask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PrepareStartTask)
  ::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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_request_id());
  }

  // string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_sound_file_uri().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sound_file_uri());
  }

  // int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_id());
  }

  // int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_play_duration() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_tact_play_duration());
  }

  // int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_repeat_count() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_tact_repeat_count());
  }

  // int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_repeat_count() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_play_repeat_count());
  }

  // .keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_play_type());
  }

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

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

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

  if (!from._internal_request_id().empty()) {
    _this->_internal_set_request_id(from._internal_request_id());
  }
  if (!from._internal_sound_file_uri().empty()) {
    _this->_internal_set_sound_file_uri(from._internal_sound_file_uri());
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  if (from._internal_tact_play_duration() != 0) {
    _this->_internal_set_tact_play_duration(from._internal_tact_play_duration());
  }
  if (from._internal_tact_repeat_count() != 0) {
    _this->_internal_set_tact_repeat_count(from._internal_tact_repeat_count());
  }
  if (from._internal_play_repeat_count() != 0) {
    _this->_internal_set_play_repeat_count(from._internal_play_repeat_count());
  }
  if (from._internal_play_type() != 0) {
    _this->_internal_set_play_type(from._internal_play_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PrepareStartTask::InternalSwap(PrepareStartTask* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_id_, lhs_arena,
                                       &other->_impl_.request_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sound_file_uri_, lhs_arena,
                                       &other->_impl_.sound_file_uri_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PrepareStartTask, _impl_.play_type_)
      + sizeof(PrepareStartTask::_impl_.play_type_)
      - PROTOBUF_FIELD_OFFSET(PrepareStartTask, _impl_.device_id_)>(
          reinterpret_cast<char*>(&_impl_.device_id_),
          reinterpret_cast<char*>(&other->_impl_.device_id_));
}

std::string PrepareStartTask::GetTypeName() const {
  return "keyapis.device.v1.PrepareStartTask";
}

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

class PrepareStopTask::_Internal {
 public:
};

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

    , decltype(_impl_.device_id_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_request_id().empty()) {
    _this->_impl_.request_id_.Set(from._internal_request_id(), _this->GetArenaForAllocation());
  }
  _this->_impl_.device_id_ = from._impl_.device_id_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PrepareStopTask)
}

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

    , decltype(_impl_.device_id_) { 0 }

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

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

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

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

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

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

const char* PrepareStopTask::_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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_request_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.device_id_ = ::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* PrepareStopTask::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PrepareStopTask)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    const std::string& _s = this->_internal_request_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PrepareStopTask.request_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_device_id(), target);
  }

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

::size_t PrepareStopTask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PrepareStopTask)
  ::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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_request_id());
  }

  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_id());
  }

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

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

  if (!from._internal_request_id().empty()) {
    _this->_internal_set_request_id(from._internal_request_id());
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

std::string PrepareStopTask::GetTypeName() const {
  return "keyapis.device.v1.PrepareStopTask";
}

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

class PlayStartTask::_Internal {
 public:
  using HasBits = decltype(std::declval<PlayStartTask>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PlayStartTask, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& port(const PlayStartTask* msg);
  static void set_has_port(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& login(const PlayStartTask* msg);
  static void set_has_login(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& password(const PlayStartTask* msg);
  static void set_has_password(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Int32Value&
PlayStartTask::_Internal::port(const PlayStartTask* msg) {
  return *msg->_impl_.port_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
PlayStartTask::_Internal::login(const PlayStartTask* msg) {
  return *msg->_impl_.login_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
PlayStartTask::_Internal::password(const PlayStartTask* msg) {
  return *msg->_impl_.password_;
}
void PlayStartTask::clear_port() {
  if (_impl_.port_ != nullptr) _impl_.port_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void PlayStartTask::clear_login() {
  if (_impl_.login_ != nullptr) _impl_.login_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void PlayStartTask::clear_password() {
  if (_impl_.password_ != nullptr) _impl_.password_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
PlayStartTask::PlayStartTask(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PlayStartTask)
}
PlayStartTask::PlayStartTask(const PlayStartTask& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PlayStartTask* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.request_id_) {}

    , decltype(_impl_.sound_file_uri_) {}

    , decltype(_impl_.ip_address_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.device_id_) {}

    , decltype(_impl_.tact_play_duration_) {}

    , decltype(_impl_.tact_repeat_count_) {}

    , decltype(_impl_.play_repeat_count_) {}

    , decltype(_impl_.play_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_request_id().empty()) {
    _this->_impl_.request_id_.Set(from._internal_request_id(), _this->GetArenaForAllocation());
  }
  _impl_.sound_file_uri_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sound_file_uri_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sound_file_uri().empty()) {
    _this->_impl_.sound_file_uri_.Set(from._internal_sound_file_uri(), _this->GetArenaForAllocation());
  }
  _impl_.ip_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.ip_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_ip_address().empty()) {
    _this->_impl_.ip_address_.Set(from._internal_ip_address(), _this->GetArenaForAllocation());
  }
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_model().empty()) {
    _this->_impl_.model_.Set(from._internal_model(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.port_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.port_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.login_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.login_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.password_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.password_);
  }
  ::memcpy(&_impl_.device_id_, &from._impl_.device_id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.play_type_) -
    reinterpret_cast<char*>(&_impl_.device_id_)) + sizeof(_impl_.play_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PlayStartTask)
}

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

    , decltype(_impl_.sound_file_uri_) {}

    , decltype(_impl_.ip_address_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.device_id_) { 0 }

    , decltype(_impl_.tact_play_duration_) { 0 }

    , decltype(_impl_.tact_repeat_count_) { 0 }

    , decltype(_impl_.play_repeat_count_) { 0 }

    , decltype(_impl_.play_type_) { 0 }

  };
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.sound_file_uri_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sound_file_uri_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.ip_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.ip_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PlayStartTask::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.request_id_.Destroy();
  _impl_.sound_file_uri_.Destroy();
  _impl_.ip_address_.Destroy();
  _impl_.model_.Destroy();
  if (this != internal_default_instance()) delete _impl_.port_;
  if (this != internal_default_instance()) delete _impl_.login_;
  if (this != internal_default_instance()) delete _impl_.password_;
}

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

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

  _impl_.request_id_.ClearToEmpty();
  _impl_.sound_file_uri_.ClearToEmpty();
  _impl_.ip_address_.ClearToEmpty();
  _impl_.model_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.port_ != nullptr);
      _impl_.port_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.login_ != nullptr);
      _impl_.login_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.password_ != nullptr);
      _impl_.password_->Clear();
    }
  }
  ::memset(&_impl_.device_id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.play_type_) -
      reinterpret_cast<char*>(&_impl_.device_id_)) + sizeof(_impl_.play_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PlayStartTask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_request_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string sound_file_uri = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_sound_file_uri();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_ip_address();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value port = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_port(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string model = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_model();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 tact_play_duration = 7 [(.google.api.field_behavior) = REQUIRED];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
          _impl_.tact_play_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 tact_repeat_count = 8 [(.google.api.field_behavior) = REQUIRED];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
          _impl_.tact_repeat_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 play_repeat_count = 9 [(.google.api.field_behavior) = REQUIRED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
          _impl_.play_repeat_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.device.v1.PlayStartTask.PlayType play_type = 10 [(.google.api.field_behavior) = REQUIRED];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_play_type(static_cast<::keyapis::device::v1::PlayStartTask_PlayType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue login = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_login(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue password = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_password(), 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* PlayStartTask::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PlayStartTask)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    const std::string& _s = this->_internal_request_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStartTask.request_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_device_id(), target);
  }

  // string sound_file_uri = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_sound_file_uri().empty()) {
    const std::string& _s = this->_internal_sound_file_uri();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStartTask.sound_file_uri");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_ip_address().empty()) {
    const std::string& _s = this->_internal_ip_address();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStartTask.ip_address");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.Int32Value port = 5;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::port(this),
        _Internal::port(this).GetCachedSize(), target, stream);
  }

  // string model = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_model().empty()) {
    const std::string& _s = this->_internal_model();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStartTask.model");
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // int32 tact_play_duration = 7 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_play_duration() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        7, this->_internal_tact_play_duration(), target);
  }

  // int32 tact_repeat_count = 8 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_repeat_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        8, this->_internal_tact_repeat_count(), target);
  }

  // int32 play_repeat_count = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_repeat_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        9, this->_internal_play_repeat_count(), target);
  }

  // .keyapis.device.v1.PlayStartTask.PlayType play_type = 10 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        10, this->_internal_play_type(), target);
  }

  // .google.protobuf.StringValue login = 11;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::login(this),
        _Internal::login(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue password = 12;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::password(this),
        _Internal::password(this).GetCachedSize(), target, stream);
  }

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

::size_t PlayStartTask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PlayStartTask)
  ::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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_request_id());
  }

  // string sound_file_uri = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_sound_file_uri().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sound_file_uri());
  }

  // string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_ip_address().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_ip_address());
  }

  // string model = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_model().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_model());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // .google.protobuf.Int32Value port = 5;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.port_);
    }

    // .google.protobuf.StringValue login = 11;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.login_);
    }

    // .google.protobuf.StringValue password = 12;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.password_);
    }

  }
  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_id());
  }

  // int32 tact_play_duration = 7 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_play_duration() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_tact_play_duration());
  }

  // int32 tact_repeat_count = 8 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_tact_repeat_count() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_tact_repeat_count());
  }

  // int32 play_repeat_count = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_repeat_count() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_play_repeat_count());
  }

  // .keyapis.device.v1.PlayStartTask.PlayType play_type = 10 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_play_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_play_type());
  }

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

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

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

  if (!from._internal_request_id().empty()) {
    _this->_internal_set_request_id(from._internal_request_id());
  }
  if (!from._internal_sound_file_uri().empty()) {
    _this->_internal_set_sound_file_uri(from._internal_sound_file_uri());
  }
  if (!from._internal_ip_address().empty()) {
    _this->_internal_set_ip_address(from._internal_ip_address());
  }
  if (!from._internal_model().empty()) {
    _this->_internal_set_model(from._internal_model());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_port()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_port());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_login()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_login());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_password()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_password());
    }
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  if (from._internal_tact_play_duration() != 0) {
    _this->_internal_set_tact_play_duration(from._internal_tact_play_duration());
  }
  if (from._internal_tact_repeat_count() != 0) {
    _this->_internal_set_tact_repeat_count(from._internal_tact_repeat_count());
  }
  if (from._internal_play_repeat_count() != 0) {
    _this->_internal_set_play_repeat_count(from._internal_play_repeat_count());
  }
  if (from._internal_play_type() != 0) {
    _this->_internal_set_play_type(from._internal_play_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PlayStartTask::InternalSwap(PlayStartTask* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_id_, lhs_arena,
                                       &other->_impl_.request_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sound_file_uri_, lhs_arena,
                                       &other->_impl_.sound_file_uri_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ip_address_, lhs_arena,
                                       &other->_impl_.ip_address_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.model_, lhs_arena,
                                       &other->_impl_.model_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PlayStartTask, _impl_.play_type_)
      + sizeof(PlayStartTask::_impl_.play_type_)
      - PROTOBUF_FIELD_OFFSET(PlayStartTask, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string PlayStartTask::GetTypeName() const {
  return "keyapis.device.v1.PlayStartTask";
}

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

class PlayStopTask::_Internal {
 public:
  using HasBits = decltype(std::declval<PlayStopTask>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PlayStopTask, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& port(const PlayStopTask* msg);
  static void set_has_port(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& login(const PlayStopTask* msg);
  static void set_has_login(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& password(const PlayStopTask* msg);
  static void set_has_password(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Int32Value&
PlayStopTask::_Internal::port(const PlayStopTask* msg) {
  return *msg->_impl_.port_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
PlayStopTask::_Internal::login(const PlayStopTask* msg) {
  return *msg->_impl_.login_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
PlayStopTask::_Internal::password(const PlayStopTask* msg) {
  return *msg->_impl_.password_;
}
void PlayStopTask::clear_port() {
  if (_impl_.port_ != nullptr) _impl_.port_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void PlayStopTask::clear_login() {
  if (_impl_.login_ != nullptr) _impl_.login_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void PlayStopTask::clear_password() {
  if (_impl_.password_ != nullptr) _impl_.password_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
PlayStopTask::PlayStopTask(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.device.v1.PlayStopTask)
}
PlayStopTask::PlayStopTask(const PlayStopTask& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PlayStopTask* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.request_id_) {}

    , decltype(_impl_.ip_address_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.device_id_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_request_id().empty()) {
    _this->_impl_.request_id_.Set(from._internal_request_id(), _this->GetArenaForAllocation());
  }
  _impl_.ip_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.ip_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_ip_address().empty()) {
    _this->_impl_.ip_address_.Set(from._internal_ip_address(), _this->GetArenaForAllocation());
  }
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_model().empty()) {
    _this->_impl_.model_.Set(from._internal_model(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.port_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.port_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.login_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.login_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.password_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.password_);
  }
  _this->_impl_.device_id_ = from._impl_.device_id_;
  // @@protoc_insertion_point(copy_constructor:keyapis.device.v1.PlayStopTask)
}

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

    , decltype(_impl_.ip_address_) {}

    , decltype(_impl_.model_) {}

    , decltype(_impl_.port_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.device_id_) { 0 }

  };
  _impl_.request_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.request_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.ip_address_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.ip_address_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.model_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.model_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PlayStopTask::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.request_id_.Destroy();
  _impl_.ip_address_.Destroy();
  _impl_.model_.Destroy();
  if (this != internal_default_instance()) delete _impl_.port_;
  if (this != internal_default_instance()) delete _impl_.login_;
  if (this != internal_default_instance()) delete _impl_.password_;
}

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

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

  _impl_.request_id_.ClearToEmpty();
  _impl_.ip_address_.ClearToEmpty();
  _impl_.model_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.port_ != nullptr);
      _impl_.port_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.login_ != nullptr);
      _impl_.login_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.password_ != nullptr);
      _impl_.password_->Clear();
    }
  }
  _impl_.device_id_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PlayStopTask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_request_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string ip_address = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_ip_address();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value port = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_port(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string model = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_model();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue login = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_login(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue password = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_password(), 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* PlayStopTask::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.device.v1.PlayStopTask)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    const std::string& _s = this->_internal_request_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStopTask.request_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_device_id(), target);
  }

  // string ip_address = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_ip_address().empty()) {
    const std::string& _s = this->_internal_ip_address();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStopTask.ip_address");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.Int32Value port = 4;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::port(this),
        _Internal::port(this).GetCachedSize(), target, stream);
  }

  // string model = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_model().empty()) {
    const std::string& _s = this->_internal_model();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.device.v1.PlayStopTask.model");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  // .google.protobuf.StringValue login = 6;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::login(this),
        _Internal::login(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue password = 7;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::password(this),
        _Internal::password(this).GetCachedSize(), target, stream);
  }

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

::size_t PlayStopTask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.device.v1.PlayStopTask)
  ::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 request_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_request_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_request_id());
  }

  // string ip_address = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_ip_address().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_ip_address());
  }

  // string model = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_model().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_model());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // .google.protobuf.Int32Value port = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.port_);
    }

    // .google.protobuf.StringValue login = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.login_);
    }

    // .google.protobuf.StringValue password = 7;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.password_);
    }

  }
  // int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_device_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_device_id());
  }

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

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

  if (!from._internal_request_id().empty()) {
    _this->_internal_set_request_id(from._internal_request_id());
  }
  if (!from._internal_ip_address().empty()) {
    _this->_internal_set_ip_address(from._internal_ip_address());
  }
  if (!from._internal_model().empty()) {
    _this->_internal_set_model(from._internal_model());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_port()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_port());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_login()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_login());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_password()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_password());
    }
  }
  if (from._internal_device_id() != 0) {
    _this->_internal_set_device_id(from._internal_device_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PlayStopTask::InternalSwap(PlayStopTask* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_id_, lhs_arena,
                                       &other->_impl_.request_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ip_address_, lhs_arena,
                                       &other->_impl_.ip_address_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.model_, lhs_arena,
                                       &other->_impl_.model_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PlayStopTask, _impl_.device_id_)
      + sizeof(PlayStopTask::_impl_.device_id_)
      - PROTOBUF_FIELD_OFFSET(PlayStopTask, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string PlayStopTask::GetTypeName() const {
  return "keyapis.device.v1.PlayStopTask";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PrepareStartTask*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PrepareStartTask >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PrepareStartTask >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PrepareStopTask*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PrepareStopTask >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PrepareStopTask >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PlayStartTask*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PlayStartTask >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PlayStartTask >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::device::v1::PlayStopTask*
Arena::CreateMaybeMessage< ::keyapis::device::v1::PlayStopTask >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::device::v1::PlayStopTask >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
