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

#include "object_detection/protos/box_coder.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

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

namespace object_detection {
namespace protos {
PROTOBUF_CONSTEXPR BoxCoder::BoxCoder(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.box_coder_oneof_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct BoxCoderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BoxCoderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BoxCoderDefaultTypeInternal() {}
  union {
    BoxCoder _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoxCoderDefaultTypeInternal _BoxCoder_default_instance_;
}  // namespace protos
}  // namespace object_detection
static ::_pb::Metadata file_level_metadata_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto[1];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto = nullptr;

const uint32_t TableStruct_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxCoder, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxCoder, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxCoder, _impl_.box_coder_oneof_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::object_detection::protos::BoxCoder)},
};

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

const char descriptor_table_protodef_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\'object_detection/protos/box_coder.prot"
  "o\022\027object_detection.protos\0323object_detec"
  "tion/protos/faster_rcnn_box_coder.proto\032"
  "0object_detection/protos/keypoint_box_co"
  "der.proto\0323object_detection/protos/mean_"
  "stddev_box_coder.proto\032.object_detection"
  "/protos/square_box_coder.proto\"\307\002\n\010BoxCo"
  "der\022L\n\025faster_rcnn_box_coder\030\001 \001(\0132+.obj"
  "ect_detection.protos.FasterRcnnBoxCoderH"
  "\000\022L\n\025mean_stddev_box_coder\030\002 \001(\0132+.objec"
  "t_detection.protos.MeanStddevBoxCoderH\000\022"
  "C\n\020square_box_coder\030\003 \001(\0132\'.object_detec"
  "tion.protos.SquareBoxCoderH\000\022G\n\022keypoint"
  "_box_coder\030\004 \001(\0132).object_detection.prot"
  "os.KeypointBoxCoderH\000B\021\n\017box_coder_oneof"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_deps[4] = {
  &::descriptor_table_object_5fdetection_2fprotos_2ffaster_5frcnn_5fbox_5fcoder_2eproto,
  &::descriptor_table_object_5fdetection_2fprotos_2fkeypoint_5fbox_5fcoder_2eproto,
  &::descriptor_table_object_5fdetection_2fprotos_2fmean_5fstddev_5fbox_5fcoder_2eproto,
  &::descriptor_table_object_5fdetection_2fprotos_2fsquare_5fbox_5fcoder_2eproto,
};
static ::_pbi::once_flag descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto = {
    false, false, 600, descriptor_table_protodef_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto,
    "object_detection/protos/box_coder.proto",
    &descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_once, descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_deps, 4, 1,
    schemas, file_default_instances, TableStruct_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto::offsets,
    file_level_metadata_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto, file_level_enum_descriptors_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto,
    file_level_service_descriptors_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_getter() {
  return &descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto(&descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto);
namespace object_detection {
namespace protos {

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

class BoxCoder::_Internal {
 public:
  static const ::object_detection::protos::FasterRcnnBoxCoder& faster_rcnn_box_coder(const BoxCoder* msg);
  static const ::object_detection::protos::MeanStddevBoxCoder& mean_stddev_box_coder(const BoxCoder* msg);
  static const ::object_detection::protos::SquareBoxCoder& square_box_coder(const BoxCoder* msg);
  static const ::object_detection::protos::KeypointBoxCoder& keypoint_box_coder(const BoxCoder* msg);
};

const ::object_detection::protos::FasterRcnnBoxCoder&
BoxCoder::_Internal::faster_rcnn_box_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_oneof_.faster_rcnn_box_coder_;
}
const ::object_detection::protos::MeanStddevBoxCoder&
BoxCoder::_Internal::mean_stddev_box_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_oneof_.mean_stddev_box_coder_;
}
const ::object_detection::protos::SquareBoxCoder&
BoxCoder::_Internal::square_box_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_oneof_.square_box_coder_;
}
const ::object_detection::protos::KeypointBoxCoder&
BoxCoder::_Internal::keypoint_box_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_oneof_.keypoint_box_coder_;
}
void BoxCoder::set_allocated_faster_rcnn_box_coder(::object_detection::protos::FasterRcnnBoxCoder* faster_rcnn_box_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder_oneof();
  if (faster_rcnn_box_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(faster_rcnn_box_coder));
    if (message_arena != submessage_arena) {
      faster_rcnn_box_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, faster_rcnn_box_coder, submessage_arena);
    }
    set_has_faster_rcnn_box_coder();
    _impl_.box_coder_oneof_.faster_rcnn_box_coder_ = faster_rcnn_box_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxCoder.faster_rcnn_box_coder)
}
void BoxCoder::clear_faster_rcnn_box_coder() {
  if (_internal_has_faster_rcnn_box_coder()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.box_coder_oneof_.faster_rcnn_box_coder_;
    }
    clear_has_box_coder_oneof();
  }
}
void BoxCoder::set_allocated_mean_stddev_box_coder(::object_detection::protos::MeanStddevBoxCoder* mean_stddev_box_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder_oneof();
  if (mean_stddev_box_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(mean_stddev_box_coder));
    if (message_arena != submessage_arena) {
      mean_stddev_box_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mean_stddev_box_coder, submessage_arena);
    }
    set_has_mean_stddev_box_coder();
    _impl_.box_coder_oneof_.mean_stddev_box_coder_ = mean_stddev_box_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxCoder.mean_stddev_box_coder)
}
void BoxCoder::clear_mean_stddev_box_coder() {
  if (_internal_has_mean_stddev_box_coder()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.box_coder_oneof_.mean_stddev_box_coder_;
    }
    clear_has_box_coder_oneof();
  }
}
void BoxCoder::set_allocated_square_box_coder(::object_detection::protos::SquareBoxCoder* square_box_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder_oneof();
  if (square_box_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(square_box_coder));
    if (message_arena != submessage_arena) {
      square_box_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, square_box_coder, submessage_arena);
    }
    set_has_square_box_coder();
    _impl_.box_coder_oneof_.square_box_coder_ = square_box_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxCoder.square_box_coder)
}
void BoxCoder::clear_square_box_coder() {
  if (_internal_has_square_box_coder()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.box_coder_oneof_.square_box_coder_;
    }
    clear_has_box_coder_oneof();
  }
}
void BoxCoder::set_allocated_keypoint_box_coder(::object_detection::protos::KeypointBoxCoder* keypoint_box_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder_oneof();
  if (keypoint_box_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(keypoint_box_coder));
    if (message_arena != submessage_arena) {
      keypoint_box_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, keypoint_box_coder, submessage_arena);
    }
    set_has_keypoint_box_coder();
    _impl_.box_coder_oneof_.keypoint_box_coder_ = keypoint_box_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxCoder.keypoint_box_coder)
}
void BoxCoder::clear_keypoint_box_coder() {
  if (_internal_has_keypoint_box_coder()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.box_coder_oneof_.keypoint_box_coder_;
    }
    clear_has_box_coder_oneof();
  }
}
BoxCoder::BoxCoder(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.BoxCoder)
}
BoxCoder::BoxCoder(const BoxCoder& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BoxCoder* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.box_coder_oneof_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_box_coder_oneof();
  switch (from.box_coder_oneof_case()) {
    case kFasterRcnnBoxCoder: {
      _this->_internal_mutable_faster_rcnn_box_coder()->::object_detection::protos::FasterRcnnBoxCoder::MergeFrom(
          from._internal_faster_rcnn_box_coder());
      break;
    }
    case kMeanStddevBoxCoder: {
      _this->_internal_mutable_mean_stddev_box_coder()->::object_detection::protos::MeanStddevBoxCoder::MergeFrom(
          from._internal_mean_stddev_box_coder());
      break;
    }
    case kSquareBoxCoder: {
      _this->_internal_mutable_square_box_coder()->::object_detection::protos::SquareBoxCoder::MergeFrom(
          from._internal_square_box_coder());
      break;
    }
    case kKeypointBoxCoder: {
      _this->_internal_mutable_keypoint_box_coder()->::object_detection::protos::KeypointBoxCoder::MergeFrom(
          from._internal_keypoint_box_coder());
      break;
    }
    case BOX_CODER_ONEOF_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.BoxCoder)
}

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

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

inline void BoxCoder::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_box_coder_oneof()) {
    clear_box_coder_oneof();
  }
}

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

void BoxCoder::clear_box_coder_oneof() {
// @@protoc_insertion_point(one_of_clear_start:object_detection.protos.BoxCoder)
  switch (box_coder_oneof_case()) {
    case kFasterRcnnBoxCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_oneof_.faster_rcnn_box_coder_;
      }
      break;
    }
    case kMeanStddevBoxCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_oneof_.mean_stddev_box_coder_;
      }
      break;
    }
    case kSquareBoxCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_oneof_.square_box_coder_;
      }
      break;
    }
    case kKeypointBoxCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_oneof_.keypoint_box_coder_;
      }
      break;
    }
    case BOX_CODER_ONEOF_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = BOX_CODER_ONEOF_NOT_SET;
}


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

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

const char* BoxCoder::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .object_detection.protos.FasterRcnnBoxCoder faster_rcnn_box_coder = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_faster_rcnn_box_coder(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.MeanStddevBoxCoder mean_stddev_box_coder = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_mean_stddev_box_coder(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.SquareBoxCoder square_box_coder = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_square_box_coder(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.KeypointBoxCoder keypoint_box_coder = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_keypoint_box_coder(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (box_coder_oneof_case()) {
    case kFasterRcnnBoxCoder: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::faster_rcnn_box_coder(this),
          _Internal::faster_rcnn_box_coder(this).GetCachedSize(), target, stream);
      break;
    }
    case kMeanStddevBoxCoder: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::mean_stddev_box_coder(this),
          _Internal::mean_stddev_box_coder(this).GetCachedSize(), target, stream);
      break;
    }
    case kSquareBoxCoder: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::square_box_coder(this),
          _Internal::square_box_coder(this).GetCachedSize(), target, stream);
      break;
    }
    case kKeypointBoxCoder: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::keypoint_box_coder(this),
          _Internal::keypoint_box_coder(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.BoxCoder)
  return target;
}

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

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

  switch (box_coder_oneof_case()) {
    // .object_detection.protos.FasterRcnnBoxCoder faster_rcnn_box_coder = 1;
    case kFasterRcnnBoxCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_oneof_.faster_rcnn_box_coder_);
      break;
    }
    // .object_detection.protos.MeanStddevBoxCoder mean_stddev_box_coder = 2;
    case kMeanStddevBoxCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_oneof_.mean_stddev_box_coder_);
      break;
    }
    // .object_detection.protos.SquareBoxCoder square_box_coder = 3;
    case kSquareBoxCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_oneof_.square_box_coder_);
      break;
    }
    // .object_detection.protos.KeypointBoxCoder keypoint_box_coder = 4;
    case kKeypointBoxCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_oneof_.keypoint_box_coder_);
      break;
    }
    case BOX_CODER_ONEOF_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


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

  switch (from.box_coder_oneof_case()) {
    case kFasterRcnnBoxCoder: {
      _this->_internal_mutable_faster_rcnn_box_coder()->::object_detection::protos::FasterRcnnBoxCoder::MergeFrom(
          from._internal_faster_rcnn_box_coder());
      break;
    }
    case kMeanStddevBoxCoder: {
      _this->_internal_mutable_mean_stddev_box_coder()->::object_detection::protos::MeanStddevBoxCoder::MergeFrom(
          from._internal_mean_stddev_box_coder());
      break;
    }
    case kSquareBoxCoder: {
      _this->_internal_mutable_square_box_coder()->::object_detection::protos::SquareBoxCoder::MergeFrom(
          from._internal_square_box_coder());
      break;
    }
    case kKeypointBoxCoder: {
      _this->_internal_mutable_keypoint_box_coder()->::object_detection::protos::KeypointBoxCoder::MergeFrom(
          from._internal_keypoint_box_coder());
      break;
    }
    case BOX_CODER_ONEOF_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BoxCoder::InternalSwap(BoxCoder* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.box_coder_oneof_, other->_impl_.box_coder_oneof_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata BoxCoder::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fcoder_2eproto[0]);
}

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

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