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

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

constexpr PromptApiResponse::ParseTableT_ PromptApiResponse::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiResponse, _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
      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::PromptApiResponse>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // string output = 1 [features = {
      {::_pbi::TcParser::FastUS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiResponse, _impl_.output_)}},
    }}, {{
      65535, 65535
    }}, {{
      // string output = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiResponse, _impl_.output_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
      "\52\6\0\0\0\0\0\0"
      "optimization_guide.proto.PromptApiResponse"
      "output"
    }},
  };
}


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

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

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

constexpr PromptApiMetadata_SamplingPreset::ParseTableT_ PromptApiMetadata_SamplingPreset::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _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
      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::PromptApiMetadata_SamplingPreset>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // string name = 1 [features = {
      {::_pbi::TcParser::FastUS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.name_)}},
      // uint32 top_k = 2 [features = {
      {::_pbi::TcParser::FastV32S1,
       {16, 1, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.top_k_)}},
      // float temperature = 3 [features = {
      {::_pbi::TcParser::FastF32S1,
       {29, 2, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.temperature_)}},
    }}, {{
      65535, 65535
    }}, {{
      // string name = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // uint32 top_k = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.top_k_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // float temperature = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata_SamplingPreset, _impl_.temperature_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
    }},
    // no aux_entries
    {{
      "\71\4\0\0\0\0\0\0"
      "optimization_guide.proto.PromptApiMetadata.SamplingPreset"
      "name"
    }},
  };
}


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

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

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

constexpr PromptApiPrompt::ParseTableT_ PromptApiPrompt::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiPrompt, _impl_._has_bits_),
      0, // no _extensions_
      3, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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::PromptApiPrompt>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // .optimization_guide.proto.PromptApiRole role = 1 [features = {
      {::_pbi::TcParser::FastV32S1,
       {8, 0, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiPrompt, _impl_.role_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .optimization_guide.proto.PromptApiRole role = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiPrompt, _impl_.role_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // string text = 2;
      {PROTOBUF_FIELD_OFFSET(PromptApiPrompt, _impl_.kind_.text_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // .optimization_guide.proto.Media media = 3;
      {PROTOBUF_FIELD_OFFSET(PromptApiPrompt, _impl_.kind_.media_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::Media>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::Media_globals_},
        #endif
    }},
    {{
      "\50\0\4\0\0\0\0\0"
      "optimization_guide.proto.PromptApiPrompt"
      "text"
    }},
  };
}


inline constexpr PromptApiPrompt::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        role_{static_cast< ::optimization_guide::proto::PromptApiRole >(0)},
        kind_{},
        _oneof_case_{} {}

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

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

constexpr PromptApiMetadata::ParseTableT_ PromptApiMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_._has_bits_),
      0, // no _extensions_
      4, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967282,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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::PromptApiMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .optimization_guide.proto.PromptApiMetadata.SamplingPreset sampling_presets = 4;
      {::_pbi::TcParser::FastMtR1,
       {34, 0, 1,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.sampling_presets_)}},
      // uint32 version = 1 [features = {
      {::_pbi::TcParser::FastV32S1,
       {8, 2, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.version_)}},
      {::_pbi::TcParser::MiniParse, {}},
      // .optimization_guide.proto.SamplingParams max_sampling_params = 3 [features = {
      {::_pbi::TcParser::FastMtS1,
       {26, 1, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.max_sampling_params_)}},
    }}, {{
      65535, 65535
    }}, {{
      // uint32 version = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.version_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // .optimization_guide.proto.SamplingParams max_sampling_params = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.max_sampling_params_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .optimization_guide.proto.PromptApiMetadata.SamplingPreset sampling_presets = 4;
      {PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.sampling_presets_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #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::PromptApiMetadata_SamplingPreset>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiMetadata_SamplingPreset_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr PromptApiMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        sampling_presets_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::PromptApiMetadata,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiMetadata, _impl_.sampling_presets_)>()
         }
        ,
        max_sampling_params_{nullptr},
        version_{0u} {}

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

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

constexpr PromptApiRequest::ParseTableT_ PromptApiRequest::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiRequest, _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::PromptApiRequest>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated .optimization_guide.proto.PromptApiPrompt initial_prompts = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.initial_prompts_)}},
      // repeated .optimization_guide.proto.PromptApiPrompt prompt_history = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 1, 1,
        PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.prompt_history_)}},
      // repeated .optimization_guide.proto.PromptApiPrompt current_prompts = 3;
      {::_pbi::TcParser::FastMtR1,
       {26, 2, 2,
        PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.current_prompts_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .optimization_guide.proto.PromptApiPrompt initial_prompts = 1;
      {PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.initial_prompts_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .optimization_guide.proto.PromptApiPrompt prompt_history = 2;
      {PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.prompt_history_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .optimization_guide.proto.PromptApiPrompt current_prompts = 3;
      {PROTOBUF_FIELD_OFFSET(PromptApiRequest, _impl_.current_prompts_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiPrompt>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiPrompt_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiPrompt>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiPrompt_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiPrompt>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiPrompt_globals_},
        #endif
    }},
    {{
    }},
  };
}


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

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

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

constexpr PromptApiLoggingData::ParseTableT_ PromptApiLoggingData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _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::PromptApiLoggingData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // .optimization_guide.proto.PromptApiRequest request = 1 [features = {
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.request_)}},
      // .optimization_guide.proto.PromptApiResponse response = 2 [features = {
      {::_pbi::TcParser::FastMtS1,
       {18, 1, 1,
        PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.response_)}},
      // .optimization_guide.proto.PromptApiMetadata metadata = 3 [features = {
      {::_pbi::TcParser::FastMtS1,
       {26, 2, 2,
        PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.metadata_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .optimization_guide.proto.PromptApiRequest request = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.request_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .optimization_guide.proto.PromptApiResponse response = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.response_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .optimization_guide.proto.PromptApiMetadata metadata = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.metadata_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiRequest>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiRequest_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiResponse>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiResponse_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PromptApiMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PromptApiMetadata_globals_},
        #endif
    }},
    {{
    }},
  };
}


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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST PromptApiLoggingDataGlobalsTypeInternal PromptApiLoggingData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* PromptApiLoggingData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return PromptApiLoggingData_globals_.GetClassData();
#else
  return PromptApiLoggingData_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 PromptApiRole_internal_data_[] = {
    262144u, 0u, };
static const char PromptApiRole_names[] = {
    "PROMPT_API_ROLE_ASSISTANT"
    "PROMPT_API_ROLE_SYSTEM"
    "PROMPT_API_ROLE_UNSPECIFIED"
    "PROMPT_API_ROLE_USER"
};

static const ::google::protobuf::internal::EnumEntry PromptApiRole_entries[] = {
    {{&PromptApiRole_names[0], 25}, 2},
    {{&PromptApiRole_names[25], 22}, 1},
    {{&PromptApiRole_names[47], 27}, 0},
    {{&PromptApiRole_names[74], 20}, 3},
};

static const int PromptApiRole_entries_by_number[] = {
    2,  // 0 -> PROMPT_API_ROLE_UNSPECIFIED
    1,  // 1 -> PROMPT_API_ROLE_SYSTEM
    0,  // 2 -> PROMPT_API_ROLE_ASSISTANT
    3,  // 3 -> PROMPT_API_ROLE_USER
};

bool PromptApiRole_Parse(::absl::string_view name,
                                  PromptApiRole* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      PromptApiRole_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<PromptApiRole>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    PromptApiRole_strings[4] = {};

const ::std::string& PromptApiRole_Name(PromptApiRole value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      PromptApiRole_entries, PromptApiRole_entries_by_number, 4,
      PromptApiRole_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(PromptApiRole_entries,
                                  PromptApiRole_entries_by_number,
                                  4, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : PromptApiRole_strings[idx].get();
}
// ===================================================================

PromptApiLoggingData::PromptApiLoggingData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiLoggingData_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.PromptApiLoggingData)
}
PROTOBUF_NDEBUG_INLINE PromptApiLoggingData::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::PromptApiLoggingData& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

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

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

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PromptApiLoggingData_class_data_ =
    PromptApiLoggingData::InternalGenerateClassData_(PromptApiLoggingData_globals_._default);

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

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

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

  // .optimization_guide.proto.PromptApiResponse response = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.response_, this_._impl_.response_->GetCachedSize(), target,
        stream);
  }

  // .optimization_guide.proto.PromptApiMetadata metadata = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.metadata_, this_._impl_.metadata_->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.PromptApiLoggingData)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t PromptApiLoggingData::ByteSizeLong(const MessageLite& base) {
  const PromptApiLoggingData& this_ = static_cast<const PromptApiLoggingData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t PromptApiLoggingData::ByteSizeLong() const {
  const PromptApiLoggingData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.PromptApiLoggingData)
  ::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)) {
    // .optimization_guide.proto.PromptApiRequest request = 1 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.request_);
    }
    // .optimization_guide.proto.PromptApiResponse response = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.response_);
    }
    // .optimization_guide.proto.PromptApiMetadata metadata = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.metadata_);
    }
  }
  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 PromptApiLoggingData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PromptApiLoggingData*>(&to_msg);
  auto& from = static_cast<const PromptApiLoggingData&>(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.PromptApiLoggingData)
  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)) {
      ABSL_DCHECK(from._impl_.request_ != nullptr);
      if (_this->_impl_.request_ == nullptr) {
        _this->_impl_.request_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.request_);
      } else {
        _this->_impl_.request_->MergeFrom(*from._impl_.request_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.response_ != nullptr);
      if (_this->_impl_.response_ == nullptr) {
        _this->_impl_.response_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_);
      } else {
        _this->_impl_.response_->MergeFrom(*from._impl_.response_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.metadata_ != nullptr);
      if (_this->_impl_.metadata_ == nullptr) {
        _this->_impl_.metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_);
      } else {
        _this->_impl_.metadata_->MergeFrom(*from._impl_.metadata_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PromptApiLoggingData::InternalSwap(PromptApiLoggingData* 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(PromptApiLoggingData, _impl_.metadata_)
      + sizeof(PromptApiLoggingData::_impl_.metadata_)
      - PROTOBUF_FIELD_OFFSET(PromptApiLoggingData, _impl_.request_)>(
          reinterpret_cast<char*>(&_impl_.request_),
          reinterpret_cast<char*>(&other->_impl_.request_));
}

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

PromptApiRequest::PromptApiRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiRequest_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.PromptApiRequest)
}
PROTOBUF_NDEBUG_INLINE PromptApiRequest::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::PromptApiRequest& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        initial_prompts_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::PromptApiRequest,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.initial_prompts_)>()
          , from.initial_prompts_
        }
        ,
        prompt_history_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::PromptApiRequest,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.prompt_history_)>()
          , from.prompt_history_
        }
        ,
        current_prompts_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::PromptApiRequest,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.current_prompts_)>()
          , from.current_prompts_
        }
     {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  PromptApiRequest* 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.PromptApiRequest)
}
PROTOBUF_NDEBUG_INLINE PromptApiRequest::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        initial_prompts_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::PromptApiRequest,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.initial_prompts_)>()
         }
        ,
        prompt_history_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::PromptApiRequest,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.prompt_history_)>()
         }
        ,
        current_prompts_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::PromptApiRequest,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiRequest, _impl_.current_prompts_)>()
         }
     {}

inline void PromptApiRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
PromptApiRequest::~PromptApiRequest() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.PromptApiRequest)
  SharedDtor(*this);
}
inline void PromptApiRequest::SharedDtor(MessageLite& self) {
  PromptApiRequest& this_ = static_cast<PromptApiRequest&>(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 PromptApiRequest_class_data_ =
    PromptApiRequest::InternalGenerateClassData_(PromptApiRequest_globals_._default);

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

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

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

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

  // repeated .optimization_guide.proto.PromptApiPrompt current_prompts = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_current_prompts_size());
         i < n; i++) {
      const auto& repfield = this_._internal_current_prompts().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              3, 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.PromptApiRequest)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t PromptApiRequest::ByteSizeLong(const MessageLite& base) {
  const PromptApiRequest& this_ = static_cast<const PromptApiRequest&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t PromptApiRequest::ByteSizeLong() const {
  const PromptApiRequest& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.PromptApiRequest)
  ::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.PromptApiPrompt initial_prompts = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_initial_prompts_size();
      for (const auto& msg : this_._internal_initial_prompts()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .optimization_guide.proto.PromptApiPrompt prompt_history = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1UL * this_._internal_prompt_history_size();
      for (const auto& msg : this_._internal_prompt_history()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .optimization_guide.proto.PromptApiPrompt current_prompts = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1UL * this_._internal_current_prompts_size();
      for (const auto& msg : this_._internal_current_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 PromptApiRequest::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PromptApiRequest*>(&to_msg);
  auto& from = static_cast<const PromptApiRequest&>(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.PromptApiRequest)
  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_initial_prompts()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_initial_prompts());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_prompt_history()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_prompt_history());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_mutable_current_prompts()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_current_prompts());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PromptApiRequest::InternalSwap(PromptApiRequest* 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_.initial_prompts_.InternalSwap(&other->_impl_.initial_prompts_);
  _impl_.prompt_history_.InternalSwap(&other->_impl_.prompt_history_);
  _impl_.current_prompts_.InternalSwap(&other->_impl_.current_prompts_);
}

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

void PromptApiPrompt::set_allocated_media(::optimization_guide::proto::Media* PROTOBUF_NULLABLE media) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_kind();
  if (media) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(media)->GetArena();
    if (message_arena != submessage_arena) {
      media = ::google::protobuf::internal::GetOwnedMessage(message_arena, media, submessage_arena);
    }
    set_has_media();
    _impl_.kind_.media_ = media;
  }
  // @@protoc_insertion_point(field_set_allocated:optimization_guide.proto.PromptApiPrompt.media)
}
void PromptApiPrompt::clear_media() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (kind_case() == kMedia) {
    if (GetArena() == nullptr) {
      delete _impl_.kind_.media_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      if (_impl_.kind_.media_ != nullptr) {
        _impl_.kind_.media_->Clear();
      }
    }
    clear_has_kind();
  }
}
PromptApiPrompt::PromptApiPrompt(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiPrompt_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.PromptApiPrompt)
}
PROTOBUF_NDEBUG_INLINE PromptApiPrompt::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::PromptApiPrompt& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        kind_{},
        _oneof_case_{from._oneof_case_[0]} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  PromptApiPrompt* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.role_ = from._impl_.role_;
  switch (kind_case()) {
    case KIND_NOT_SET:
      break;
      case kText:
        new (&_impl_.kind_.text_) decltype(_impl_.kind_.text_){arena, from._impl_.kind_.text_};
        break;
      case kMedia:
        _impl_.kind_.media_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.kind_.media_);
        break;
  }

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

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

void PromptApiPrompt::clear_kind() {
// @@protoc_insertion_point(one_of_clear_start:optimization_guide.proto.PromptApiPrompt)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (kind_case()) {
    case kText: {
      _impl_.kind_.text_.Destroy();
      break;
    }
    case kMedia: {
      if (GetArena() == nullptr) {
        delete _impl_.kind_.media_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.kind_.media_ != nullptr) {
          _impl_.kind_.media_->Clear();
        }
      }
      break;
    }
    case KIND_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = KIND_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PromptApiPrompt_class_data_ =
    PromptApiPrompt::InternalGenerateClassData_(PromptApiPrompt_globals_._default);

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

  _impl_.role_ = 0;
  clear_kind();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // .optimization_guide.proto.PromptApiRole role = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_role(), target);
  }

  switch (this_.kind_case()) {
    case kText: {
      const ::std::string& _s = this_._internal_text();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.PromptApiPrompt.text");
      target = stream->WriteStringMaybeAliased(2, _s, target);
      break;
    }
    case kMedia: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          3, *this_._impl_.kind_.media_, this_._impl_.kind_.media_->GetCachedSize(), target,
          stream);
      break;
    }
    default:
      break;
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:optimization_guide.proto.PromptApiPrompt)
  return target;
}

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

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

   {
    // .optimization_guide.proto.PromptApiRole role = 1 [features = {
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_role());
    }
  }
  switch (this_.kind_case()) {
    // string text = 2;
    case kText: {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_text());
      break;
    }
    // .optimization_guide.proto.Media media = 3;
    case kMedia: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.media_);
      break;
    }
    case KIND_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 PromptApiPrompt::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PromptApiPrompt*>(&to_msg);
  auto& from = static_cast<const PromptApiPrompt&>(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.PromptApiPrompt)
  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->_impl_.role_ = from._impl_.role_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  if (const uint32_t oneof_from_case =
          from._impl_._oneof_case_[0]) {
    const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
    const bool oneof_needs_init = oneof_to_case != oneof_from_case;
    if (oneof_needs_init) {
      if (oneof_to_case != 0) {
        _this->clear_kind();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kText: {
        if (oneof_needs_init) {
          _this->_impl_.kind_.text_.InitDefault();
        }
        _this->_impl_.kind_.text_.Set(from._internal_text(), arena);
        break;
      }
      case kMedia: {
        if (oneof_needs_init) {
          _this->_impl_.kind_.media_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.kind_.media_);
        } else {
          _this->_impl_.kind_.media_->MergeFrom(*from._impl_.kind_.media_);
        }
        break;
      }
      case KIND_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PromptApiPrompt::InternalSwap(PromptApiPrompt* 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_.role_, other->_impl_.role_);
  swap(_impl_.kind_, other->_impl_.kind_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

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

PromptApiResponse::PromptApiResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiResponse_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.PromptApiResponse)
}
PROTOBUF_NDEBUG_INLINE PromptApiResponse::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::PromptApiResponse& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        output_(arena, from.output_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  PromptApiResponse* 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.PromptApiResponse)
}
PROTOBUF_NDEBUG_INLINE PromptApiResponse::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        output_(arena) {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PromptApiResponse_class_data_ =
    PromptApiResponse::InternalGenerateClassData_(PromptApiResponse_globals_._default);

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

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // string output = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_output();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.PromptApiResponse.output");
    target = stream->WriteStringMaybeAliased(1, _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.PromptApiResponse)
  return target;
}

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

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

   {
    // string output = 1 [features = {
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_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 PromptApiResponse::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PromptApiResponse*>(&to_msg);
  auto& from = static_cast<const PromptApiResponse&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.PromptApiResponse)
  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_set_output(from._internal_output());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PromptApiResponse::InternalSwap(PromptApiResponse* 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_.output_, &other->_impl_.output_, arena);
}

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

PromptApiMetadata_SamplingPreset::PromptApiMetadata_SamplingPreset(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiMetadata_SamplingPreset_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.PromptApiMetadata.SamplingPreset)
}
PROTOBUF_NDEBUG_INLINE PromptApiMetadata_SamplingPreset::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::PromptApiMetadata_SamplingPreset& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        name_(arena, from.name_) {}

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

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

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

inline void PromptApiMetadata_SamplingPreset::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_));
}
PromptApiMetadata_SamplingPreset::~PromptApiMetadata_SamplingPreset() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.PromptApiMetadata.SamplingPreset)
  SharedDtor(*this);
}
inline void PromptApiMetadata_SamplingPreset::SharedDtor(MessageLite& self) {
  PromptApiMetadata_SamplingPreset& this_ = static_cast<PromptApiMetadata_SamplingPreset&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.name_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PromptApiMetadata_SamplingPreset_class_data_ =
    PromptApiMetadata_SamplingPreset::InternalGenerateClassData_(PromptApiMetadata_SamplingPreset_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PromptApiMetadata_SamplingPreset::GetClassData() const {
  return PromptApiMetadata_SamplingPreset_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PromptApiMetadata_SamplingPreset::GetClassData() const {
  return PromptApiMetadata_SamplingPreset_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const PromptApiMetadata_SamplingPreset::ParseTableT_
    PromptApiMetadata_SamplingPreset::_table_ =
        PromptApiMetadata_SamplingPreset::InternalGenerateParseTable_(PromptApiMetadata_SamplingPreset_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void PromptApiMetadata_SamplingPreset::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.PromptApiMetadata.SamplingPreset)
  ::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_.name_.ClearNonDefaultToEmpty();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) {
    ::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 PromptApiMetadata_SamplingPreset::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const PromptApiMetadata_SamplingPreset& this_ = static_cast<const PromptApiMetadata_SamplingPreset&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL PromptApiMetadata_SamplingPreset::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const PromptApiMetadata_SamplingPreset& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:optimization_guide.proto.PromptApiMetadata.SamplingPreset)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // string name = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_name();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.PromptApiMetadata.SamplingPreset.name");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // uint32 top_k = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        2, this_._internal_top_k(), target);
  }

  // float temperature = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        3, 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.PromptApiMetadata.SamplingPreset)
  return target;
}

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

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


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

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

void PromptApiMetadata::clear_max_sampling_params() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.max_sampling_params_ != nullptr) _impl_.max_sampling_params_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
PromptApiMetadata::PromptApiMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PromptApiMetadata_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.PromptApiMetadata)
}
PROTOBUF_NDEBUG_INLINE PromptApiMetadata::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::PromptApiMetadata& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        sampling_presets_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::PromptApiMetadata,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::PromptApiMetadata, _impl_.sampling_presets_)>()
          , from.sampling_presets_
        }
     {}

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

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

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PromptApiMetadata_class_data_ =
    PromptApiMetadata::InternalGenerateClassData_(PromptApiMetadata_globals_._default);

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

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // uint32 version = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        1, this_._internal_version(), target);
  }

  // .optimization_guide.proto.SamplingParams max_sampling_params = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.max_sampling_params_, this_._impl_.max_sampling_params_->GetCachedSize(), target,
        stream);
  }

  // repeated .optimization_guide.proto.PromptApiMetadata.SamplingPreset sampling_presets = 4;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_sampling_presets_size());
         i < n; i++) {
      const auto& repfield = this_._internal_sampling_presets().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              4, 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.PromptApiMetadata)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t PromptApiMetadata::ByteSizeLong(const MessageLite& base) {
  const PromptApiMetadata& this_ = static_cast<const PromptApiMetadata&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t PromptApiMetadata::ByteSizeLong() const {
  const PromptApiMetadata& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.PromptApiMetadata)
  ::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.PromptApiMetadata.SamplingPreset sampling_presets = 4;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_sampling_presets_size();
      for (const auto& msg : this_._internal_sampling_presets()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // .optimization_guide.proto.SamplingParams max_sampling_params = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.max_sampling_params_);
    }
    // uint32 version = 1 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_version());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void PromptApiMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PromptApiMetadata*>(&to_msg);
  auto& from = static_cast<const PromptApiMetadata&>(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.PromptApiMetadata)
  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_sampling_presets()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_sampling_presets());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.max_sampling_params_ != nullptr);
      if (_this->_impl_.max_sampling_params_ == nullptr) {
        _this->_impl_.max_sampling_params_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.max_sampling_params_);
      } else {
        _this->_impl_.max_sampling_params_->MergeFrom(*from._impl_.max_sampling_params_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.version_ = from._impl_.version_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PromptApiMetadata::InternalSwap(PromptApiMetadata* 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_.sampling_presets_.InternalSwap(&other->_impl_.sampling_presets_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.version_)
      + sizeof(PromptApiMetadata::_impl_.version_)
      - PROTOBUF_FIELD_OFFSET(PromptApiMetadata, _impl_.max_sampling_params_)>(
          reinterpret_cast<char*>(&_impl_.max_sampling_params_),
          reinterpret_cast<char*>(&other->_impl_.max_sampling_params_));
}

// @@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"
