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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "detection_result.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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)

namespace PaddleSolution {

namespace {

const ::google::protobuf::Descriptor* DetectionBox_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DetectionBox_reflection_ = NULL;
const ::google::protobuf::Descriptor* DetectionResult_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DetectionResult_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_detection_5fresult_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_detection_5fresult_2eproto() {
  protobuf_AddDesc_detection_5fresult_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "detection_result.proto");
  GOOGLE_CHECK(file != NULL);
  DetectionBox_descriptor_ = file->message_type(0);
  static const int DetectionBox_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, class__),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, score_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, left_top_x_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, left_top_y_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, right_bottom_x_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, right_bottom_y_),
  };
  DetectionBox_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DetectionBox_descriptor_,
      DetectionBox::internal_default_instance(),
      DetectionBox_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, _has_bits_),
      -1,
      -1,
      sizeof(DetectionBox),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionBox, _internal_metadata_));
  DetectionResult_descriptor_ = file->message_type(1);
  static const int DetectionResult_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionResult, filename_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionResult, detection_boxes_),
  };
  DetectionResult_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DetectionResult_descriptor_,
      DetectionResult::internal_default_instance(),
      DetectionResult_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionResult, _has_bits_),
      -1,
      -1,
      sizeof(DetectionResult),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionResult, _internal_metadata_));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_detection_5fresult_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DetectionBox_descriptor_, DetectionBox::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DetectionResult_descriptor_, DetectionResult::internal_default_instance());
}

}  // namespace

void protobuf_ShutdownFile_detection_5fresult_2eproto() {
  DetectionBox_default_instance_.Shutdown();
  delete DetectionBox_reflection_;
  DetectionResult_default_instance_.Shutdown();
  delete DetectionResult_reflection_;
}

void protobuf_InitDefaults_detection_5fresult_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  DetectionBox_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  DetectionResult_default_instance_.DefaultConstruct();
  DetectionBox_default_instance_.get_mutable()->InitAsDefaultInstance();
  DetectionResult_default_instance_.get_mutable()->InitAsDefaultInstance();
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_detection_5fresult_2eproto_once_);
void protobuf_InitDefaults_detection_5fresult_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_detection_5fresult_2eproto_once_,
                 &protobuf_InitDefaults_detection_5fresult_2eproto_impl);
}
void protobuf_AddDesc_detection_5fresult_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  protobuf_InitDefaults_detection_5fresult_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\026detection_result.proto\022\016PaddleSolution"
    "\"\204\001\n\014DetectionBox\022\r\n\005class\030\001 \001(\005\022\r\n\005scor"
    "e\030\002 \001(\002\022\022\n\nleft_top_x\030\003 \001(\002\022\022\n\nleft_top_"
    "y\030\004 \001(\002\022\026\n\016right_bottom_x\030\005 \001(\002\022\026\n\016right"
    "_bottom_y\030\006 \001(\002\"Z\n\017DetectionResult\022\020\n\010fi"
    "lename\030\001 \001(\t\0225\n\017detection_boxes\030\002 \003(\0132\034."
    "PaddleSolution.DetectionBox", 267);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "detection_result.proto", &protobuf_RegisterTypes);
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_detection_5fresult_2eproto);
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_detection_5fresult_2eproto_once_);
void protobuf_AddDesc_detection_5fresult_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_detection_5fresult_2eproto_once_,
                 &protobuf_AddDesc_detection_5fresult_2eproto_impl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_detection_5fresult_2eproto {
  StaticDescriptorInitializer_detection_5fresult_2eproto() {
    protobuf_AddDesc_detection_5fresult_2eproto();
  }
} static_descriptor_initializer_detection_5fresult_2eproto_;

namespace {

static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
static void MergeFromFail(int line) {
  ::google::protobuf::internal::MergeFromFail(__FILE__, line);
}

}  // namespace


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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DetectionBox::kClassFieldNumber;
const int DetectionBox::kScoreFieldNumber;
const int DetectionBox::kLeftTopXFieldNumber;
const int DetectionBox::kLeftTopYFieldNumber;
const int DetectionBox::kRightBottomXFieldNumber;
const int DetectionBox::kRightBottomYFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DetectionBox::DetectionBox()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_detection_5fresult_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:PaddleSolution.DetectionBox)
}

void DetectionBox::InitAsDefaultInstance() {
}

DetectionBox::DetectionBox(const DetectionBox& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:PaddleSolution.DetectionBox)
}

void DetectionBox::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&class__, 0, reinterpret_cast<char*>(&right_bottom_y_) -
    reinterpret_cast<char*>(&class__) + sizeof(right_bottom_y_));
}

DetectionBox::~DetectionBox() {
  // @@protoc_insertion_point(destructor:PaddleSolution.DetectionBox)
  SharedDtor();
}

void DetectionBox::SharedDtor() {
}

void DetectionBox::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DetectionBox::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DetectionBox_descriptor_;
}

const DetectionBox& DetectionBox::default_instance() {
  protobuf_InitDefaults_detection_5fresult_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DetectionBox> DetectionBox_default_instance_;

DetectionBox* DetectionBox::New(::google::protobuf::Arena* arena) const {
  DetectionBox* n = new DetectionBox;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DetectionBox::Clear() {
// @@protoc_insertion_point(message_clear_start:PaddleSolution.DetectionBox)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(DetectionBox, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<DetectionBox*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(class__, right_bottom_y_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DetectionBox::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:PaddleSolution.DetectionBox)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 class = 1;
      case 1: {
        if (tag == 8) {
          set_has_class_();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &class__)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_score;
        break;
      }

      // optional float score = 2;
      case 2: {
        if (tag == 21) {
         parse_score:
          set_has_score();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &score_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_left_top_x;
        break;
      }

      // optional float left_top_x = 3;
      case 3: {
        if (tag == 29) {
         parse_left_top_x:
          set_has_left_top_x();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &left_top_x_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_left_top_y;
        break;
      }

      // optional float left_top_y = 4;
      case 4: {
        if (tag == 37) {
         parse_left_top_y:
          set_has_left_top_y();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &left_top_y_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_right_bottom_x;
        break;
      }

      // optional float right_bottom_x = 5;
      case 5: {
        if (tag == 45) {
         parse_right_bottom_x:
          set_has_right_bottom_x();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &right_bottom_x_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_right_bottom_y;
        break;
      }

      // optional float right_bottom_y = 6;
      case 6: {
        if (tag == 53) {
         parse_right_bottom_y:
          set_has_right_bottom_y();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &right_bottom_y_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:PaddleSolution.DetectionBox)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:PaddleSolution.DetectionBox)
  return false;
#undef DO_
}

void DetectionBox::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:PaddleSolution.DetectionBox)
  // optional int32 class = 1;
  if (has_class_()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->class_(), output);
  }

  // optional float score = 2;
  if (has_score()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->score(), output);
  }

  // optional float left_top_x = 3;
  if (has_left_top_x()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->left_top_x(), output);
  }

  // optional float left_top_y = 4;
  if (has_left_top_y()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->left_top_y(), output);
  }

  // optional float right_bottom_x = 5;
  if (has_right_bottom_x()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->right_bottom_x(), output);
  }

  // optional float right_bottom_y = 6;
  if (has_right_bottom_y()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->right_bottom_y(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:PaddleSolution.DetectionBox)
}

::google::protobuf::uint8* DetectionBox::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:PaddleSolution.DetectionBox)
  // optional int32 class = 1;
  if (has_class_()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->class_(), target);
  }

  // optional float score = 2;
  if (has_score()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->score(), target);
  }

  // optional float left_top_x = 3;
  if (has_left_top_x()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->left_top_x(), target);
  }

  // optional float left_top_y = 4;
  if (has_left_top_y()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->left_top_y(), target);
  }

  // optional float right_bottom_x = 5;
  if (has_right_bottom_x()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->right_bottom_x(), target);
  }

  // optional float right_bottom_y = 6;
  if (has_right_bottom_y()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->right_bottom_y(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:PaddleSolution.DetectionBox)
  return target;
}

size_t DetectionBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:PaddleSolution.DetectionBox)
  size_t total_size = 0;

  if (_has_bits_[0 / 32] & 63u) {
    // optional int32 class = 1;
    if (has_class_()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->class_());
    }

    // optional float score = 2;
    if (has_score()) {
      total_size += 1 + 4;
    }

    // optional float left_top_x = 3;
    if (has_left_top_x()) {
      total_size += 1 + 4;
    }

    // optional float left_top_y = 4;
    if (has_left_top_y()) {
      total_size += 1 + 4;
    }

    // optional float right_bottom_x = 5;
    if (has_right_bottom_x()) {
      total_size += 1 + 4;
    }

    // optional float right_bottom_y = 6;
    if (has_right_bottom_y()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DetectionBox::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:PaddleSolution.DetectionBox)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DetectionBox* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DetectionBox>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:PaddleSolution.DetectionBox)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:PaddleSolution.DetectionBox)
    UnsafeMergeFrom(*source);
  }
}

void DetectionBox::MergeFrom(const DetectionBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:PaddleSolution.DetectionBox)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DetectionBox::UnsafeMergeFrom(const DetectionBox& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_class_()) {
      set_class_(from.class_());
    }
    if (from.has_score()) {
      set_score(from.score());
    }
    if (from.has_left_top_x()) {
      set_left_top_x(from.left_top_x());
    }
    if (from.has_left_top_y()) {
      set_left_top_y(from.left_top_y());
    }
    if (from.has_right_bottom_x()) {
      set_right_bottom_x(from.right_bottom_x());
    }
    if (from.has_right_bottom_y()) {
      set_right_bottom_y(from.right_bottom_y());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DetectionBox::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:PaddleSolution.DetectionBox)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DetectionBox::CopyFrom(const DetectionBox& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:PaddleSolution.DetectionBox)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool DetectionBox::IsInitialized() const {

  return true;
}

void DetectionBox::Swap(DetectionBox* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DetectionBox::InternalSwap(DetectionBox* other) {
  std::swap(class__, other->class__);
  std::swap(score_, other->score_);
  std::swap(left_top_x_, other->left_top_x_);
  std::swap(left_top_y_, other->left_top_y_);
  std::swap(right_bottom_x_, other->right_bottom_x_);
  std::swap(right_bottom_y_, other->right_bottom_y_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DetectionBox::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DetectionBox_descriptor_;
  metadata.reflection = DetectionBox_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DetectionBox

// optional int32 class = 1;
bool DetectionBox::has_class_() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DetectionBox::set_has_class_() {
  _has_bits_[0] |= 0x00000001u;
}
void DetectionBox::clear_has_class_() {
  _has_bits_[0] &= ~0x00000001u;
}
void DetectionBox::clear_class_() {
  class__ = 0;
  clear_has_class_();
}
::google::protobuf::int32 DetectionBox::class_() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.class)
  return class__;
}
void DetectionBox::set_class_(::google::protobuf::int32 value) {
  set_has_class_();
  class__ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.class)
}

// optional float score = 2;
bool DetectionBox::has_score() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void DetectionBox::set_has_score() {
  _has_bits_[0] |= 0x00000002u;
}
void DetectionBox::clear_has_score() {
  _has_bits_[0] &= ~0x00000002u;
}
void DetectionBox::clear_score() {
  score_ = 0;
  clear_has_score();
}
float DetectionBox::score() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.score)
  return score_;
}
void DetectionBox::set_score(float value) {
  set_has_score();
  score_ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.score)
}

// optional float left_top_x = 3;
bool DetectionBox::has_left_top_x() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void DetectionBox::set_has_left_top_x() {
  _has_bits_[0] |= 0x00000004u;
}
void DetectionBox::clear_has_left_top_x() {
  _has_bits_[0] &= ~0x00000004u;
}
void DetectionBox::clear_left_top_x() {
  left_top_x_ = 0;
  clear_has_left_top_x();
}
float DetectionBox::left_top_x() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.left_top_x)
  return left_top_x_;
}
void DetectionBox::set_left_top_x(float value) {
  set_has_left_top_x();
  left_top_x_ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.left_top_x)
}

// optional float left_top_y = 4;
bool DetectionBox::has_left_top_y() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void DetectionBox::set_has_left_top_y() {
  _has_bits_[0] |= 0x00000008u;
}
void DetectionBox::clear_has_left_top_y() {
  _has_bits_[0] &= ~0x00000008u;
}
void DetectionBox::clear_left_top_y() {
  left_top_y_ = 0;
  clear_has_left_top_y();
}
float DetectionBox::left_top_y() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.left_top_y)
  return left_top_y_;
}
void DetectionBox::set_left_top_y(float value) {
  set_has_left_top_y();
  left_top_y_ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.left_top_y)
}

// optional float right_bottom_x = 5;
bool DetectionBox::has_right_bottom_x() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void DetectionBox::set_has_right_bottom_x() {
  _has_bits_[0] |= 0x00000010u;
}
void DetectionBox::clear_has_right_bottom_x() {
  _has_bits_[0] &= ~0x00000010u;
}
void DetectionBox::clear_right_bottom_x() {
  right_bottom_x_ = 0;
  clear_has_right_bottom_x();
}
float DetectionBox::right_bottom_x() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.right_bottom_x)
  return right_bottom_x_;
}
void DetectionBox::set_right_bottom_x(float value) {
  set_has_right_bottom_x();
  right_bottom_x_ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.right_bottom_x)
}

// optional float right_bottom_y = 6;
bool DetectionBox::has_right_bottom_y() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void DetectionBox::set_has_right_bottom_y() {
  _has_bits_[0] |= 0x00000020u;
}
void DetectionBox::clear_has_right_bottom_y() {
  _has_bits_[0] &= ~0x00000020u;
}
void DetectionBox::clear_right_bottom_y() {
  right_bottom_y_ = 0;
  clear_has_right_bottom_y();
}
float DetectionBox::right_bottom_y() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionBox.right_bottom_y)
  return right_bottom_y_;
}
void DetectionBox::set_right_bottom_y(float value) {
  set_has_right_bottom_y();
  right_bottom_y_ = value;
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionBox.right_bottom_y)
}

inline const DetectionBox* DetectionBox::internal_default_instance() {
  return &DetectionBox_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DetectionResult::kFilenameFieldNumber;
const int DetectionResult::kDetectionBoxesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DetectionResult::DetectionResult()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_detection_5fresult_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:PaddleSolution.DetectionResult)
}

void DetectionResult::InitAsDefaultInstance() {
}

DetectionResult::DetectionResult(const DetectionResult& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:PaddleSolution.DetectionResult)
}

void DetectionResult::SharedCtor() {
  _cached_size_ = 0;
  filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

DetectionResult::~DetectionResult() {
  // @@protoc_insertion_point(destructor:PaddleSolution.DetectionResult)
  SharedDtor();
}

void DetectionResult::SharedDtor() {
  filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void DetectionResult::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DetectionResult::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DetectionResult_descriptor_;
}

const DetectionResult& DetectionResult::default_instance() {
  protobuf_InitDefaults_detection_5fresult_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DetectionResult> DetectionResult_default_instance_;

DetectionResult* DetectionResult::New(::google::protobuf::Arena* arena) const {
  DetectionResult* n = new DetectionResult;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DetectionResult::Clear() {
// @@protoc_insertion_point(message_clear_start:PaddleSolution.DetectionResult)
  if (has_filename()) {
    filename_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  detection_boxes_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DetectionResult::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:PaddleSolution.DetectionResult)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string filename = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_filename()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->filename().data(), this->filename().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "PaddleSolution.DetectionResult.filename");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_detection_boxes;
        break;
      }

      // repeated .PaddleSolution.DetectionBox detection_boxes = 2;
      case 2: {
        if (tag == 18) {
         parse_detection_boxes:
          DO_(input->IncrementRecursionDepth());
         parse_loop_detection_boxes:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_detection_boxes()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_loop_detection_boxes;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:PaddleSolution.DetectionResult)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:PaddleSolution.DetectionResult)
  return false;
#undef DO_
}

void DetectionResult::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:PaddleSolution.DetectionResult)
  // optional string filename = 1;
  if (has_filename()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->filename().data(), this->filename().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "PaddleSolution.DetectionResult.filename");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->filename(), output);
  }

  // repeated .PaddleSolution.DetectionBox detection_boxes = 2;
  for (unsigned int i = 0, n = this->detection_boxes_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->detection_boxes(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:PaddleSolution.DetectionResult)
}

::google::protobuf::uint8* DetectionResult::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:PaddleSolution.DetectionResult)
  // optional string filename = 1;
  if (has_filename()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->filename().data(), this->filename().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "PaddleSolution.DetectionResult.filename");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->filename(), target);
  }

  // repeated .PaddleSolution.DetectionBox detection_boxes = 2;
  for (unsigned int i = 0, n = this->detection_boxes_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        2, this->detection_boxes(i), false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:PaddleSolution.DetectionResult)
  return target;
}

size_t DetectionResult::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:PaddleSolution.DetectionResult)
  size_t total_size = 0;

  // optional string filename = 1;
  if (has_filename()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->filename());
  }

  // repeated .PaddleSolution.DetectionBox detection_boxes = 2;
  {
    unsigned int count = this->detection_boxes_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->detection_boxes(i));
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DetectionResult::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:PaddleSolution.DetectionResult)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DetectionResult* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DetectionResult>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:PaddleSolution.DetectionResult)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:PaddleSolution.DetectionResult)
    UnsafeMergeFrom(*source);
  }
}

void DetectionResult::MergeFrom(const DetectionResult& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:PaddleSolution.DetectionResult)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DetectionResult::UnsafeMergeFrom(const DetectionResult& from) {
  GOOGLE_DCHECK(&from != this);
  detection_boxes_.MergeFrom(from.detection_boxes_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_filename()) {
      set_has_filename();
      filename_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.filename_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DetectionResult::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:PaddleSolution.DetectionResult)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DetectionResult::CopyFrom(const DetectionResult& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:PaddleSolution.DetectionResult)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool DetectionResult::IsInitialized() const {

  return true;
}

void DetectionResult::Swap(DetectionResult* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DetectionResult::InternalSwap(DetectionResult* other) {
  filename_.Swap(&other->filename_);
  detection_boxes_.UnsafeArenaSwap(&other->detection_boxes_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DetectionResult::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DetectionResult_descriptor_;
  metadata.reflection = DetectionResult_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DetectionResult

// optional string filename = 1;
bool DetectionResult::has_filename() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DetectionResult::set_has_filename() {
  _has_bits_[0] |= 0x00000001u;
}
void DetectionResult::clear_has_filename() {
  _has_bits_[0] &= ~0x00000001u;
}
void DetectionResult::clear_filename() {
  filename_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_filename();
}
const ::std::string& DetectionResult::filename() const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionResult.filename)
  return filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DetectionResult::set_filename(const ::std::string& value) {
  set_has_filename();
  filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:PaddleSolution.DetectionResult.filename)
}
void DetectionResult::set_filename(const char* value) {
  set_has_filename();
  filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:PaddleSolution.DetectionResult.filename)
}
void DetectionResult::set_filename(const char* value, size_t size) {
  set_has_filename();
  filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:PaddleSolution.DetectionResult.filename)
}
::std::string* DetectionResult::mutable_filename() {
  set_has_filename();
  // @@protoc_insertion_point(field_mutable:PaddleSolution.DetectionResult.filename)
  return filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DetectionResult::release_filename() {
  // @@protoc_insertion_point(field_release:PaddleSolution.DetectionResult.filename)
  clear_has_filename();
  return filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DetectionResult::set_allocated_filename(::std::string* filename) {
  if (filename != NULL) {
    set_has_filename();
  } else {
    clear_has_filename();
  }
  filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename);
  // @@protoc_insertion_point(field_set_allocated:PaddleSolution.DetectionResult.filename)
}

// repeated .PaddleSolution.DetectionBox detection_boxes = 2;
int DetectionResult::detection_boxes_size() const {
  return detection_boxes_.size();
}
void DetectionResult::clear_detection_boxes() {
  detection_boxes_.Clear();
}
const ::PaddleSolution::DetectionBox& DetectionResult::detection_boxes(int index) const {
  // @@protoc_insertion_point(field_get:PaddleSolution.DetectionResult.detection_boxes)
  return detection_boxes_.Get(index);
}
::PaddleSolution::DetectionBox* DetectionResult::mutable_detection_boxes(int index) {
  // @@protoc_insertion_point(field_mutable:PaddleSolution.DetectionResult.detection_boxes)
  return detection_boxes_.Mutable(index);
}
::PaddleSolution::DetectionBox* DetectionResult::add_detection_boxes() {
  // @@protoc_insertion_point(field_add:PaddleSolution.DetectionResult.detection_boxes)
  return detection_boxes_.Add();
}
::google::protobuf::RepeatedPtrField< ::PaddleSolution::DetectionBox >*
DetectionResult::mutable_detection_boxes() {
  // @@protoc_insertion_point(field_mutable_list:PaddleSolution.DetectionResult.detection_boxes)
  return &detection_boxes_;
}
const ::google::protobuf::RepeatedPtrField< ::PaddleSolution::DetectionBox >&
DetectionResult::detection_boxes() const {
  // @@protoc_insertion_point(field_list:PaddleSolution.DetectionResult.detection_boxes)
  return detection_boxes_;
}

inline const DetectionResult* DetectionResult::internal_default_instance() {
  return &DetectionResult_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

}  // namespace PaddleSolution

// @@protoc_insertion_point(global_scope)
