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

#include "ClassConfidenceThresholding.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 ClassConfidenceThresholding::ClassConfidenceThresholding(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : precisionrecallcurves_(){}
struct ClassConfidenceThresholdingDefaultTypeInternal {
  constexpr ClassConfidenceThresholdingDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ClassConfidenceThresholdingDefaultTypeInternal() {}
  union {
    ClassConfidenceThresholding _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ClassConfidenceThresholdingDefaultTypeInternal _ClassConfidenceThresholding_default_instance_;
}  // namespace Specification
}  // namespace CoreML
namespace CoreML {
namespace Specification {

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

class ClassConfidenceThresholding::_Internal {
 public:
};

void ClassConfidenceThresholding::clear_precisionrecallcurves() {
  precisionrecallcurves_.Clear();
}
ClassConfidenceThresholding::ClassConfidenceThresholding(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  precisionrecallcurves_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:CoreML.Specification.ClassConfidenceThresholding)
}
ClassConfidenceThresholding::ClassConfidenceThresholding(const ClassConfidenceThresholding& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      precisionrecallcurves_(from.precisionrecallcurves_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.ClassConfidenceThresholding)
}

inline void ClassConfidenceThresholding::SharedCtor() {
}

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

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

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

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

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

const char* ClassConfidenceThresholding::_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) {
      // repeated .CoreML.Specification.PrecisionRecallCurve precisionRecallCurves = 100;
      case 100:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_precisionrecallcurves(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<802>(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* ClassConfidenceThresholding::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.ClassConfidenceThresholding)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .CoreML.Specification.PrecisionRecallCurve precisionRecallCurves = 100;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_precisionrecallcurves_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(100, this->_internal_precisionrecallcurves(i), 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:CoreML.Specification.ClassConfidenceThresholding)
  return target;
}

size_t ClassConfidenceThresholding::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.ClassConfidenceThresholding)
  size_t total_size = 0;

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

  // repeated .CoreML.Specification.PrecisionRecallCurve precisionRecallCurves = 100;
  total_size += 2UL * this->_internal_precisionrecallcurves_size();
  for (const auto& msg : this->precisionrecallcurves_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

  precisionrecallcurves_.MergeFrom(from.precisionrecallcurves_);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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


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

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