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

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

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

class Imputer::_Internal {
 public:
  static const ::CoreML::Specification::DoubleVector& imputeddoublearray(const Imputer* msg);
  static const ::CoreML::Specification::Int64Vector& imputedint64array(const Imputer* msg);
  static const ::CoreML::Specification::StringToDoubleMap& imputedstringdictionary(const Imputer* msg);
  static const ::CoreML::Specification::Int64ToDoubleMap& imputedint64dictionary(const Imputer* msg);
};

const ::CoreML::Specification::DoubleVector&
Imputer::_Internal::imputeddoublearray(const Imputer* msg) {
  return *msg->ImputedValue_.imputeddoublearray_;
}
const ::CoreML::Specification::Int64Vector&
Imputer::_Internal::imputedint64array(const Imputer* msg) {
  return *msg->ImputedValue_.imputedint64array_;
}
const ::CoreML::Specification::StringToDoubleMap&
Imputer::_Internal::imputedstringdictionary(const Imputer* msg) {
  return *msg->ImputedValue_.imputedstringdictionary_;
}
const ::CoreML::Specification::Int64ToDoubleMap&
Imputer::_Internal::imputedint64dictionary(const Imputer* msg) {
  return *msg->ImputedValue_.imputedint64dictionary_;
}
void Imputer::set_allocated_imputeddoublearray(::CoreML::Specification::DoubleVector* imputeddoublearray) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ImputedValue();
  if (imputeddoublearray) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(imputeddoublearray));
    if (message_arena != submessage_arena) {
      imputeddoublearray = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, imputeddoublearray, submessage_arena);
    }
    set_has_imputeddoublearray();
    ImputedValue_.imputeddoublearray_ = imputeddoublearray;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.Imputer.imputedDoubleArray)
}
void Imputer::clear_imputeddoublearray() {
  if (_internal_has_imputeddoublearray()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ImputedValue_.imputeddoublearray_;
    }
    clear_has_ImputedValue();
  }
}
void Imputer::set_allocated_imputedint64array(::CoreML::Specification::Int64Vector* imputedint64array) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ImputedValue();
  if (imputedint64array) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(imputedint64array));
    if (message_arena != submessage_arena) {
      imputedint64array = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, imputedint64array, submessage_arena);
    }
    set_has_imputedint64array();
    ImputedValue_.imputedint64array_ = imputedint64array;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.Imputer.imputedInt64Array)
}
void Imputer::clear_imputedint64array() {
  if (_internal_has_imputedint64array()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ImputedValue_.imputedint64array_;
    }
    clear_has_ImputedValue();
  }
}
void Imputer::set_allocated_imputedstringdictionary(::CoreML::Specification::StringToDoubleMap* imputedstringdictionary) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ImputedValue();
  if (imputedstringdictionary) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(imputedstringdictionary));
    if (message_arena != submessage_arena) {
      imputedstringdictionary = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, imputedstringdictionary, submessage_arena);
    }
    set_has_imputedstringdictionary();
    ImputedValue_.imputedstringdictionary_ = imputedstringdictionary;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.Imputer.imputedStringDictionary)
}
void Imputer::clear_imputedstringdictionary() {
  if (_internal_has_imputedstringdictionary()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ImputedValue_.imputedstringdictionary_;
    }
    clear_has_ImputedValue();
  }
}
void Imputer::set_allocated_imputedint64dictionary(::CoreML::Specification::Int64ToDoubleMap* imputedint64dictionary) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_ImputedValue();
  if (imputedint64dictionary) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
            ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(imputedint64dictionary));
    if (message_arena != submessage_arena) {
      imputedint64dictionary = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, imputedint64dictionary, submessage_arena);
    }
    set_has_imputedint64dictionary();
    ImputedValue_.imputedint64dictionary_ = imputedint64dictionary;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.Imputer.imputedInt64Dictionary)
}
void Imputer::clear_imputedint64dictionary() {
  if (_internal_has_imputedint64dictionary()) {
    if (GetArenaForAllocation() == nullptr) {
      delete ImputedValue_.imputedint64dictionary_;
    }
    clear_has_ImputedValue();
  }
}
Imputer::Imputer(::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.Imputer)
}
Imputer::Imputer(const Imputer& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_ImputedValue();
  switch (from.ImputedValue_case()) {
    case kImputedDoubleValue: {
      _internal_set_imputeddoublevalue(from._internal_imputeddoublevalue());
      break;
    }
    case kImputedInt64Value: {
      _internal_set_imputedint64value(from._internal_imputedint64value());
      break;
    }
    case kImputedStringValue: {
      _internal_set_imputedstringvalue(from._internal_imputedstringvalue());
      break;
    }
    case kImputedDoubleArray: {
      _internal_mutable_imputeddoublearray()->::CoreML::Specification::DoubleVector::MergeFrom(from._internal_imputeddoublearray());
      break;
    }
    case kImputedInt64Array: {
      _internal_mutable_imputedint64array()->::CoreML::Specification::Int64Vector::MergeFrom(from._internal_imputedint64array());
      break;
    }
    case kImputedStringDictionary: {
      _internal_mutable_imputedstringdictionary()->::CoreML::Specification::StringToDoubleMap::MergeFrom(from._internal_imputedstringdictionary());
      break;
    }
    case kImputedInt64Dictionary: {
      _internal_mutable_imputedint64dictionary()->::CoreML::Specification::Int64ToDoubleMap::MergeFrom(from._internal_imputedint64dictionary());
      break;
    }
    case IMPUTEDVALUE_NOT_SET: {
      break;
    }
  }
  clear_has_ReplaceValue();
  switch (from.ReplaceValue_case()) {
    case kReplaceDoubleValue: {
      _internal_set_replacedoublevalue(from._internal_replacedoublevalue());
      break;
    }
    case kReplaceInt64Value: {
      _internal_set_replaceint64value(from._internal_replaceint64value());
      break;
    }
    case kReplaceStringValue: {
      _internal_set_replacestringvalue(from._internal_replacestringvalue());
      break;
    }
    case REPLACEVALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.Imputer)
}

inline void Imputer::SharedCtor() {
clear_has_ImputedValue();
clear_has_ReplaceValue();
}

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

inline void Imputer::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_ImputedValue()) {
    clear_ImputedValue();
  }
  if (has_ReplaceValue()) {
    clear_ReplaceValue();
  }
}

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

void Imputer::clear_ImputedValue() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.Imputer)
  switch (ImputedValue_case()) {
    case kImputedDoubleValue: {
      // No need to clear
      break;
    }
    case kImputedInt64Value: {
      // No need to clear
      break;
    }
    case kImputedStringValue: {
      ImputedValue_.imputedstringvalue_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
      break;
    }
    case kImputedDoubleArray: {
      if (GetArenaForAllocation() == nullptr) {
        delete ImputedValue_.imputeddoublearray_;
      }
      break;
    }
    case kImputedInt64Array: {
      if (GetArenaForAllocation() == nullptr) {
        delete ImputedValue_.imputedint64array_;
      }
      break;
    }
    case kImputedStringDictionary: {
      if (GetArenaForAllocation() == nullptr) {
        delete ImputedValue_.imputedstringdictionary_;
      }
      break;
    }
    case kImputedInt64Dictionary: {
      if (GetArenaForAllocation() == nullptr) {
        delete ImputedValue_.imputedint64dictionary_;
      }
      break;
    }
    case IMPUTEDVALUE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = IMPUTEDVALUE_NOT_SET;
}

void Imputer::clear_ReplaceValue() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.Imputer)
  switch (ReplaceValue_case()) {
    case kReplaceDoubleValue: {
      // No need to clear
      break;
    }
    case kReplaceInt64Value: {
      // No need to clear
      break;
    }
    case kReplaceStringValue: {
      ReplaceValue_.replacestringvalue_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
      break;
    }
    case REPLACEVALUE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = REPLACEVALUE_NOT_SET;
}


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

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

const char* Imputer::_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) {
      // double imputedDoubleValue = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
          _internal_set_imputeddoublevalue(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // int64 imputedInt64Value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _internal_set_imputedint64value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string imputedStringValue = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_imputedstringvalue();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.DoubleVector imputedDoubleArray = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_imputeddoublearray(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.Int64Vector imputedInt64Array = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_imputedint64array(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.StringToDoubleMap imputedStringDictionary = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_imputedstringdictionary(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .CoreML.Specification.Int64ToDoubleMap imputedInt64Dictionary = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_imputedint64dictionary(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // double replaceDoubleValue = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 89)) {
          _internal_set_replacedoublevalue(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // int64 replaceInt64Value = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _internal_set_replaceint64value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string replaceStringValue = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          auto str = _internal_mutable_replacestringvalue();
          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* Imputer::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.Imputer)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // double imputedDoubleValue = 1;
  if (_internal_has_imputeddoublevalue()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_imputeddoublevalue(), target);
  }

  // int64 imputedInt64Value = 2;
  if (_internal_has_imputedint64value()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_imputedint64value(), target);
  }

  // string imputedStringValue = 3;
  if (_internal_has_imputedstringvalue()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_imputedstringvalue().data(), static_cast<int>(this->_internal_imputedstringvalue().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.Imputer.imputedStringValue");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_imputedstringvalue(), target);
  }

  // .CoreML.Specification.DoubleVector imputedDoubleArray = 4;
  if (_internal_has_imputeddoublearray()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::imputeddoublearray(this), target, stream);
  }

  // .CoreML.Specification.Int64Vector imputedInt64Array = 5;
  if (_internal_has_imputedint64array()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::imputedint64array(this), target, stream);
  }

  // .CoreML.Specification.StringToDoubleMap imputedStringDictionary = 6;
  if (_internal_has_imputedstringdictionary()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::imputedstringdictionary(this), target, stream);
  }

  // .CoreML.Specification.Int64ToDoubleMap imputedInt64Dictionary = 7;
  if (_internal_has_imputedint64dictionary()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::imputedint64dictionary(this), target, stream);
  }

  // double replaceDoubleValue = 11;
  if (_internal_has_replacedoublevalue()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(11, this->_internal_replacedoublevalue(), target);
  }

  // int64 replaceInt64Value = 12;
  if (_internal_has_replaceint64value()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->_internal_replaceint64value(), target);
  }

  // string replaceStringValue = 13;
  if (_internal_has_replacestringvalue()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_replacestringvalue().data(), static_cast<int>(this->_internal_replacestringvalue().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "CoreML.Specification.Imputer.replaceStringValue");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_replacestringvalue(), 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.Imputer)
  return target;
}

size_t Imputer::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.Imputer)
  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 (ImputedValue_case()) {
    // double imputedDoubleValue = 1;
    case kImputedDoubleValue: {
      total_size += 1 + 8;
      break;
    }
    // int64 imputedInt64Value = 2;
    case kImputedInt64Value: {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_imputedint64value());
      break;
    }
    // string imputedStringValue = 3;
    case kImputedStringValue: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_imputedstringvalue());
      break;
    }
    // .CoreML.Specification.DoubleVector imputedDoubleArray = 4;
    case kImputedDoubleArray: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ImputedValue_.imputeddoublearray_);
      break;
    }
    // .CoreML.Specification.Int64Vector imputedInt64Array = 5;
    case kImputedInt64Array: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ImputedValue_.imputedint64array_);
      break;
    }
    // .CoreML.Specification.StringToDoubleMap imputedStringDictionary = 6;
    case kImputedStringDictionary: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ImputedValue_.imputedstringdictionary_);
      break;
    }
    // .CoreML.Specification.Int64ToDoubleMap imputedInt64Dictionary = 7;
    case kImputedInt64Dictionary: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ImputedValue_.imputedint64dictionary_);
      break;
    }
    case IMPUTEDVALUE_NOT_SET: {
      break;
    }
  }
  switch (ReplaceValue_case()) {
    // double replaceDoubleValue = 11;
    case kReplaceDoubleValue: {
      total_size += 1 + 8;
      break;
    }
    // int64 replaceInt64Value = 12;
    case kReplaceInt64Value: {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_replaceint64value());
      break;
    }
    // string replaceStringValue = 13;
    case kReplaceStringValue: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_replacestringvalue());
      break;
    }
    case REPLACEVALUE_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 Imputer::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const Imputer*>(
      &from));
}

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

  switch (from.ImputedValue_case()) {
    case kImputedDoubleValue: {
      _internal_set_imputeddoublevalue(from._internal_imputeddoublevalue());
      break;
    }
    case kImputedInt64Value: {
      _internal_set_imputedint64value(from._internal_imputedint64value());
      break;
    }
    case kImputedStringValue: {
      _internal_set_imputedstringvalue(from._internal_imputedstringvalue());
      break;
    }
    case kImputedDoubleArray: {
      _internal_mutable_imputeddoublearray()->::CoreML::Specification::DoubleVector::MergeFrom(from._internal_imputeddoublearray());
      break;
    }
    case kImputedInt64Array: {
      _internal_mutable_imputedint64array()->::CoreML::Specification::Int64Vector::MergeFrom(from._internal_imputedint64array());
      break;
    }
    case kImputedStringDictionary: {
      _internal_mutable_imputedstringdictionary()->::CoreML::Specification::StringToDoubleMap::MergeFrom(from._internal_imputedstringdictionary());
      break;
    }
    case kImputedInt64Dictionary: {
      _internal_mutable_imputedint64dictionary()->::CoreML::Specification::Int64ToDoubleMap::MergeFrom(from._internal_imputedint64dictionary());
      break;
    }
    case IMPUTEDVALUE_NOT_SET: {
      break;
    }
  }
  switch (from.ReplaceValue_case()) {
    case kReplaceDoubleValue: {
      _internal_set_replacedoublevalue(from._internal_replacedoublevalue());
      break;
    }
    case kReplaceInt64Value: {
      _internal_set_replaceint64value(from._internal_replaceint64value());
      break;
    }
    case kReplaceStringValue: {
      _internal_set_replacestringvalue(from._internal_replacestringvalue());
      break;
    }
    case REPLACEVALUE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Imputer::InternalSwap(Imputer* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(ImputedValue_, other->ImputedValue_);
  swap(ReplaceValue_, other->ReplaceValue_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
}

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


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

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