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

#include "object_detection/protos/input_reader.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 object_detection {
namespace protos {
PROTOBUF_CONSTEXPR InputReader::InputReader(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.label_map_path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.num_epochs_)*/0u
  , /*decltype(_impl_.num_keypoints_)*/0u
  , /*decltype(_impl_.load_multiclass_scores_)*/false
  , /*decltype(_impl_.load_instance_masks_)*/false
  , /*decltype(_impl_.use_display_name_)*/false
  , /*decltype(_impl_.num_additional_channels_)*/0
  , /*decltype(_impl_.shuffle_)*/true
  , /*decltype(_impl_.queue_capacity_)*/2000u
  , /*decltype(_impl_.min_after_dequeue_)*/1000u
  , /*decltype(_impl_.num_readers_)*/64u
  , /*decltype(_impl_.mask_type_)*/1
  , /*decltype(_impl_.shuffle_buffer_size_)*/2048u
  , /*decltype(_impl_.filenames_shuffle_buffer_size_)*/100u
  , /*decltype(_impl_.prefetch_size_)*/512u
  , /*decltype(_impl_.num_parallel_map_calls_)*/64u
  , /*decltype(_impl_.read_block_length_)*/32u
  , /*decltype(_impl_.num_parallel_batches_)*/8u
  , /*decltype(_impl_.num_prefetch_batches_)*/2
  , /*decltype(_impl_.max_number_of_boxes_)*/100
  , /*decltype(_impl_.sample_1_of_n_examples_)*/1u
  , /*decltype(_impl_.input_reader_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct InputReaderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InputReaderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InputReaderDefaultTypeInternal() {}
  union {
    InputReader _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InputReaderDefaultTypeInternal _InputReader_default_instance_;
PROTOBUF_CONSTEXPR TFRecordInputReader::TFRecordInputReader(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.input_path_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct TFRecordInputReaderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TFRecordInputReaderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TFRecordInputReaderDefaultTypeInternal() {}
  union {
    TFRecordInputReader _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TFRecordInputReaderDefaultTypeInternal _TFRecordInputReader_default_instance_;
PROTOBUF_CONSTEXPR ExternalInputReader::ExternalInputReader(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._extensions_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ExternalInputReaderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ExternalInputReaderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ExternalInputReaderDefaultTypeInternal() {}
  union {
    ExternalInputReader _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExternalInputReaderDefaultTypeInternal _ExternalInputReader_default_instance_;
}  // namespace protos
}  // namespace object_detection
static ::_pb::Metadata file_level_metadata_object_5fdetection_2fprotos_2finput_5freader_2eproto[3];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_object_5fdetection_2fprotos_2finput_5freader_2eproto[1];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_object_5fdetection_2fprotos_2finput_5freader_2eproto = nullptr;

const uint32_t TableStruct_object_5fdetection_2fprotos_2finput_5freader_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.label_map_path_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.shuffle_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.shuffle_buffer_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.filenames_shuffle_buffer_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_epochs_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.sample_1_of_n_examples_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_readers_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_parallel_batches_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_prefetch_batches_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.queue_capacity_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.min_after_dequeue_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.read_block_length_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.prefetch_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_parallel_map_calls_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_additional_channels_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.num_keypoints_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.max_number_of_boxes_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.load_multiclass_scores_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.load_instance_masks_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.mask_type_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.use_display_name_),
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::InputReader, _impl_.input_reader_),
  1,
  0,
  8,
  13,
  14,
  2,
  21,
  11,
  18,
  19,
  9,
  10,
  17,
  15,
  16,
  7,
  3,
  20,
  4,
  5,
  12,
  6,
  ~0u,
  ~0u,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::TFRecordInputReader, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::TFRecordInputReader, _impl_.input_path_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ExternalInputReader, _internal_metadata_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ExternalInputReader, _impl_._extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 31, -1, sizeof(::object_detection::protos::InputReader)},
  { 55, -1, -1, sizeof(::object_detection::protos::TFRecordInputReader)},
  { 62, -1, -1, sizeof(::object_detection::protos::ExternalInputReader)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::object_detection::protos::_InputReader_default_instance_._instance,
  &::object_detection::protos::_TFRecordInputReader_default_instance_._instance,
  &::object_detection::protos::_ExternalInputReader_default_instance_._instance,
};

const char descriptor_table_protodef_object_5fdetection_2fprotos_2finput_5freader_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n*object_detection/protos/input_reader.p"
  "roto\022\027object_detection.protos\"\252\007\n\013InputR"
  "eader\022\016\n\004name\030\027 \001(\t:\000\022\030\n\016label_map_path\030"
  "\001 \001(\t:\000\022\025\n\007shuffle\030\002 \001(\010:\004true\022!\n\023shuffl"
  "e_buffer_size\030\013 \001(\r:\0042048\022*\n\035filenames_s"
  "huffle_buffer_size\030\014 \001(\r:\003100\022\025\n\nnum_epo"
  "chs\030\005 \001(\r:\0010\022!\n\026sample_1_of_n_examples\030\026"
  " \001(\r:\0011\022\027\n\013num_readers\030\006 \001(\r:\00264\022\037\n\024num_"
  "parallel_batches\030\023 \001(\r:\0018\022\037\n\024num_prefetc"
  "h_batches\030\024 \001(\005:\0012\022 \n\016queue_capacity\030\003 \001"
  "(\r:\0042000B\002\030\001\022#\n\021min_after_dequeue\030\004 \001(\r:"
  "\0041000B\002\030\001\022\035\n\021read_block_length\030\017 \001(\r:\00232"
  "\022\036\n\rprefetch_size\030\r \001(\r:\003512B\002\030\001\022&\n\026num_"
  "parallel_map_calls\030\016 \001(\r:\00264B\002\030\001\022\"\n\027num_"
  "additional_channels\030\022 \001(\005:\0010\022\030\n\rnum_keyp"
  "oints\030\020 \001(\r:\0010\022 \n\023max_number_of_boxes\030\025 "
  "\001(\005:\003100\022%\n\026load_multiclass_scores\030\030 \001(\010"
  ":\005false\022\"\n\023load_instance_masks\030\007 \001(\010:\005fa"
  "lse\022M\n\tmask_type\030\n \001(\0162).object_detectio"
  "n.protos.InstanceMaskType:\017NUMERICAL_MAS"
  "KS\022\037\n\020use_display_name\030\021 \001(\010:\005false\022N\n\026t"
  "f_record_input_reader\030\010 \001(\0132,.object_det"
  "ection.protos.TFRecordInputReaderH\000\022M\n\025e"
  "xternal_input_reader\030\t \001(\0132,.object_dete"
  "ction.protos.ExternalInputReaderH\000B\016\n\014in"
  "put_reader\")\n\023TFRecordInputReader\022\022\n\ninp"
  "ut_path\030\001 \003(\t\"\034\n\023ExternalInputReader*\005\010\001"
  "\020\350\007*C\n\020InstanceMaskType\022\013\n\007DEFAULT\020\000\022\023\n\017"
  "NUMERICAL_MASKS\020\001\022\r\n\tPNG_MASKS\020\002"
  ;
static ::_pbi::once_flag descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto = {
    false, false, 1152, descriptor_table_protodef_object_5fdetection_2fprotos_2finput_5freader_2eproto,
    "object_detection/protos/input_reader.proto",
    &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_once, nullptr, 0, 3,
    schemas, file_default_instances, TableStruct_object_5fdetection_2fprotos_2finput_5freader_2eproto::offsets,
    file_level_metadata_object_5fdetection_2fprotos_2finput_5freader_2eproto, file_level_enum_descriptors_object_5fdetection_2fprotos_2finput_5freader_2eproto,
    file_level_service_descriptors_object_5fdetection_2fprotos_2finput_5freader_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_getter() {
  return &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_object_5fdetection_2fprotos_2finput_5freader_2eproto(&descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto);
namespace object_detection {
namespace protos {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* InstanceMaskType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto);
  return file_level_enum_descriptors_object_5fdetection_2fprotos_2finput_5freader_2eproto[0];
}
bool InstanceMaskType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}


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

class InputReader::_Internal {
 public:
  using HasBits = decltype(std::declval<InputReader>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_label_map_path(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_shuffle(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_shuffle_buffer_size(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_filenames_shuffle_buffer_size(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_num_epochs(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_sample_1_of_n_examples(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static void set_has_num_readers(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_num_parallel_batches(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static void set_has_num_prefetch_batches(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static void set_has_queue_capacity(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_min_after_dequeue(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_read_block_length(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static void set_has_prefetch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static void set_has_num_parallel_map_calls(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_num_additional_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_num_keypoints(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_max_number_of_boxes(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static void set_has_load_multiclass_scores(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_load_instance_masks(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_mask_type(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_use_display_name(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::object_detection::protos::TFRecordInputReader& tf_record_input_reader(const InputReader* msg);
  static const ::object_detection::protos::ExternalInputReader& external_input_reader(const InputReader* msg);
};

const ::object_detection::protos::TFRecordInputReader&
InputReader::_Internal::tf_record_input_reader(const InputReader* msg) {
  return *msg->_impl_.input_reader_.tf_record_input_reader_;
}
const ::object_detection::protos::ExternalInputReader&
InputReader::_Internal::external_input_reader(const InputReader* msg) {
  return *msg->_impl_.input_reader_.external_input_reader_;
}
void InputReader::set_allocated_tf_record_input_reader(::object_detection::protos::TFRecordInputReader* tf_record_input_reader) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_input_reader();
  if (tf_record_input_reader) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tf_record_input_reader);
    if (message_arena != submessage_arena) {
      tf_record_input_reader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, tf_record_input_reader, submessage_arena);
    }
    set_has_tf_record_input_reader();
    _impl_.input_reader_.tf_record_input_reader_ = tf_record_input_reader;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.InputReader.tf_record_input_reader)
}
void InputReader::set_allocated_external_input_reader(::object_detection::protos::ExternalInputReader* external_input_reader) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_input_reader();
  if (external_input_reader) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(external_input_reader);
    if (message_arena != submessage_arena) {
      external_input_reader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, external_input_reader, submessage_arena);
    }
    set_has_external_input_reader();
    _impl_.input_reader_.external_input_reader_ = external_input_reader;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.InputReader.external_input_reader)
}
InputReader::InputReader(::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:object_detection.protos.InputReader)
}
InputReader::InputReader(const InputReader& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InputReader* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.label_map_path_){}
    , decltype(_impl_.name_){}
    , decltype(_impl_.num_epochs_){}
    , decltype(_impl_.num_keypoints_){}
    , decltype(_impl_.load_multiclass_scores_){}
    , decltype(_impl_.load_instance_masks_){}
    , decltype(_impl_.use_display_name_){}
    , decltype(_impl_.num_additional_channels_){}
    , decltype(_impl_.shuffle_){}
    , decltype(_impl_.queue_capacity_){}
    , decltype(_impl_.min_after_dequeue_){}
    , decltype(_impl_.num_readers_){}
    , decltype(_impl_.mask_type_){}
    , decltype(_impl_.shuffle_buffer_size_){}
    , decltype(_impl_.filenames_shuffle_buffer_size_){}
    , decltype(_impl_.prefetch_size_){}
    , decltype(_impl_.num_parallel_map_calls_){}
    , decltype(_impl_.read_block_length_){}
    , decltype(_impl_.num_parallel_batches_){}
    , decltype(_impl_.num_prefetch_batches_){}
    , decltype(_impl_.max_number_of_boxes_){}
    , decltype(_impl_.sample_1_of_n_examples_){}
    , decltype(_impl_.input_reader_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.label_map_path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.label_map_path_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_label_map_path()) {
    _this->_impl_.label_map_path_.Set(from._internal_label_map_path(), 
      _this->GetArenaForAllocation());
  }
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.num_epochs_, &from._impl_.num_epochs_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.sample_1_of_n_examples_) -
    reinterpret_cast<char*>(&_impl_.num_epochs_)) + sizeof(_impl_.sample_1_of_n_examples_));
  clear_has_input_reader();
  switch (from.input_reader_case()) {
    case kTfRecordInputReader: {
      _this->_internal_mutable_tf_record_input_reader()->::object_detection::protos::TFRecordInputReader::MergeFrom(
          from._internal_tf_record_input_reader());
      break;
    }
    case kExternalInputReader: {
      _this->_internal_mutable_external_input_reader()->::object_detection::protos::ExternalInputReader::MergeFrom(
          from._internal_external_input_reader());
      break;
    }
    case INPUT_READER_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.InputReader)
}

inline void InputReader::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.label_map_path_){}
    , decltype(_impl_.name_){}
    , decltype(_impl_.num_epochs_){0u}
    , decltype(_impl_.num_keypoints_){0u}
    , decltype(_impl_.load_multiclass_scores_){false}
    , decltype(_impl_.load_instance_masks_){false}
    , decltype(_impl_.use_display_name_){false}
    , decltype(_impl_.num_additional_channels_){0}
    , decltype(_impl_.shuffle_){true}
    , decltype(_impl_.queue_capacity_){2000u}
    , decltype(_impl_.min_after_dequeue_){1000u}
    , decltype(_impl_.num_readers_){64u}
    , decltype(_impl_.mask_type_){1}
    , decltype(_impl_.shuffle_buffer_size_){2048u}
    , decltype(_impl_.filenames_shuffle_buffer_size_){100u}
    , decltype(_impl_.prefetch_size_){512u}
    , decltype(_impl_.num_parallel_map_calls_){64u}
    , decltype(_impl_.read_block_length_){32u}
    , decltype(_impl_.num_parallel_batches_){8u}
    , decltype(_impl_.num_prefetch_batches_){2}
    , decltype(_impl_.max_number_of_boxes_){100}
    , decltype(_impl_.sample_1_of_n_examples_){1u}
    , decltype(_impl_.input_reader_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  _impl_.label_map_path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.label_map_path_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  clear_has_input_reader();
}

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

inline void InputReader::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.label_map_path_.Destroy();
  _impl_.name_.Destroy();
  if (has_input_reader()) {
    clear_input_reader();
  }
}

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

void InputReader::clear_input_reader() {
// @@protoc_insertion_point(one_of_clear_start:object_detection.protos.InputReader)
  switch (input_reader_case()) {
    case kTfRecordInputReader: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.input_reader_.tf_record_input_reader_;
      }
      break;
    }
    case kExternalInputReader: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.input_reader_.external_input_reader_;
      }
      break;
    }
    case INPUT_READER_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = INPUT_READER_NOT_SET;
}


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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.label_map_path_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.num_epochs_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.num_additional_channels_) -
        reinterpret_cast<char*>(&_impl_.num_epochs_)) + sizeof(_impl_.num_additional_channels_));
  }
  if (cached_has_bits & 0x0000ff00u) {
    _impl_.shuffle_ = true;
    _impl_.queue_capacity_ = 2000u;
    _impl_.min_after_dequeue_ = 1000u;
    _impl_.num_readers_ = 64u;
    _impl_.mask_type_ = 1;
    _impl_.shuffle_buffer_size_ = 2048u;
    _impl_.filenames_shuffle_buffer_size_ = 100u;
    _impl_.prefetch_size_ = 512u;
  }
  if (cached_has_bits & 0x003f0000u) {
    _impl_.num_parallel_map_calls_ = 64u;
    _impl_.read_block_length_ = 32u;
    _impl_.num_parallel_batches_ = 8u;
    _impl_.num_prefetch_batches_ = 2;
    _impl_.max_number_of_boxes_ = 100;
    _impl_.sample_1_of_n_examples_ = 1u;
  }
  clear_input_reader();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InputReader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string label_map_path = 1 [default = ""];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_label_map_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "object_detection.protos.InputReader.label_map_path");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bool shuffle = 2 [default = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_shuffle(&has_bits);
          _impl_.shuffle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 queue_capacity = 3 [default = 2000, deprecated = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_queue_capacity(&has_bits);
          _impl_.queue_capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 min_after_dequeue = 4 [default = 1000, deprecated = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_min_after_dequeue(&has_bits);
          _impl_.min_after_dequeue_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_epochs = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_num_epochs(&has_bits);
          _impl_.num_epochs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_readers = 6 [default = 64];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_num_readers(&has_bits);
          _impl_.num_readers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool load_instance_masks = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_load_instance_masks(&has_bits);
          _impl_.load_instance_masks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.TFRecordInputReader tf_record_input_reader = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_tf_record_input_reader(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.ExternalInputReader external_input_reader = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_external_input_reader(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.InstanceMaskType mask_type = 10 [default = NUMERICAL_MASKS];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::object_detection::protos::InstanceMaskType_IsValid(val))) {
            _internal_set_mask_type(static_cast<::object_detection::protos::InstanceMaskType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional uint32 shuffle_buffer_size = 11 [default = 2048];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_shuffle_buffer_size(&has_bits);
          _impl_.shuffle_buffer_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 filenames_shuffle_buffer_size = 12 [default = 100];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_filenames_shuffle_buffer_size(&has_bits);
          _impl_.filenames_shuffle_buffer_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 prefetch_size = 13 [default = 512, deprecated = true];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_prefetch_size(&has_bits);
          _impl_.prefetch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_parallel_map_calls = 14 [default = 64, deprecated = true];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_num_parallel_map_calls(&has_bits);
          _impl_.num_parallel_map_calls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 read_block_length = 15 [default = 32];
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
          _Internal::set_has_read_block_length(&has_bits);
          _impl_.read_block_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_keypoints = 16 [default = 0];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          _Internal::set_has_num_keypoints(&has_bits);
          _impl_.num_keypoints_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_display_name = 17 [default = false];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
          _Internal::set_has_use_display_name(&has_bits);
          _impl_.use_display_name_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_additional_channels = 18 [default = 0];
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
          _Internal::set_has_num_additional_channels(&has_bits);
          _impl_.num_additional_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_parallel_batches = 19 [default = 8];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
          _Internal::set_has_num_parallel_batches(&has_bits);
          _impl_.num_parallel_batches_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_prefetch_batches = 20 [default = 2];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
          _Internal::set_has_num_prefetch_batches(&has_bits);
          _impl_.num_prefetch_batches_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_number_of_boxes = 21 [default = 100];
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
          _Internal::set_has_max_number_of_boxes(&has_bits);
          _impl_.max_number_of_boxes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 sample_1_of_n_examples = 22 [default = 1];
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
          _Internal::set_has_sample_1_of_n_examples(&has_bits);
          _impl_.sample_1_of_n_examples_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string name = 23 [default = ""];
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "object_detection.protos.InputReader.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bool load_multiclass_scores = 24 [default = false];
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 192)) {
          _Internal::set_has_load_multiclass_scores(&has_bits);
          _impl_.load_multiclass_scores_ = ::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // optional string label_map_path = 1 [default = ""];
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_label_map_path().data(), static_cast<int>(this->_internal_label_map_path().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "object_detection.protos.InputReader.label_map_path");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_label_map_path(), target);
  }

  // optional bool shuffle = 2 [default = true];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_shuffle(), target);
  }

  // optional uint32 queue_capacity = 3 [default = 2000, deprecated = true];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_queue_capacity(), target);
  }

  // optional uint32 min_after_dequeue = 4 [default = 1000, deprecated = true];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_min_after_dequeue(), target);
  }

  // optional uint32 num_epochs = 5 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_num_epochs(), target);
  }

  // optional uint32 num_readers = 6 [default = 64];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_readers(), target);
  }

  // optional bool load_instance_masks = 7 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_load_instance_masks(), target);
  }

  switch (input_reader_case()) {
    case kTfRecordInputReader: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, _Internal::tf_record_input_reader(this),
          _Internal::tf_record_input_reader(this).GetCachedSize(), target, stream);
      break;
    }
    case kExternalInputReader: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(9, _Internal::external_input_reader(this),
          _Internal::external_input_reader(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  // optional .object_detection.protos.InstanceMaskType mask_type = 10 [default = NUMERICAL_MASKS];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      10, this->_internal_mask_type(), target);
  }

  // optional uint32 shuffle_buffer_size = 11 [default = 2048];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(11, this->_internal_shuffle_buffer_size(), target);
  }

  // optional uint32 filenames_shuffle_buffer_size = 12 [default = 100];
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(12, this->_internal_filenames_shuffle_buffer_size(), target);
  }

  // optional uint32 prefetch_size = 13 [default = 512, deprecated = true];
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(13, this->_internal_prefetch_size(), target);
  }

  // optional uint32 num_parallel_map_calls = 14 [default = 64, deprecated = true];
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(14, this->_internal_num_parallel_map_calls(), target);
  }

  // optional uint32 read_block_length = 15 [default = 32];
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(15, this->_internal_read_block_length(), target);
  }

  // optional uint32 num_keypoints = 16 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(16, this->_internal_num_keypoints(), target);
  }

  // optional bool use_display_name = 17 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_use_display_name(), target);
  }

  // optional int32 num_additional_channels = 18 [default = 0];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_num_additional_channels(), target);
  }

  // optional uint32 num_parallel_batches = 19 [default = 8];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(19, this->_internal_num_parallel_batches(), target);
  }

  // optional int32 num_prefetch_batches = 20 [default = 2];
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(20, this->_internal_num_prefetch_batches(), target);
  }

  // optional int32 max_number_of_boxes = 21 [default = 100];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(21, this->_internal_max_number_of_boxes(), target);
  }

  // optional uint32 sample_1_of_n_examples = 22 [default = 1];
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(22, this->_internal_sample_1_of_n_examples(), target);
  }

  // optional string name = 23 [default = ""];
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "object_detection.protos.InputReader.name");
    target = stream->WriteStringMaybeAliased(
        23, this->_internal_name(), target);
  }

  // optional bool load_multiclass_scores = 24 [default = false];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(24, this->_internal_load_multiclass_scores(), target);
  }

  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:object_detection.protos.InputReader)
  return target;
}

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string label_map_path = 1 [default = ""];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_label_map_path());
    }

    // optional string name = 23 [default = ""];
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional uint32 num_epochs = 5 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_epochs());
    }

    // optional uint32 num_keypoints = 16 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_num_keypoints());
    }

    // optional bool load_multiclass_scores = 24 [default = false];
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 + 1;
    }

    // optional bool load_instance_masks = 7 [default = false];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional bool use_display_name = 17 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 + 1;
    }

    // optional int32 num_additional_channels = 18 [default = 0];
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_num_additional_channels());
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional bool shuffle = 2 [default = true];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 + 1;
    }

    // optional uint32 queue_capacity = 3 [default = 2000, deprecated = true];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_queue_capacity());
    }

    // optional uint32 min_after_dequeue = 4 [default = 1000, deprecated = true];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_min_after_dequeue());
    }

    // optional uint32 num_readers = 6 [default = 64];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_readers());
    }

    // optional .object_detection.protos.InstanceMaskType mask_type = 10 [default = NUMERICAL_MASKS];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_mask_type());
    }

    // optional uint32 shuffle_buffer_size = 11 [default = 2048];
    if (cached_has_bits & 0x00002000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_shuffle_buffer_size());
    }

    // optional uint32 filenames_shuffle_buffer_size = 12 [default = 100];
    if (cached_has_bits & 0x00004000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_filenames_shuffle_buffer_size());
    }

    // optional uint32 prefetch_size = 13 [default = 512, deprecated = true];
    if (cached_has_bits & 0x00008000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_prefetch_size());
    }

  }
  if (cached_has_bits & 0x003f0000u) {
    // optional uint32 num_parallel_map_calls = 14 [default = 64, deprecated = true];
    if (cached_has_bits & 0x00010000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_parallel_map_calls());
    }

    // optional uint32 read_block_length = 15 [default = 32];
    if (cached_has_bits & 0x00020000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_read_block_length());
    }

    // optional uint32 num_parallel_batches = 19 [default = 8];
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_num_parallel_batches());
    }

    // optional int32 num_prefetch_batches = 20 [default = 2];
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_num_prefetch_batches());
    }

    // optional int32 max_number_of_boxes = 21 [default = 100];
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_max_number_of_boxes());
    }

    // optional uint32 sample_1_of_n_examples = 22 [default = 1];
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_sample_1_of_n_examples());
    }

  }
  switch (input_reader_case()) {
    // .object_detection.protos.TFRecordInputReader tf_record_input_reader = 8;
    case kTfRecordInputReader: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.input_reader_.tf_record_input_reader_);
      break;
    }
    // .object_detection.protos.ExternalInputReader external_input_reader = 9;
    case kExternalInputReader: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.input_reader_.external_input_reader_);
      break;
    }
    case INPUT_READER_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_label_map_path(from._internal_label_map_path());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_epochs_ = from._impl_.num_epochs_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.num_keypoints_ = from._impl_.num_keypoints_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.load_multiclass_scores_ = from._impl_.load_multiclass_scores_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.load_instance_masks_ = from._impl_.load_instance_masks_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.use_display_name_ = from._impl_.use_display_name_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.num_additional_channels_ = from._impl_.num_additional_channels_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.shuffle_ = from._impl_.shuffle_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.queue_capacity_ = from._impl_.queue_capacity_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.min_after_dequeue_ = from._impl_.min_after_dequeue_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.num_readers_ = from._impl_.num_readers_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.mask_type_ = from._impl_.mask_type_;
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_impl_.shuffle_buffer_size_ = from._impl_.shuffle_buffer_size_;
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_impl_.filenames_shuffle_buffer_size_ = from._impl_.filenames_shuffle_buffer_size_;
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_impl_.prefetch_size_ = from._impl_.prefetch_size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x003f0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_impl_.num_parallel_map_calls_ = from._impl_.num_parallel_map_calls_;
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_impl_.read_block_length_ = from._impl_.read_block_length_;
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_impl_.num_parallel_batches_ = from._impl_.num_parallel_batches_;
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_impl_.num_prefetch_batches_ = from._impl_.num_prefetch_batches_;
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_impl_.max_number_of_boxes_ = from._impl_.max_number_of_boxes_;
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_impl_.sample_1_of_n_examples_ = from._impl_.sample_1_of_n_examples_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  switch (from.input_reader_case()) {
    case kTfRecordInputReader: {
      _this->_internal_mutable_tf_record_input_reader()->::object_detection::protos::TFRecordInputReader::MergeFrom(
          from._internal_tf_record_input_reader());
      break;
    }
    case kExternalInputReader: {
      _this->_internal_mutable_external_input_reader()->::object_detection::protos::ExternalInputReader::MergeFrom(
          from._internal_external_input_reader());
      break;
    }
    case INPUT_READER_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool InputReader::IsInitialized() const {
  switch (input_reader_case()) {
    case kTfRecordInputReader: {
      break;
    }
    case kExternalInputReader: {
      if (_internal_has_external_input_reader()) {
        if (!_impl_.input_reader_.external_input_reader_->IsInitialized()) return false;
      }
      break;
    }
    case INPUT_READER_NOT_SET: {
      break;
    }
  }
  return true;
}

void InputReader::InternalSwap(InputReader* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.label_map_path_, lhs_arena,
      &other->_impl_.label_map_path_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(InputReader, _impl_.num_additional_channels_)
      + sizeof(InputReader::_impl_.num_additional_channels_)
      - PROTOBUF_FIELD_OFFSET(InputReader, _impl_.num_epochs_)>(
          reinterpret_cast<char*>(&_impl_.num_epochs_),
          reinterpret_cast<char*>(&other->_impl_.num_epochs_));
  swap(_impl_.shuffle_, other->_impl_.shuffle_);
  swap(_impl_.queue_capacity_, other->_impl_.queue_capacity_);
  swap(_impl_.min_after_dequeue_, other->_impl_.min_after_dequeue_);
  swap(_impl_.num_readers_, other->_impl_.num_readers_);
  swap(_impl_.mask_type_, other->_impl_.mask_type_);
  swap(_impl_.shuffle_buffer_size_, other->_impl_.shuffle_buffer_size_);
  swap(_impl_.filenames_shuffle_buffer_size_, other->_impl_.filenames_shuffle_buffer_size_);
  swap(_impl_.prefetch_size_, other->_impl_.prefetch_size_);
  swap(_impl_.num_parallel_map_calls_, other->_impl_.num_parallel_map_calls_);
  swap(_impl_.read_block_length_, other->_impl_.read_block_length_);
  swap(_impl_.num_parallel_batches_, other->_impl_.num_parallel_batches_);
  swap(_impl_.num_prefetch_batches_, other->_impl_.num_prefetch_batches_);
  swap(_impl_.max_number_of_boxes_, other->_impl_.max_number_of_boxes_);
  swap(_impl_.sample_1_of_n_examples_, other->_impl_.sample_1_of_n_examples_);
  swap(_impl_.input_reader_, other->_impl_.input_reader_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata InputReader::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2finput_5freader_2eproto[0]);
}

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

class TFRecordInputReader::_Internal {
 public:
};

TFRecordInputReader::TFRecordInputReader(::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:object_detection.protos.TFRecordInputReader)
}
TFRecordInputReader::TFRecordInputReader(const TFRecordInputReader& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TFRecordInputReader* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.input_path_){from._impl_.input_path_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.TFRecordInputReader)
}

inline void TFRecordInputReader::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.input_path_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void TFRecordInputReader::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.input_path_.~RepeatedPtrField();
}

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

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

  _impl_.input_path_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TFRecordInputReader::_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) {
      // repeated string input_path = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_input_path();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "object_detection.protos.TFRecordInputReader.input_path");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* TFRecordInputReader::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.TFRecordInputReader)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string input_path = 1;
  for (int i = 0, n = this->_internal_input_path_size(); i < n; i++) {
    const auto& s = this->_internal_input_path(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "object_detection.protos.TFRecordInputReader.input_path");
    target = stream->WriteString(1, s, target);
  }

  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:object_detection.protos.TFRecordInputReader)
  return target;
}

size_t TFRecordInputReader::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.TFRecordInputReader)
  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 string input_path = 1;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.input_path_.size());
  for (int i = 0, n = _impl_.input_path_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.input_path_.Get(i));
  }

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

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


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

  _this->_impl_.input_path_.MergeFrom(from._impl_.input_path_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata TFRecordInputReader::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2finput_5freader_2eproto[1]);
}

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

class ExternalInputReader::_Internal {
 public:
};

ExternalInputReader::ExternalInputReader(::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:object_detection.protos.ExternalInputReader)
}
ExternalInputReader::ExternalInputReader(const ExternalInputReader& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ExternalInputReader* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      /*decltype(_impl_._extensions_)*/{}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.ExternalInputReader)
}

inline void ExternalInputReader::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void ExternalInputReader::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_._extensions_.~ExtensionSet();
}

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

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

  _impl_._extensions_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ExternalInputReader::_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);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    if ((8u <= tag && tag < 8000u)) {
      ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
      CHK_(ptr != nullptr);
      continue;
    }
    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* ExternalInputReader::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.ExternalInputReader)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // Extension range [1, 1000)
  target = _impl_._extensions_._InternalSerialize(
  internal_default_instance(), 1, 1000, 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:object_detection.protos.ExternalInputReader)
  return target;
}

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

  total_size += _impl_._extensions_.ByteSize();

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

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

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


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

  _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool ExternalInputReader::IsInitialized() const {
  if (!_impl_._extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

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

::PROTOBUF_NAMESPACE_ID::Metadata ExternalInputReader::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2finput_5freader_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2finput_5freader_2eproto[2]);
}

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

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