// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: second/protos/pipeline.proto

#include "second/protos/pipeline.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/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace second {
namespace protos {
PROTOBUF_CONSTEXPR TrainEvalPipelineConfig::TrainEvalPipelineConfig(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.model_)*/nullptr
  , /*decltype(_impl_.train_input_reader_)*/nullptr
  , /*decltype(_impl_.train_config_)*/nullptr
  , /*decltype(_impl_.eval_input_reader_)*/nullptr
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct TrainEvalPipelineConfigDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TrainEvalPipelineConfigDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TrainEvalPipelineConfigDefaultTypeInternal() {}
  union {
    TrainEvalPipelineConfig _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TrainEvalPipelineConfigDefaultTypeInternal _TrainEvalPipelineConfig_default_instance_;
}  // namespace protos
}  // namespace second
static ::_pb::Metadata file_level_metadata_second_2fprotos_2fpipeline_2eproto[1];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_second_2fprotos_2fpipeline_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_second_2fprotos_2fpipeline_2eproto = nullptr;

const uint32_t TableStruct_second_2fprotos_2fpipeline_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::second::protos::TrainEvalPipelineConfig, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::second::protos::TrainEvalPipelineConfig, _impl_.model_),
  PROTOBUF_FIELD_OFFSET(::second::protos::TrainEvalPipelineConfig, _impl_.train_input_reader_),
  PROTOBUF_FIELD_OFFSET(::second::protos::TrainEvalPipelineConfig, _impl_.train_config_),
  PROTOBUF_FIELD_OFFSET(::second::protos::TrainEvalPipelineConfig, _impl_.eval_input_reader_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::second::protos::TrainEvalPipelineConfig)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::second::protos::_TrainEvalPipelineConfig_default_instance_._instance,
};

const char descriptor_table_protodef_second_2fprotos_2fpipeline_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\034second/protos/pipeline.proto\022\rsecond.p"
  "rotos\032 second/protos/input_reader.proto\032"
  "\031second/protos/model.proto\032\031second/proto"
  "s/train.proto\"\350\001\n\027TrainEvalPipelineConfi"
  "g\022,\n\005model\030\001 \001(\0132\035.second.protos.Detecti"
  "onModel\0226\n\022train_input_reader\030\002 \001(\0132\032.se"
  "cond.protos.InputReader\0220\n\014train_config\030"
  "\003 \001(\0132\032.second.protos.TrainConfig\0225\n\021eva"
  "l_input_reader\030\004 \001(\0132\032.second.protos.Inp"
  "utReaderb\006proto3"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_second_2fprotos_2fpipeline_2eproto_deps[3] = {
  &::descriptor_table_second_2fprotos_2finput_5freader_2eproto,
  &::descriptor_table_second_2fprotos_2fmodel_2eproto,
  &::descriptor_table_second_2fprotos_2ftrain_2eproto,
};
static ::_pbi::once_flag descriptor_table_second_2fprotos_2fpipeline_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_second_2fprotos_2fpipeline_2eproto = {
    false, false, 376, descriptor_table_protodef_second_2fprotos_2fpipeline_2eproto,
    "second/protos/pipeline.proto",
    &descriptor_table_second_2fprotos_2fpipeline_2eproto_once, descriptor_table_second_2fprotos_2fpipeline_2eproto_deps, 3, 1,
    schemas, file_default_instances, TableStruct_second_2fprotos_2fpipeline_2eproto::offsets,
    file_level_metadata_second_2fprotos_2fpipeline_2eproto, file_level_enum_descriptors_second_2fprotos_2fpipeline_2eproto,
    file_level_service_descriptors_second_2fprotos_2fpipeline_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_second_2fprotos_2fpipeline_2eproto_getter() {
  return &descriptor_table_second_2fprotos_2fpipeline_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_second_2fprotos_2fpipeline_2eproto(&descriptor_table_second_2fprotos_2fpipeline_2eproto);
namespace second {
namespace protos {

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

class TrainEvalPipelineConfig::_Internal {
 public:
  static const ::second::protos::DetectionModel& model(const TrainEvalPipelineConfig* msg);
  static const ::second::protos::InputReader& train_input_reader(const TrainEvalPipelineConfig* msg);
  static const ::second::protos::TrainConfig& train_config(const TrainEvalPipelineConfig* msg);
  static const ::second::protos::InputReader& eval_input_reader(const TrainEvalPipelineConfig* msg);
};

const ::second::protos::DetectionModel&
TrainEvalPipelineConfig::_Internal::model(const TrainEvalPipelineConfig* msg) {
  return *msg->_impl_.model_;
}
const ::second::protos::InputReader&
TrainEvalPipelineConfig::_Internal::train_input_reader(const TrainEvalPipelineConfig* msg) {
  return *msg->_impl_.train_input_reader_;
}
const ::second::protos::TrainConfig&
TrainEvalPipelineConfig::_Internal::train_config(const TrainEvalPipelineConfig* msg) {
  return *msg->_impl_.train_config_;
}
const ::second::protos::InputReader&
TrainEvalPipelineConfig::_Internal::eval_input_reader(const TrainEvalPipelineConfig* msg) {
  return *msg->_impl_.eval_input_reader_;
}
void TrainEvalPipelineConfig::clear_model() {
  if (GetArenaForAllocation() == nullptr && _impl_.model_ != nullptr) {
    delete _impl_.model_;
  }
  _impl_.model_ = nullptr;
}
void TrainEvalPipelineConfig::clear_train_input_reader() {
  if (GetArenaForAllocation() == nullptr && _impl_.train_input_reader_ != nullptr) {
    delete _impl_.train_input_reader_;
  }
  _impl_.train_input_reader_ = nullptr;
}
void TrainEvalPipelineConfig::clear_train_config() {
  if (GetArenaForAllocation() == nullptr && _impl_.train_config_ != nullptr) {
    delete _impl_.train_config_;
  }
  _impl_.train_config_ = nullptr;
}
void TrainEvalPipelineConfig::clear_eval_input_reader() {
  if (GetArenaForAllocation() == nullptr && _impl_.eval_input_reader_ != nullptr) {
    delete _impl_.eval_input_reader_;
  }
  _impl_.eval_input_reader_ = nullptr;
}
TrainEvalPipelineConfig::TrainEvalPipelineConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:second.protos.TrainEvalPipelineConfig)
}
TrainEvalPipelineConfig::TrainEvalPipelineConfig(const TrainEvalPipelineConfig& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TrainEvalPipelineConfig* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.model_){nullptr}
    , decltype(_impl_.train_input_reader_){nullptr}
    , decltype(_impl_.train_config_){nullptr}
    , decltype(_impl_.eval_input_reader_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_model()) {
    _this->_impl_.model_ = new ::second::protos::DetectionModel(*from._impl_.model_);
  }
  if (from._internal_has_train_input_reader()) {
    _this->_impl_.train_input_reader_ = new ::second::protos::InputReader(*from._impl_.train_input_reader_);
  }
  if (from._internal_has_train_config()) {
    _this->_impl_.train_config_ = new ::second::protos::TrainConfig(*from._impl_.train_config_);
  }
  if (from._internal_has_eval_input_reader()) {
    _this->_impl_.eval_input_reader_ = new ::second::protos::InputReader(*from._impl_.eval_input_reader_);
  }
  // @@protoc_insertion_point(copy_constructor:second.protos.TrainEvalPipelineConfig)
}

inline void TrainEvalPipelineConfig::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.model_){nullptr}
    , decltype(_impl_.train_input_reader_){nullptr}
    , decltype(_impl_.train_config_){nullptr}
    , decltype(_impl_.eval_input_reader_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

TrainEvalPipelineConfig::~TrainEvalPipelineConfig() {
  // @@protoc_insertion_point(destructor:second.protos.TrainEvalPipelineConfig)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TrainEvalPipelineConfig::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.model_;
  if (this != internal_default_instance()) delete _impl_.train_input_reader_;
  if (this != internal_default_instance()) delete _impl_.train_config_;
  if (this != internal_default_instance()) delete _impl_.eval_input_reader_;
}

void TrainEvalPipelineConfig::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TrainEvalPipelineConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:second.protos.TrainEvalPipelineConfig)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaForAllocation() == nullptr && _impl_.model_ != nullptr) {
    delete _impl_.model_;
  }
  _impl_.model_ = nullptr;
  if (GetArenaForAllocation() == nullptr && _impl_.train_input_reader_ != nullptr) {
    delete _impl_.train_input_reader_;
  }
  _impl_.train_input_reader_ = nullptr;
  if (GetArenaForAllocation() == nullptr && _impl_.train_config_ != nullptr) {
    delete _impl_.train_config_;
  }
  _impl_.train_config_ = nullptr;
  if (GetArenaForAllocation() == nullptr && _impl_.eval_input_reader_ != nullptr) {
    delete _impl_.eval_input_reader_;
  }
  _impl_.eval_input_reader_ = nullptr;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TrainEvalPipelineConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .second.protos.DetectionModel model = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_model(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .second.protos.InputReader train_input_reader = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_train_input_reader(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .second.protos.TrainConfig train_config = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_train_config(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .second.protos.InputReader eval_input_reader = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_eval_input_reader(), 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TrainEvalPipelineConfig::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:second.protos.TrainEvalPipelineConfig)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .second.protos.DetectionModel model = 1;
  if (this->_internal_has_model()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::model(this),
        _Internal::model(this).GetCachedSize(), target, stream);
  }

  // .second.protos.InputReader train_input_reader = 2;
  if (this->_internal_has_train_input_reader()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::train_input_reader(this),
        _Internal::train_input_reader(this).GetCachedSize(), target, stream);
  }

  // .second.protos.TrainConfig train_config = 3;
  if (this->_internal_has_train_config()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::train_config(this),
        _Internal::train_config(this).GetCachedSize(), target, stream);
  }

  // .second.protos.InputReader eval_input_reader = 4;
  if (this->_internal_has_eval_input_reader()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::eval_input_reader(this),
        _Internal::eval_input_reader(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:second.protos.TrainEvalPipelineConfig)
  return target;
}

size_t TrainEvalPipelineConfig::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:second.protos.TrainEvalPipelineConfig)
  size_t total_size = 0;

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

  // .second.protos.DetectionModel model = 1;
  if (this->_internal_has_model()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.model_);
  }

  // .second.protos.InputReader train_input_reader = 2;
  if (this->_internal_has_train_input_reader()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.train_input_reader_);
  }

  // .second.protos.TrainConfig train_config = 3;
  if (this->_internal_has_train_config()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.train_config_);
  }

  // .second.protos.InputReader eval_input_reader = 4;
  if (this->_internal_has_eval_input_reader()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.eval_input_reader_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TrainEvalPipelineConfig::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TrainEvalPipelineConfig::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TrainEvalPipelineConfig::GetClassData() const { return &_class_data_; }


void TrainEvalPipelineConfig::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TrainEvalPipelineConfig*>(&to_msg);
  auto& from = static_cast<const TrainEvalPipelineConfig&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:second.protos.TrainEvalPipelineConfig)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_model()) {
    _this->_internal_mutable_model()->::second::protos::DetectionModel::MergeFrom(
        from._internal_model());
  }
  if (from._internal_has_train_input_reader()) {
    _this->_internal_mutable_train_input_reader()->::second::protos::InputReader::MergeFrom(
        from._internal_train_input_reader());
  }
  if (from._internal_has_train_config()) {
    _this->_internal_mutable_train_config()->::second::protos::TrainConfig::MergeFrom(
        from._internal_train_config());
  }
  if (from._internal_has_eval_input_reader()) {
    _this->_internal_mutable_eval_input_reader()->::second::protos::InputReader::MergeFrom(
        from._internal_eval_input_reader());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TrainEvalPipelineConfig::CopyFrom(const TrainEvalPipelineConfig& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:second.protos.TrainEvalPipelineConfig)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TrainEvalPipelineConfig::InternalSwap(TrainEvalPipelineConfig* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TrainEvalPipelineConfig, _impl_.eval_input_reader_)
      + sizeof(TrainEvalPipelineConfig::_impl_.eval_input_reader_)
      - PROTOBUF_FIELD_OFFSET(TrainEvalPipelineConfig, _impl_.model_)>(
          reinterpret_cast<char*>(&_impl_.model_),
          reinterpret_cast<char*>(&other->_impl_.model_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TrainEvalPipelineConfig::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_second_2fprotos_2fpipeline_2eproto_getter, &descriptor_table_second_2fprotos_2fpipeline_2eproto_once,
      file_level_metadata_second_2fprotos_2fpipeline_2eproto[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace protos
}  // namespace second
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::second::protos::TrainEvalPipelineConfig*
Arena::CreateMaybeMessage< ::second::protos::TrainEvalPipelineConfig >(Arena* arena) {
  return Arena::CreateMessageInternal< ::second::protos::TrainEvalPipelineConfig >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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