// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: ranker_model.proto
// Protobuf C++ Version: 7.35.1

#include "ranker_model.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace assist_ranker {
class RankerModelMetadata::_Internal {
 public:
  using HasBits = decltype(::std::declval<RankerModelMetadata>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_._has_bits_);
};

constexpr RankerModelMetadata::ParseTableT_ RankerModelMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_._has_bits_),
      0, // no _extensions_
      7, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967168,  // skipmap
      offsetof(ParseTableT_, field_entries),
      7,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::assist_ranker::RankerModelMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional string name = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.name_)}},
      // optional string label = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.label_)}},
      // optional string source = 3;
      {::_pbi::TcParser::FastBS1,
       {26, 2, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.source_)}},
      // optional int64 last_modified_sec = 4;
      {::_pbi::TcParser::FastV64S1,
       {32, 3, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.last_modified_sec_)}},
      // optional int64 cache_duration_sec = 5;
      {::_pbi::TcParser::FastV64S1,
       {40, 4, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.cache_duration_sec_)}},
      // optional uint32 model_version = 6;
      {::_pbi::TcParser::FastV32S1,
       {48, 5, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.model_version_)}},
      // optional bool input_features_names_are_hex_hashes = 7;
      {::_pbi::TcParser::FastV8S1,
       {56, 6, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.input_features_names_are_hex_hashes_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string name = 1;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string label = 2;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.label_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string source = 3;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.source_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional int64 last_modified_sec = 4;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.last_modified_sec_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // optional int64 cache_duration_sec = 5;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.cache_duration_sec_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // optional uint32 model_version = 6;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.model_version_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // optional bool input_features_names_are_hex_hashes = 7;
      {PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.input_features_names_are_hex_hashes_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr RankerModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        name_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        label_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        source_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        last_modified_sec_{::int64_t{0}},
        cache_duration_sec_{::int64_t{0}},
        model_version_{0u},
        input_features_names_are_hex_hashes_{false} {}

template <typename>
constexpr RankerModelMetadata::RankerModelMetadata(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL RankerModelMetadata::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) RankerModelMetadata(arena);
}
constexpr auto RankerModelMetadata::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(RankerModelMetadata), alignof(RankerModelMetadata));
}
constexpr auto RankerModelMetadata::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &RankerModelMetadata::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<RankerModelMetadata>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &RankerModelMetadata::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<RankerModelMetadata>(), &RankerModelMetadata::ByteSizeLong,
              &RankerModelMetadata::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_._cached_size_),
          true,
      },
      "assist_ranker.RankerModelMetadata",
  };
}
struct RankerModelMetadataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr RankerModelMetadataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 RankerModelMetadata_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(RankerModelMetadata::InternalGenerateClassData_(
            _default, &RankerModelMetadata_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<RankerModelMetadata>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~RankerModelMetadataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) RankerModelMetadata _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<RankerModelMetadata>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(RankerModelMetadataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST RankerModelMetadataGlobalsTypeInternal RankerModelMetadata_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* RankerModelMetadata_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return RankerModelMetadata_globals_.GetClassData();
#else
  return RankerModelMetadata_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class RankerModelProto::_Internal {
 public:
  using HasBits = decltype(::std::declval<RankerModelProto>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_._has_bits_);
  static constexpr ::int32_t kOneofCaseOffset =
      PROTOBUF_FIELD_OFFSET(::assist_ranker::RankerModelProto, _impl_._oneof_case_);
};

constexpr RankerModelProto::ParseTableT_ RankerModelProto::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_._has_bits_),
      0, // no _extensions_
      4, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967280,  // skipmap
      offsetof(ParseTableT_, field_entries),
      4,  // num_field_entries
      4,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::assist_ranker::RankerModelProto>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional .assist_ranker.RankerModelMetadata metadata = 1;
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_.metadata_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .assist_ranker.RankerModelMetadata metadata = 1;
      {PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_.metadata_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .assist_ranker.TranslateRankerModel translate = 2;
      {PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_.model_.translate_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
      // .assist_ranker.GenericLogisticRegressionModel logistic_regression = 3;
      {PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_.model_.logistic_regression_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
      // .assist_ranker.NNClassifierModel nn_classifier = 4;
      {PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_.model_.nn_classifier_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::assist_ranker::RankerModelMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::assist_ranker::RankerModelMetadata_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::assist_ranker::TranslateRankerModel>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::assist_ranker::TranslateRankerModel_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::assist_ranker::GenericLogisticRegressionModel>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::assist_ranker::GenericLogisticRegressionModel_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::assist_ranker::NNClassifierModel>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::assist_ranker::NNClassifierModel_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr RankerModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        metadata_{nullptr},
        model_{},
        _oneof_case_{} {}

template <typename>
constexpr RankerModelProto::RankerModelProto(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL RankerModelProto::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) RankerModelProto(arena);
}
constexpr auto RankerModelProto::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RankerModelProto), alignof(RankerModelProto));
}
constexpr auto RankerModelProto::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &RankerModelProto::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<RankerModelProto>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &RankerModelProto::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<RankerModelProto>(), &RankerModelProto::ByteSizeLong,
              &RankerModelProto::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(RankerModelProto, _impl_._cached_size_),
          true,
      },
      "assist_ranker.RankerModelProto",
  };
}
struct RankerModelProtoGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr RankerModelProtoGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 RankerModelProto_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(RankerModelProto::InternalGenerateClassData_(
            _default, &RankerModelProto_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<RankerModelProto>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~RankerModelProtoGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) RankerModelProto _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<RankerModelProto>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(RankerModelProtoGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST RankerModelProtoGlobalsTypeInternal RankerModelProto_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* RankerModelProto_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return RankerModelProto_globals_.GetClassData();
#else
  return RankerModelProto_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace assist_ranker
namespace assist_ranker {
// ===================================================================

RankerModelMetadata::RankerModelMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, RankerModelMetadata_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:assist_ranker.RankerModelMetadata)
}
PROTOBUF_NDEBUG_INLINE RankerModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::assist_ranker::RankerModelMetadata& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        name_(arena, from.name_),
        label_(arena, from.label_),
        source_(arena, from.source_) {}

RankerModelMetadata::RankerModelMetadata(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const RankerModelMetadata& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, RankerModelMetadata_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  RankerModelMetadata* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, last_modified_sec_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, last_modified_sec_),
           offsetof(Impl_, input_features_names_are_hex_hashes_) -
               offsetof(Impl_, last_modified_sec_) +
               sizeof(Impl_::input_features_names_are_hex_hashes_));

  // @@protoc_insertion_point(copy_constructor:assist_ranker.RankerModelMetadata)
}
PROTOBUF_NDEBUG_INLINE RankerModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        name_(arena),
        label_(arena),
        source_(arena) {}

inline void RankerModelMetadata::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, last_modified_sec_),
           0,
           offsetof(Impl_, input_features_names_are_hex_hashes_) -
               offsetof(Impl_, last_modified_sec_) +
               sizeof(Impl_::input_features_names_are_hex_hashes_));
}
RankerModelMetadata::~RankerModelMetadata() {
  // @@protoc_insertion_point(destructor:assist_ranker.RankerModelMetadata)
  SharedDtor(*this);
}
inline void RankerModelMetadata::SharedDtor(MessageLite& self) {
  RankerModelMetadata& this_ = static_cast<RankerModelMetadata&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.name_.Destroy();
  this_._impl_.label_.Destroy();
  this_._impl_.source_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite RankerModelMetadata_class_data_ =
    RankerModelMetadata::InternalGenerateClassData_(RankerModelMetadata_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
RankerModelMetadata::GetClassData() const {
  return RankerModelMetadata_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
RankerModelMetadata::GetClassData() const {
  return RankerModelMetadata_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const RankerModelMetadata::ParseTableT_
    RankerModelMetadata::_table_ =
        RankerModelMetadata::InternalGenerateParseTable_(RankerModelMetadata_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void RankerModelMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:assist_ranker.RankerModelMetadata)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.label_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.source_.ClearNonDefaultToEmpty();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000078U)) {
    ::memset(&_impl_.last_modified_sec_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.input_features_names_are_hex_hashes_) -
        reinterpret_cast<char*>(&_impl_.last_modified_sec_)) + sizeof(_impl_.input_features_names_are_hex_hashes_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL RankerModelMetadata::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const RankerModelMetadata& this_ = static_cast<const RankerModelMetadata&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL RankerModelMetadata::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const RankerModelMetadata& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:assist_ranker.RankerModelMetadata)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string name = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_name();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // optional string label = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_label();
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // optional string source = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_source();
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // optional int64 last_modified_sec = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
            stream, this_._internal_last_modified_sec(), target);
  }

  // optional int64 cache_duration_sec = 5;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<5>(
            stream, this_._internal_cache_duration_sec(), target);
  }

  // optional uint32 model_version = 6;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        6, this_._internal_model_version(), target);
  }

  // optional bool input_features_names_are_hex_hashes = 7;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        7, this_._internal_input_features_names_are_hex_hashes(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:assist_ranker.RankerModelMetadata)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t RankerModelMetadata::ByteSizeLong(const MessageLite& base) {
  const RankerModelMetadata& this_ = static_cast<const RankerModelMetadata&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t RankerModelMetadata::ByteSizeLong() const {
  const RankerModelMetadata& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:assist_ranker.RankerModelMetadata)
  ::size_t total_size = 0;

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += static_cast<bool>(0x00000040U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    // optional string name = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_name());
    }
    // optional string label = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_label());
    }
    // optional string source = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_source());
    }
    // optional int64 last_modified_sec = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_last_modified_sec());
    }
    // optional int64 cache_duration_sec = 5;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_cache_duration_sec());
    }
    // optional uint32 model_version = 6;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_model_version());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void RankerModelMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<RankerModelMetadata*>(&to_msg);
  auto& from = static_cast<const RankerModelMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:assist_ranker.RankerModelMetadata)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_name(from._internal_name());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_label(from._internal_label());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_source(from._internal_source());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.last_modified_sec_ = from._impl_.last_modified_sec_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.cache_duration_sec_ = from._impl_.cache_duration_sec_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.model_version_ = from._impl_.model_version_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.input_features_names_are_hex_hashes_ = from._impl_.input_features_names_are_hex_hashes_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void RankerModelMetadata::InternalSwap(RankerModelMetadata* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.label_, &other->_impl_.label_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.source_, &other->_impl_.source_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.input_features_names_are_hex_hashes_)
      + sizeof(RankerModelMetadata::_impl_.input_features_names_are_hex_hashes_)
      - PROTOBUF_FIELD_OFFSET(RankerModelMetadata, _impl_.last_modified_sec_)>(
          reinterpret_cast<char*>(&_impl_.last_modified_sec_),
          reinterpret_cast<char*>(&other->_impl_.last_modified_sec_));
}

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

void RankerModelProto::set_allocated_translate(::assist_ranker::TranslateRankerModel* PROTOBUF_NULLABLE translate) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_model();
  if (translate) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(translate)->GetArena();
    if (message_arena != submessage_arena) {
      translate = ::google::protobuf::internal::GetOwnedMessage(message_arena, translate, submessage_arena);
    }
    set_has_translate();
    _impl_.model_.translate_ = translate;
  }
  // @@protoc_insertion_point(field_set_allocated:assist_ranker.RankerModelProto.translate)
}
void RankerModelProto::clear_translate() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (model_case() == kTranslate) {
    if (GetArena() == nullptr) {
      delete _impl_.model_.translate_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      if (_impl_.model_.translate_ != nullptr) {
        _impl_.model_.translate_->Clear();
      }
    }
    clear_has_model();
  }
}
void RankerModelProto::set_allocated_logistic_regression(::assist_ranker::GenericLogisticRegressionModel* PROTOBUF_NULLABLE logistic_regression) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_model();
  if (logistic_regression) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(logistic_regression)->GetArena();
    if (message_arena != submessage_arena) {
      logistic_regression = ::google::protobuf::internal::GetOwnedMessage(message_arena, logistic_regression, submessage_arena);
    }
    set_has_logistic_regression();
    _impl_.model_.logistic_regression_ = logistic_regression;
  }
  // @@protoc_insertion_point(field_set_allocated:assist_ranker.RankerModelProto.logistic_regression)
}
void RankerModelProto::clear_logistic_regression() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (model_case() == kLogisticRegression) {
    if (GetArena() == nullptr) {
      delete _impl_.model_.logistic_regression_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      if (_impl_.model_.logistic_regression_ != nullptr) {
        _impl_.model_.logistic_regression_->Clear();
      }
    }
    clear_has_model();
  }
}
void RankerModelProto::set_allocated_nn_classifier(::assist_ranker::NNClassifierModel* PROTOBUF_NULLABLE nn_classifier) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_model();
  if (nn_classifier) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(nn_classifier)->GetArena();
    if (message_arena != submessage_arena) {
      nn_classifier = ::google::protobuf::internal::GetOwnedMessage(message_arena, nn_classifier, submessage_arena);
    }
    set_has_nn_classifier();
    _impl_.model_.nn_classifier_ = nn_classifier;
  }
  // @@protoc_insertion_point(field_set_allocated:assist_ranker.RankerModelProto.nn_classifier)
}
void RankerModelProto::clear_nn_classifier() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (model_case() == kNnClassifier) {
    if (GetArena() == nullptr) {
      delete _impl_.model_.nn_classifier_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      if (_impl_.model_.nn_classifier_ != nullptr) {
        _impl_.model_.nn_classifier_->Clear();
      }
    }
    clear_has_model();
  }
}
RankerModelProto::RankerModelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, RankerModelProto_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:assist_ranker.RankerModelProto)
}
PROTOBUF_NDEBUG_INLINE RankerModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::assist_ranker::RankerModelProto& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        model_{},
        _oneof_case_{from._oneof_case_[0]} {}

RankerModelProto::RankerModelProto(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const RankerModelProto& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, RankerModelProto_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  RankerModelProto* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.metadata_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_)
                : nullptr;
  switch (model_case()) {
    case MODEL_NOT_SET:
      break;
      case kTranslate:
        _impl_.model_.translate_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.translate_);
        break;
      case kLogisticRegression:
        _impl_.model_.logistic_regression_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.logistic_regression_);
        break;
      case kNnClassifier:
        _impl_.model_.nn_classifier_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.nn_classifier_);
        break;
  }

  // @@protoc_insertion_point(copy_constructor:assist_ranker.RankerModelProto)
}
PROTOBUF_NDEBUG_INLINE RankerModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        model_{},
        _oneof_case_{} {}

inline void RankerModelProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.metadata_ = {};
}
RankerModelProto::~RankerModelProto() {
  // @@protoc_insertion_point(destructor:assist_ranker.RankerModelProto)
  SharedDtor(*this);
}
inline void RankerModelProto::SharedDtor(MessageLite& self) {
  RankerModelProto& this_ = static_cast<RankerModelProto&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.metadata_;
  if (this_.has_model()) {
    this_.clear_model();
  }
  this_._impl_.~Impl_();
}

void RankerModelProto::clear_model() {
// @@protoc_insertion_point(one_of_clear_start:assist_ranker.RankerModelProto)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (model_case()) {
    case kTranslate: {
      if (GetArena() == nullptr) {
        delete _impl_.model_.translate_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.model_.translate_ != nullptr) {
          _impl_.model_.translate_->Clear();
        }
      }
      break;
    }
    case kLogisticRegression: {
      if (GetArena() == nullptr) {
        delete _impl_.model_.logistic_regression_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.model_.logistic_regression_ != nullptr) {
          _impl_.model_.logistic_regression_->Clear();
        }
      }
      break;
    }
    case kNnClassifier: {
      if (GetArena() == nullptr) {
        delete _impl_.model_.nn_classifier_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.model_.nn_classifier_ != nullptr) {
          _impl_.model_.nn_classifier_->Clear();
        }
      }
      break;
    }
    case MODEL_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = MODEL_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite RankerModelProto_class_data_ =
    RankerModelProto::InternalGenerateClassData_(RankerModelProto_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
RankerModelProto::GetClassData() const {
  return RankerModelProto_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
RankerModelProto::GetClassData() const {
  return RankerModelProto_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const RankerModelProto::ParseTableT_
    RankerModelProto::_table_ =
        RankerModelProto::InternalGenerateParseTable_(RankerModelProto_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void RankerModelProto::Clear() {
// @@protoc_insertion_point(message_clear_start:assist_ranker.RankerModelProto)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(_impl_.metadata_ != nullptr);
    _impl_.metadata_->Clear();
  }
  clear_model();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL RankerModelProto::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const RankerModelProto& this_ = static_cast<const RankerModelProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL RankerModelProto::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const RankerModelProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:assist_ranker.RankerModelProto)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .assist_ranker.RankerModelMetadata metadata = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.metadata_, this_._impl_.metadata_->GetCachedSize(), target,
        stream);
  }

  switch (this_.model_case()) {
    case kTranslate: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          2, *this_._impl_.model_.translate_, this_._impl_.model_.translate_->GetCachedSize(), target,
          stream);
      break;
    }
    case kLogisticRegression: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          3, *this_._impl_.model_.logistic_regression_, this_._impl_.model_.logistic_regression_->GetCachedSize(), target,
          stream);
      break;
    }
    case kNnClassifier: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          4, *this_._impl_.model_.nn_classifier_, this_._impl_.model_.nn_classifier_->GetCachedSize(), target,
          stream);
      break;
    }
    default:
      break;
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:assist_ranker.RankerModelProto)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t RankerModelProto::ByteSizeLong(const MessageLite& base) {
  const RankerModelProto& this_ = static_cast<const RankerModelProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t RankerModelProto::ByteSizeLong() const {
  const RankerModelProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:assist_ranker.RankerModelProto)
  ::size_t total_size = 0;

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

   {
    // optional .assist_ranker.RankerModelMetadata metadata = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.metadata_);
    }
  }
  switch (this_.model_case()) {
    // .assist_ranker.TranslateRankerModel translate = 2;
    case kTranslate: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.model_.translate_);
      break;
    }
    // .assist_ranker.GenericLogisticRegressionModel logistic_regression = 3;
    case kLogisticRegression: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.model_.logistic_regression_);
      break;
    }
    // .assist_ranker.NNClassifierModel nn_classifier = 4;
    case kNnClassifier: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.model_.nn_classifier_);
      break;
    }
    case MODEL_NOT_SET: {
      break;
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void RankerModelProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<RankerModelProto*>(&to_msg);
  auto& from = static_cast<const RankerModelProto&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:assist_ranker.RankerModelProto)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(from._impl_.metadata_ != nullptr);
    if (_this->_impl_.metadata_ == nullptr) {
      _this->_impl_.metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_);
    } else {
      _this->_impl_.metadata_->MergeFrom(*from._impl_.metadata_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  if (const uint32_t oneof_from_case =
          from._impl_._oneof_case_[0]) {
    const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
    const bool oneof_needs_init = oneof_to_case != oneof_from_case;
    if (oneof_needs_init) {
      if (oneof_to_case != 0) {
        _this->clear_model();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kTranslate: {
        if (oneof_needs_init) {
          _this->_impl_.model_.translate_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.translate_);
        } else {
          _this->_impl_.model_.translate_->CheckTypeAndMergeFrom(*from._impl_.model_.translate_);
        }
        break;
      }
      case kLogisticRegression: {
        if (oneof_needs_init) {
          _this->_impl_.model_.logistic_regression_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.logistic_regression_);
        } else {
          _this->_impl_.model_.logistic_regression_->CheckTypeAndMergeFrom(*from._impl_.model_.logistic_regression_);
        }
        break;
      }
      case kNnClassifier: {
        if (oneof_needs_init) {
          _this->_impl_.model_.nn_classifier_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.model_.nn_classifier_);
        } else {
          _this->_impl_.model_.nn_classifier_->CheckTypeAndMergeFrom(*from._impl_.model_.nn_classifier_);
        }
        break;
      }
      case MODEL_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void RankerModelProto::InternalSwap(RankerModelProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.metadata_, other->_impl_.metadata_);
  swap(_impl_.model_, other->_impl_.model_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace assist_ranker
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
