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

#include "SoundAnalysisPreprocessing.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 {
namespace CoreMLModels {
constexpr SoundAnalysisPreprocessing_Vggish::SoundAnalysisPreprocessing_Vggish(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct SoundAnalysisPreprocessing_VggishDefaultTypeInternal {
  constexpr SoundAnalysisPreprocessing_VggishDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SoundAnalysisPreprocessing_VggishDefaultTypeInternal() {}
  union {
    SoundAnalysisPreprocessing_Vggish _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SoundAnalysisPreprocessing_VggishDefaultTypeInternal _SoundAnalysisPreprocessing_Vggish_default_instance_;
constexpr SoundAnalysisPreprocessing::SoundAnalysisPreprocessing(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : _oneof_case_{}{}
struct SoundAnalysisPreprocessingDefaultTypeInternal {
  constexpr SoundAnalysisPreprocessingDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SoundAnalysisPreprocessingDefaultTypeInternal() {}
  union {
    SoundAnalysisPreprocessing _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SoundAnalysisPreprocessingDefaultTypeInternal _SoundAnalysisPreprocessing_default_instance_;
}  // namespace CoreMLModels
}  // namespace Specification
}  // namespace CoreML
namespace CoreML {
namespace Specification {
namespace CoreMLModels {

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

class SoundAnalysisPreprocessing_Vggish::_Internal {
 public:
};

SoundAnalysisPreprocessing_Vggish::SoundAnalysisPreprocessing_Vggish(::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.CoreMLModels.SoundAnalysisPreprocessing.Vggish)
}
SoundAnalysisPreprocessing_Vggish::SoundAnalysisPreprocessing_Vggish(const SoundAnalysisPreprocessing_Vggish& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish)
}

inline void SoundAnalysisPreprocessing_Vggish::SharedCtor() {
}

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

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

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

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

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

const char* SoundAnalysisPreprocessing_Vggish::_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);
    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* SoundAnalysisPreprocessing_Vggish::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  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.CoreMLModels.SoundAnalysisPreprocessing.Vggish)
  return target;
}

size_t SoundAnalysisPreprocessing_Vggish::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish)
  size_t total_size = 0;

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

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

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

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

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

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

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

std::string SoundAnalysisPreprocessing_Vggish::GetTypeName() const {
  return "CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish";
}


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

class SoundAnalysisPreprocessing::_Internal {
 public:
  static const ::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish& vggish(const SoundAnalysisPreprocessing* msg);
};

const ::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish&
SoundAnalysisPreprocessing::_Internal::vggish(const SoundAnalysisPreprocessing* msg) {
  return *msg->SoundAnalysisPreprocessingType_.vggish_;
}
void SoundAnalysisPreprocessing::set_allocated_vggish(::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish* vggish) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_SoundAnalysisPreprocessingType();
  if (vggish) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish>::GetOwningArena(vggish);
    if (message_arena != submessage_arena) {
      vggish = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, vggish, submessage_arena);
    }
    set_has_vggish();
    SoundAnalysisPreprocessingType_.vggish_ = vggish;
  }
  // @@protoc_insertion_point(field_set_allocated:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.vggish)
}
SoundAnalysisPreprocessing::SoundAnalysisPreprocessing(::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.CoreMLModels.SoundAnalysisPreprocessing)
}
SoundAnalysisPreprocessing::SoundAnalysisPreprocessing(const SoundAnalysisPreprocessing& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_SoundAnalysisPreprocessingType();
  switch (from.SoundAnalysisPreprocessingType_case()) {
    case kVggish: {
      _internal_mutable_vggish()->::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish::MergeFrom(from._internal_vggish());
      break;
    }
    case SOUNDANALYSISPREPROCESSINGTYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing)
}

inline void SoundAnalysisPreprocessing::SharedCtor() {
clear_has_SoundAnalysisPreprocessingType();
}

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

inline void SoundAnalysisPreprocessing::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_SoundAnalysisPreprocessingType()) {
    clear_SoundAnalysisPreprocessingType();
  }
}

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

void SoundAnalysisPreprocessing::clear_SoundAnalysisPreprocessingType() {
// @@protoc_insertion_point(one_of_clear_start:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing)
  switch (SoundAnalysisPreprocessingType_case()) {
    case kVggish: {
      if (GetArenaForAllocation() == nullptr) {
        delete SoundAnalysisPreprocessingType_.vggish_;
      }
      break;
    }
    case SOUNDANALYSISPREPROCESSINGTYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = SOUNDANALYSISPREPROCESSINGTYPE_NOT_SET;
}


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

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

const char* SoundAnalysisPreprocessing::_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.CoreMLModels.SoundAnalysisPreprocessing.Vggish vggish = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_vggish(), 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* SoundAnalysisPreprocessing::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish vggish = 20;
  if (_internal_has_vggish()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        20, _Internal::vggish(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.CoreMLModels.SoundAnalysisPreprocessing)
  return target;
}

size_t SoundAnalysisPreprocessing::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing)
  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 (SoundAnalysisPreprocessingType_case()) {
    // .CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish vggish = 20;
    case kVggish: {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *SoundAnalysisPreprocessingType_.vggish_);
      break;
    }
    case SOUNDANALYSISPREPROCESSINGTYPE_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 SoundAnalysisPreprocessing::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const SoundAnalysisPreprocessing*>(
      &from));
}

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

  switch (from.SoundAnalysisPreprocessingType_case()) {
    case kVggish: {
      _internal_mutable_vggish()->::CoreML::Specification::CoreMLModels::SoundAnalysisPreprocessing_Vggish::MergeFrom(from._internal_vggish());
      break;
    }
    case SOUNDANALYSISPREPROCESSINGTYPE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SoundAnalysisPreprocessing::InternalSwap(SoundAnalysisPreprocessing* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(SoundAnalysisPreprocessingType_, other->SoundAnalysisPreprocessingType_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

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


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

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