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

#include "components/optimization_guide/proto/on_device_model_execution_config.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 optimization_guide {
namespace proto {
class ValidationPrompt::_Internal {
 public:
  using HasBits = decltype(::std::declval<ValidationPrompt>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_._has_bits_);
};

constexpr ValidationPrompt::ParseTableT_ ValidationPrompt::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // 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<::optimization_guide::proto::ValidationPrompt>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional string expected_output = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_.expected_output_)}},
      // optional string prompt = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_.prompt_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string prompt = 1;
      {PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_.prompt_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string expected_output = 2;
      {PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_.expected_output_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr ValidationPrompt::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        prompt_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        expected_output_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
constexpr ValidationPrompt::ValidationPrompt(::_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 ValidationPrompt::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ValidationPrompt(arena);
}
constexpr auto ValidationPrompt::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ValidationPrompt), alignof(ValidationPrompt));
}
constexpr auto ValidationPrompt::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
          &ValidationPrompt::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ValidationPrompt>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ValidationPrompt::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ValidationPrompt>(), &ValidationPrompt::ByteSizeLong,
              &ValidationPrompt::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ValidationPrompt, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.ValidationPrompt",
  };
}
struct ValidationPromptGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ValidationPromptGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ValidationPrompt_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ValidationPrompt::InternalGenerateClassData_(
            _default, &ValidationPrompt_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ValidationPrompt>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ValidationPromptGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ValidationPrompt _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ValidationPrompt>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ValidationPromptGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr SamplingParams::ParseTableT_ SamplingParams::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // 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<::optimization_guide::proto::SamplingParams>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional float temperature = 2;
      {::_pbi::TcParser::FastF32S1,
       {21, 1, 0,
        PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.temperature_)}},
      // optional uint32 top_k = 1;
      {::_pbi::TcParser::FastV32S1,
       {8, 0, 0,
        PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.top_k_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional uint32 top_k = 1;
      {PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.top_k_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // optional float temperature = 2;
      {PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.temperature_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr SamplingParams::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        top_k_{0u},
        temperature_{0} {}

template <typename>
constexpr SamplingParams::SamplingParams(::_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 SamplingParams::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) SamplingParams(arena);
}
constexpr auto SamplingParams::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(SamplingParams), alignof(SamplingParams));
}
constexpr auto SamplingParams::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
          &SamplingParams::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<SamplingParams>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &SamplingParams::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<SamplingParams>(), &SamplingParams::ByteSizeLong,
              &SamplingParams::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.SamplingParams",
  };
}
struct SamplingParamsGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr SamplingParamsGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 SamplingParams_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(SamplingParams::InternalGenerateClassData_(
            _default, &SamplingParams_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<SamplingParams>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~SamplingParamsGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) SamplingParams _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<SamplingParams>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(SamplingParamsGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST SamplingParamsGlobalsTypeInternal SamplingParams_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* SamplingParams_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return SamplingParams_globals_.GetClassData();
#else
  return SamplingParams_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class ResponseConstraint::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
      PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ResponseConstraint, _impl_._oneof_case_);
};

constexpr ResponseConstraint::ParseTableT_ ResponseConstraint::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ResponseConstraint,
                            _impl_._cached_size_),  // no hasbits
      0, // no _extensions_
      2, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // 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<::optimization_guide::proto::ResponseConstraint>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // string json_schema = 1;
      {PROTOBUF_FIELD_OFFSET(ResponseConstraint, _impl_.format_.json_schema_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kBytes | ::_fl::kRepAString)},
      // string regex = 2;
      {PROTOBUF_FIELD_OFFSET(ResponseConstraint, _impl_.format_.regex_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr ResponseConstraint::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : format_{},
        _cached_size_{0},
        _oneof_case_{} {}

template <typename>
constexpr ResponseConstraint::ResponseConstraint(::_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 ResponseConstraint::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ResponseConstraint(arena);
}
constexpr auto ResponseConstraint::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ResponseConstraint), alignof(ResponseConstraint));
}
constexpr auto ResponseConstraint::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
          &ResponseConstraint::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ResponseConstraint>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ResponseConstraint::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ResponseConstraint>(), &ResponseConstraint::ByteSizeLong,
              &ResponseConstraint::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ResponseConstraint, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.ResponseConstraint",
  };
}
struct ResponseConstraintGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ResponseConstraintGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ResponseConstraint_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ResponseConstraint::InternalGenerateClassData_(
            _default, &ResponseConstraint_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ResponseConstraint>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ResponseConstraintGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ResponseConstraint _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ResponseConstraint>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ResponseConstraintGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr OnDeviceModelValidationConfig::ParseTableT_ OnDeviceModelValidationConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(OnDeviceModelValidationConfig, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      1,  // 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<::optimization_guide::proto::OnDeviceModelValidationConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .optimization_guide.proto.ValidationPrompt validation_prompts = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelValidationConfig, _impl_.validation_prompts_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .optimization_guide.proto.ValidationPrompt validation_prompts = 1;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelValidationConfig, _impl_.validation_prompts_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ValidationPrompt>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ValidationPrompt_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr OnDeviceModelValidationConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        validation_prompts_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelValidationConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelValidationConfig, _impl_.validation_prompts_)>()
         }
     {}

template <typename>
constexpr OnDeviceModelValidationConfig::OnDeviceModelValidationConfig(::_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 OnDeviceModelValidationConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) OnDeviceModelValidationConfig(arena);
}
constexpr auto OnDeviceModelValidationConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OnDeviceModelValidationConfig), alignof(OnDeviceModelValidationConfig));
}
constexpr auto OnDeviceModelValidationConfig::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
          &OnDeviceModelValidationConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<OnDeviceModelValidationConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &OnDeviceModelValidationConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<OnDeviceModelValidationConfig>(), &OnDeviceModelValidationConfig::ByteSizeLong,
              &OnDeviceModelValidationConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(OnDeviceModelValidationConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.OnDeviceModelValidationConfig",
  };
}
struct OnDeviceModelValidationConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr OnDeviceModelValidationConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 OnDeviceModelValidationConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(OnDeviceModelValidationConfig::InternalGenerateClassData_(
            _default, &OnDeviceModelValidationConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelValidationConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~OnDeviceModelValidationConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) OnDeviceModelValidationConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelValidationConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(OnDeviceModelValidationConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr TextSafetyFallbackConfig::ParseTableT_ TextSafetyFallbackConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(TextSafetyFallbackConfig, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      1,  // 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<::optimization_guide::proto::TextSafetyFallbackConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional .optimization_guide.proto.ProtoField input_url_proto_field = 1;
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(TextSafetyFallbackConfig, _impl_.input_url_proto_field_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .optimization_guide.proto.ProtoField input_url_proto_field = 1;
      {PROTOBUF_FIELD_OFFSET(TextSafetyFallbackConfig, _impl_.input_url_proto_field_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ProtoField>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ProtoField_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr TextSafetyFallbackConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        input_url_proto_field_{nullptr} {}

template <typename>
constexpr TextSafetyFallbackConfig::TextSafetyFallbackConfig(::_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 TextSafetyFallbackConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) TextSafetyFallbackConfig(arena);
}
constexpr auto TextSafetyFallbackConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TextSafetyFallbackConfig), alignof(TextSafetyFallbackConfig));
}
constexpr auto TextSafetyFallbackConfig::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
          &TextSafetyFallbackConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<TextSafetyFallbackConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &TextSafetyFallbackConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<TextSafetyFallbackConfig>(), &TextSafetyFallbackConfig::ByteSizeLong,
              &TextSafetyFallbackConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(TextSafetyFallbackConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.TextSafetyFallbackConfig",
  };
}
struct TextSafetyFallbackConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr TextSafetyFallbackConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 TextSafetyFallbackConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(TextSafetyFallbackConfig::InternalGenerateClassData_(
            _default, &TextSafetyFallbackConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<TextSafetyFallbackConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~TextSafetyFallbackConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) TextSafetyFallbackConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<TextSafetyFallbackConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(TextSafetyFallbackConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr OnDeviceModelExecutionOutputConfig::ParseTableT_ OnDeviceModelExecutionOutputConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_._has_bits_),
      0, // no _extensions_
      9, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966848,  // skipmap
      offsetof(ParseTableT_, field_entries),
      8,  // num_field_entries
      5,  // 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<::optimization_guide::proto::OnDeviceModelExecutionOutputConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional string proto_type = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.proto_type_)}},
      // optional .optimization_guide.proto.ProtoField proto_field = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.proto_field_)}},
      // optional .optimization_guide.proto.RedactRules redact_rules = 3;
      {::_pbi::TcParser::FastMtS1,
       {26, 2, 1,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.redact_rules_)}},
      // optional .optimization_guide.proto.ParserKind parser_kind = 4;
      {::_pbi::TcParser::FastEr0S1,
       {32, 5, 4,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.parser_kind_)}},
      // optional bool suppress_parsing_incomplete_output = 5;
      {::_pbi::TcParser::FastV8S1,
       {40, 6, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.suppress_parsing_incomplete_output_)}},
      // optional uint32 max_output_tokens = 6;
      {::_pbi::TcParser::FastV32S1,
       {48, 7, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.max_output_tokens_)}},
      {::_pbi::TcParser::MiniParse, {}},
      // optional .optimization_guide.proto.FieldwiseParserConfig fieldwise_parser_config = 8;
      {::_pbi::TcParser::FastMtS1,
       {66, 3, 2,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.fieldwise_parser_config_)}},
      // optional .optimization_guide.proto.ResponseConstraint response_constraint = 9;
      {::_pbi::TcParser::FastMtS1,
       {74, 4, 3,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.response_constraint_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string proto_type = 1;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.proto_type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional .optimization_guide.proto.ProtoField proto_field = 2;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.proto_field_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.RedactRules redact_rules = 3;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.redact_rules_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.ParserKind parser_kind = 4;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.parser_kind_), _Internal::kHasBitsOffset + 5, 4, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // optional bool suppress_parsing_incomplete_output = 5;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.suppress_parsing_incomplete_output_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional uint32 max_output_tokens = 6;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.max_output_tokens_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // optional .optimization_guide.proto.FieldwiseParserConfig fieldwise_parser_config = 8;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.fieldwise_parser_config_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.ResponseConstraint response_constraint = 9;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.response_constraint_), _Internal::kHasBitsOffset + 4, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ProtoField>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ProtoField_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::RedactRules>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::RedactRules_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::FieldwiseParserConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::FieldwiseParserConfig_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ResponseConstraint>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ResponseConstraint_globals_},
        #endif
        {0, 4},
    }},
    {{
    }},
  };
}


inline constexpr OnDeviceModelExecutionOutputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        proto_type_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        proto_field_{nullptr},
        redact_rules_{nullptr},
        fieldwise_parser_config_{nullptr},
        response_constraint_{nullptr},
        parser_kind_{static_cast< ::optimization_guide::proto::ParserKind >(0)},
        suppress_parsing_incomplete_output_{false},
        max_output_tokens_{0u} {}

template <typename>
constexpr OnDeviceModelExecutionOutputConfig::OnDeviceModelExecutionOutputConfig(::_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 OnDeviceModelExecutionOutputConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) OnDeviceModelExecutionOutputConfig(arena);
}
constexpr auto OnDeviceModelExecutionOutputConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OnDeviceModelExecutionOutputConfig), alignof(OnDeviceModelExecutionOutputConfig));
}
constexpr auto OnDeviceModelExecutionOutputConfig::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
          &OnDeviceModelExecutionOutputConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<OnDeviceModelExecutionOutputConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &OnDeviceModelExecutionOutputConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<OnDeviceModelExecutionOutputConfig>(), &OnDeviceModelExecutionOutputConfig::ByteSizeLong,
              &OnDeviceModelExecutionOutputConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.OnDeviceModelExecutionOutputConfig",
  };
}
struct OnDeviceModelExecutionOutputConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr OnDeviceModelExecutionOutputConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 OnDeviceModelExecutionOutputConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(OnDeviceModelExecutionOutputConfig::InternalGenerateClassData_(
            _default, &OnDeviceModelExecutionOutputConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionOutputConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~OnDeviceModelExecutionOutputConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) OnDeviceModelExecutionOutputConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionOutputConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr OnDeviceModelExecutionInputConfig::ParseTableT_ OnDeviceModelExecutionInputConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_._has_bits_),
      0, // no _extensions_
      6, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967232,  // skipmap
      offsetof(ParseTableT_, field_entries),
      6,  // num_field_entries
      2,  // 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<::optimization_guide::proto::OnDeviceModelExecutionInputConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional string request_base_name = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 2, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.request_base_name_)}},
      // repeated .optimization_guide.proto.SubstitutedString execute_substitutions = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.execute_substitutions_)}},
      // repeated .optimization_guide.proto.SubstitutedString input_context_substitutions = 3;
      {::_pbi::TcParser::FastMtR1,
       {26, 1, 1,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.input_context_substitutions_)}},
      // optional uint32 min_context_tokens = 4;
      {::_pbi::TcParser::FastV32S1,
       {32, 3, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.min_context_tokens_)}},
      // optional uint32 max_context_tokens = 5;
      {::_pbi::TcParser::FastV32S1,
       {40, 4, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.max_context_tokens_)}},
      // optional uint32 max_execute_tokens = 6;
      {::_pbi::TcParser::FastV32S1,
       {48, 5, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.max_execute_tokens_)}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string request_base_name = 1;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.request_base_name_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // repeated .optimization_guide.proto.SubstitutedString execute_substitutions = 2;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.execute_substitutions_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .optimization_guide.proto.SubstitutedString input_context_substitutions = 3;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.input_context_substitutions_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional uint32 min_context_tokens = 4;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.min_context_tokens_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // optional uint32 max_context_tokens = 5;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.max_context_tokens_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // optional uint32 max_execute_tokens = 6;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.max_execute_tokens_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::SubstitutedString>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::SubstitutedString_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::SubstitutedString>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::SubstitutedString_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr OnDeviceModelExecutionInputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        execute_substitutions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.execute_substitutions_)>()
         }
        ,
        input_context_substitutions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.input_context_substitutions_)>()
         }
        ,
        request_base_name_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        min_context_tokens_{0u},
        max_context_tokens_{0u},
        max_execute_tokens_{0u} {}

template <typename>
constexpr OnDeviceModelExecutionInputConfig::OnDeviceModelExecutionInputConfig(::_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 OnDeviceModelExecutionInputConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) OnDeviceModelExecutionInputConfig(arena);
}
constexpr auto OnDeviceModelExecutionInputConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OnDeviceModelExecutionInputConfig), alignof(OnDeviceModelExecutionInputConfig));
}
constexpr auto OnDeviceModelExecutionInputConfig::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
          &OnDeviceModelExecutionInputConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<OnDeviceModelExecutionInputConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &OnDeviceModelExecutionInputConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<OnDeviceModelExecutionInputConfig>(), &OnDeviceModelExecutionInputConfig::ByteSizeLong,
              &OnDeviceModelExecutionInputConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.OnDeviceModelExecutionInputConfig",
  };
}
struct OnDeviceModelExecutionInputConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr OnDeviceModelExecutionInputConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 OnDeviceModelExecutionInputConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(OnDeviceModelExecutionInputConfig::InternalGenerateClassData_(
            _default, &OnDeviceModelExecutionInputConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionInputConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~OnDeviceModelExecutionInputConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) OnDeviceModelExecutionInputConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionInputConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr OnDeviceModelExecutionFeatureConfig::ParseTableT_ OnDeviceModelExecutionFeatureConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_._has_bits_),
      0, // no _extensions_
      8, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967040,  // skipmap
      offsetof(ParseTableT_, field_entries),
      8,  // num_field_entries
      6,  // 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<::optimization_guide::proto::OnDeviceModelExecutionFeatureConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional uint32 adaptation_rank = 8;
      {::_pbi::TcParser::FastV32S1,
       {64, 7, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.adaptation_rank_)}},
      // optional .optimization_guide.proto.ModelExecutionFeature feature = 1;
      {::_pbi::TcParser::FastEvS1,
       {8, 5, 5,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.feature_)}},
      // optional .optimization_guide.proto.OnDeviceModelExecutionInputConfig input_config = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.input_config_)}},
      // optional .optimization_guide.proto.OnDeviceModelExecutionOutputConfig output_config = 3;
      {::_pbi::TcParser::FastMtS1,
       {26, 1, 1,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.output_config_)}},
      // optional .optimization_guide.proto.TextSafetyFallbackConfig text_safety_fallback_config = 4;
      {::_pbi::TcParser::FastMtS1,
       {34, 2, 2,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.text_safety_fallback_config_)}},
      // optional bool can_skip_text_safety = 5;
      {::_pbi::TcParser::FastV8S1,
       {40, 6, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.can_skip_text_safety_)}},
      // optional .optimization_guide.proto.SamplingParams sampling_params = 6;
      {::_pbi::TcParser::FastMtS1,
       {50, 3, 3,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.sampling_params_)}},
      // optional .optimization_guide.proto.Any feature_metadata = 7;
      {::_pbi::TcParser::FastMtS1,
       {58, 4, 4,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.feature_metadata_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .optimization_guide.proto.ModelExecutionFeature feature = 1;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.feature_), _Internal::kHasBitsOffset + 5, 5, (0 | ::_fl::kFcOptional | ::_fl::kEnum)},
      // optional .optimization_guide.proto.OnDeviceModelExecutionInputConfig input_config = 2;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.input_config_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.OnDeviceModelExecutionOutputConfig output_config = 3;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.output_config_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.TextSafetyFallbackConfig text_safety_fallback_config = 4;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.text_safety_fallback_config_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional bool can_skip_text_safety = 5;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.can_skip_text_safety_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional .optimization_guide.proto.SamplingParams sampling_params = 6;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.sampling_params_), _Internal::kHasBitsOffset + 3, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.Any feature_metadata = 7;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.feature_metadata_), _Internal::kHasBitsOffset + 4, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional uint32 adaptation_rank = 8;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.adaptation_rank_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::OnDeviceModelExecutionInputConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::OnDeviceModelExecutionInputConfig_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::OnDeviceModelExecutionOutputConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::OnDeviceModelExecutionOutputConfig_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::TextSafetyFallbackConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::TextSafetyFallbackConfig_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::SamplingParams>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::SamplingParams_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::Any>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::Any_globals_},
        #endif
        {::_pbi::FieldAuxEnumData{}, ::optimization_guide::proto::ModelExecutionFeature_internal_data_},
    }},
    {{
    }},
  };
}


inline constexpr OnDeviceModelExecutionFeatureConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        input_config_{nullptr},
        output_config_{nullptr},
        text_safety_fallback_config_{nullptr},
        sampling_params_{nullptr},
        feature_metadata_{nullptr},
        feature_{static_cast< ::optimization_guide::proto::ModelExecutionFeature >(0)},
        can_skip_text_safety_{false},
        adaptation_rank_{0u} {}

template <typename>
constexpr OnDeviceModelExecutionFeatureConfig::OnDeviceModelExecutionFeatureConfig(::_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 OnDeviceModelExecutionFeatureConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) OnDeviceModelExecutionFeatureConfig(arena);
}
constexpr auto OnDeviceModelExecutionFeatureConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(OnDeviceModelExecutionFeatureConfig), alignof(OnDeviceModelExecutionFeatureConfig));
}
constexpr auto OnDeviceModelExecutionFeatureConfig::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
          &OnDeviceModelExecutionFeatureConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<OnDeviceModelExecutionFeatureConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &OnDeviceModelExecutionFeatureConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<OnDeviceModelExecutionFeatureConfig>(), &OnDeviceModelExecutionFeatureConfig::ByteSizeLong,
              &OnDeviceModelExecutionFeatureConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.OnDeviceModelExecutionFeatureConfig",
  };
}
struct OnDeviceModelExecutionFeatureConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr OnDeviceModelExecutionFeatureConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 OnDeviceModelExecutionFeatureConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(OnDeviceModelExecutionFeatureConfig::InternalGenerateClassData_(
            _default, &OnDeviceModelExecutionFeatureConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionFeatureConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~OnDeviceModelExecutionFeatureConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) OnDeviceModelExecutionFeatureConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionFeatureConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr OnDeviceModelExecutionConfig::ParseTableT_ OnDeviceModelExecutionConfig::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_._has_bits_),
      0, // no _extensions_
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // num_field_entries
      3,  // 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<::optimization_guide::proto::OnDeviceModelExecutionConfig>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated .optimization_guide.proto.OnDeviceModelExecutionFeatureConfig feature_configs = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.feature_configs_)}},
      // optional .optimization_guide.proto.OnDeviceModelValidationConfig validation_config = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 2, 1,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.validation_config_)}},
      // repeated .optimization_guide.proto.OnDeviceModelCapability capabilities = 3;
      {::_pbi::TcParser::FastEr0R1,
       {24, 1, 2,
        PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.capabilities_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .optimization_guide.proto.OnDeviceModelExecutionFeatureConfig feature_configs = 1;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.feature_configs_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .optimization_guide.proto.OnDeviceModelValidationConfig validation_config = 2;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.validation_config_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .optimization_guide.proto.OnDeviceModelCapability capabilities = 3;
      {PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_.capabilities_), _Internal::kHasBitsOffset + 1, 2, (0 | ::_fl::kFcRepeated | ::_fl::kEnumRange)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::OnDeviceModelExecutionFeatureConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::OnDeviceModelExecutionFeatureConfig_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::OnDeviceModelValidationConfig>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::OnDeviceModelValidationConfig_globals_},
        #endif
        {0, 2},
    }},
    {{
    }},
  };
}


inline constexpr OnDeviceModelExecutionConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        feature_configs_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.feature_configs_)>()
         }
        ,
        capabilities_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.capabilities_)>()
         }
        ,
        validation_config_{nullptr} {}

template <typename>
constexpr OnDeviceModelExecutionConfig::OnDeviceModelExecutionConfig(::_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 OnDeviceModelExecutionConfig::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) OnDeviceModelExecutionConfig(arena);
}
constexpr auto OnDeviceModelExecutionConfig::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OnDeviceModelExecutionConfig), alignof(OnDeviceModelExecutionConfig));
}
constexpr auto OnDeviceModelExecutionConfig::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
          &OnDeviceModelExecutionConfig::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<OnDeviceModelExecutionConfig>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &OnDeviceModelExecutionConfig::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<OnDeviceModelExecutionConfig>(), &OnDeviceModelExecutionConfig::ByteSizeLong,
              &OnDeviceModelExecutionConfig::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfig, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.OnDeviceModelExecutionConfig",
  };
}
struct OnDeviceModelExecutionConfigGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr OnDeviceModelExecutionConfigGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 OnDeviceModelExecutionConfig_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(OnDeviceModelExecutionConfig::InternalGenerateClassData_(
            _default, &OnDeviceModelExecutionConfig_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionConfig>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~OnDeviceModelExecutionConfigGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) OnDeviceModelExecutionConfig _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<OnDeviceModelExecutionConfig>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionConfigGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST OnDeviceModelExecutionConfigGlobalsTypeInternal OnDeviceModelExecutionConfig_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* OnDeviceModelExecutionConfig_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return OnDeviceModelExecutionConfig_globals_.GetClassData();
#else
  return OnDeviceModelExecutionConfig_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace proto
}  // namespace optimization_guide
namespace optimization_guide {
namespace proto {
PROTOBUF_CONSTINIT const uint32_t OnDeviceModelCapability_internal_data_[] = {
    196608u, 0u, };
static const char OnDeviceModelCapability_names[] = {
    "ON_DEVICE_MODEL_CAPABILITY_AUDIO_INPUT"
    "ON_DEVICE_MODEL_CAPABILITY_IMAGE_INPUT"
    "ON_DEVICE_MODEL_CAPABILITY_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry OnDeviceModelCapability_entries[] = {
    {{&OnDeviceModelCapability_names[0], 38}, 2},
    {{&OnDeviceModelCapability_names[38], 38}, 1},
    {{&OnDeviceModelCapability_names[76], 38}, 0},
};

static const int OnDeviceModelCapability_entries_by_number[] = {
    2,  // 0 -> ON_DEVICE_MODEL_CAPABILITY_UNSPECIFIED
    1,  // 1 -> ON_DEVICE_MODEL_CAPABILITY_IMAGE_INPUT
    0,  // 2 -> ON_DEVICE_MODEL_CAPABILITY_AUDIO_INPUT
};

bool OnDeviceModelCapability_Parse(::absl::string_view name,
                                  OnDeviceModelCapability* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      OnDeviceModelCapability_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<OnDeviceModelCapability>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    OnDeviceModelCapability_strings[3] = {};

const ::std::string& OnDeviceModelCapability_Name(OnDeviceModelCapability value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      OnDeviceModelCapability_entries, OnDeviceModelCapability_entries_by_number, 3,
      OnDeviceModelCapability_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(OnDeviceModelCapability_entries,
                                  OnDeviceModelCapability_entries_by_number,
                                  3, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : OnDeviceModelCapability_strings[idx].get();
}
// ===================================================================

OnDeviceModelExecutionConfig::OnDeviceModelExecutionConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, OnDeviceModelExecutionConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.OnDeviceModelExecutionConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::OnDeviceModelExecutionConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        feature_configs_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::OnDeviceModelExecutionConfig,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.feature_configs_)>()
          , from.feature_configs_
        }
        ,
        capabilities_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::OnDeviceModelExecutionConfig,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.capabilities_)>()
          , from.capabilities_
        }
     {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  OnDeviceModelExecutionConfig* 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_.validation_config_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.validation_config_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.OnDeviceModelExecutionConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        feature_configs_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.feature_configs_)>()
         }
        ,
        capabilities_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionConfig, _impl_.capabilities_)>()
         }
     {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite OnDeviceModelExecutionConfig_class_data_ =
    OnDeviceModelExecutionConfig::InternalGenerateClassData_(OnDeviceModelExecutionConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionConfig::GetClassData() const {
  return OnDeviceModelExecutionConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionConfig::GetClassData() const {
  return OnDeviceModelExecutionConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const OnDeviceModelExecutionConfig::ParseTableT_
    OnDeviceModelExecutionConfig::_table_ =
        OnDeviceModelExecutionConfig::InternalGenerateParseTable_(OnDeviceModelExecutionConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void OnDeviceModelExecutionConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.OnDeviceModelExecutionConfig)
  ::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_.feature_configs_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.capabilities_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.validation_config_ != nullptr);
      _impl_.validation_config_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .optimization_guide.proto.OnDeviceModelExecutionFeatureConfig feature_configs = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_feature_configs_size());
         i < n; i++) {
      const auto& repfield = this_._internal_feature_configs().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // optional .optimization_guide.proto.OnDeviceModelValidationConfig validation_config = 2;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.validation_config_, this_._impl_.validation_config_->GetCachedSize(), target,
        stream);
  }

  // repeated .optimization_guide.proto.OnDeviceModelCapability capabilities = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    for (int i = 0, n = this_._internal_capabilities_size(); i < n; ++i) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteEnumToArray(
          3, static_cast<::optimization_guide::proto::OnDeviceModelCapability>(this_._internal_capabilities().Get(i)),
          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:optimization_guide.proto.OnDeviceModelExecutionConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t OnDeviceModelExecutionConfig::ByteSizeLong(const MessageLite& base) {
  const OnDeviceModelExecutionConfig& this_ = static_cast<const OnDeviceModelExecutionConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t OnDeviceModelExecutionConfig::ByteSizeLong() const {
  const OnDeviceModelExecutionConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.OnDeviceModelExecutionConfig)
  ::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];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // repeated .optimization_guide.proto.OnDeviceModelExecutionFeatureConfig feature_configs = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_feature_configs_size();
      for (const auto& msg : this_._internal_feature_configs()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .optimization_guide.proto.OnDeviceModelCapability capabilities = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ::size_t data_size =
          ::_pbi::WireFormatLite::EnumSize(this_._internal_capabilities());
      ::size_t tag_size = ::size_t{1} *
          ::_pbi::FromIntSize(this_._internal_capabilities_size());
      total_size += data_size + tag_size;
    }
    // optional .optimization_guide.proto.OnDeviceModelValidationConfig validation_config = 2;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.validation_config_);
    }
  }
  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 OnDeviceModelExecutionConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<OnDeviceModelExecutionConfig*>(&to_msg);
  auto& from = static_cast<const OnDeviceModelExecutionConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.OnDeviceModelExecutionConfig)
  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, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_feature_configs()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_feature_configs());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_capabilities()->MergeFrom(from._internal_capabilities());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.validation_config_ != nullptr);
      if (_this->_impl_.validation_config_ == nullptr) {
        _this->_impl_.validation_config_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.validation_config_);
      } else {
        _this->_impl_.validation_config_->MergeFrom(*from._impl_.validation_config_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void OnDeviceModelExecutionConfig::InternalSwap(OnDeviceModelExecutionConfig* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.feature_configs_.InternalSwap(&other->_impl_.feature_configs_);
  _impl_.capabilities_.InternalSwap(&other->_impl_.capabilities_);
  swap(_impl_.validation_config_, other->_impl_.validation_config_);
}

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

void OnDeviceModelExecutionFeatureConfig::clear_feature_metadata() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.feature_metadata_ != nullptr) _impl_.feature_metadata_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000010U);
}
OnDeviceModelExecutionFeatureConfig::OnDeviceModelExecutionFeatureConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, OnDeviceModelExecutionFeatureConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionFeatureConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::OnDeviceModelExecutionFeatureConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  OnDeviceModelExecutionFeatureConfig* 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_.input_config_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.input_config_)
                : nullptr;
  _impl_.output_config_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.output_config_)
                : nullptr;
  _impl_.text_safety_fallback_config_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.text_safety_fallback_config_)
                : nullptr;
  _impl_.sampling_params_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.sampling_params_)
                : nullptr;
  _impl_.feature_metadata_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.feature_metadata_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, feature_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, feature_),
           offsetof(Impl_, adaptation_rank_) -
               offsetof(Impl_, feature_) +
               sizeof(Impl_::adaptation_rank_));

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionFeatureConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void OnDeviceModelExecutionFeatureConfig::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, input_config_),
           0,
           offsetof(Impl_, adaptation_rank_) -
               offsetof(Impl_, input_config_) +
               sizeof(Impl_::adaptation_rank_));
}
OnDeviceModelExecutionFeatureConfig::~OnDeviceModelExecutionFeatureConfig() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
  SharedDtor(*this);
}
inline void OnDeviceModelExecutionFeatureConfig::SharedDtor(MessageLite& self) {
  OnDeviceModelExecutionFeatureConfig& this_ = static_cast<OnDeviceModelExecutionFeatureConfig&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.input_config_;
  delete this_._impl_.output_config_;
  delete this_._impl_.text_safety_fallback_config_;
  delete this_._impl_.sampling_params_;
  delete this_._impl_.feature_metadata_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite OnDeviceModelExecutionFeatureConfig_class_data_ =
    OnDeviceModelExecutionFeatureConfig::InternalGenerateClassData_(OnDeviceModelExecutionFeatureConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionFeatureConfig::GetClassData() const {
  return OnDeviceModelExecutionFeatureConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionFeatureConfig::GetClassData() const {
  return OnDeviceModelExecutionFeatureConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const OnDeviceModelExecutionFeatureConfig::ParseTableT_
    OnDeviceModelExecutionFeatureConfig::_table_ =
        OnDeviceModelExecutionFeatureConfig::InternalGenerateParseTable_(OnDeviceModelExecutionFeatureConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void OnDeviceModelExecutionFeatureConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
  ::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, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(_impl_.input_config_ != nullptr);
      _impl_.input_config_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.output_config_ != nullptr);
      _impl_.output_config_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.text_safety_fallback_config_ != nullptr);
      _impl_.text_safety_fallback_config_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.sampling_params_ != nullptr);
      _impl_.sampling_params_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.feature_metadata_ != nullptr);
      _impl_.feature_metadata_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000e0U)) {
    ::memset(&_impl_.feature_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.adaptation_rank_) -
        reinterpret_cast<char*>(&_impl_.feature_)) + sizeof(_impl_.adaptation_rank_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .optimization_guide.proto.ModelExecutionFeature feature = 1;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_feature(), target);
  }

  // optional .optimization_guide.proto.OnDeviceModelExecutionInputConfig input_config = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.input_config_, this_._impl_.input_config_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.OnDeviceModelExecutionOutputConfig output_config = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.output_config_, this_._impl_.output_config_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.TextSafetyFallbackConfig text_safety_fallback_config = 4;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        4, *this_._impl_.text_safety_fallback_config_, this_._impl_.text_safety_fallback_config_->GetCachedSize(), target,
        stream);
  }

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

  // optional .optimization_guide.proto.SamplingParams sampling_params = 6;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        6, *this_._impl_.sampling_params_, this_._impl_.sampling_params_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.Any feature_metadata = 7;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        7, *this_._impl_.feature_metadata_, this_._impl_.feature_metadata_->GetCachedSize(), target,
        stream);
  }

  // optional uint32 adaptation_rank = 8;
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        8, this_._internal_adaptation_rank(), 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:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t OnDeviceModelExecutionFeatureConfig::ByteSizeLong(const MessageLite& base) {
  const OnDeviceModelExecutionFeatureConfig& this_ = static_cast<const OnDeviceModelExecutionFeatureConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t OnDeviceModelExecutionFeatureConfig::ByteSizeLong() const {
  const OnDeviceModelExecutionFeatureConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
  ::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, 0x000000bfU)) {
    // optional .optimization_guide.proto.OnDeviceModelExecutionInputConfig input_config = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.input_config_);
    }
    // optional .optimization_guide.proto.OnDeviceModelExecutionOutputConfig output_config = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.output_config_);
    }
    // optional .optimization_guide.proto.TextSafetyFallbackConfig text_safety_fallback_config = 4;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.text_safety_fallback_config_);
    }
    // optional .optimization_guide.proto.SamplingParams sampling_params = 6;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.sampling_params_);
    }
    // optional .optimization_guide.proto.Any feature_metadata = 7;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.feature_metadata_);
    }
    // optional .optimization_guide.proto.ModelExecutionFeature feature = 1;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_feature());
    }
    // optional uint32 adaptation_rank = 8;
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_adaptation_rank());
    }
  }
  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 OnDeviceModelExecutionFeatureConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<OnDeviceModelExecutionFeatureConfig*>(&to_msg);
  auto& from = static_cast<const OnDeviceModelExecutionFeatureConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.OnDeviceModelExecutionFeatureConfig)
  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, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(from._impl_.input_config_ != nullptr);
      if (_this->_impl_.input_config_ == nullptr) {
        _this->_impl_.input_config_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.input_config_);
      } else {
        _this->_impl_.input_config_->MergeFrom(*from._impl_.input_config_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.output_config_ != nullptr);
      if (_this->_impl_.output_config_ == nullptr) {
        _this->_impl_.output_config_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.output_config_);
      } else {
        _this->_impl_.output_config_->MergeFrom(*from._impl_.output_config_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.text_safety_fallback_config_ != nullptr);
      if (_this->_impl_.text_safety_fallback_config_ == nullptr) {
        _this->_impl_.text_safety_fallback_config_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.text_safety_fallback_config_);
      } else {
        _this->_impl_.text_safety_fallback_config_->MergeFrom(*from._impl_.text_safety_fallback_config_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.sampling_params_ != nullptr);
      if (_this->_impl_.sampling_params_ == nullptr) {
        _this->_impl_.sampling_params_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.sampling_params_);
      } else {
        _this->_impl_.sampling_params_->MergeFrom(*from._impl_.sampling_params_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.feature_metadata_ != nullptr);
      if (_this->_impl_.feature_metadata_ == nullptr) {
        _this->_impl_.feature_metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.feature_metadata_);
      } else {
        _this->_impl_.feature_metadata_->MergeFrom(*from._impl_.feature_metadata_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.feature_ = from._impl_.feature_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.can_skip_text_safety_ = from._impl_.can_skip_text_safety_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.adaptation_rank_ = from._impl_.adaptation_rank_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void OnDeviceModelExecutionFeatureConfig::InternalSwap(OnDeviceModelExecutionFeatureConfig* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.adaptation_rank_)
      + sizeof(OnDeviceModelExecutionFeatureConfig::_impl_.adaptation_rank_)
      - PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionFeatureConfig, _impl_.input_config_)>(
          reinterpret_cast<char*>(&_impl_.input_config_),
          reinterpret_cast<char*>(&other->_impl_.input_config_));
}

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

void OnDeviceModelExecutionInputConfig::clear_input_context_substitutions() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.input_context_substitutions_.Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
void OnDeviceModelExecutionInputConfig::clear_execute_substitutions() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.execute_substitutions_.Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000001U);
}
OnDeviceModelExecutionInputConfig::OnDeviceModelExecutionInputConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, OnDeviceModelExecutionInputConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionInputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::OnDeviceModelExecutionInputConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        execute_substitutions_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.execute_substitutions_)>()
          , from.execute_substitutions_
        }
        ,
        input_context_substitutions_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.input_context_substitutions_)>()
          , from.input_context_substitutions_
        }
        ,
        request_base_name_(arena, from.request_base_name_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  OnDeviceModelExecutionInputConfig* 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_, min_context_tokens_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, min_context_tokens_),
           offsetof(Impl_, max_execute_tokens_) -
               offsetof(Impl_, min_context_tokens_) +
               sizeof(Impl_::max_execute_tokens_));

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionInputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        execute_substitutions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.execute_substitutions_)>()
         }
        ,
        input_context_substitutions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelExecutionInputConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelExecutionInputConfig, _impl_.input_context_substitutions_)>()
         }
        ,
        request_base_name_(arena) {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite OnDeviceModelExecutionInputConfig_class_data_ =
    OnDeviceModelExecutionInputConfig::InternalGenerateClassData_(OnDeviceModelExecutionInputConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionInputConfig::GetClassData() const {
  return OnDeviceModelExecutionInputConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionInputConfig::GetClassData() const {
  return OnDeviceModelExecutionInputConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const OnDeviceModelExecutionInputConfig::ParseTableT_
    OnDeviceModelExecutionInputConfig::_table_ =
        OnDeviceModelExecutionInputConfig::InternalGenerateParseTable_(OnDeviceModelExecutionInputConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void OnDeviceModelExecutionInputConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
  ::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_.execute_substitutions_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.input_context_substitutions_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.request_base_name_.ClearNonDefaultToEmpty();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000038U)) {
    ::memset(&_impl_.min_context_tokens_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.max_execute_tokens_) -
        reinterpret_cast<char*>(&_impl_.min_context_tokens_)) + sizeof(_impl_.max_execute_tokens_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // repeated .optimization_guide.proto.SubstitutedString execute_substitutions = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_execute_substitutions_size());
         i < n; i++) {
      const auto& repfield = this_._internal_execute_substitutions().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // repeated .optimization_guide.proto.SubstitutedString input_context_substitutions = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_input_context_substitutions_size());
         i < n; i++) {
      const auto& repfield = this_._internal_input_context_substitutions().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              3, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // optional uint32 min_context_tokens = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        4, this_._internal_min_context_tokens(), target);
  }

  // optional uint32 max_context_tokens = 5;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        5, this_._internal_max_context_tokens(), target);
  }

  // optional uint32 max_execute_tokens = 6;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        6, this_._internal_max_execute_tokens(), 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:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t OnDeviceModelExecutionInputConfig::ByteSizeLong(const MessageLite& base) {
  const OnDeviceModelExecutionInputConfig& this_ = static_cast<const OnDeviceModelExecutionInputConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t OnDeviceModelExecutionInputConfig::ByteSizeLong() const {
  const OnDeviceModelExecutionInputConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
  ::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];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    // repeated .optimization_guide.proto.SubstitutedString execute_substitutions = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_execute_substitutions_size();
      for (const auto& msg : this_._internal_execute_substitutions()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .optimization_guide.proto.SubstitutedString input_context_substitutions = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1UL * this_._internal_input_context_substitutions_size();
      for (const auto& msg : this_._internal_input_context_substitutions()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // optional string request_base_name = 1;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_request_base_name());
    }
    // optional uint32 min_context_tokens = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_min_context_tokens());
    }
    // optional uint32 max_context_tokens = 5;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_max_context_tokens());
    }
    // optional uint32 max_execute_tokens = 6;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_max_execute_tokens());
    }
  }
  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 OnDeviceModelExecutionInputConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<OnDeviceModelExecutionInputConfig*>(&to_msg);
  auto& from = static_cast<const OnDeviceModelExecutionInputConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.OnDeviceModelExecutionInputConfig)
  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, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_execute_substitutions()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_execute_substitutions());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_input_context_substitutions()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_input_context_substitutions());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_request_base_name(from._internal_request_base_name());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.min_context_tokens_ = from._impl_.min_context_tokens_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.max_context_tokens_ = from._impl_.max_context_tokens_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.max_execute_tokens_ = from._impl_.max_execute_tokens_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void OnDeviceModelExecutionInputConfig::InternalSwap(OnDeviceModelExecutionInputConfig* 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]);
  _impl_.execute_substitutions_.InternalSwap(&other->_impl_.execute_substitutions_);
  _impl_.input_context_substitutions_.InternalSwap(&other->_impl_.input_context_substitutions_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_base_name_, &other->_impl_.request_base_name_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.max_execute_tokens_)
      + sizeof(OnDeviceModelExecutionInputConfig::_impl_.max_execute_tokens_)
      - PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionInputConfig, _impl_.min_context_tokens_)>(
          reinterpret_cast<char*>(&_impl_.min_context_tokens_),
          reinterpret_cast<char*>(&other->_impl_.min_context_tokens_));
}

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

ResponseConstraint::ResponseConstraint(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ResponseConstraint_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.ResponseConstraint)
}
PROTOBUF_NDEBUG_INLINE ResponseConstraint::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::ResponseConstraint& from_msg)
      : format_{},
        _cached_size_{0},
        _oneof_case_{from._oneof_case_[0]} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ResponseConstraint* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  switch (format_case()) {
    case FORMAT_NOT_SET:
      break;
      case kJsonSchema:
        new (&_impl_.format_.json_schema_) decltype(_impl_.format_.json_schema_){arena, from._impl_.format_.json_schema_};
        break;
      case kRegex:
        new (&_impl_.format_.regex_) decltype(_impl_.format_.regex_){arena, from._impl_.format_.regex_};
        break;
  }

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

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

void ResponseConstraint::clear_format() {
// @@protoc_insertion_point(one_of_clear_start:optimization_guide.proto.ResponseConstraint)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (format_case()) {
    case kJsonSchema: {
      _impl_.format_.json_schema_.Destroy();
      break;
    }
    case kRegex: {
      _impl_.format_.regex_.Destroy();
      break;
    }
    case FORMAT_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = FORMAT_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ResponseConstraint_class_data_ =
    ResponseConstraint::InternalGenerateClassData_(ResponseConstraint_globals_._default);

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

  clear_format();
  _internal_metadata_.Clear<::std::string>();
}

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

  switch (this_.format_case()) {
    case kJsonSchema: {
      const ::std::string& _s = this_._internal_json_schema();
      target = stream->WriteStringMaybeAliased(1, _s, target);
      break;
    }
    case kRegex: {
      const ::std::string& _s = this_._internal_regex();
      target = stream->WriteStringMaybeAliased(2, _s, target);
      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:optimization_guide.proto.ResponseConstraint)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ResponseConstraint::ByteSizeLong(const MessageLite& base) {
  const ResponseConstraint& this_ = static_cast<const ResponseConstraint&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ResponseConstraint::ByteSizeLong() const {
  const ResponseConstraint& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.ResponseConstraint)
  ::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 (this_.format_case()) {
    // string json_schema = 1;
    case kJsonSchema: {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_json_schema());
      break;
    }
    // string regex = 2;
    case kRegex: {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_regex());
      break;
    }
    case FORMAT_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 ResponseConstraint::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ResponseConstraint*>(&to_msg);
  auto& from = static_cast<const ResponseConstraint&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.ResponseConstraint)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)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_format();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kJsonSchema: {
        if (oneof_needs_init) {
          _this->_impl_.format_.json_schema_.InitDefault();
        }
        _this->_impl_.format_.json_schema_.Set(from._internal_json_schema(), arena);
        break;
      }
      case kRegex: {
        if (oneof_needs_init) {
          _this->_impl_.format_.regex_.InitDefault();
        }
        _this->_impl_.format_.regex_.Set(from._internal_regex(), arena);
        break;
      }
      case FORMAT_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


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

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

void OnDeviceModelExecutionOutputConfig::clear_proto_field() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.proto_field_ != nullptr) _impl_.proto_field_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
void OnDeviceModelExecutionOutputConfig::clear_redact_rules() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.redact_rules_ != nullptr) _impl_.redact_rules_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000004U);
}
void OnDeviceModelExecutionOutputConfig::clear_fieldwise_parser_config() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.fieldwise_parser_config_ != nullptr) _impl_.fieldwise_parser_config_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000008U);
}
OnDeviceModelExecutionOutputConfig::OnDeviceModelExecutionOutputConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, OnDeviceModelExecutionOutputConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionOutputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::OnDeviceModelExecutionOutputConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        proto_type_(arena, from.proto_type_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  OnDeviceModelExecutionOutputConfig* 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_.proto_field_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.proto_field_)
                : nullptr;
  _impl_.redact_rules_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.redact_rules_)
                : nullptr;
  _impl_.fieldwise_parser_config_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.fieldwise_parser_config_)
                : nullptr;
  _impl_.response_constraint_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_constraint_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, parser_kind_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, parser_kind_),
           offsetof(Impl_, max_output_tokens_) -
               offsetof(Impl_, parser_kind_) +
               sizeof(Impl_::max_output_tokens_));

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelExecutionOutputConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        proto_type_(arena) {}

inline void OnDeviceModelExecutionOutputConfig::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, proto_field_),
           0,
           offsetof(Impl_, max_output_tokens_) -
               offsetof(Impl_, proto_field_) +
               sizeof(Impl_::max_output_tokens_));
}
OnDeviceModelExecutionOutputConfig::~OnDeviceModelExecutionOutputConfig() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
  SharedDtor(*this);
}
inline void OnDeviceModelExecutionOutputConfig::SharedDtor(MessageLite& self) {
  OnDeviceModelExecutionOutputConfig& this_ = static_cast<OnDeviceModelExecutionOutputConfig&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.proto_type_.Destroy();
  delete this_._impl_.proto_field_;
  delete this_._impl_.redact_rules_;
  delete this_._impl_.fieldwise_parser_config_;
  delete this_._impl_.response_constraint_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite OnDeviceModelExecutionOutputConfig_class_data_ =
    OnDeviceModelExecutionOutputConfig::InternalGenerateClassData_(OnDeviceModelExecutionOutputConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionOutputConfig::GetClassData() const {
  return OnDeviceModelExecutionOutputConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelExecutionOutputConfig::GetClassData() const {
  return OnDeviceModelExecutionOutputConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const OnDeviceModelExecutionOutputConfig::ParseTableT_
    OnDeviceModelExecutionOutputConfig::_table_ =
        OnDeviceModelExecutionOutputConfig::InternalGenerateParseTable_(OnDeviceModelExecutionOutputConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void OnDeviceModelExecutionOutputConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
  ::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, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.proto_type_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.proto_field_ != nullptr);
      _impl_.proto_field_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.redact_rules_ != nullptr);
      _impl_.redact_rules_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.fieldwise_parser_config_ != nullptr);
      _impl_.fieldwise_parser_config_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.response_constraint_ != nullptr);
      _impl_.response_constraint_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000e0U)) {
    ::memset(&_impl_.parser_kind_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.max_output_tokens_) -
        reinterpret_cast<char*>(&_impl_.parser_kind_)) + sizeof(_impl_.max_output_tokens_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // optional .optimization_guide.proto.ProtoField proto_field = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.proto_field_, this_._impl_.proto_field_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.RedactRules redact_rules = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.redact_rules_, this_._impl_.redact_rules_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.ParserKind parser_kind = 4;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this_._internal_parser_kind(), target);
  }

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

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

  // optional .optimization_guide.proto.FieldwiseParserConfig fieldwise_parser_config = 8;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        8, *this_._impl_.fieldwise_parser_config_, this_._impl_.fieldwise_parser_config_->GetCachedSize(), target,
        stream);
  }

  // optional .optimization_guide.proto.ResponseConstraint response_constraint = 9;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        9, *this_._impl_.response_constraint_, this_._impl_.response_constraint_->GetCachedSize(), target,
        stream);
  }

  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:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t OnDeviceModelExecutionOutputConfig::ByteSizeLong(const MessageLite& base) {
  const OnDeviceModelExecutionOutputConfig& this_ = static_cast<const OnDeviceModelExecutionOutputConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t OnDeviceModelExecutionOutputConfig::ByteSizeLong() const {
  const OnDeviceModelExecutionOutputConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
  ::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, 0x000000bfU)) {
    // optional string proto_type = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_proto_type());
    }
    // optional .optimization_guide.proto.ProtoField proto_field = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.proto_field_);
    }
    // optional .optimization_guide.proto.RedactRules redact_rules = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.redact_rules_);
    }
    // optional .optimization_guide.proto.FieldwiseParserConfig fieldwise_parser_config = 8;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.fieldwise_parser_config_);
    }
    // optional .optimization_guide.proto.ResponseConstraint response_constraint = 9;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.response_constraint_);
    }
    // optional .optimization_guide.proto.ParserKind parser_kind = 4;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_parser_kind());
    }
    // optional uint32 max_output_tokens = 6;
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_max_output_tokens());
    }
  }
  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 OnDeviceModelExecutionOutputConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<OnDeviceModelExecutionOutputConfig*>(&to_msg);
  auto& from = static_cast<const OnDeviceModelExecutionOutputConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.OnDeviceModelExecutionOutputConfig)
  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, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_proto_type(from._internal_proto_type());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.proto_field_ != nullptr);
      if (_this->_impl_.proto_field_ == nullptr) {
        _this->_impl_.proto_field_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.proto_field_);
      } else {
        _this->_impl_.proto_field_->MergeFrom(*from._impl_.proto_field_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.redact_rules_ != nullptr);
      if (_this->_impl_.redact_rules_ == nullptr) {
        _this->_impl_.redact_rules_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.redact_rules_);
      } else {
        _this->_impl_.redact_rules_->MergeFrom(*from._impl_.redact_rules_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.fieldwise_parser_config_ != nullptr);
      if (_this->_impl_.fieldwise_parser_config_ == nullptr) {
        _this->_impl_.fieldwise_parser_config_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.fieldwise_parser_config_);
      } else {
        _this->_impl_.fieldwise_parser_config_->MergeFrom(*from._impl_.fieldwise_parser_config_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.response_constraint_ != nullptr);
      if (_this->_impl_.response_constraint_ == nullptr) {
        _this->_impl_.response_constraint_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_constraint_);
      } else {
        _this->_impl_.response_constraint_->MergeFrom(*from._impl_.response_constraint_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.parser_kind_ = from._impl_.parser_kind_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.suppress_parsing_incomplete_output_ = from._impl_.suppress_parsing_incomplete_output_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.max_output_tokens_ = from._impl_.max_output_tokens_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void OnDeviceModelExecutionOutputConfig::InternalSwap(OnDeviceModelExecutionOutputConfig* 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_.proto_type_, &other->_impl_.proto_type_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.max_output_tokens_)
      + sizeof(OnDeviceModelExecutionOutputConfig::_impl_.max_output_tokens_)
      - PROTOBUF_FIELD_OFFSET(OnDeviceModelExecutionOutputConfig, _impl_.proto_field_)>(
          reinterpret_cast<char*>(&_impl_.proto_field_),
          reinterpret_cast<char*>(&other->_impl_.proto_field_));
}

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

void TextSafetyFallbackConfig::clear_input_url_proto_field() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.input_url_proto_field_ != nullptr) _impl_.input_url_proto_field_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000001U);
}
TextSafetyFallbackConfig::TextSafetyFallbackConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, TextSafetyFallbackConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.TextSafetyFallbackConfig)
}
PROTOBUF_NDEBUG_INLINE TextSafetyFallbackConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::TextSafetyFallbackConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  TextSafetyFallbackConfig* 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_.input_url_proto_field_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.input_url_proto_field_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.TextSafetyFallbackConfig)
}
PROTOBUF_NDEBUG_INLINE TextSafetyFallbackConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite TextSafetyFallbackConfig_class_data_ =
    TextSafetyFallbackConfig::InternalGenerateClassData_(TextSafetyFallbackConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TextSafetyFallbackConfig::GetClassData() const {
  return TextSafetyFallbackConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TextSafetyFallbackConfig::GetClassData() const {
  return TextSafetyFallbackConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const TextSafetyFallbackConfig::ParseTableT_
    TextSafetyFallbackConfig::_table_ =
        TextSafetyFallbackConfig::InternalGenerateParseTable_(TextSafetyFallbackConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void TextSafetyFallbackConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.TextSafetyFallbackConfig)
  ::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_.input_url_proto_field_ != nullptr);
    _impl_.input_url_proto_field_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .optimization_guide.proto.ProtoField input_url_proto_field = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.input_url_proto_field_, this_._impl_.input_url_proto_field_->GetCachedSize(), target,
        stream);
  }

  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:optimization_guide.proto.TextSafetyFallbackConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t TextSafetyFallbackConfig::ByteSizeLong(const MessageLite& base) {
  const TextSafetyFallbackConfig& this_ = static_cast<const TextSafetyFallbackConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t TextSafetyFallbackConfig::ByteSizeLong() const {
  const TextSafetyFallbackConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.TextSafetyFallbackConfig)
  ::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 .optimization_guide.proto.ProtoField input_url_proto_field = 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_.input_url_proto_field_);
    }
  }
  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 TextSafetyFallbackConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<TextSafetyFallbackConfig*>(&to_msg);
  auto& from = static_cast<const TextSafetyFallbackConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.TextSafetyFallbackConfig)
  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_.input_url_proto_field_ != nullptr);
    if (_this->_impl_.input_url_proto_field_ == nullptr) {
      _this->_impl_.input_url_proto_field_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.input_url_proto_field_);
    } else {
      _this->_impl_.input_url_proto_field_->MergeFrom(*from._impl_.input_url_proto_field_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void TextSafetyFallbackConfig::InternalSwap(TextSafetyFallbackConfig* 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_.input_url_proto_field_, other->_impl_.input_url_proto_field_);
}

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

OnDeviceModelValidationConfig::OnDeviceModelValidationConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, OnDeviceModelValidationConfig_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.OnDeviceModelValidationConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelValidationConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::OnDeviceModelValidationConfig& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        validation_prompts_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::OnDeviceModelValidationConfig,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelValidationConfig, _impl_.validation_prompts_)>()
          , from.validation_prompts_
        }
     {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  OnDeviceModelValidationConfig* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.OnDeviceModelValidationConfig)
}
PROTOBUF_NDEBUG_INLINE OnDeviceModelValidationConfig::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        validation_prompts_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::OnDeviceModelValidationConfig,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::OnDeviceModelValidationConfig, _impl_.validation_prompts_)>()
         }
     {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite OnDeviceModelValidationConfig_class_data_ =
    OnDeviceModelValidationConfig::InternalGenerateClassData_(OnDeviceModelValidationConfig_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelValidationConfig::GetClassData() const {
  return OnDeviceModelValidationConfig_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
OnDeviceModelValidationConfig::GetClassData() const {
  return OnDeviceModelValidationConfig_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const OnDeviceModelValidationConfig::ParseTableT_
    OnDeviceModelValidationConfig::_table_ =
        OnDeviceModelValidationConfig::InternalGenerateParseTable_(OnDeviceModelValidationConfig_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void OnDeviceModelValidationConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.OnDeviceModelValidationConfig)
  ::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)) {
    _impl_.validation_prompts_.Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .optimization_guide.proto.ValidationPrompt validation_prompts = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_validation_prompts_size());
         i < n; i++) {
      const auto& repfield = this_._internal_validation_prompts().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  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:optimization_guide.proto.OnDeviceModelValidationConfig)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t OnDeviceModelValidationConfig::ByteSizeLong(const MessageLite& base) {
  const OnDeviceModelValidationConfig& this_ = static_cast<const OnDeviceModelValidationConfig&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t OnDeviceModelValidationConfig::ByteSizeLong() const {
  const OnDeviceModelValidationConfig& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.OnDeviceModelValidationConfig)
  ::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_);
   {
    // repeated .optimization_guide.proto.ValidationPrompt validation_prompts = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_validation_prompts_size();
      for (const auto& msg : this_._internal_validation_prompts()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
  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 OnDeviceModelValidationConfig::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<OnDeviceModelValidationConfig*>(&to_msg);
  auto& from = static_cast<const OnDeviceModelValidationConfig&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.OnDeviceModelValidationConfig)
  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)) {
    _this->_internal_mutable_validation_prompts()->InternalMergeFromWithArena(
        ::google::protobuf::MessageLite::internal_visibility(), arena,
        from._internal_validation_prompts());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


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

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

ValidationPrompt::ValidationPrompt(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ValidationPrompt_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.ValidationPrompt)
}
PROTOBUF_NDEBUG_INLINE ValidationPrompt::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::ValidationPrompt& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        prompt_(arena, from.prompt_),
        expected_output_(arena, from.expected_output_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ValidationPrompt* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:optimization_guide.proto.ValidationPrompt)
}
PROTOBUF_NDEBUG_INLINE ValidationPrompt::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        prompt_(arena),
        expected_output_(arena) {}

inline void ValidationPrompt::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
ValidationPrompt::~ValidationPrompt() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.ValidationPrompt)
  SharedDtor(*this);
}
inline void ValidationPrompt::SharedDtor(MessageLite& self) {
  ValidationPrompt& this_ = static_cast<ValidationPrompt&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.prompt_.Destroy();
  this_._impl_.expected_output_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ValidationPrompt_class_data_ =
    ValidationPrompt::InternalGenerateClassData_(ValidationPrompt_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ValidationPrompt::GetClassData() const {
  return ValidationPrompt_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ValidationPrompt::GetClassData() const {
  return ValidationPrompt_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ValidationPrompt::ParseTableT_
    ValidationPrompt::_table_ =
        ValidationPrompt::InternalGenerateParseTable_(ValidationPrompt_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ValidationPrompt::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.ValidationPrompt)
  ::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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.prompt_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.expected_output_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // optional string expected_output = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_expected_output();
    target = stream->WriteStringMaybeAliased(2, _s, 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:optimization_guide.proto.ValidationPrompt)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ValidationPrompt::ByteSizeLong(const MessageLite& base) {
  const ValidationPrompt& this_ = static_cast<const ValidationPrompt&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ValidationPrompt::ByteSizeLong() const {
  const ValidationPrompt& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.ValidationPrompt)
  ::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];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    // optional string prompt = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_prompt());
    }
    // optional string expected_output = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_expected_output());
    }
  }
  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 ValidationPrompt::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ValidationPrompt*>(&to_msg);
  auto& from = static_cast<const ValidationPrompt&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.ValidationPrompt)
  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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_prompt(from._internal_prompt());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_expected_output(from._internal_expected_output());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void ValidationPrompt::InternalSwap(ValidationPrompt* 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_.prompt_, &other->_impl_.prompt_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.expected_output_, &other->_impl_.expected_output_, arena);
}

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

SamplingParams::SamplingParams(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SamplingParams_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.SamplingParams)
}
SamplingParams::SamplingParams(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SamplingParams& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SamplingParams_get_class_data()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE SamplingParams::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite SamplingParams_class_data_ =
    SamplingParams::InternalGenerateClassData_(SamplingParams_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SamplingParams::GetClassData() const {
  return SamplingParams_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SamplingParams::GetClassData() const {
  return SamplingParams_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const SamplingParams::ParseTableT_
    SamplingParams::_table_ =
        SamplingParams::InternalGenerateParseTable_(SamplingParams_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void SamplingParams::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.SamplingParams)
  ::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, 0x00000003U)) {
    ::memset(&_impl_.top_k_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.temperature_) -
        reinterpret_cast<char*>(&_impl_.top_k_)) + sizeof(_impl_.temperature_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional uint32 top_k = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        1, this_._internal_top_k(), target);
  }

  // optional float temperature = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        2, this_._internal_temperature(), 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:optimization_guide.proto.SamplingParams)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SamplingParams::ByteSizeLong(const MessageLite& base) {
  const SamplingParams& this_ = static_cast<const SamplingParams&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t SamplingParams::ByteSizeLong() const {
  const SamplingParams& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.SamplingParams)
  ::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>(0x00000002U & cached_has_bits) * 5;
   {
    // optional uint32 top_k = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_top_k());
    }
  }
  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 SamplingParams::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<SamplingParams*>(&to_msg);
  auto& from = static_cast<const SamplingParams&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.SamplingParams)
  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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_impl_.top_k_ = from._impl_.top_k_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.temperature_ = from._impl_.temperature_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void SamplingParams::InternalSwap(SamplingParams* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.temperature_)
      + sizeof(SamplingParams::_impl_.temperature_)
      - PROTOBUF_FIELD_OFFSET(SamplingParams, _impl_.top_k_)>(
          reinterpret_cast<char*>(&_impl_.top_k_),
          reinterpret_cast<char*>(&other->_impl_.top_k_));
}

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