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

#include "GLMClassifier.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 GLMClassifier_DoubleArray::GLMClassifier_DoubleArray(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : value_(){}
struct GLMClassifier_DoubleArrayDefaultTypeInternal {
  constexpr GLMClassifier_DoubleArrayDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GLMClassifier_DoubleArrayDefaultTypeInternal() {}
  union {
    GLMClassifier_DoubleArray _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GLMClassifier_DoubleArrayDefaultTypeInternal _GLMClassifier_DoubleArray_default_instance_;
constexpr GLMClassifier::GLMClassifier(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weights_()
  , offset_()
  , postevaluationtransform_(0)

  , classencoding_(0)

  , _oneof_case_{}{}
struct GLMClassifierDefaultTypeInternal {
  constexpr GLMClassifierDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GLMClassifierDefaultTypeInternal() {}
  union {
    GLMClassifier _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GLMClassifierDefaultTypeInternal _GLMClassifier_default_instance_;
}  // namespace Specification
}  // namespace CoreML
namespace CoreML {
namespace Specification {
bool GLMClassifier_PostEvaluationTransform_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> GLMClassifier_PostEvaluationTransform_strings[2] = {};

static const char GLMClassifier_PostEvaluationTransform_names[] =
  "Logit"
  "Probit";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry GLMClassifier_PostEvaluationTransform_entries[] = {
  { {GLMClassifier_PostEvaluationTransform_names + 0, 5}, 0 },
  { {GLMClassifier_PostEvaluationTransform_names + 5, 6}, 1 },
};

static const int GLMClassifier_PostEvaluationTransform_entries_by_number[] = {
  0, // 0 -> Logit
  1, // 1 -> Probit
};

const std::string& GLMClassifier_PostEvaluationTransform_Name(
    GLMClassifier_PostEvaluationTransform value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          GLMClassifier_PostEvaluationTransform_entries,
          GLMClassifier_PostEvaluationTransform_entries_by_number,
          2, GLMClassifier_PostEvaluationTransform_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      GLMClassifier_PostEvaluationTransform_entries,
      GLMClassifier_PostEvaluationTransform_entries_by_number,
      2, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     GLMClassifier_PostEvaluationTransform_strings[idx].get();
}
bool GLMClassifier_PostEvaluationTransform_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GLMClassifier_PostEvaluationTransform* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      GLMClassifier_PostEvaluationTransform_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<GLMClassifier_PostEvaluationTransform>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr GLMClassifier_PostEvaluationTransform GLMClassifier::Logit;
constexpr GLMClassifier_PostEvaluationTransform GLMClassifier::Probit;
constexpr GLMClassifier_PostEvaluationTransform GLMClassifier::PostEvaluationTransform_MIN;
constexpr GLMClassifier_PostEvaluationTransform GLMClassifier::PostEvaluationTransform_MAX;
constexpr int GLMClassifier::PostEvaluationTransform_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool GLMClassifier_ClassEncoding_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> GLMClassifier_ClassEncoding_strings[2] = {};

static const char GLMClassifier_ClassEncoding_names[] =
  "OneVsRest"
  "ReferenceClass";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry GLMClassifier_ClassEncoding_entries[] = {
  { {GLMClassifier_ClassEncoding_names + 0, 9}, 1 },
  { {GLMClassifier_ClassEncoding_names + 9, 14}, 0 },
};

static const int GLMClassifier_ClassEncoding_entries_by_number[] = {
  1, // 0 -> ReferenceClass
  0, // 1 -> OneVsRest
};

const std::string& GLMClassifier_ClassEncoding_Name(
    GLMClassifier_ClassEncoding value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          GLMClassifier_ClassEncoding_entries,
          GLMClassifier_ClassEncoding_entries_by_number,
          2, GLMClassifier_ClassEncoding_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      GLMClassifier_ClassEncoding_entries,
      GLMClassifier_ClassEncoding_entries_by_number,
      2, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     GLMClassifier_ClassEncoding_strings[idx].get();
}
bool GLMClassifier_ClassEncoding_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GLMClassifier_ClassEncoding* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      GLMClassifier_ClassEncoding_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<GLMClassifier_ClassEncoding>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr GLMClassifier_ClassEncoding GLMClassifier::ReferenceClass;
constexpr GLMClassifier_ClassEncoding GLMClassifier::OneVsRest;
constexpr GLMClassifier_ClassEncoding GLMClassifier::ClassEncoding_MIN;
constexpr GLMClassifier_ClassEncoding GLMClassifier::ClassEncoding_MAX;
constexpr int GLMClassifier::ClassEncoding_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

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

class GLMClassifier_DoubleArray::_Internal {
 public:
};

GLMClassifier_DoubleArray::GLMClassifier_DoubleArray(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  value_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:CoreML.Specification.GLMClassifier.DoubleArray)
}
GLMClassifier_DoubleArray::GLMClassifier_DoubleArray(const GLMClassifier_DoubleArray& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      value_(from.value_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.GLMClassifier.DoubleArray)
}

inline void GLMClassifier_DoubleArray::SharedCtor() {
}

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

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

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

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

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

const char* GLMClassifier_DoubleArray::_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 double value = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_value(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 9) {
          _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } 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* GLMClassifier_DoubleArray::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.GLMClassifier.DoubleArray)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated double value = 1;
  if (this->_internal_value_size() > 0) {
    target = stream->WriteFixedPacked(1, _internal_value(), 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.GLMClassifier.DoubleArray)
  return target;
}

size_t GLMClassifier_DoubleArray::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.GLMClassifier.DoubleArray)
  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 double value = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_value_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

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

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

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

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

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

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

std::string GLMClassifier_DoubleArray::GetTypeName() const {
  return "CoreML.Specification.GLMClassifier.DoubleArray";
}


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

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

const ::CoreML::Specification::StringVector&
GLMClassifier::_Internal::stringclasslabels(const GLMClassifier* msg) {
  return *msg->ClassLabels_.stringclasslabels_;
}
const ::CoreML::Specification::Int64Vector&
GLMClassifier::_Internal::int64classlabels(const GLMClassifier* msg) {
  return *msg->ClassLabels_.int64classlabels_;
}
void GLMClassifier::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.GLMClassifier.stringClassLabels)
}
void GLMClassifier::clear_stringclasslabels() {
  if (_internal_has_stringclasslabels()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ClassLabels_.stringclasslabels_;
    }
    clear_has_ClassLabels();
  }
}
void GLMClassifier::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.GLMClassifier.int64ClassLabels)
}
void GLMClassifier::clear_int64classlabels() {
  if (_internal_has_int64classlabels()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ClassLabels_.int64classlabels_;
    }
    clear_has_ClassLabels();
  }
}
GLMClassifier::GLMClassifier(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  weights_(arena),
  offset_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:CoreML.Specification.GLMClassifier)
}
GLMClassifier::GLMClassifier(const GLMClassifier& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      weights_(from.weights_),
      offset_(from.offset_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&postevaluationtransform_, &from.postevaluationtransform_,
    static_cast<size_t>(reinterpret_cast<char*>(&classencoding_) -
    reinterpret_cast<char*>(&postevaluationtransform_)) + sizeof(classencoding_));
  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.GLMClassifier)
}

inline void GLMClassifier::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&postevaluationtransform_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&classencoding_) -
    reinterpret_cast<char*>(&postevaluationtransform_)) + sizeof(classencoding_));
clear_has_ClassLabels();
}

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

inline void GLMClassifier::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_ClassLabels()) {
    clear_ClassLabels();
  }
}

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

void GLMClassifier::clear_ClassLabels() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.GLMClassifier)
  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_[0] = CLASSLABELS_NOT_SET;
}


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

  weights_.Clear();
  offset_.Clear();
  ::memset(&postevaluationtransform_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&classencoding_) -
      reinterpret_cast<char*>(&postevaluationtransform_)) + sizeof(classencoding_));
  clear_ClassLabels();
  _internal_metadata_.Clear<std::string>();
}

const char* GLMClassifier::_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.GLMClassifier.DoubleArray weights = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_weights(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated double offset = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_offset(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 17) {
          _internal_add_offset(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.GLMClassifier.PostEvaluationTransform postEvaluationTransform = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_postevaluationtransform(static_cast<::CoreML::Specification::GLMClassifier_PostEvaluationTransform>(val));
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.GLMClassifier.ClassEncoding classEncoding = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_classencoding(static_cast<::CoreML::Specification::GLMClassifier_ClassEncoding>(val));
        } 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;
      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* GLMClassifier::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.GLMClassifier)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .CoreML.Specification.GLMClassifier.DoubleArray weights = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_weights_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_weights(i), target, stream);
  }

  // repeated double offset = 2;
  if (this->_internal_offset_size() > 0) {
    target = stream->WriteFixedPacked(2, _internal_offset(), target);
  }

  // .CoreML.Specification.GLMClassifier.PostEvaluationTransform postEvaluationTransform = 3;
  if (this->_internal_postevaluationtransform() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_postevaluationtransform(), target);
  }

  // .CoreML.Specification.GLMClassifier.ClassEncoding classEncoding = 4;
  if (this->_internal_classencoding() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      4, this->_internal_classencoding(), target);
  }

  // .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);
  }

  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.GLMClassifier)
  return target;
}

size_t GLMClassifier::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.GLMClassifier)
  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.GLMClassifier.DoubleArray weights = 1;
  total_size += 1UL * this->_internal_weights_size();
  for (const auto& msg : this->weights_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated double offset = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_offset_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // .CoreML.Specification.GLMClassifier.PostEvaluationTransform postEvaluationTransform = 3;
  if (this->_internal_postevaluationtransform() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_postevaluationtransform());
  }

  // .CoreML.Specification.GLMClassifier.ClassEncoding classEncoding = 4;
  if (this->_internal_classencoding() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_classencoding());
  }

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

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

  weights_.MergeFrom(from.weights_);
  offset_.MergeFrom(from.offset_);
  if (from._internal_postevaluationtransform() != 0) {
    _internal_set_postevaluationtransform(from._internal_postevaluationtransform());
  }
  if (from._internal_classencoding() != 0) {
    _internal_set_classencoding(from._internal_classencoding());
  }
  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 GLMClassifier::CopyFrom(const GLMClassifier& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:CoreML.Specification.GLMClassifier)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GLMClassifier::InternalSwap(GLMClassifier* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  weights_.InternalSwap(&other->weights_);
  offset_.InternalSwap(&other->offset_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GLMClassifier, classencoding_)
      + sizeof(GLMClassifier::classencoding_)
      - PROTOBUF_FIELD_OFFSET(GLMClassifier, postevaluationtransform_)>(
          reinterpret_cast<char*>(&postevaluationtransform_),
          reinterpret_cast<char*>(&other->postevaluationtransform_));
  swap(ClassLabels_, other->ClassLabels_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

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


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

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