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

#include "deviceapis/device/v1/deviceapis_device_dtmf_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 DtmfSettings::DtmfSettings(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.is_rfc_on_)*/ false

  , /*decltype(_impl_.is_inbound_on_)*/ false

  , /*decltype(_impl_.is_sipinfo_on_)*/ false

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DtmfSettingsDefaultTypeInternal _DtmfSettings_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditDtmfSettingsRequest::EditDtmfSettingsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr
  , /*decltype(_impl_.update_mask_)*/nullptr} {}
struct EditDtmfSettingsRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditDtmfSettingsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditDtmfSettingsRequestDefaultTypeInternal() {}
  union {
    EditDtmfSettingsRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditDtmfSettingsRequestDefaultTypeInternal _EditDtmfSettingsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditDtmfSettingsResponse_Error::EditDtmfSettingsResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditDtmfSettingsResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditDtmfSettingsResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditDtmfSettingsResponse_ErrorDefaultTypeInternal() {}
  union {
    EditDtmfSettingsResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditDtmfSettingsResponse_ErrorDefaultTypeInternal _EditDtmfSettingsResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR EditDtmfSettingsResponse::EditDtmfSettingsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct EditDtmfSettingsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EditDtmfSettingsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EditDtmfSettingsResponseDefaultTypeInternal() {}
  union {
    EditDtmfSettingsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EditDtmfSettingsResponseDefaultTypeInternal _EditDtmfSettingsResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDtmfSettingsRequest::GetDtmfSettingsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetDtmfSettingsRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDtmfSettingsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDtmfSettingsRequestDefaultTypeInternal() {}
  union {
    GetDtmfSettingsRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDtmfSettingsRequestDefaultTypeInternal _GetDtmfSettingsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetDtmfSettingsResponse::GetDtmfSettingsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetDtmfSettingsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetDtmfSettingsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetDtmfSettingsResponseDefaultTypeInternal() {}
  union {
    GetDtmfSettingsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetDtmfSettingsResponseDefaultTypeInternal _GetDtmfSettingsResponse_default_instance_;
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
namespace deviceapis {
namespace device {
namespace v1 {
// ===================================================================

class DtmfSettings::_Internal {
 public:
};

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

inline void DtmfSettings::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.is_rfc_on_) { false }

    , decltype(_impl_.is_inbound_on_) { false }

    , decltype(_impl_.is_sipinfo_on_) { false }

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

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

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

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

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

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

const char* DtmfSettings::_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) {
      // bool is_rfc_on = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.is_rfc_on_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_inbound_on = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.is_inbound_on_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_sipinfo_on = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.is_sipinfo_on_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool is_rfc_on = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_rfc_on() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this->_internal_is_rfc_on(), target);
  }

  // bool is_inbound_on = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_inbound_on() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        2, this->_internal_is_inbound_on(), target);
  }

  // bool is_sipinfo_on = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_sipinfo_on() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        3, this->_internal_is_sipinfo_on(), 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.DtmfSettings)
  return target;
}

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

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

  // bool is_rfc_on = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_rfc_on() != 0) {
    total_size += 2;
  }

  // bool is_inbound_on = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_inbound_on() != 0) {
    total_size += 2;
  }

  // bool is_sipinfo_on = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
  if (this->_internal_is_sipinfo_on() != 0) {
    total_size += 2;
  }

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

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

  if (from._internal_is_rfc_on() != 0) {
    _this->_internal_set_is_rfc_on(from._internal_is_rfc_on());
  }
  if (from._internal_is_inbound_on() != 0) {
    _this->_internal_set_is_inbound_on(from._internal_is_inbound_on());
  }
  if (from._internal_is_sipinfo_on() != 0) {
    _this->_internal_set_is_sipinfo_on(from._internal_is_sipinfo_on());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

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

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

const ::deviceapis::device::v1::DtmfSettings&
EditDtmfSettingsRequest::_Internal::data(const EditDtmfSettingsRequest* msg) {
  return *msg->_impl_.data_;
}
const ::PROTOBUF_NAMESPACE_ID::FieldMask&
EditDtmfSettingsRequest::_Internal::update_mask(const EditDtmfSettingsRequest* msg) {
  return *msg->_impl_.update_mask_;
}
void EditDtmfSettingsRequest::clear_update_mask() {
  if (_impl_.update_mask_ != nullptr) _impl_.update_mask_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
EditDtmfSettingsRequest::EditDtmfSettingsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:deviceapis.device.v1.EditDtmfSettingsRequest)
}
EditDtmfSettingsRequest::EditDtmfSettingsRequest(const EditDtmfSettingsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  EditDtmfSettingsRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}
    , decltype(_impl_.update_mask_){nullptr}};

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

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

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

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

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

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

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

const char* EditDtmfSettingsRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .deviceapis.device.v1.DtmfSettings data = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.FieldMask update_mask = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_mask(), 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* EditDtmfSettingsRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:deviceapis.device.v1.EditDtmfSettingsRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // .google.protobuf.FieldMask update_mask = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::update_mask(this),
        _Internal::update_mask(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.EditDtmfSettingsRequest)
  return target;
}

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

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

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

    // .google.protobuf.FieldMask update_mask = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.update_mask_);
    }

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

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_data()->::deviceapis::device::v1::DtmfSettings::MergeFrom(
          from._internal_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_update_mask()->::PROTOBUF_NAMESPACE_ID::FieldMask::MergeFrom(
          from._internal_update_mask());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void EditDtmfSettingsRequest::InternalSwap(EditDtmfSettingsRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(EditDtmfSettingsRequest, _impl_.update_mask_)
      + sizeof(EditDtmfSettingsRequest::_impl_.update_mask_)
      - PROTOBUF_FIELD_OFFSET(EditDtmfSettingsRequest, _impl_.data_)>(
          reinterpret_cast<char*>(&_impl_.data_),
          reinterpret_cast<char*>(&other->_impl_.data_));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class GetDtmfSettingsRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


void GetDtmfSettingsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:deviceapis.device.v1.GetDtmfSettingsResponse)
  ::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* GetDtmfSettingsResponse::_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.DtmfSettings data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

::size_t GetDtmfSettingsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:deviceapis.device.v1.GetDtmfSettingsResponse)
  ::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.DtmfSettings data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace device
}  // namespace deviceapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::DtmfSettings*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::DtmfSettings >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::DtmfSettings >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditDtmfSettingsRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditDtmfSettingsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditDtmfSettingsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditDtmfSettingsResponse_Error*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditDtmfSettingsResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditDtmfSettingsResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::EditDtmfSettingsResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::EditDtmfSettingsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::EditDtmfSettingsResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetDtmfSettingsRequest*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetDtmfSettingsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetDtmfSettingsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::deviceapis::device::v1::GetDtmfSettingsResponse*
Arena::CreateMaybeMessage< ::deviceapis::device::v1::GetDtmfSettingsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::deviceapis::device::v1::GetDtmfSettingsResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
