Skip to content

File detection.pb.cc

File List > formats > detection.pb.cc

Go to the documentation of this file

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mediapipe/framework/formats/detection.proto

#include "mediapipe/framework/formats/detection.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 mediapipe {
constexpr Detection_AssociatedDetection::Detection_AssociatedDetection(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : id_(0)
  , confidence_(0){}
struct Detection_AssociatedDetectionDefaultTypeInternal {
  constexpr Detection_AssociatedDetectionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~Detection_AssociatedDetectionDefaultTypeInternal() {}
  union {
    Detection_AssociatedDetection _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Detection_AssociatedDetectionDefaultTypeInternal _Detection_AssociatedDetection_default_instance_;
constexpr Detection::Detection(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : label_()
  , label_id_()
  , _label_id_cached_byte_size_(0)
  , score_()
  , associated_detections_()
  , display_name_()
  , feature_tag_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , track_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , location_data_(nullptr)
  , detection_id_(int64_t{0})
  , timestamp_usec_(int64_t{0}){}
struct DetectionDefaultTypeInternal {
  constexpr DetectionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DetectionDefaultTypeInternal() {}
  union {
    Detection _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DetectionDefaultTypeInternal _Detection_default_instance_;
constexpr DetectionList::DetectionList(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : detection_(){}
struct DetectionListDefaultTypeInternal {
  constexpr DetectionListDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DetectionListDefaultTypeInternal() {}
  union {
    DetectionList _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DetectionListDefaultTypeInternal _DetectionList_default_instance_;
}  // namespace mediapipe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mediapipe_2fframework_2fformats_2fdetection_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_mediapipe_2fframework_2fformats_2fdetection_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mediapipe_2fframework_2fformats_2fdetection_2eproto = nullptr;

const uint32_t TableStruct_mediapipe_2fframework_2fformats_2fdetection_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection_AssociatedDetection, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection_AssociatedDetection, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection_AssociatedDetection, id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection_AssociatedDetection, confidence_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, label_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, label_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, score_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, location_data_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, feature_tag_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, track_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, detection_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, associated_detections_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, display_name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::Detection, timestamp_usec_),
  ~0u,
  ~0u,
  ~0u,
  2,
  0,
  1,
  3,
  ~0u,
  ~0u,
  4,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::mediapipe::DetectionList, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::DetectionList, detection_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 8, -1, sizeof(::mediapipe::Detection_AssociatedDetection)},
  { 10, 26, -1, sizeof(::mediapipe::Detection)},
  { 36, -1, -1, sizeof(::mediapipe::DetectionList)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_Detection_AssociatedDetection_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_Detection_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_DetectionList_default_instance_),
};

const char descriptor_table_protodef_mediapipe_2fframework_2fformats_2fdetection_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n+mediapipe/framework/formats/detection."
  "proto\022\tmediapipe\032/mediapipe/framework/fo"
  "rmats/location_data.proto\"\336\002\n\tDetection\022"
  "\r\n\005label\030\001 \003(\t\022\024\n\010label_id\030\002 \003(\005B\002\020\001\022\021\n\005"
  "score\030\003 \003(\002B\002\020\001\022.\n\rlocation_data\030\004 \001(\0132\027"
  ".mediapipe.LocationData\022\023\n\013feature_tag\030\005"
  " \001(\t\022\020\n\010track_id\030\006 \001(\t\022\024\n\014detection_id\030\007"
  " \001(\003\022G\n\025associated_detections\030\010 \003(\0132(.me"
  "diapipe.Detection.AssociatedDetection\022\024\n"
  "\014display_name\030\t \003(\t\022\026\n\016timestamp_usec\030\n "
  "\001(\003\0325\n\023AssociatedDetection\022\n\n\002id\030\001 \001(\005\022\022"
  "\n\nconfidence\030\002 \001(\002\"8\n\rDetectionList\022\'\n\td"
  "etection\030\001 \003(\0132\024.mediapipe.DetectionB4\n\""
  "com.google.mediapipe.formats.protoB\016Dete"
  "ctionProto"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_deps[1] = {
  &::descriptor_table_mediapipe_2fframework_2fformats_2flocation_5fdata_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto = {
  false, false, 570, descriptor_table_protodef_mediapipe_2fframework_2fformats_2fdetection_2eproto, "mediapipe/framework/formats/detection.proto", 
  &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_once, descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_deps, 1, 3,
  schemas, file_default_instances, TableStruct_mediapipe_2fframework_2fformats_2fdetection_2eproto::offsets,
  file_level_metadata_mediapipe_2fframework_2fformats_2fdetection_2eproto, file_level_enum_descriptors_mediapipe_2fframework_2fformats_2fdetection_2eproto, file_level_service_descriptors_mediapipe_2fframework_2fformats_2fdetection_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_getter() {
  return &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_mediapipe_2fframework_2fformats_2fdetection_2eproto(&descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto);
namespace mediapipe {

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

class Detection_AssociatedDetection::_Internal {
 public:
  using HasBits = decltype(std::declval<Detection_AssociatedDetection>()._has_bits_);
  static void set_has_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_confidence(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

Detection_AssociatedDetection::Detection_AssociatedDetection(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.Detection.AssociatedDetection)
}
Detection_AssociatedDetection::Detection_AssociatedDetection(const Detection_AssociatedDetection& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&id_, &from.id_,
    static_cast<size_t>(reinterpret_cast<char*>(&confidence_) -
    reinterpret_cast<char*>(&id_)) + sizeof(confidence_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.Detection.AssociatedDetection)
}

inline void Detection_AssociatedDetection::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&id_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&confidence_) -
    reinterpret_cast<char*>(&id_)) + sizeof(confidence_));
}

Detection_AssociatedDetection::~Detection_AssociatedDetection() {
  // @@protoc_insertion_point(destructor:mediapipe.Detection.AssociatedDetection)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

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

void Detection_AssociatedDetection::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.Detection.AssociatedDetection)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    ::memset(&id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&confidence_) -
        reinterpret_cast<char*>(&id_)) + sizeof(confidence_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Detection_AssociatedDetection::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_id(&has_bits);
          id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float confidence = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_confidence(&has_bits);
          confidence_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } 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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Detection_AssociatedDetection::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.Detection.AssociatedDetection)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 id = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
  }

  // optional float confidence = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_confidence(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:mediapipe.Detection.AssociatedDetection)
  return target;
}

size_t Detection_AssociatedDetection::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.Detection.AssociatedDetection)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 id = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_id());
    }

    // optional float confidence = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Detection_AssociatedDetection::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Detection_AssociatedDetection *>(to)->MergeFrom(
      static_cast<const Detection_AssociatedDetection &>(from));
}


void Detection_AssociatedDetection::MergeFrom(const Detection_AssociatedDetection& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.Detection.AssociatedDetection)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      id_ = from.id_;
    }
    if (cached_has_bits & 0x00000002u) {
      confidence_ = from.confidence_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Detection_AssociatedDetection::CopyFrom(const Detection_AssociatedDetection& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.Detection.AssociatedDetection)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Detection_AssociatedDetection::InternalSwap(Detection_AssociatedDetection* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Detection_AssociatedDetection, confidence_)
      + sizeof(Detection_AssociatedDetection::confidence_)
      - PROTOBUF_FIELD_OFFSET(Detection_AssociatedDetection, id_)>(
          reinterpret_cast<char*>(&id_),
          reinterpret_cast<char*>(&other->id_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Detection_AssociatedDetection::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fformats_2fdetection_2eproto[0]);
}

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

class Detection::_Internal {
 public:
  using HasBits = decltype(std::declval<Detection>()._has_bits_);
  static const ::mediapipe::LocationData& location_data(const Detection* msg);
  static void set_has_location_data(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_feature_tag(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_track_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_detection_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_timestamp_usec(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

const ::mediapipe::LocationData&
Detection::_Internal::location_data(const Detection* msg) {
  return *msg->location_data_;
}
void Detection::clear_location_data() {
  if (location_data_ != nullptr) location_data_->Clear();
  _has_bits_[0] &= ~0x00000004u;
}
Detection::Detection(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  label_(arena),
  label_id_(arena),
  score_(arena),
  associated_detections_(arena),
  display_name_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.Detection)
}
Detection::Detection(const Detection& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      label_(from.label_),
      label_id_(from.label_id_),
      score_(from.score_),
      associated_detections_(from.associated_detections_),
      display_name_(from.display_name_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  feature_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    feature_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_feature_tag()) {
    feature_tag_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_feature_tag(), 
      GetArenaForAllocation());
  }
  track_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    track_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_track_id()) {
    track_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_track_id(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_location_data()) {
    location_data_ = new ::mediapipe::LocationData(*from.location_data_);
  } else {
    location_data_ = nullptr;
  }
  ::memcpy(&detection_id_, &from.detection_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&timestamp_usec_) -
    reinterpret_cast<char*>(&detection_id_)) + sizeof(timestamp_usec_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.Detection)
}

inline void Detection::SharedCtor() {
feature_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  feature_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
track_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  track_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&location_data_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&timestamp_usec_) -
    reinterpret_cast<char*>(&location_data_)) + sizeof(timestamp_usec_));
}

Detection::~Detection() {
  // @@protoc_insertion_point(destructor:mediapipe.Detection)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void Detection::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  feature_tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  track_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete location_data_;
}

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

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

  label_.Clear();
  label_id_.Clear();
  score_.Clear();
  associated_detections_.Clear();
  display_name_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      feature_tag_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      track_id_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(location_data_ != nullptr);
      location_data_->Clear();
    }
  }
  if (cached_has_bits & 0x00000018u) {
    ::memset(&detection_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&timestamp_usec_) -
        reinterpret_cast<char*>(&detection_id_)) + sizeof(timestamp_usec_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Detection::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated string label = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_label();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.Detection.label");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated int32 label_id = 2 [packed = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_label_id(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 16) {
          _internal_add_label_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float score = 3 [packed = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_score(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 29) {
          _internal_add_score(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.LocationData location_data = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_location_data(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string feature_tag = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_feature_tag();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.Detection.feature_tag");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string track_id = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_track_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.Detection.track_id");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 detection_id = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_detection_id(&has_bits);
          detection_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.Detection.AssociatedDetection associated_detections = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_associated_detections(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string display_name = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_display_name();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.Detection.display_name");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional int64 timestamp_usec = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_timestamp_usec(&has_bits);
          timestamp_usec_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated string label = 1;
  for (int i = 0, n = this->_internal_label_size(); i < n; i++) {
    const auto& s = this->_internal_label(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.Detection.label");
    target = stream->WriteString(1, s, target);
  }

  // repeated int32 label_id = 2 [packed = true];
  {
    int byte_size = _label_id_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          2, _internal_label_id(), byte_size, target);
    }
  }

  // repeated float score = 3 [packed = true];
  if (this->_internal_score_size() > 0) {
    target = stream->WriteFixedPacked(3, _internal_score(), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional .mediapipe.LocationData location_data = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::location_data(this), target, stream);
  }

  // optional string feature_tag = 5;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_feature_tag().data(), static_cast<int>(this->_internal_feature_tag().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.Detection.feature_tag");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_feature_tag(), target);
  }

  // optional string track_id = 6;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_track_id().data(), static_cast<int>(this->_internal_track_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.Detection.track_id");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_track_id(), target);
  }

  // optional int64 detection_id = 7;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->_internal_detection_id(), target);
  }

  // repeated .mediapipe.Detection.AssociatedDetection associated_detections = 8;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_associated_detections_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, this->_internal_associated_detections(i), target, stream);
  }

  // repeated string display_name = 9;
  for (int i = 0, n = this->_internal_display_name_size(); i < n; i++) {
    const auto& s = this->_internal_display_name(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.Detection.display_name");
    target = stream->WriteString(9, s, target);
  }

  // optional int64 timestamp_usec = 10;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->_internal_timestamp_usec(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:mediapipe.Detection)
  return target;
}

size_t Detection::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.Detection)
  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 label = 1;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(label_.size());
  for (int i = 0, n = label_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      label_.Get(i));
  }

  // repeated int32 label_id = 2 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->label_id_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _label_id_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated float score = 3 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_score_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated .mediapipe.Detection.AssociatedDetection associated_detections = 8;
  total_size += 1UL * this->_internal_associated_detections_size();
  for (const auto& msg : this->associated_detections_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated string display_name = 9;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(display_name_.size());
  for (int i = 0, n = display_name_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      display_name_.Get(i));
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional string feature_tag = 5;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_feature_tag());
    }

    // optional string track_id = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_track_id());
    }

    // optional .mediapipe.LocationData location_data = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *location_data_);
    }

    // optional int64 detection_id = 7;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_detection_id());
    }

    // optional int64 timestamp_usec = 10;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp_usec());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Detection::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Detection *>(to)->MergeFrom(
      static_cast<const Detection &>(from));
}


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

  label_.MergeFrom(from.label_);
  label_id_.MergeFrom(from.label_id_);
  score_.MergeFrom(from.score_);
  associated_detections_.MergeFrom(from.associated_detections_);
  display_name_.MergeFrom(from.display_name_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_feature_tag(from._internal_feature_tag());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_track_id(from._internal_track_id());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_location_data()->::mediapipe::LocationData::MergeFrom(from._internal_location_data());
    }
    if (cached_has_bits & 0x00000008u) {
      detection_id_ = from.detection_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      timestamp_usec_ = from.timestamp_usec_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool Detection::IsInitialized() const {
  if (_internal_has_location_data()) {
    if (!location_data_->IsInitialized()) return false;
  }
  return true;
}

void Detection::InternalSwap(Detection* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  label_.InternalSwap(&other->label_);
  label_id_.InternalSwap(&other->label_id_);
  score_.InternalSwap(&other->score_);
  associated_detections_.InternalSwap(&other->associated_detections_);
  display_name_.InternalSwap(&other->display_name_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &feature_tag_, lhs_arena,
      &other->feature_tag_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &track_id_, lhs_arena,
      &other->track_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Detection, timestamp_usec_)
      + sizeof(Detection::timestamp_usec_)
      - PROTOBUF_FIELD_OFFSET(Detection, location_data_)>(
          reinterpret_cast<char*>(&location_data_),
          reinterpret_cast<char*>(&other->location_data_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Detection::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fformats_2fdetection_2eproto[1]);
}

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

class DetectionList::_Internal {
 public:
};

DetectionList::DetectionList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  detection_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.DetectionList)
}
DetectionList::DetectionList(const DetectionList& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      detection_(from.detection_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:mediapipe.DetectionList)
}

inline void DetectionList::SharedCtor() {
}

DetectionList::~DetectionList() {
  // @@protoc_insertion_point(destructor:mediapipe.DetectionList)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

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

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

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

const char* DetectionList::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .mediapipe.Detection detection = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_detection(), ptr);
            CHK_(ptr);
            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* DetectionList::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.DetectionList)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .mediapipe.Detection detection = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_detection_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_detection(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:mediapipe.DetectionList)
  return target;
}

size_t DetectionList::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.DetectionList)
  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 .mediapipe.Detection detection = 1;
  total_size += 1UL * this->_internal_detection_size();
  for (const auto& msg : this->detection_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DetectionList::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DetectionList *>(to)->MergeFrom(
      static_cast<const DetectionList &>(from));
}


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

  detection_.MergeFrom(from.detection_);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool DetectionList::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(detection_))
    return false;
  return true;
}

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

::PROTOBUF_NAMESPACE_ID::Metadata DetectionList::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fformats_2fdetection_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fformats_2fdetection_2eproto[2]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace mediapipe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mediapipe::Detection_AssociatedDetection* Arena::CreateMaybeMessage< ::mediapipe::Detection_AssociatedDetection >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::Detection_AssociatedDetection >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::Detection* Arena::CreateMaybeMessage< ::mediapipe::Detection >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::Detection >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::DetectionList* Arena::CreateMaybeMessage< ::mediapipe::DetectionList >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::DetectionList >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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