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

#include "ArrayFeatureExtractor.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 ArrayFeatureExtractor::ArrayFeatureExtractor(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : extractindex_()
  , _extractindex_cached_byte_size_(0){}
struct ArrayFeatureExtractorDefaultTypeInternal {
  constexpr ArrayFeatureExtractorDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ArrayFeatureExtractorDefaultTypeInternal() {}
  union {
    ArrayFeatureExtractor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArrayFeatureExtractorDefaultTypeInternal _ArrayFeatureExtractor_default_instance_;
}  // namespace Specification
}  // namespace CoreML
namespace CoreML {
namespace Specification {

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

class ArrayFeatureExtractor::_Internal {
 public:
};

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

inline void ArrayFeatureExtractor::SharedCtor() {
}

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

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

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

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

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

const char* ArrayFeatureExtractor::_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 uint64 extractIndex = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_extractindex(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 8) {
          _internal_add_extractindex(::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* ArrayFeatureExtractor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.ArrayFeatureExtractor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated uint64 extractIndex = 1;
  {
    int byte_size = _extractindex_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteUInt64Packed(
          1, _internal_extractindex(), byte_size, 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.ArrayFeatureExtractor)
  return target;
}

size_t ArrayFeatureExtractor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.ArrayFeatureExtractor)
  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 uint64 extractIndex = 1;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt64Size(this->extractindex_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _extractindex_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    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 ArrayFeatureExtractor::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ArrayFeatureExtractor*>(
      &from));
}

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

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

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

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

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

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


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

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