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

#include "second/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 second {
namespace protos {
PROTOBUF_CONSTEXPR BoxCoder::BoxCoder(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.box_coder_)*/{}
  , /*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_;
PROTOBUF_CONSTEXPR GroundBox3dCoder::GroundBox3dCoder(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.linear_dim_)*/false
  , /*decltype(_impl_.encode_angle_vector_)*/false
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GroundBox3dCoderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GroundBox3dCoderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~GroundBox3dCoderDefaultTypeInternal() {}
  union {
    GroundBox3dCoder _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GroundBox3dCoderDefaultTypeInternal _GroundBox3dCoder_default_instance_;
PROTOBUF_CONSTEXPR BevBoxCoder::BevBoxCoder(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.linear_dim_)*/false
  , /*decltype(_impl_.encode_angle_vector_)*/false
  , /*decltype(_impl_.z_fixed_)*/0
  , /*decltype(_impl_.h_fixed_)*/0
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BevBoxCoderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BevBoxCoderDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BevBoxCoderDefaultTypeInternal() {}
  union {
    BevBoxCoder _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BevBoxCoderDefaultTypeInternal _BevBoxCoder_default_instance_;
}  // namespace protos
}  // namespace second
static ::_pb::Metadata file_level_metadata_second_2fprotos_2fbox_5fcoder_2eproto[3];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_second_2fprotos_2fbox_5fcoder_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_second_2fprotos_2fbox_5fcoder_2eproto = nullptr;

const uint32_t TableStruct_second_2fprotos_2fbox_5fcoder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::second::protos::BoxCoder, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::second::protos::BoxCoder, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::second::protos::BoxCoder, _impl_.box_coder_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::second::protos::GroundBox3dCoder, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::second::protos::GroundBox3dCoder, _impl_.linear_dim_),
  PROTOBUF_FIELD_OFFSET(::second::protos::GroundBox3dCoder, _impl_.encode_angle_vector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::second::protos::BevBoxCoder, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::second::protos::BevBoxCoder, _impl_.linear_dim_),
  PROTOBUF_FIELD_OFFSET(::second::protos::BevBoxCoder, _impl_.encode_angle_vector_),
  PROTOBUF_FIELD_OFFSET(::second::protos::BevBoxCoder, _impl_.z_fixed_),
  PROTOBUF_FIELD_OFFSET(::second::protos::BevBoxCoder, _impl_.h_fixed_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::second::protos::BoxCoder)},
  { 9, -1, -1, sizeof(::second::protos::GroundBox3dCoder)},
  { 17, -1, -1, sizeof(::second::protos::BevBoxCoder)},
};

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

const char descriptor_table_protodef_second_2fprotos_2fbox_5fcoder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\035second/protos/box_coder.proto\022\rsecond."
  "protos\"\213\001\n\010BoxCoder\022=\n\022ground_box3d_code"
  "r\030\001 \001(\0132\037.second.protos.GroundBox3dCoder"
  "H\000\0223\n\rbev_box_coder\030\002 \001(\0132\032.second.proto"
  "s.BevBoxCoderH\000B\013\n\tbox_coder\"C\n\020GroundBo"
  "x3dCoder\022\022\n\nlinear_dim\030\001 \001(\010\022\033\n\023encode_a"
  "ngle_vector\030\002 \001(\010\"`\n\013BevBoxCoder\022\022\n\nline"
  "ar_dim\030\001 \001(\010\022\033\n\023encode_angle_vector\030\002 \001("
  "\010\022\017\n\007z_fixed\030\003 \001(\002\022\017\n\007h_fixed\030\004 \001(\002b\006pro"
  "to3"
  ;
static ::_pbi::once_flag descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto = {
    false, false, 363, descriptor_table_protodef_second_2fprotos_2fbox_5fcoder_2eproto,
    "second/protos/box_coder.proto",
    &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_once, nullptr, 0, 3,
    schemas, file_default_instances, TableStruct_second_2fprotos_2fbox_5fcoder_2eproto::offsets,
    file_level_metadata_second_2fprotos_2fbox_5fcoder_2eproto, file_level_enum_descriptors_second_2fprotos_2fbox_5fcoder_2eproto,
    file_level_service_descriptors_second_2fprotos_2fbox_5fcoder_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_getter() {
  return &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_second_2fprotos_2fbox_5fcoder_2eproto(&descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto);
namespace second {
namespace protos {

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

class BoxCoder::_Internal {
 public:
  static const ::second::protos::GroundBox3dCoder& ground_box3d_coder(const BoxCoder* msg);
  static const ::second::protos::BevBoxCoder& bev_box_coder(const BoxCoder* msg);
};

const ::second::protos::GroundBox3dCoder&
BoxCoder::_Internal::ground_box3d_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_.ground_box3d_coder_;
}
const ::second::protos::BevBoxCoder&
BoxCoder::_Internal::bev_box_coder(const BoxCoder* msg) {
  return *msg->_impl_.box_coder_.bev_box_coder_;
}
void BoxCoder::set_allocated_ground_box3d_coder(::second::protos::GroundBox3dCoder* ground_box3d_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder();
  if (ground_box3d_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(ground_box3d_coder);
    if (message_arena != submessage_arena) {
      ground_box3d_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, ground_box3d_coder, submessage_arena);
    }
    set_has_ground_box3d_coder();
    _impl_.box_coder_.ground_box3d_coder_ = ground_box3d_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:second.protos.BoxCoder.ground_box3d_coder)
}
void BoxCoder::set_allocated_bev_box_coder(::second::protos::BevBoxCoder* bev_box_coder) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_coder();
  if (bev_box_coder) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bev_box_coder);
    if (message_arena != submessage_arena) {
      bev_box_coder = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, bev_box_coder, submessage_arena);
    }
    set_has_bev_box_coder();
    _impl_.box_coder_.bev_box_coder_ = bev_box_coder;
  }
  // @@protoc_insertion_point(field_set_allocated:second.protos.BoxCoder.bev_box_coder)
}
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:second.protos.BoxCoder)
}
BoxCoder::BoxCoder(const BoxCoder& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BoxCoder* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.box_coder_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_box_coder();
  switch (from.box_coder_case()) {
    case kGroundBox3DCoder: {
      _this->_internal_mutable_ground_box3d_coder()->::second::protos::GroundBox3dCoder::MergeFrom(
          from._internal_ground_box3d_coder());
      break;
    }
    case kBevBoxCoder: {
      _this->_internal_mutable_bev_box_coder()->::second::protos::BevBoxCoder::MergeFrom(
          from._internal_bev_box_coder());
      break;
    }
    case BOX_CODER_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:second.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_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_box_coder();
}

BoxCoder::~BoxCoder() {
  // @@protoc_insertion_point(destructor:second.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()) {
    clear_box_coder();
  }
}

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

void BoxCoder::clear_box_coder() {
// @@protoc_insertion_point(one_of_clear_start:second.protos.BoxCoder)
  switch (box_coder_case()) {
    case kGroundBox3DCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_.ground_box3d_coder_;
      }
      break;
    }
    case kBevBoxCoder: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_coder_.bev_box_coder_;
      }
      break;
    }
    case BOX_CODER_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = BOX_CODER_NOT_SET;
}


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

  clear_box_coder();
  _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) {
      // .second.protos.GroundBox3dCoder ground_box3d_coder = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_ground_box3d_coder(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .second.protos.BevBoxCoder bev_box_coder = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_bev_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:second.protos.BoxCoder)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .second.protos.GroundBox3dCoder ground_box3d_coder = 1;
  if (_internal_has_ground_box3d_coder()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::ground_box3d_coder(this),
        _Internal::ground_box3d_coder(this).GetCachedSize(), target, stream);
  }

  // .second.protos.BevBoxCoder bev_box_coder = 2;
  if (_internal_has_bev_box_coder()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::bev_box_coder(this),
        _Internal::bev_box_coder(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:second.protos.BoxCoder)
  return target;
}

size_t BoxCoder::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:second.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_case()) {
    // .second.protos.GroundBox3dCoder ground_box3d_coder = 1;
    case kGroundBox3DCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_.ground_box3d_coder_);
      break;
    }
    // .second.protos.BevBoxCoder bev_box_coder = 2;
    case kBevBoxCoder: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_coder_.bev_box_coder_);
      break;
    }
    case BOX_CODER_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:second.protos.BoxCoder)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.box_coder_case()) {
    case kGroundBox3DCoder: {
      _this->_internal_mutable_ground_box3d_coder()->::second::protos::GroundBox3dCoder::MergeFrom(
          from._internal_ground_box3d_coder());
      break;
    }
    case kBevBoxCoder: {
      _this->_internal_mutable_bev_box_coder()->::second::protos::BevBoxCoder::MergeFrom(
          from._internal_bev_box_coder());
      break;
    }
    case BOX_CODER_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:second.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_, other->_impl_.box_coder_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata BoxCoder::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_getter, &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_once,
      file_level_metadata_second_2fprotos_2fbox_5fcoder_2eproto[0]);
}

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

class GroundBox3dCoder::_Internal {
 public:
};

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.linear_dim_, &from._impl_.linear_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.encode_angle_vector_) -
    reinterpret_cast<char*>(&_impl_.linear_dim_)) + sizeof(_impl_.encode_angle_vector_));
  // @@protoc_insertion_point(copy_constructor:second.protos.GroundBox3dCoder)
}

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

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

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

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

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

  ::memset(&_impl_.linear_dim_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.encode_angle_vector_) -
      reinterpret_cast<char*>(&_impl_.linear_dim_)) + sizeof(_impl_.encode_angle_vector_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GroundBox3dCoder::_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) {
      // bool linear_dim = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.linear_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // bool encode_angle_vector = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.encode_angle_vector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool linear_dim = 1;
  if (this->_internal_linear_dim() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_linear_dim(), target);
  }

  // bool encode_angle_vector = 2;
  if (this->_internal_encode_angle_vector() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_encode_angle_vector(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:second.protos.GroundBox3dCoder)
  return target;
}

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

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

  // bool linear_dim = 1;
  if (this->_internal_linear_dim() != 0) {
    total_size += 1 + 1;
  }

  // bool encode_angle_vector = 2;
  if (this->_internal_encode_angle_vector() != 0) {
    total_size += 1 + 1;
  }

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

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


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

  if (from._internal_linear_dim() != 0) {
    _this->_internal_set_linear_dim(from._internal_linear_dim());
  }
  if (from._internal_encode_angle_vector() != 0) {
    _this->_internal_set_encode_angle_vector(from._internal_encode_angle_vector());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void GroundBox3dCoder::InternalSwap(GroundBox3dCoder* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GroundBox3dCoder, _impl_.encode_angle_vector_)
      + sizeof(GroundBox3dCoder::_impl_.encode_angle_vector_)
      - PROTOBUF_FIELD_OFFSET(GroundBox3dCoder, _impl_.linear_dim_)>(
          reinterpret_cast<char*>(&_impl_.linear_dim_),
          reinterpret_cast<char*>(&other->_impl_.linear_dim_));
}

::PROTOBUF_NAMESPACE_ID::Metadata GroundBox3dCoder::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_getter, &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_once,
      file_level_metadata_second_2fprotos_2fbox_5fcoder_2eproto[1]);
}

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

class BevBoxCoder::_Internal {
 public:
};

BevBoxCoder::BevBoxCoder(::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:second.protos.BevBoxCoder)
}
BevBoxCoder::BevBoxCoder(const BevBoxCoder& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BevBoxCoder* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.linear_dim_){}
    , decltype(_impl_.encode_angle_vector_){}
    , decltype(_impl_.z_fixed_){}
    , decltype(_impl_.h_fixed_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.linear_dim_, &from._impl_.linear_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.h_fixed_) -
    reinterpret_cast<char*>(&_impl_.linear_dim_)) + sizeof(_impl_.h_fixed_));
  // @@protoc_insertion_point(copy_constructor:second.protos.BevBoxCoder)
}

inline void BevBoxCoder::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.linear_dim_){false}
    , decltype(_impl_.encode_angle_vector_){false}
    , decltype(_impl_.z_fixed_){0}
    , decltype(_impl_.h_fixed_){0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

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

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

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

  ::memset(&_impl_.linear_dim_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.h_fixed_) -
      reinterpret_cast<char*>(&_impl_.linear_dim_)) + sizeof(_impl_.h_fixed_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BevBoxCoder::_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) {
      // bool linear_dim = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.linear_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // bool encode_angle_vector = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.encode_angle_vector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // float z_fixed = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _impl_.z_fixed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // float h_fixed = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _impl_.h_fixed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // bool linear_dim = 1;
  if (this->_internal_linear_dim() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_linear_dim(), target);
  }

  // bool encode_angle_vector = 2;
  if (this->_internal_encode_angle_vector() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_encode_angle_vector(), target);
  }

  // float z_fixed = 3;
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_z_fixed = this->_internal_z_fixed();
  uint32_t raw_z_fixed;
  memcpy(&raw_z_fixed, &tmp_z_fixed, sizeof(tmp_z_fixed));
  if (raw_z_fixed != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_z_fixed(), target);
  }

  // float h_fixed = 4;
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_h_fixed = this->_internal_h_fixed();
  uint32_t raw_h_fixed;
  memcpy(&raw_h_fixed, &tmp_h_fixed, sizeof(tmp_h_fixed));
  if (raw_h_fixed != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_h_fixed(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:second.protos.BevBoxCoder)
  return target;
}

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

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

  // bool linear_dim = 1;
  if (this->_internal_linear_dim() != 0) {
    total_size += 1 + 1;
  }

  // bool encode_angle_vector = 2;
  if (this->_internal_encode_angle_vector() != 0) {
    total_size += 1 + 1;
  }

  // float z_fixed = 3;
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_z_fixed = this->_internal_z_fixed();
  uint32_t raw_z_fixed;
  memcpy(&raw_z_fixed, &tmp_z_fixed, sizeof(tmp_z_fixed));
  if (raw_z_fixed != 0) {
    total_size += 1 + 4;
  }

  // float h_fixed = 4;
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_h_fixed = this->_internal_h_fixed();
  uint32_t raw_h_fixed;
  memcpy(&raw_h_fixed, &tmp_h_fixed, sizeof(tmp_h_fixed));
  if (raw_h_fixed != 0) {
    total_size += 1 + 4;
  }

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

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


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

  if (from._internal_linear_dim() != 0) {
    _this->_internal_set_linear_dim(from._internal_linear_dim());
  }
  if (from._internal_encode_angle_vector() != 0) {
    _this->_internal_set_encode_angle_vector(from._internal_encode_angle_vector());
  }
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_z_fixed = from._internal_z_fixed();
  uint32_t raw_z_fixed;
  memcpy(&raw_z_fixed, &tmp_z_fixed, sizeof(tmp_z_fixed));
  if (raw_z_fixed != 0) {
    _this->_internal_set_z_fixed(from._internal_z_fixed());
  }
  static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
  float tmp_h_fixed = from._internal_h_fixed();
  uint32_t raw_h_fixed;
  memcpy(&raw_h_fixed, &tmp_h_fixed, sizeof(tmp_h_fixed));
  if (raw_h_fixed != 0) {
    _this->_internal_set_h_fixed(from._internal_h_fixed());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BevBoxCoder::InternalSwap(BevBoxCoder* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BevBoxCoder, _impl_.h_fixed_)
      + sizeof(BevBoxCoder::_impl_.h_fixed_)
      - PROTOBUF_FIELD_OFFSET(BevBoxCoder, _impl_.linear_dim_)>(
          reinterpret_cast<char*>(&_impl_.linear_dim_),
          reinterpret_cast<char*>(&other->_impl_.linear_dim_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BevBoxCoder::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_getter, &descriptor_table_second_2fprotos_2fbox_5fcoder_2eproto_once,
      file_level_metadata_second_2fprotos_2fbox_5fcoder_2eproto[2]);
}

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

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