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

#ifndef GOOGLE_PROTOBUF_INCLUDED_second_2fprotos_2fsimilarity_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_second_2fprotos_2fsimilarity_2eproto

#include <limits>
#include <string>

#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif

#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_bases.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
#include <google/protobuf/extension_set.h>  // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_second_2fprotos_2fsimilarity_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
}  // namespace internal
PROTOBUF_NAMESPACE_CLOSE

// Internal implementation detail -- do not use these members.
struct TableStruct_second_2fprotos_2fsimilarity_2eproto {
  static const uint32_t offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_second_2fprotos_2fsimilarity_2eproto;
namespace second {
namespace protos {
class DistanceSimilarity;
struct DistanceSimilarityDefaultTypeInternal;
extern DistanceSimilarityDefaultTypeInternal _DistanceSimilarity_default_instance_;
class NearestIouSimilarity;
struct NearestIouSimilarityDefaultTypeInternal;
extern NearestIouSimilarityDefaultTypeInternal _NearestIouSimilarity_default_instance_;
class RegionSimilarityCalculator;
struct RegionSimilarityCalculatorDefaultTypeInternal;
extern RegionSimilarityCalculatorDefaultTypeInternal _RegionSimilarityCalculator_default_instance_;
class RotateIouSimilarity;
struct RotateIouSimilarityDefaultTypeInternal;
extern RotateIouSimilarityDefaultTypeInternal _RotateIouSimilarity_default_instance_;
}  // namespace protos
}  // namespace second
PROTOBUF_NAMESPACE_OPEN
template<> ::second::protos::DistanceSimilarity* Arena::CreateMaybeMessage<::second::protos::DistanceSimilarity>(Arena*);
template<> ::second::protos::NearestIouSimilarity* Arena::CreateMaybeMessage<::second::protos::NearestIouSimilarity>(Arena*);
template<> ::second::protos::RegionSimilarityCalculator* Arena::CreateMaybeMessage<::second::protos::RegionSimilarityCalculator>(Arena*);
template<> ::second::protos::RotateIouSimilarity* Arena::CreateMaybeMessage<::second::protos::RotateIouSimilarity>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace second {
namespace protos {

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

class RegionSimilarityCalculator final :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:second.protos.RegionSimilarityCalculator) */ {
 public:
  inline RegionSimilarityCalculator() : RegionSimilarityCalculator(nullptr) {}
  ~RegionSimilarityCalculator() override;
  explicit PROTOBUF_CONSTEXPR RegionSimilarityCalculator(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);

  RegionSimilarityCalculator(const RegionSimilarityCalculator& from);
  RegionSimilarityCalculator(RegionSimilarityCalculator&& from) noexcept
    : RegionSimilarityCalculator() {
    *this = ::std::move(from);
  }

  inline RegionSimilarityCalculator& operator=(const RegionSimilarityCalculator& from) {
    CopyFrom(from);
    return *this;
  }
  inline RegionSimilarityCalculator& operator=(RegionSimilarityCalculator&& from) noexcept {
    if (this == &from) return *this;
    if (GetOwningArena() == from.GetOwningArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetOwningArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const RegionSimilarityCalculator& default_instance() {
    return *internal_default_instance();
  }
  enum RegionSimilarityCase {
    kRotateIouSimilarity = 1,
    kNearestIouSimilarity = 2,
    kDistanceSimilarity = 3,
    REGION_SIMILARITY_NOT_SET = 0,
  };

  static inline const RegionSimilarityCalculator* internal_default_instance() {
    return reinterpret_cast<const RegionSimilarityCalculator*>(
               &_RegionSimilarityCalculator_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

  friend void swap(RegionSimilarityCalculator& a, RegionSimilarityCalculator& b) {
    a.Swap(&b);
  }
  inline void Swap(RegionSimilarityCalculator* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() != nullptr &&
        GetOwningArena() == other->GetOwningArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() == other->GetOwningArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(RegionSimilarityCalculator* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  RegionSimilarityCalculator* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<RegionSimilarityCalculator>(arena);
  }
  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  void CopyFrom(const RegionSimilarityCalculator& from);
  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  void MergeFrom( const RegionSimilarityCalculator& from) {
    RegionSimilarityCalculator::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  uint8_t* _InternalSerialize(
      uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(RegionSimilarityCalculator* other);

  private:
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "second.protos.RegionSimilarityCalculator";
  }
  protected:
  explicit RegionSimilarityCalculator(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                       bool is_message_owned = false);
  public:

  static const ClassData _class_data_;
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kRotateIouSimilarityFieldNumber = 1,
    kNearestIouSimilarityFieldNumber = 2,
    kDistanceSimilarityFieldNumber = 3,
  };
  // .second.protos.RotateIouSimilarity rotate_iou_similarity = 1;
  bool has_rotate_iou_similarity() const;
  private:
  bool _internal_has_rotate_iou_similarity() const;
  public:
  void clear_rotate_iou_similarity();
  const ::second::protos::RotateIouSimilarity& rotate_iou_similarity() const;
  PROTOBUF_NODISCARD ::second::protos::RotateIouSimilarity* release_rotate_iou_similarity();
  ::second::protos::RotateIouSimilarity* mutable_rotate_iou_similarity();
  void set_allocated_rotate_iou_similarity(::second::protos::RotateIouSimilarity* rotate_iou_similarity);
  private:
  const ::second::protos::RotateIouSimilarity& _internal_rotate_iou_similarity() const;
  ::second::protos::RotateIouSimilarity* _internal_mutable_rotate_iou_similarity();
  public:
  void unsafe_arena_set_allocated_rotate_iou_similarity(
      ::second::protos::RotateIouSimilarity* rotate_iou_similarity);
  ::second::protos::RotateIouSimilarity* unsafe_arena_release_rotate_iou_similarity();

  // .second.protos.NearestIouSimilarity nearest_iou_similarity = 2;
  bool has_nearest_iou_similarity() const;
  private:
  bool _internal_has_nearest_iou_similarity() const;
  public:
  void clear_nearest_iou_similarity();
  const ::second::protos::NearestIouSimilarity& nearest_iou_similarity() const;
  PROTOBUF_NODISCARD ::second::protos::NearestIouSimilarity* release_nearest_iou_similarity();
  ::second::protos::NearestIouSimilarity* mutable_nearest_iou_similarity();
  void set_allocated_nearest_iou_similarity(::second::protos::NearestIouSimilarity* nearest_iou_similarity);
  private:
  const ::second::protos::NearestIouSimilarity& _internal_nearest_iou_similarity() const;
  ::second::protos::NearestIouSimilarity* _internal_mutable_nearest_iou_similarity();
  public:
  void unsafe_arena_set_allocated_nearest_iou_similarity(
      ::second::protos::NearestIouSimilarity* nearest_iou_similarity);
  ::second::protos::NearestIouSimilarity* unsafe_arena_release_nearest_iou_similarity();

  // .second.protos.DistanceSimilarity distance_similarity = 3;
  bool has_distance_similarity() const;
  private:
  bool _internal_has_distance_similarity() const;
  public:
  void clear_distance_similarity();
  const ::second::protos::DistanceSimilarity& distance_similarity() const;
  PROTOBUF_NODISCARD ::second::protos::DistanceSimilarity* release_distance_similarity();
  ::second::protos::DistanceSimilarity* mutable_distance_similarity();
  void set_allocated_distance_similarity(::second::protos::DistanceSimilarity* distance_similarity);
  private:
  const ::second::protos::DistanceSimilarity& _internal_distance_similarity() const;
  ::second::protos::DistanceSimilarity* _internal_mutable_distance_similarity();
  public:
  void unsafe_arena_set_allocated_distance_similarity(
      ::second::protos::DistanceSimilarity* distance_similarity);
  ::second::protos::DistanceSimilarity* unsafe_arena_release_distance_similarity();

  void clear_region_similarity();
  RegionSimilarityCase region_similarity_case() const;
  // @@protoc_insertion_point(class_scope:second.protos.RegionSimilarityCalculator)
 private:
  class _Internal;
  void set_has_rotate_iou_similarity();
  void set_has_nearest_iou_similarity();
  void set_has_distance_similarity();

  inline bool has_region_similarity() const;
  inline void clear_has_region_similarity();

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  struct Impl_ {
    union RegionSimilarityUnion {
      constexpr RegionSimilarityUnion() : _constinit_{} {}
        ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
      ::second::protos::RotateIouSimilarity* rotate_iou_similarity_;
      ::second::protos::NearestIouSimilarity* nearest_iou_similarity_;
      ::second::protos::DistanceSimilarity* distance_similarity_;
    } region_similarity_;
    mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
    uint32_t _oneof_case_[1];

  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_second_2fprotos_2fsimilarity_2eproto;
};
// -------------------------------------------------------------------

class RotateIouSimilarity final :
    public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:second.protos.RotateIouSimilarity) */ {
 public:
  inline RotateIouSimilarity() : RotateIouSimilarity(nullptr) {}
  explicit PROTOBUF_CONSTEXPR RotateIouSimilarity(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);

  RotateIouSimilarity(const RotateIouSimilarity& from);
  RotateIouSimilarity(RotateIouSimilarity&& from) noexcept
    : RotateIouSimilarity() {
    *this = ::std::move(from);
  }

  inline RotateIouSimilarity& operator=(const RotateIouSimilarity& from) {
    CopyFrom(from);
    return *this;
  }
  inline RotateIouSimilarity& operator=(RotateIouSimilarity&& from) noexcept {
    if (this == &from) return *this;
    if (GetOwningArena() == from.GetOwningArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetOwningArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const RotateIouSimilarity& default_instance() {
    return *internal_default_instance();
  }
  static inline const RotateIouSimilarity* internal_default_instance() {
    return reinterpret_cast<const RotateIouSimilarity*>(
               &_RotateIouSimilarity_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  friend void swap(RotateIouSimilarity& a, RotateIouSimilarity& b) {
    a.Swap(&b);
  }
  inline void Swap(RotateIouSimilarity* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() != nullptr &&
        GetOwningArena() == other->GetOwningArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() == other->GetOwningArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(RotateIouSimilarity* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  RotateIouSimilarity* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<RotateIouSimilarity>(arena);
  }
  using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom;
  inline void CopyFrom(const RotateIouSimilarity& from) {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from);
  }
  using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom;
  void MergeFrom(const RotateIouSimilarity& from) {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from);
  }
  public:

  private:
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "second.protos.RotateIouSimilarity";
  }
  protected:
  explicit RotateIouSimilarity(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                       bool is_message_owned = false);
  public:

  static const ClassData _class_data_;
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:second.protos.RotateIouSimilarity)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  struct Impl_ {
  };
  friend struct ::TableStruct_second_2fprotos_2fsimilarity_2eproto;
};
// -------------------------------------------------------------------

class NearestIouSimilarity final :
    public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:second.protos.NearestIouSimilarity) */ {
 public:
  inline NearestIouSimilarity() : NearestIouSimilarity(nullptr) {}
  explicit PROTOBUF_CONSTEXPR NearestIouSimilarity(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);

  NearestIouSimilarity(const NearestIouSimilarity& from);
  NearestIouSimilarity(NearestIouSimilarity&& from) noexcept
    : NearestIouSimilarity() {
    *this = ::std::move(from);
  }

  inline NearestIouSimilarity& operator=(const NearestIouSimilarity& from) {
    CopyFrom(from);
    return *this;
  }
  inline NearestIouSimilarity& operator=(NearestIouSimilarity&& from) noexcept {
    if (this == &from) return *this;
    if (GetOwningArena() == from.GetOwningArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetOwningArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const NearestIouSimilarity& default_instance() {
    return *internal_default_instance();
  }
  static inline const NearestIouSimilarity* internal_default_instance() {
    return reinterpret_cast<const NearestIouSimilarity*>(
               &_NearestIouSimilarity_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    2;

  friend void swap(NearestIouSimilarity& a, NearestIouSimilarity& b) {
    a.Swap(&b);
  }
  inline void Swap(NearestIouSimilarity* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() != nullptr &&
        GetOwningArena() == other->GetOwningArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() == other->GetOwningArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(NearestIouSimilarity* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  NearestIouSimilarity* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<NearestIouSimilarity>(arena);
  }
  using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom;
  inline void CopyFrom(const NearestIouSimilarity& from) {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from);
  }
  using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom;
  void MergeFrom(const NearestIouSimilarity& from) {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from);
  }
  public:

  private:
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "second.protos.NearestIouSimilarity";
  }
  protected:
  explicit NearestIouSimilarity(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                       bool is_message_owned = false);
  public:

  static const ClassData _class_data_;
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:second.protos.NearestIouSimilarity)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  struct Impl_ {
  };
  friend struct ::TableStruct_second_2fprotos_2fsimilarity_2eproto;
};
// -------------------------------------------------------------------

class DistanceSimilarity final :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:second.protos.DistanceSimilarity) */ {
 public:
  inline DistanceSimilarity() : DistanceSimilarity(nullptr) {}
  ~DistanceSimilarity() override;
  explicit PROTOBUF_CONSTEXPR DistanceSimilarity(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);

  DistanceSimilarity(const DistanceSimilarity& from);
  DistanceSimilarity(DistanceSimilarity&& from) noexcept
    : DistanceSimilarity() {
    *this = ::std::move(from);
  }

  inline DistanceSimilarity& operator=(const DistanceSimilarity& from) {
    CopyFrom(from);
    return *this;
  }
  inline DistanceSimilarity& operator=(DistanceSimilarity&& from) noexcept {
    if (this == &from) return *this;
    if (GetOwningArena() == from.GetOwningArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetOwningArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const DistanceSimilarity& default_instance() {
    return *internal_default_instance();
  }
  static inline const DistanceSimilarity* internal_default_instance() {
    return reinterpret_cast<const DistanceSimilarity*>(
               &_DistanceSimilarity_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    3;

  friend void swap(DistanceSimilarity& a, DistanceSimilarity& b) {
    a.Swap(&b);
  }
  inline void Swap(DistanceSimilarity* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() != nullptr &&
        GetOwningArena() == other->GetOwningArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetOwningArena() == other->GetOwningArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(DistanceSimilarity* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  DistanceSimilarity* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<DistanceSimilarity>(arena);
  }
  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  void CopyFrom(const DistanceSimilarity& from);
  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  void MergeFrom( const DistanceSimilarity& from) {
    DistanceSimilarity::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  uint8_t* _InternalSerialize(
      uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(DistanceSimilarity* other);

  private:
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "second.protos.DistanceSimilarity";
  }
  protected:
  explicit DistanceSimilarity(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                       bool is_message_owned = false);
  public:

  static const ClassData _class_data_;
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kDistanceNormFieldNumber = 1,
    kWithRotationFieldNumber = 2,
    kRotationAlphaFieldNumber = 3,
  };
  // float distance_norm = 1;
  void clear_distance_norm();
  float distance_norm() const;
  void set_distance_norm(float value);
  private:
  float _internal_distance_norm() const;
  void _internal_set_distance_norm(float value);
  public:

  // bool with_rotation = 2;
  void clear_with_rotation();
  bool with_rotation() const;
  void set_with_rotation(bool value);
  private:
  bool _internal_with_rotation() const;
  void _internal_set_with_rotation(bool value);
  public:

  // float rotation_alpha = 3;
  void clear_rotation_alpha();
  float rotation_alpha() const;
  void set_rotation_alpha(float value);
  private:
  float _internal_rotation_alpha() const;
  void _internal_set_rotation_alpha(float value);
  public:

  // @@protoc_insertion_point(class_scope:second.protos.DistanceSimilarity)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  struct Impl_ {
    float distance_norm_;
    bool with_rotation_;
    float rotation_alpha_;
    mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_second_2fprotos_2fsimilarity_2eproto;
};
// ===================================================================


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

#ifdef __GNUC__
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// RegionSimilarityCalculator

// .second.protos.RotateIouSimilarity rotate_iou_similarity = 1;
inline bool RegionSimilarityCalculator::_internal_has_rotate_iou_similarity() const {
  return region_similarity_case() == kRotateIouSimilarity;
}
inline bool RegionSimilarityCalculator::has_rotate_iou_similarity() const {
  return _internal_has_rotate_iou_similarity();
}
inline void RegionSimilarityCalculator::set_has_rotate_iou_similarity() {
  _impl_._oneof_case_[0] = kRotateIouSimilarity;
}
inline void RegionSimilarityCalculator::clear_rotate_iou_similarity() {
  if (_internal_has_rotate_iou_similarity()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.region_similarity_.rotate_iou_similarity_;
    }
    clear_has_region_similarity();
  }
}
inline ::second::protos::RotateIouSimilarity* RegionSimilarityCalculator::release_rotate_iou_similarity() {
  // @@protoc_insertion_point(field_release:second.protos.RegionSimilarityCalculator.rotate_iou_similarity)
  if (_internal_has_rotate_iou_similarity()) {
    clear_has_region_similarity();
    ::second::protos::RotateIouSimilarity* temp = _impl_.region_similarity_.rotate_iou_similarity_;
    if (GetArenaForAllocation() != nullptr) {
      temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
    }
    _impl_.region_similarity_.rotate_iou_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::second::protos::RotateIouSimilarity& RegionSimilarityCalculator::_internal_rotate_iou_similarity() const {
  return _internal_has_rotate_iou_similarity()
      ? *_impl_.region_similarity_.rotate_iou_similarity_
      : reinterpret_cast< ::second::protos::RotateIouSimilarity&>(::second::protos::_RotateIouSimilarity_default_instance_);
}
inline const ::second::protos::RotateIouSimilarity& RegionSimilarityCalculator::rotate_iou_similarity() const {
  // @@protoc_insertion_point(field_get:second.protos.RegionSimilarityCalculator.rotate_iou_similarity)
  return _internal_rotate_iou_similarity();
}
inline ::second::protos::RotateIouSimilarity* RegionSimilarityCalculator::unsafe_arena_release_rotate_iou_similarity() {
  // @@protoc_insertion_point(field_unsafe_arena_release:second.protos.RegionSimilarityCalculator.rotate_iou_similarity)
  if (_internal_has_rotate_iou_similarity()) {
    clear_has_region_similarity();
    ::second::protos::RotateIouSimilarity* temp = _impl_.region_similarity_.rotate_iou_similarity_;
    _impl_.region_similarity_.rotate_iou_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void RegionSimilarityCalculator::unsafe_arena_set_allocated_rotate_iou_similarity(::second::protos::RotateIouSimilarity* rotate_iou_similarity) {
  clear_region_similarity();
  if (rotate_iou_similarity) {
    set_has_rotate_iou_similarity();
    _impl_.region_similarity_.rotate_iou_similarity_ = rotate_iou_similarity;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:second.protos.RegionSimilarityCalculator.rotate_iou_similarity)
}
inline ::second::protos::RotateIouSimilarity* RegionSimilarityCalculator::_internal_mutable_rotate_iou_similarity() {
  if (!_internal_has_rotate_iou_similarity()) {
    clear_region_similarity();
    set_has_rotate_iou_similarity();
    _impl_.region_similarity_.rotate_iou_similarity_ = CreateMaybeMessage< ::second::protos::RotateIouSimilarity >(GetArenaForAllocation());
  }
  return _impl_.region_similarity_.rotate_iou_similarity_;
}
inline ::second::protos::RotateIouSimilarity* RegionSimilarityCalculator::mutable_rotate_iou_similarity() {
  ::second::protos::RotateIouSimilarity* _msg = _internal_mutable_rotate_iou_similarity();
  // @@protoc_insertion_point(field_mutable:second.protos.RegionSimilarityCalculator.rotate_iou_similarity)
  return _msg;
}

// .second.protos.NearestIouSimilarity nearest_iou_similarity = 2;
inline bool RegionSimilarityCalculator::_internal_has_nearest_iou_similarity() const {
  return region_similarity_case() == kNearestIouSimilarity;
}
inline bool RegionSimilarityCalculator::has_nearest_iou_similarity() const {
  return _internal_has_nearest_iou_similarity();
}
inline void RegionSimilarityCalculator::set_has_nearest_iou_similarity() {
  _impl_._oneof_case_[0] = kNearestIouSimilarity;
}
inline void RegionSimilarityCalculator::clear_nearest_iou_similarity() {
  if (_internal_has_nearest_iou_similarity()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.region_similarity_.nearest_iou_similarity_;
    }
    clear_has_region_similarity();
  }
}
inline ::second::protos::NearestIouSimilarity* RegionSimilarityCalculator::release_nearest_iou_similarity() {
  // @@protoc_insertion_point(field_release:second.protos.RegionSimilarityCalculator.nearest_iou_similarity)
  if (_internal_has_nearest_iou_similarity()) {
    clear_has_region_similarity();
    ::second::protos::NearestIouSimilarity* temp = _impl_.region_similarity_.nearest_iou_similarity_;
    if (GetArenaForAllocation() != nullptr) {
      temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
    }
    _impl_.region_similarity_.nearest_iou_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::second::protos::NearestIouSimilarity& RegionSimilarityCalculator::_internal_nearest_iou_similarity() const {
  return _internal_has_nearest_iou_similarity()
      ? *_impl_.region_similarity_.nearest_iou_similarity_
      : reinterpret_cast< ::second::protos::NearestIouSimilarity&>(::second::protos::_NearestIouSimilarity_default_instance_);
}
inline const ::second::protos::NearestIouSimilarity& RegionSimilarityCalculator::nearest_iou_similarity() const {
  // @@protoc_insertion_point(field_get:second.protos.RegionSimilarityCalculator.nearest_iou_similarity)
  return _internal_nearest_iou_similarity();
}
inline ::second::protos::NearestIouSimilarity* RegionSimilarityCalculator::unsafe_arena_release_nearest_iou_similarity() {
  // @@protoc_insertion_point(field_unsafe_arena_release:second.protos.RegionSimilarityCalculator.nearest_iou_similarity)
  if (_internal_has_nearest_iou_similarity()) {
    clear_has_region_similarity();
    ::second::protos::NearestIouSimilarity* temp = _impl_.region_similarity_.nearest_iou_similarity_;
    _impl_.region_similarity_.nearest_iou_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void RegionSimilarityCalculator::unsafe_arena_set_allocated_nearest_iou_similarity(::second::protos::NearestIouSimilarity* nearest_iou_similarity) {
  clear_region_similarity();
  if (nearest_iou_similarity) {
    set_has_nearest_iou_similarity();
    _impl_.region_similarity_.nearest_iou_similarity_ = nearest_iou_similarity;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:second.protos.RegionSimilarityCalculator.nearest_iou_similarity)
}
inline ::second::protos::NearestIouSimilarity* RegionSimilarityCalculator::_internal_mutable_nearest_iou_similarity() {
  if (!_internal_has_nearest_iou_similarity()) {
    clear_region_similarity();
    set_has_nearest_iou_similarity();
    _impl_.region_similarity_.nearest_iou_similarity_ = CreateMaybeMessage< ::second::protos::NearestIouSimilarity >(GetArenaForAllocation());
  }
  return _impl_.region_similarity_.nearest_iou_similarity_;
}
inline ::second::protos::NearestIouSimilarity* RegionSimilarityCalculator::mutable_nearest_iou_similarity() {
  ::second::protos::NearestIouSimilarity* _msg = _internal_mutable_nearest_iou_similarity();
  // @@protoc_insertion_point(field_mutable:second.protos.RegionSimilarityCalculator.nearest_iou_similarity)
  return _msg;
}

// .second.protos.DistanceSimilarity distance_similarity = 3;
inline bool RegionSimilarityCalculator::_internal_has_distance_similarity() const {
  return region_similarity_case() == kDistanceSimilarity;
}
inline bool RegionSimilarityCalculator::has_distance_similarity() const {
  return _internal_has_distance_similarity();
}
inline void RegionSimilarityCalculator::set_has_distance_similarity() {
  _impl_._oneof_case_[0] = kDistanceSimilarity;
}
inline void RegionSimilarityCalculator::clear_distance_similarity() {
  if (_internal_has_distance_similarity()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.region_similarity_.distance_similarity_;
    }
    clear_has_region_similarity();
  }
}
inline ::second::protos::DistanceSimilarity* RegionSimilarityCalculator::release_distance_similarity() {
  // @@protoc_insertion_point(field_release:second.protos.RegionSimilarityCalculator.distance_similarity)
  if (_internal_has_distance_similarity()) {
    clear_has_region_similarity();
    ::second::protos::DistanceSimilarity* temp = _impl_.region_similarity_.distance_similarity_;
    if (GetArenaForAllocation() != nullptr) {
      temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
    }
    _impl_.region_similarity_.distance_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::second::protos::DistanceSimilarity& RegionSimilarityCalculator::_internal_distance_similarity() const {
  return _internal_has_distance_similarity()
      ? *_impl_.region_similarity_.distance_similarity_
      : reinterpret_cast< ::second::protos::DistanceSimilarity&>(::second::protos::_DistanceSimilarity_default_instance_);
}
inline const ::second::protos::DistanceSimilarity& RegionSimilarityCalculator::distance_similarity() const {
  // @@protoc_insertion_point(field_get:second.protos.RegionSimilarityCalculator.distance_similarity)
  return _internal_distance_similarity();
}
inline ::second::protos::DistanceSimilarity* RegionSimilarityCalculator::unsafe_arena_release_distance_similarity() {
  // @@protoc_insertion_point(field_unsafe_arena_release:second.protos.RegionSimilarityCalculator.distance_similarity)
  if (_internal_has_distance_similarity()) {
    clear_has_region_similarity();
    ::second::protos::DistanceSimilarity* temp = _impl_.region_similarity_.distance_similarity_;
    _impl_.region_similarity_.distance_similarity_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void RegionSimilarityCalculator::unsafe_arena_set_allocated_distance_similarity(::second::protos::DistanceSimilarity* distance_similarity) {
  clear_region_similarity();
  if (distance_similarity) {
    set_has_distance_similarity();
    _impl_.region_similarity_.distance_similarity_ = distance_similarity;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:second.protos.RegionSimilarityCalculator.distance_similarity)
}
inline ::second::protos::DistanceSimilarity* RegionSimilarityCalculator::_internal_mutable_distance_similarity() {
  if (!_internal_has_distance_similarity()) {
    clear_region_similarity();
    set_has_distance_similarity();
    _impl_.region_similarity_.distance_similarity_ = CreateMaybeMessage< ::second::protos::DistanceSimilarity >(GetArenaForAllocation());
  }
  return _impl_.region_similarity_.distance_similarity_;
}
inline ::second::protos::DistanceSimilarity* RegionSimilarityCalculator::mutable_distance_similarity() {
  ::second::protos::DistanceSimilarity* _msg = _internal_mutable_distance_similarity();
  // @@protoc_insertion_point(field_mutable:second.protos.RegionSimilarityCalculator.distance_similarity)
  return _msg;
}

inline bool RegionSimilarityCalculator::has_region_similarity() const {
  return region_similarity_case() != REGION_SIMILARITY_NOT_SET;
}
inline void RegionSimilarityCalculator::clear_has_region_similarity() {
  _impl_._oneof_case_[0] = REGION_SIMILARITY_NOT_SET;
}
inline RegionSimilarityCalculator::RegionSimilarityCase RegionSimilarityCalculator::region_similarity_case() const {
  return RegionSimilarityCalculator::RegionSimilarityCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// RotateIouSimilarity

// -------------------------------------------------------------------

// NearestIouSimilarity

// -------------------------------------------------------------------

// DistanceSimilarity

// float distance_norm = 1;
inline void DistanceSimilarity::clear_distance_norm() {
  _impl_.distance_norm_ = 0;
}
inline float DistanceSimilarity::_internal_distance_norm() const {
  return _impl_.distance_norm_;
}
inline float DistanceSimilarity::distance_norm() const {
  // @@protoc_insertion_point(field_get:second.protos.DistanceSimilarity.distance_norm)
  return _internal_distance_norm();
}
inline void DistanceSimilarity::_internal_set_distance_norm(float value) {
  
  _impl_.distance_norm_ = value;
}
inline void DistanceSimilarity::set_distance_norm(float value) {
  _internal_set_distance_norm(value);
  // @@protoc_insertion_point(field_set:second.protos.DistanceSimilarity.distance_norm)
}

// bool with_rotation = 2;
inline void DistanceSimilarity::clear_with_rotation() {
  _impl_.with_rotation_ = false;
}
inline bool DistanceSimilarity::_internal_with_rotation() const {
  return _impl_.with_rotation_;
}
inline bool DistanceSimilarity::with_rotation() const {
  // @@protoc_insertion_point(field_get:second.protos.DistanceSimilarity.with_rotation)
  return _internal_with_rotation();
}
inline void DistanceSimilarity::_internal_set_with_rotation(bool value) {
  
  _impl_.with_rotation_ = value;
}
inline void DistanceSimilarity::set_with_rotation(bool value) {
  _internal_set_with_rotation(value);
  // @@protoc_insertion_point(field_set:second.protos.DistanceSimilarity.with_rotation)
}

// float rotation_alpha = 3;
inline void DistanceSimilarity::clear_rotation_alpha() {
  _impl_.rotation_alpha_ = 0;
}
inline float DistanceSimilarity::_internal_rotation_alpha() const {
  return _impl_.rotation_alpha_;
}
inline float DistanceSimilarity::rotation_alpha() const {
  // @@protoc_insertion_point(field_get:second.protos.DistanceSimilarity.rotation_alpha)
  return _internal_rotation_alpha();
}
inline void DistanceSimilarity::_internal_set_rotation_alpha(float value) {
  
  _impl_.rotation_alpha_ = value;
}
inline void DistanceSimilarity::set_rotation_alpha(float value) {
  _internal_set_rotation_alpha(value);
  // @@protoc_insertion_point(field_set:second.protos.DistanceSimilarity.rotation_alpha)
}

#ifdef __GNUC__
  #pragma GCC diagnostic pop
#endif  // __GNUC__
// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------


// @@protoc_insertion_point(namespace_scope)

}  // namespace protos
}  // namespace second

// @@protoc_insertion_point(global_scope)

#include <google/protobuf/port_undef.inc>
#endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_second_2fprotos_2fsimilarity_2eproto
