// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: NonMaximumSuppression.proto

#include "NonMaximumSuppression.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)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace CoreML {
namespace Specification {
constexpr NonMaximumSuppression_PickTop::NonMaximumSuppression_PickTop(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : perclass_(false){}
struct NonMaximumSuppression_PickTopDefaultTypeInternal {
  constexpr NonMaximumSuppression_PickTopDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NonMaximumSuppression_PickTopDefaultTypeInternal() {}
  union {
    NonMaximumSuppression_PickTop _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NonMaximumSuppression_PickTopDefaultTypeInternal _NonMaximumSuppression_PickTop_default_instance_;
constexpr NonMaximumSuppression::NonMaximumSuppression(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : confidenceinputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , coordinatesinputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , iouthresholdinputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , confidencethresholdinputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , confidenceoutputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , coordinatesoutputfeaturename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , iouthreshold_(0)
  , confidencethreshold_(0)
  , _oneof_case_{}{}
struct NonMaximumSuppressionDefaultTypeInternal {
  constexpr NonMaximumSuppressionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NonMaximumSuppressionDefaultTypeInternal() {}
  union {
    NonMaximumSuppression _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NonMaximumSuppressionDefaultTypeInternal _NonMaximumSuppression_default_instance_;
}  // namespace Specification
}  // namespace CoreML
namespace CoreML {
namespace Specification {

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

class NonMaximumSuppression_PickTop::_Internal {
 public:
};

NonMaximumSuppression_PickTop::NonMaximumSuppression_PickTop(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:CoreML.Specification.NonMaximumSuppression.PickTop)
}
NonMaximumSuppression_PickTop::NonMaximumSuppression_PickTop(const NonMaximumSuppression_PickTop& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  perclass_ = from.perclass_;
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.NonMaximumSuppression.PickTop)
}

inline void NonMaximumSuppression_PickTop::SharedCtor() {
perclass_ = false;
}

NonMaximumSuppression_PickTop::~NonMaximumSuppression_PickTop() {
  // @@protoc_insertion_point(destructor:CoreML.Specification.NonMaximumSuppression.PickTop)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void NonMaximumSuppression_PickTop::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void NonMaximumSuppression_PickTop::ArenaDtor(void* object) {
  NonMaximumSuppression_PickTop* _this = reinterpret_cast< NonMaximumSuppression_PickTop* >(object);
  (void)_this;
}
void NonMaximumSuppression_PickTop::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NonMaximumSuppression_PickTop::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void NonMaximumSuppression_PickTop::Clear() {
// @@protoc_insertion_point(message_clear_start:CoreML.Specification.NonMaximumSuppression.PickTop)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  perclass_ = false;
  _internal_metadata_.Clear<std::string>();
}

const char* NonMaximumSuppression_PickTop::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool perClass = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          perclass_ = ::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* NonMaximumSuppression_PickTop::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.NonMaximumSuppression.PickTop)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // bool perClass = 1;
  if (this->_internal_perclass() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_perclass(), 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:CoreML.Specification.NonMaximumSuppression.PickTop)
  return target;
}

size_t NonMaximumSuppression_PickTop::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.NonMaximumSuppression.PickTop)
  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 perClass = 1;
  if (this->_internal_perclass() != 0) {
    total_size += 1 + 1;
  }

  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 = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void NonMaximumSuppression_PickTop::MergeFrom(const NonMaximumSuppression_PickTop& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:CoreML.Specification.NonMaximumSuppression.PickTop)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_perclass() != 0) {
    _internal_set_perclass(from._internal_perclass());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void NonMaximumSuppression_PickTop::CopyFrom(const NonMaximumSuppression_PickTop& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:CoreML.Specification.NonMaximumSuppression.PickTop)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string NonMaximumSuppression_PickTop::GetTypeName() const {
  return "CoreML.Specification.NonMaximumSuppression.PickTop";
}


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

class NonMaximumSuppression::_Internal {
 public:
  static const ::CoreML::Specification::NonMaximumSuppression_PickTop& picktop(const NonMaximumSuppression* msg);
  static const ::CoreML::Specification::StringVector& stringclasslabels(const NonMaximumSuppression* msg);
  static const ::CoreML::Specification::Int64Vector& int64classlabels(const NonMaximumSuppression* msg);
};

const ::CoreML::Specification::NonMaximumSuppression_PickTop&
NonMaximumSuppression::_Internal::picktop(const NonMaximumSuppression* msg) {
  return *msg->SuppressionMethod_.picktop_;
}
const ::CoreML::Specification::StringVector&
NonMaximumSuppression::_Internal::stringclasslabels(const NonMaximumSuppression* msg) {
  return *msg->ClassLabels_.stringclasslabels_;
}
const ::CoreML::Specification::Int64Vector&
NonMaximumSuppression::_Internal::int64classlabels(const NonMaximumSuppression* msg) {
  return *msg->ClassLabels_.int64classlabels_;
}
void NonMaximumSuppression::set_allocated_picktop(::CoreML::Specification::NonMaximumSuppression_PickTop* picktop) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_SuppressionMethod();
  if (picktop) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::CoreML::Specification::NonMaximumSuppression_PickTop>::GetOwningArena(picktop);
    if (message_arena != submessage_arena) {
      picktop = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, picktop, submessage_arena);
    }
    set_has_picktop();
    SuppressionMethod_.picktop_ = picktop;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.NonMaximumSuppression.pickTop)
}
void NonMaximumSuppression::set_allocated_stringclasslabels(::CoreML::Specification::StringVector* stringclasslabels) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ClassLabels();
  if (stringclasslabels) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(stringclasslabels));
    if (message_arena != submessage_arena) {
      stringclasslabels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, stringclasslabels, submessage_arena);
    }
    set_has_stringclasslabels();
    ClassLabels_.stringclasslabels_ = stringclasslabels;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.NonMaximumSuppression.stringClassLabels)
}
void NonMaximumSuppression::clear_stringclasslabels() {
  if (_internal_has_stringclasslabels()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ClassLabels_.stringclasslabels_;
    }
    clear_has_ClassLabels();
  }
}
void NonMaximumSuppression::set_allocated_int64classlabels(::CoreML::Specification::Int64Vector* int64classlabels) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ClassLabels();
  if (int64classlabels) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(int64classlabels));
    if (message_arena != submessage_arena) {
      int64classlabels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, int64classlabels, submessage_arena);
    }
    set_has_int64classlabels();
    ClassLabels_.int64classlabels_ = int64classlabels;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.NonMaximumSuppression.int64ClassLabels)
}
void NonMaximumSuppression::clear_int64classlabels() {
  if (_internal_has_int64classlabels()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ClassLabels_.int64classlabels_;
    }
    clear_has_ClassLabels();
  }
}
NonMaximumSuppression::NonMaximumSuppression(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:CoreML.Specification.NonMaximumSuppression)
}
NonMaximumSuppression::NonMaximumSuppression(const NonMaximumSuppression& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  confidenceinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    confidenceinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_confidenceinputfeaturename().empty()) {
    confidenceinputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_confidenceinputfeaturename(), 
      GetArenaForAllocation());
  }
  coordinatesinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    coordinatesinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_coordinatesinputfeaturename().empty()) {
    coordinatesinputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_coordinatesinputfeaturename(), 
      GetArenaForAllocation());
  }
  iouthresholdinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    iouthresholdinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_iouthresholdinputfeaturename().empty()) {
    iouthresholdinputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_iouthresholdinputfeaturename(), 
      GetArenaForAllocation());
  }
  confidencethresholdinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    confidencethresholdinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_confidencethresholdinputfeaturename().empty()) {
    confidencethresholdinputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_confidencethresholdinputfeaturename(), 
      GetArenaForAllocation());
  }
  confidenceoutputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    confidenceoutputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_confidenceoutputfeaturename().empty()) {
    confidenceoutputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_confidenceoutputfeaturename(), 
      GetArenaForAllocation());
  }
  coordinatesoutputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    coordinatesoutputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_coordinatesoutputfeaturename().empty()) {
    coordinatesoutputfeaturename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_coordinatesoutputfeaturename(), 
      GetArenaForAllocation());
  }
  ::memcpy(&iouthreshold_, &from.iouthreshold_,
    static_cast<size_t>(reinterpret_cast<char*>(&confidencethreshold_) -
    reinterpret_cast<char*>(&iouthreshold_)) + sizeof(confidencethreshold_));
  clear_has_SuppressionMethod();
  switch (from.SuppressionMethod_case()) {
    case kPickTop: {
      _internal_mutable_picktop()->::CoreML::Specification::NonMaximumSuppression_PickTop::MergeFrom(from._internal_picktop());
      break;
    }
    case SUPPRESSIONMETHOD_NOT_SET: {
      break;
    }
  }
  clear_has_ClassLabels();
  switch (from.ClassLabels_case()) {
    case kStringClassLabels: {
      _internal_mutable_stringclasslabels()->::CoreML::Specification::StringVector::MergeFrom(from._internal_stringclasslabels());
      break;
    }
    case kInt64ClassLabels: {
      _internal_mutable_int64classlabels()->::CoreML::Specification::Int64Vector::MergeFrom(from._internal_int64classlabels());
      break;
    }
    case CLASSLABELS_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.NonMaximumSuppression)
}

inline void NonMaximumSuppression::SharedCtor() {
confidenceinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  confidenceinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
coordinatesinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  coordinatesinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
iouthresholdinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  iouthresholdinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
confidencethresholdinputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  confidencethresholdinputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
confidenceoutputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  confidenceoutputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
coordinatesoutputfeaturename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  coordinatesoutputfeaturename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&iouthreshold_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&confidencethreshold_) -
    reinterpret_cast<char*>(&iouthreshold_)) + sizeof(confidencethreshold_));
clear_has_SuppressionMethod();
clear_has_ClassLabels();
}

NonMaximumSuppression::~NonMaximumSuppression() {
  // @@protoc_insertion_point(destructor:CoreML.Specification.NonMaximumSuppression)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void NonMaximumSuppression::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  confidenceinputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  coordinatesinputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  iouthresholdinputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  confidencethresholdinputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  confidenceoutputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  coordinatesoutputfeaturename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_SuppressionMethod()) {
    clear_SuppressionMethod();
  }
  if (has_ClassLabels()) {
    clear_ClassLabels();
  }
}

void NonMaximumSuppression::ArenaDtor(void* object) {
  NonMaximumSuppression* _this = reinterpret_cast< NonMaximumSuppression* >(object);
  (void)_this;
}
void NonMaximumSuppression::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NonMaximumSuppression::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void NonMaximumSuppression::clear_SuppressionMethod() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.NonMaximumSuppression)
  switch (SuppressionMethod_case()) {
    case kPickTop: {
      if (GetArenaForAllocation() == nullptr) {
        delete SuppressionMethod_.picktop_;
      }
      break;
    }
    case SUPPRESSIONMETHOD_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = SUPPRESSIONMETHOD_NOT_SET;
}

void NonMaximumSuppression::clear_ClassLabels() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.NonMaximumSuppression)
  switch (ClassLabels_case()) {
    case kStringClassLabels: {
      if (GetArenaForAllocation() == nullptr) {
        delete ClassLabels_.stringclasslabels_;
      }
      break;
    }
    case kInt64ClassLabels: {
      if (GetArenaForAllocation() == nullptr) {
        delete ClassLabels_.int64classlabels_;
      }
      break;
    }
    case CLASSLABELS_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = CLASSLABELS_NOT_SET;
}


void NonMaximumSuppression::Clear() {
// @@protoc_insertion_point(message_clear_start:CoreML.Specification.NonMaximumSuppression)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  confidenceinputfeaturename_.ClearToEmpty();
  coordinatesinputfeaturename_.ClearToEmpty();
  iouthresholdinputfeaturename_.ClearToEmpty();
  confidencethresholdinputfeaturename_.ClearToEmpty();
  confidenceoutputfeaturename_.ClearToEmpty();
  coordinatesoutputfeaturename_.ClearToEmpty();
  ::memset(&iouthreshold_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&confidencethreshold_) -
      reinterpret_cast<char*>(&iouthreshold_)) + sizeof(confidencethreshold_));
  clear_SuppressionMethod();
  clear_ClassLabels();
  _internal_metadata_.Clear<std::string>();
}

const char* NonMaximumSuppression::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .CoreML.Specification.NonMaximumSuppression.PickTop pickTop = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_picktop(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.StringVector stringClassLabels = 100;
      case 100:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_stringclasslabels(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.Int64Vector int64ClassLabels = 101;
      case 101:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_int64classlabels(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // double iouThreshold = 110;
      case 110:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 113)) {
          iouthreshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // double confidenceThreshold = 111;
      case 111:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 121)) {
          confidencethreshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // string confidenceInputFeatureName = 200;
      case 200:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_confidenceinputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string coordinatesInputFeatureName = 201;
      case 201:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          auto str = _internal_mutable_coordinatesinputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string iouThresholdInputFeatureName = 202;
      case 202:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_iouthresholdinputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string confidenceThresholdInputFeatureName = 203;
      case 203:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          auto str = _internal_mutable_confidencethresholdinputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string confidenceOutputFeatureName = 210;
      case 210:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          auto str = _internal_mutable_confidenceoutputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string coordinatesOutputFeatureName = 211;
      case 211:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          auto str = _internal_mutable_coordinatesoutputfeaturename();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          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* NonMaximumSuppression::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.NonMaximumSuppression)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .CoreML.Specification.NonMaximumSuppression.PickTop pickTop = 1;
  if (_internal_has_picktop()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::picktop(this), target, stream);
  }

  // .CoreML.Specification.StringVector stringClassLabels = 100;
  if (_internal_has_stringclasslabels()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        100, _Internal::stringclasslabels(this), target, stream);
  }

  // .CoreML.Specification.Int64Vector int64ClassLabels = 101;
  if (_internal_has_int64classlabels()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        101, _Internal::int64classlabels(this), target, stream);
  }

  // double iouThreshold = 110;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_iouthreshold = this->_internal_iouthreshold();
  uint64_t raw_iouthreshold;
  memcpy(&raw_iouthreshold, &tmp_iouthreshold, sizeof(tmp_iouthreshold));
  if (raw_iouthreshold != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(110, this->_internal_iouthreshold(), target);
  }

  // double confidenceThreshold = 111;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_confidencethreshold = this->_internal_confidencethreshold();
  uint64_t raw_confidencethreshold;
  memcpy(&raw_confidencethreshold, &tmp_confidencethreshold, sizeof(tmp_confidencethreshold));
  if (raw_confidencethreshold != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(111, this->_internal_confidencethreshold(), target);
  }

  // string confidenceInputFeatureName = 200;
  if (!this->_internal_confidenceinputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_confidenceinputfeaturename().data(), static_cast<int>(this->_internal_confidenceinputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.confidenceInputFeatureName");
    target = stream->WriteStringMaybeAliased(
        200, this->_internal_confidenceinputfeaturename(), target);
  }

  // string coordinatesInputFeatureName = 201;
  if (!this->_internal_coordinatesinputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_coordinatesinputfeaturename().data(), static_cast<int>(this->_internal_coordinatesinputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.coordinatesInputFeatureName");
    target = stream->WriteStringMaybeAliased(
        201, this->_internal_coordinatesinputfeaturename(), target);
  }

  // string iouThresholdInputFeatureName = 202;
  if (!this->_internal_iouthresholdinputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_iouthresholdinputfeaturename().data(), static_cast<int>(this->_internal_iouthresholdinputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.iouThresholdInputFeatureName");
    target = stream->WriteStringMaybeAliased(
        202, this->_internal_iouthresholdinputfeaturename(), target);
  }

  // string confidenceThresholdInputFeatureName = 203;
  if (!this->_internal_confidencethresholdinputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_confidencethresholdinputfeaturename().data(), static_cast<int>(this->_internal_confidencethresholdinputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.confidenceThresholdInputFeatureName");
    target = stream->WriteStringMaybeAliased(
        203, this->_internal_confidencethresholdinputfeaturename(), target);
  }

  // string confidenceOutputFeatureName = 210;
  if (!this->_internal_confidenceoutputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_confidenceoutputfeaturename().data(), static_cast<int>(this->_internal_confidenceoutputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.confidenceOutputFeatureName");
    target = stream->WriteStringMaybeAliased(
        210, this->_internal_confidenceoutputfeaturename(), target);
  }

  // string coordinatesOutputFeatureName = 211;
  if (!this->_internal_coordinatesoutputfeaturename().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_coordinatesoutputfeaturename().data(), static_cast<int>(this->_internal_coordinatesoutputfeaturename().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.NonMaximumSuppression.coordinatesOutputFeatureName");
    target = stream->WriteStringMaybeAliased(
        211, this->_internal_coordinatesoutputfeaturename(), 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:CoreML.Specification.NonMaximumSuppression)
  return target;
}

size_t NonMaximumSuppression::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.NonMaximumSuppression)
  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 confidenceInputFeatureName = 200;
  if (!this->_internal_confidenceinputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_confidenceinputfeaturename());
  }

  // string coordinatesInputFeatureName = 201;
  if (!this->_internal_coordinatesinputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_coordinatesinputfeaturename());
  }

  // string iouThresholdInputFeatureName = 202;
  if (!this->_internal_iouthresholdinputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_iouthresholdinputfeaturename());
  }

  // string confidenceThresholdInputFeatureName = 203;
  if (!this->_internal_confidencethresholdinputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_confidencethresholdinputfeaturename());
  }

  // string confidenceOutputFeatureName = 210;
  if (!this->_internal_confidenceoutputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_confidenceoutputfeaturename());
  }

  // string coordinatesOutputFeatureName = 211;
  if (!this->_internal_coordinatesoutputfeaturename().empty()) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_coordinatesoutputfeaturename());
  }

  // double iouThreshold = 110;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_iouthreshold = this->_internal_iouthreshold();
  uint64_t raw_iouthreshold;
  memcpy(&raw_iouthreshold, &tmp_iouthreshold, sizeof(tmp_iouthreshold));
  if (raw_iouthreshold != 0) {
    total_size += 2 + 8;
  }

  // double confidenceThreshold = 111;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_confidencethreshold = this->_internal_confidencethreshold();
  uint64_t raw_confidencethreshold;
  memcpy(&raw_confidencethreshold, &tmp_confidencethreshold, sizeof(tmp_confidencethreshold));
  if (raw_confidencethreshold != 0) {
    total_size += 2 + 8;
  }

  switch (SuppressionMethod_case()) {
    // .CoreML.Specification.NonMaximumSuppression.PickTop pickTop = 1;
    case kPickTop: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *SuppressionMethod_.picktop_);
      break;
    }
    case SUPPRESSIONMETHOD_NOT_SET: {
      break;
    }
  }
  switch (ClassLabels_case()) {
    // .CoreML.Specification.StringVector stringClassLabels = 100;
    case kStringClassLabels: {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ClassLabels_.stringclasslabels_);
      break;
    }
    // .CoreML.Specification.Int64Vector int64ClassLabels = 101;
    case kInt64ClassLabels: {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ClassLabels_.int64classlabels_);
      break;
    }
    case CLASSLABELS_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 = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void NonMaximumSuppression::MergeFrom(const NonMaximumSuppression& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:CoreML.Specification.NonMaximumSuppression)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_confidenceinputfeaturename().empty()) {
    _internal_set_confidenceinputfeaturename(from._internal_confidenceinputfeaturename());
  }
  if (!from._internal_coordinatesinputfeaturename().empty()) {
    _internal_set_coordinatesinputfeaturename(from._internal_coordinatesinputfeaturename());
  }
  if (!from._internal_iouthresholdinputfeaturename().empty()) {
    _internal_set_iouthresholdinputfeaturename(from._internal_iouthresholdinputfeaturename());
  }
  if (!from._internal_confidencethresholdinputfeaturename().empty()) {
    _internal_set_confidencethresholdinputfeaturename(from._internal_confidencethresholdinputfeaturename());
  }
  if (!from._internal_confidenceoutputfeaturename().empty()) {
    _internal_set_confidenceoutputfeaturename(from._internal_confidenceoutputfeaturename());
  }
  if (!from._internal_coordinatesoutputfeaturename().empty()) {
    _internal_set_coordinatesoutputfeaturename(from._internal_coordinatesoutputfeaturename());
  }
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_iouthreshold = from._internal_iouthreshold();
  uint64_t raw_iouthreshold;
  memcpy(&raw_iouthreshold, &tmp_iouthreshold, sizeof(tmp_iouthreshold));
  if (raw_iouthreshold != 0) {
    _internal_set_iouthreshold(from._internal_iouthreshold());
  }
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_confidencethreshold = from._internal_confidencethreshold();
  uint64_t raw_confidencethreshold;
  memcpy(&raw_confidencethreshold, &tmp_confidencethreshold, sizeof(tmp_confidencethreshold));
  if (raw_confidencethreshold != 0) {
    _internal_set_confidencethreshold(from._internal_confidencethreshold());
  }
  switch (from.SuppressionMethod_case()) {
    case kPickTop: {
      _internal_mutable_picktop()->::CoreML::Specification::NonMaximumSuppression_PickTop::MergeFrom(from._internal_picktop());
      break;
    }
    case SUPPRESSIONMETHOD_NOT_SET: {
      break;
    }
  }
  switch (from.ClassLabels_case()) {
    case kStringClassLabels: {
      _internal_mutable_stringclasslabels()->::CoreML::Specification::StringVector::MergeFrom(from._internal_stringclasslabels());
      break;
    }
    case kInt64ClassLabels: {
      _internal_mutable_int64classlabels()->::CoreML::Specification::Int64Vector::MergeFrom(from._internal_int64classlabels());
      break;
    }
    case CLASSLABELS_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void NonMaximumSuppression::CopyFrom(const NonMaximumSuppression& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:CoreML.Specification.NonMaximumSuppression)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void NonMaximumSuppression::InternalSwap(NonMaximumSuppression* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &confidenceinputfeaturename_, lhs_arena,
      &other->confidenceinputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &coordinatesinputfeaturename_, lhs_arena,
      &other->coordinatesinputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &iouthresholdinputfeaturename_, lhs_arena,
      &other->iouthresholdinputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &confidencethresholdinputfeaturename_, lhs_arena,
      &other->confidencethresholdinputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &confidenceoutputfeaturename_, lhs_arena,
      &other->confidenceoutputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &coordinatesoutputfeaturename_, lhs_arena,
      &other->coordinatesoutputfeaturename_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NonMaximumSuppression, confidencethreshold_)
      + sizeof(NonMaximumSuppression::confidencethreshold_)
      - PROTOBUF_FIELD_OFFSET(NonMaximumSuppression, iouthreshold_)>(
          reinterpret_cast<char*>(&iouthreshold_),
          reinterpret_cast<char*>(&other->iouthreshold_));
  swap(SuppressionMethod_, other->SuppressionMethod_);
  swap(ClassLabels_, other->ClassLabels_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
}

std::string NonMaximumSuppression::GetTypeName() const {
  return "CoreML.Specification.NonMaximumSuppression";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace Specification
}  // namespace CoreML
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::CoreML::Specification::NonMaximumSuppression_PickTop* Arena::CreateMaybeMessage< ::CoreML::Specification::NonMaximumSuppression_PickTop >(Arena* arena) {
  return Arena::CreateMessageInternal< ::CoreML::Specification::NonMaximumSuppression_PickTop >(arena);
}
template<> PROTOBUF_NOINLINE ::CoreML::Specification::NonMaximumSuppression* Arena::CreateMaybeMessage< ::CoreML::Specification::NonMaximumSuppression >(Arena* arena) {
  return Arena::CreateMessageInternal< ::CoreML::Specification::NonMaximumSuppression >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
