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

#include "function.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/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/wire_format.h"
// @@protoc_insertion_point(includes)

// 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 opencv_tensorflow {

inline constexpr GradientDef::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        function_name_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        gradient_func_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
PROTOBUF_CONSTEXPR GradientDef::GradientDef(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(GradientDef_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct GradientDefDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GradientDefDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GradientDefDefaultTypeInternal() {}
  union {
    GradientDef _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GradientDefDefaultTypeInternal _GradientDef_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : FunctionDef_Node_AttrEntry_DoNotUse::MapEntry(FunctionDef_Node_AttrEntry_DoNotUse_class_data_.base()){}
#else   // PROTOBUF_CUSTOM_VTABLE
    : FunctionDef_Node_AttrEntry_DoNotUse::MapEntry() {
}
#endif  // PROTOBUF_CUSTOM_VTABLE
struct FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal() {}
  union {
    FunctionDef_Node_AttrEntry_DoNotUse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal _FunctionDef_Node_AttrEntry_DoNotUse_default_instance_;

inline constexpr FunctionDef_Node::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        ret_{},
        arg_{},
        dep_{},
        attr_{},
        op_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
PROTOBUF_CONSTEXPR FunctionDef_Node::FunctionDef_Node(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(FunctionDef_Node_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct FunctionDef_NodeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FunctionDef_NodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~FunctionDef_NodeDefaultTypeInternal() {}
  union {
    FunctionDef_Node _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDef_NodeDefaultTypeInternal _FunctionDef_Node_default_instance_;

inline constexpr FunctionDef::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        node_{},
        signature_{nullptr} {}

template <typename>
PROTOBUF_CONSTEXPR FunctionDef::FunctionDef(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(FunctionDef_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct FunctionDefDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FunctionDefDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~FunctionDefDefaultTypeInternal() {}
  union {
    FunctionDef _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDefDefaultTypeInternal _FunctionDef_default_instance_;

inline constexpr FunctionDefLibrary::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : function_{},
        gradient_{},
        _cached_size_{0} {}

template <typename>
PROTOBUF_CONSTEXPR FunctionDefLibrary::FunctionDefLibrary(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(FunctionDefLibrary_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct FunctionDefLibraryDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FunctionDefLibraryDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~FunctionDefLibraryDefaultTypeInternal() {}
  union {
    FunctionDefLibrary _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDefLibraryDefaultTypeInternal _FunctionDefLibrary_default_instance_;
}  // namespace opencv_tensorflow
static constexpr const ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
    file_level_enum_descriptors_function_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
    file_level_service_descriptors_function_2eproto = nullptr;
const ::uint32_t
    TableStruct_function_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
        protodesc_cold) = {
        0x000, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, _impl_.function_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, _impl_.gradient_),
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _impl_._has_bits_),
        5, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _impl_.key_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _impl_.value_),
        0,
        1,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_._has_bits_),
        8, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_.ret_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_.op_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_.arg_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_.dep_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _impl_.attr_),
        ~0u,
        0,
        ~0u,
        ~0u,
        ~0u,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _impl_._has_bits_),
        5, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _impl_.signature_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _impl_.node_),
        0,
        ~0u,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _impl_._has_bits_),
        5, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _impl_.function_name_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _impl_.gradient_func_),
        0,
        1,
};

static const ::_pbi::MigrationSchema
    schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        {0, sizeof(::opencv_tensorflow::FunctionDefLibrary)},
        {3, sizeof(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse)},
        {10, sizeof(::opencv_tensorflow::FunctionDef_Node)},
        {23, sizeof(::opencv_tensorflow::FunctionDef)},
        {30, sizeof(::opencv_tensorflow::GradientDef)},
};
static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
    &::opencv_tensorflow::_FunctionDefLibrary_default_instance_._instance,
    &::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_._instance,
    &::opencv_tensorflow::_FunctionDef_Node_default_instance_._instance,
    &::opencv_tensorflow::_FunctionDef_default_instance_._instance,
    &::opencv_tensorflow::_GradientDef_default_instance_._instance,
};
const char descriptor_table_protodef_function_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
    protodesc_cold) = {
    "\n\016function.proto\022\021opencv_tensorflow\032\020att"
    "r_value.proto\032\014op_def.proto\"x\n\022FunctionD"
    "efLibrary\0220\n\010function\030\001 \003(\0132\036.opencv_ten"
    "sorflow.FunctionDef\0220\n\010gradient\030\002 \003(\0132\036."
    "opencv_tensorflow.GradientDef\"\261\002\n\013Functi"
    "onDef\022+\n\tsignature\030\001 \001(\0132\030.opencv_tensor"
    "flow.OpDef\0221\n\004node\030\002 \003(\0132#.opencv_tensor"
    "flow.FunctionDef.Node\032\301\001\n\004Node\022\013\n\003ret\030\001 "
    "\003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep\030\004 \003("
    "\t\022;\n\004attr\030\005 \003(\0132-.opencv_tensorflow.Func"
    "tionDef.Node.AttrEntry\032I\n\tAttrEntry\022\013\n\003k"
    "ey\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorf"
    "low.AttrValue:\0028\001\";\n\013GradientDef\022\025\n\rfunc"
    "tion_name\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/"
    "\n\030org.tensorflow.frameworkB\016FunctionProt"
    "osP\001\370\001\001b\006proto3"
};
static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const
    descriptor_table_function_2eproto_deps[2] = {
        &::descriptor_table_attr_5fvalue_2eproto,
        &::descriptor_table_op_5fdef_2eproto,
};
static ::absl::once_flag descriptor_table_function_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_function_2eproto = {
    false,
    false,
    615,
    descriptor_table_protodef_function_2eproto,
    "function.proto",
    &descriptor_table_function_2eproto_once,
    descriptor_table_function_2eproto_deps,
    2,
    5,
    schemas,
    file_default_instances,
    TableStruct_function_2eproto::offsets,
    file_level_enum_descriptors_function_2eproto,
    file_level_service_descriptors_function_2eproto,
};
namespace opencv_tensorflow {
// ===================================================================

class FunctionDefLibrary::_Internal {
 public:
};

FunctionDefLibrary::FunctionDefLibrary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDefLibrary_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDefLibrary)
}
PROTOBUF_NDEBUG_INLINE FunctionDefLibrary::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::opencv_tensorflow::FunctionDefLibrary& from_msg)
      : function_{visibility, arena, from.function_},
        gradient_{visibility, arena, from.gradient_},
        _cached_size_{0} {}

FunctionDefLibrary::FunctionDefLibrary(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const FunctionDefLibrary& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDefLibrary_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  FunctionDefLibrary* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDefLibrary)
}
PROTOBUF_NDEBUG_INLINE FunctionDefLibrary::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : function_{visibility, arena},
        gradient_{visibility, arena},
        _cached_size_{0} {}

inline void FunctionDefLibrary::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
FunctionDefLibrary::~FunctionDefLibrary() {
  // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDefLibrary)
  SharedDtor(*this);
}
inline void FunctionDefLibrary::SharedDtor(MessageLite& self) {
  FunctionDefLibrary& this_ = static_cast<FunctionDefLibrary&>(self);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    this_.VerifyHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL FunctionDefLibrary::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) FunctionDefLibrary(arena);
}
constexpr auto FunctionDefLibrary::InternalNewImpl_() {
  constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
      PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.function_) +
          decltype(FunctionDefLibrary::_impl_.function_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
      PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.gradient_) +
          decltype(FunctionDefLibrary::_impl_.gradient_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
  });
  if (arena_bits.has_value()) {
    return ::google::protobuf::internal::MessageCreator::ZeroInit(
        sizeof(FunctionDefLibrary), alignof(FunctionDefLibrary), *arena_bits);
  } else {
    return ::google::protobuf::internal::MessageCreator(&FunctionDefLibrary::PlacementNew_,
                                 sizeof(FunctionDefLibrary),
                                 alignof(FunctionDefLibrary));
  }
}
constexpr auto FunctionDefLibrary::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_FunctionDefLibrary_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &FunctionDefLibrary::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<FunctionDefLibrary>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &FunctionDefLibrary::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<FunctionDefLibrary>(), &FunctionDefLibrary::ByteSizeLong,
              &FunctionDefLibrary::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_._cached_size_),
          false,
      },
      &FunctionDefLibrary::kDescriptorMethods,
      &descriptor_table_function_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull FunctionDefLibrary_class_data_ =
        FunctionDefLibrary::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
FunctionDefLibrary::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&FunctionDefLibrary_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(FunctionDefLibrary_class_data_.tc_table);
  return FunctionDefLibrary_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 2, 0, 2>
FunctionDefLibrary::_table_ = {
  {
    0,  // no _has_bits_
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    FunctionDefLibrary_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDefLibrary>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // repeated .opencv_tensorflow.GradientDef gradient = 2;
    {::_pbi::TcParser::FastMtR1,
     {18, 63, 1, PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.gradient_)}},
    // repeated .opencv_tensorflow.FunctionDef function = 1;
    {::_pbi::TcParser::FastMtR1,
     {10, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.function_)}},
  }}, {{
    65535, 65535
  }}, {{
    // repeated .opencv_tensorflow.FunctionDef function = 1;
    {PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.function_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    // repeated .opencv_tensorflow.GradientDef gradient = 2;
    {PROTOBUF_FIELD_OFFSET(FunctionDefLibrary, _impl_.gradient_), 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDef>()},
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::GradientDef>()},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void FunctionDefLibrary::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDefLibrary)
  ::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_.function_.Clear();
  _impl_.gradient_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

  // repeated .opencv_tensorflow.FunctionDef function = 1;
  for (unsigned i = 0, n = static_cast<unsigned>(
                           this_._internal_function_size());
       i < n; i++) {
    const auto& repfield = this_._internal_function().Get(i);
    target =
        ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
            1, repfield, repfield.GetCachedSize(),
            target, stream);
  }

  // repeated .opencv_tensorflow.GradientDef gradient = 2;
  for (unsigned i = 0, n = static_cast<unsigned>(
                           this_._internal_gradient_size());
       i < n; i++) {
    const auto& repfield = this_._internal_gradient().Get(i);
    target =
        ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
            2, repfield, repfield.GetCachedSize(),
            target, stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDefLibrary)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
   {
    // repeated .opencv_tensorflow.FunctionDef function = 1;
    {
      total_size += 1UL * this_._internal_function_size();
      for (const auto& msg : this_._internal_function()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .opencv_tensorflow.GradientDef gradient = 2;
    {
      total_size += 1UL * this_._internal_gradient_size();
      for (const auto& msg : this_._internal_gradient()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

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

  _this->_internal_mutable_function()->MergeFrom(
      from._internal_function());
  _this->_internal_mutable_gradient()->MergeFrom(
      from._internal_gradient());
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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


void FunctionDefLibrary::InternalSwap(FunctionDefLibrary* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.function_.InternalSwap(&other->_impl_.function_);
  _impl_.gradient_.InternalSwap(&other->_impl_.gradient_);
}

::google::protobuf::Metadata FunctionDefLibrary::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

#if defined(PROTOBUF_CUSTOM_VTABLE)
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse()
    : SuperType(FunctionDef_Node_AttrEntry_DoNotUse_class_data_.base()) {}
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
    : SuperType(arena, FunctionDef_Node_AttrEntry_DoNotUse_class_data_.base()) {}
#else   // PROTOBUF_CUSTOM_VTABLE
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse() : SuperType() {}
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : SuperType(arena) {}
#endif  // PROTOBUF_CUSTOM_VTABLE
inline void* PROTOBUF_NONNULL FunctionDef_Node_AttrEntry_DoNotUse::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) FunctionDef_Node_AttrEntry_DoNotUse(arena);
}
constexpr auto FunctionDef_Node_AttrEntry_DoNotUse::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(FunctionDef_Node_AttrEntry_DoNotUse),
                                            alignof(FunctionDef_Node_AttrEntry_DoNotUse));
}
constexpr auto FunctionDef_Node_AttrEntry_DoNotUse::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &FunctionDef_Node_AttrEntry_DoNotUse::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<FunctionDef_Node_AttrEntry_DoNotUse>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &FunctionDef_Node_AttrEntry_DoNotUse::SharedDtor,
          static_cast<void (::google::protobuf::MessageLite::*)()>(&FunctionDef_Node_AttrEntry_DoNotUse::ClearImpl),
              ::google::protobuf::Message::ByteSizeLongImpl, ::google::protobuf::Message::_InternalSerializeImpl
              ,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_._cached_size_),
          false,
      },
      &FunctionDef_Node_AttrEntry_DoNotUse::kDescriptorMethods,
      &descriptor_table_function_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull FunctionDef_Node_AttrEntry_DoNotUse_class_data_ =
        FunctionDef_Node_AttrEntry_DoNotUse::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
FunctionDef_Node_AttrEntry_DoNotUse::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&FunctionDef_Node_AttrEntry_DoNotUse_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(FunctionDef_Node_AttrEntry_DoNotUse_class_data_.tc_table);
  return FunctionDef_Node_AttrEntry_DoNotUse_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 56, 2>
FunctionDef_Node_AttrEntry_DoNotUse::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    FunctionDef_Node_AttrEntry_DoNotUse_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::DiscardEverythingFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // .opencv_tensorflow.AttrValue value = 2;
    {::_pbi::TcParser::FastMtS1,
     {18, 1, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_.value_)}},
    // string key = 1;
    {::_pbi::TcParser::FastUS1,
     {10, 0, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_.key_)}},
  }}, {{
    65535, 65535
  }}, {{
    // string key = 1;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // .opencv_tensorflow.AttrValue value = 2;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node_AttrEntry_DoNotUse, _impl_.value_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::AttrValue>()},
  }},
  {{
    "\54\3\0\0\0\0\0\0"
    "opencv_tensorflow.FunctionDef.Node.AttrEntry"
    "key"
  }},
};
// ===================================================================

class FunctionDef_Node::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<FunctionDef_Node>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_._has_bits_);
};

void FunctionDef_Node::clear_attr() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.attr_.Clear();
}
FunctionDef_Node::FunctionDef_Node(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDef_Node_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef.Node)
}
PROTOBUF_NDEBUG_INLINE FunctionDef_Node::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::opencv_tensorflow::FunctionDef_Node& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        ret_{visibility, arena, from.ret_},
        arg_{visibility, arena, from.arg_},
        dep_{visibility, arena, from.dep_},
        attr_{visibility, arena, from.attr_},
        op_(arena, from.op_) {}

FunctionDef_Node::FunctionDef_Node(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const FunctionDef_Node& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDef_Node_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  FunctionDef_Node* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef.Node)
}
PROTOBUF_NDEBUG_INLINE FunctionDef_Node::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        ret_{visibility, arena},
        arg_{visibility, arena},
        dep_{visibility, arena},
        attr_{visibility, arena},
        op_(arena) {}

inline void FunctionDef_Node::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
FunctionDef_Node::~FunctionDef_Node() {
  // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef.Node)
  SharedDtor(*this);
}
inline void FunctionDef_Node::SharedDtor(MessageLite& self) {
  FunctionDef_Node& this_ = static_cast<FunctionDef_Node&>(self);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    this_.VerifyHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.op_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL FunctionDef_Node::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) FunctionDef_Node(arena);
}
constexpr auto FunctionDef_Node::InternalNewImpl_() {
  constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
      PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.ret_) +
          decltype(FunctionDef_Node::_impl_.ret_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
      PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.arg_) +
          decltype(FunctionDef_Node::_impl_.arg_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
      PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.dep_) +
          decltype(FunctionDef_Node::_impl_.dep_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
      PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.attr_) +
          decltype(FunctionDef_Node::_impl_.attr_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
      PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.attr_) +
          decltype(FunctionDef_Node::_impl_.attr_)::
              InternalGetArenaOffsetAlt(
                  ::google::protobuf::Message::internal_visibility()),
  });
  if (arena_bits.has_value()) {
    return ::google::protobuf::internal::MessageCreator::CopyInit(
        sizeof(FunctionDef_Node), alignof(FunctionDef_Node), *arena_bits);
  } else {
    return ::google::protobuf::internal::MessageCreator(&FunctionDef_Node::PlacementNew_,
                                 sizeof(FunctionDef_Node),
                                 alignof(FunctionDef_Node));
  }
}
constexpr auto FunctionDef_Node::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_FunctionDef_Node_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &FunctionDef_Node::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<FunctionDef_Node>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &FunctionDef_Node::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<FunctionDef_Node>(), &FunctionDef_Node::ByteSizeLong,
              &FunctionDef_Node::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_._cached_size_),
          false,
      },
      &FunctionDef_Node::kDescriptorMethods,
      &descriptor_table_function_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull FunctionDef_Node_class_data_ =
        FunctionDef_Node::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
FunctionDef_Node::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&FunctionDef_Node_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(FunctionDef_Node_class_data_.tc_table);
  return FunctionDef_Node_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 5, 2, 58, 2>
FunctionDef_Node::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_._has_bits_),
    0, // no _extensions_
    5, 24,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967264,  // skipmap
    offsetof(decltype(_table_), field_entries),
    5,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    FunctionDef_Node_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDef_Node>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // repeated string dep = 4;
    {::_pbi::TcParser::FastUR1,
     {34, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.dep_)}},
    // repeated string ret = 1;
    {::_pbi::TcParser::FastUR1,
     {10, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.ret_)}},
    // string op = 2;
    {::_pbi::TcParser::FastUS1,
     {18, 0, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.op_)}},
    // repeated string arg = 3;
    {::_pbi::TcParser::FastUR1,
     {26, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.arg_)}},
  }}, {{
    65535, 65535
  }}, {{
    // repeated string ret = 1;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.ret_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
    // string op = 2;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.op_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // repeated string arg = 3;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.arg_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
    // repeated string dep = 4;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.dep_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
    // map<string, .opencv_tensorflow.AttrValue> attr = 5;
    {PROTOBUF_FIELD_OFFSET(FunctionDef_Node, _impl_.attr_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
  }},
  {{
      {::_pbi::TcParser::GetMapAuxInfo(1, 0, 0,
                                       9, 11,
                                       0)},
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::AttrValue>()},
  }},
  {{
    "\42\3\2\3\3\4\0\0"
    "opencv_tensorflow.FunctionDef.Node"
    "ret"
    "op"
    "arg"
    "dep"
    "attr"
  }},
};
PROTOBUF_NOINLINE void FunctionDef_Node::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef.Node)
  ::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_.ret_.Clear();
  _impl_.arg_.Clear();
  _impl_.dep_.Clear();
  _impl_.attr_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000001U) != 0) {
    _impl_.op_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

  // repeated string ret = 1;
  for (int i = 0, n = this_._internal_ret_size(); i < n; ++i) {
    const auto& s = this_._internal_ret().Get(i);
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.ret");
    target = stream->WriteString(1, s, target);
  }

  // string op = 2;
  if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) {
    if (!this_._internal_op().empty()) {
      const ::std::string& _s = this_._internal_op();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.op");
      target = stream->WriteStringMaybeAliased(2, _s, target);
    }
  }

  // repeated string arg = 3;
  for (int i = 0, n = this_._internal_arg_size(); i < n; ++i) {
    const auto& s = this_._internal_arg().Get(i);
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.arg");
    target = stream->WriteString(3, s, target);
  }

  // repeated string dep = 4;
  for (int i = 0, n = this_._internal_dep_size(); i < n; ++i) {
    const auto& s = this_._internal_dep().Get(i);
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.dep");
    target = stream->WriteString(4, s, target);
  }

  // map<string, .opencv_tensorflow.AttrValue> attr = 5;
  if (!this_._internal_attr().empty()) {
    using MapType = ::google::protobuf::Map<::std::string, ::opencv_tensorflow::AttrValue>;
    using WireHelper = _pbi::MapEntryFuncs<::std::string, ::opencv_tensorflow::AttrValue,
                                   _pbi::WireFormatLite::TYPE_STRING,
                                   _pbi::WireFormatLite::TYPE_MESSAGE>;
    const auto& field = this_._internal_attr();

    if (stream->IsSerializationDeterministic() && field.size() > 1) {
      for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
        target = WireHelper::InternalSerialize(
            5, entry.first, entry.second, target, stream);
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            entry.first.data(), static_cast<int>(entry.first.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.attr");
      }
    } else {
      for (const auto& entry : field) {
        target = WireHelper::InternalSerialize(
            5, entry.first, entry.second, target, stream);
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            entry.first.data(), static_cast<int>(entry.first.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.FunctionDef.Node.attr");
      }
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef.Node)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
   {
    // repeated string ret = 1;
    {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_ret().size());
      for (int i = 0, n = this_._internal_ret().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_ret().Get(i));
      }
    }
    // repeated string arg = 3;
    {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_arg().size());
      for (int i = 0, n = this_._internal_arg().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_arg().Get(i));
      }
    }
    // repeated string dep = 4;
    {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_dep().size());
      for (int i = 0, n = this_._internal_dep().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_dep().Get(i));
      }
    }
    // map<string, .opencv_tensorflow.AttrValue> attr = 5;
    {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_attr_size());
      for (const auto& entry : this_._internal_attr()) {
        total_size += _pbi::MapEntryFuncs<::std::string, ::opencv_tensorflow::AttrValue,
                                       _pbi::WireFormatLite::TYPE_STRING,
                                       _pbi::WireFormatLite::TYPE_MESSAGE>::ByteSizeLong(entry.first, entry.second);
      }
    }
  }
   {
    // string op = 2;
    cached_has_bits = this_._impl_._has_bits_[0];
    if ((cached_has_bits & 0x00000001U) != 0) {
      if (!this_._internal_op().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_op());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void FunctionDef_Node::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<FunctionDef_Node*>(&to_msg);
  auto& from = static_cast<const FunctionDef_Node&>(from_msg);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    from.VerifyHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef.Node)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_mutable_ret()->MergeFrom(from._internal_ret());
  _this->_internal_mutable_arg()->MergeFrom(from._internal_arg());
  _this->_internal_mutable_dep()->MergeFrom(from._internal_dep());
  _this->_impl_.attr_.MergeFrom(from._impl_.attr_);
  cached_has_bits = from._impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000001U) != 0) {
    if (!from._internal_op().empty()) {
      _this->_internal_set_op(from._internal_op());
    } else {
      if (_this->_impl_.op_.IsDefault()) {
        _this->_internal_set_op("");
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void FunctionDef_Node::CopyFrom(const FunctionDef_Node& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef.Node)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void FunctionDef_Node::InternalSwap(FunctionDef_Node* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.ret_.InternalSwap(&other->_impl_.ret_);
  _impl_.arg_.InternalSwap(&other->_impl_.arg_);
  _impl_.dep_.InternalSwap(&other->_impl_.dep_);
  _impl_.attr_.InternalSwap(&other->_impl_.attr_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.op_, &other->_impl_.op_, arena);
}

::google::protobuf::Metadata FunctionDef_Node::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

class FunctionDef::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<FunctionDef>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_._has_bits_);
};

void FunctionDef::clear_signature() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.signature_ != nullptr) _impl_.signature_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001U;
}
FunctionDef::FunctionDef(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDef_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef)
}
PROTOBUF_NDEBUG_INLINE FunctionDef::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::opencv_tensorflow::FunctionDef& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        node_{visibility, arena, from.node_} {}

FunctionDef::FunctionDef(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const FunctionDef& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, FunctionDef_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  FunctionDef* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.signature_ = ((cached_has_bits & 0x00000001U) != 0)
                ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.signature_)
                : nullptr;

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

inline void FunctionDef::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.signature_ = {};
}
FunctionDef::~FunctionDef() {
  // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef)
  SharedDtor(*this);
}
inline void FunctionDef::SharedDtor(MessageLite& self) {
  FunctionDef& this_ = static_cast<FunctionDef&>(self);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    this_.VerifyHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.signature_;
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL FunctionDef::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) FunctionDef(arena);
}
constexpr auto FunctionDef::InternalNewImpl_() {
  constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
      PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_.node_) +
          decltype(FunctionDef::_impl_.node_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
  });
  if (arena_bits.has_value()) {
    return ::google::protobuf::internal::MessageCreator::ZeroInit(
        sizeof(FunctionDef), alignof(FunctionDef), *arena_bits);
  } else {
    return ::google::protobuf::internal::MessageCreator(&FunctionDef::PlacementNew_,
                                 sizeof(FunctionDef),
                                 alignof(FunctionDef));
  }
}
constexpr auto FunctionDef::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_FunctionDef_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &FunctionDef::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<FunctionDef>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &FunctionDef::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<FunctionDef>(), &FunctionDef::ByteSizeLong,
              &FunctionDef::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_._cached_size_),
          false,
      },
      &FunctionDef::kDescriptorMethods,
      &descriptor_table_function_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull FunctionDef_class_data_ =
        FunctionDef::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
FunctionDef::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&FunctionDef_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(FunctionDef_class_data_.tc_table);
  return FunctionDef_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 2, 0, 2>
FunctionDef::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    FunctionDef_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDef>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // repeated .opencv_tensorflow.FunctionDef.Node node = 2;
    {::_pbi::TcParser::FastMtR1,
     {18, 63, 1, PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_.node_)}},
    // .opencv_tensorflow.OpDef signature = 1;
    {::_pbi::TcParser::FastMtS1,
     {10, 0, 0, PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_.signature_)}},
  }}, {{
    65535, 65535
  }}, {{
    // .opencv_tensorflow.OpDef signature = 1;
    {PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_.signature_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // repeated .opencv_tensorflow.FunctionDef.Node node = 2;
    {PROTOBUF_FIELD_OFFSET(FunctionDef, _impl_.node_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::OpDef>()},
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::FunctionDef_Node>()},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void FunctionDef::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef)
  ::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_.node_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000001U) != 0) {
    ABSL_DCHECK(_impl_.signature_ != nullptr);
    _impl_.signature_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // .opencv_tensorflow.OpDef signature = 1;
  if ((cached_has_bits & 0x00000001U) != 0) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.signature_, this_._impl_.signature_->GetCachedSize(), target,
        stream);
  }

  // repeated .opencv_tensorflow.FunctionDef.Node node = 2;
  for (unsigned i = 0, n = static_cast<unsigned>(
                           this_._internal_node_size());
       i < n; i++) {
    const auto& repfield = this_._internal_node().Get(i);
    target =
        ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
            2, repfield, repfield.GetCachedSize(),
            target, stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
   {
    // repeated .opencv_tensorflow.FunctionDef.Node node = 2;
    {
      total_size += 1UL * this_._internal_node_size();
      for (const auto& msg : this_._internal_node()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
   {
    // .opencv_tensorflow.OpDef signature = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if ((cached_has_bits & 0x00000001U) != 0) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.signature_);
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

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

  _this->_internal_mutable_node()->MergeFrom(
      from._internal_node());
  cached_has_bits = from._impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000001U) != 0) {
    ABSL_DCHECK(from._impl_.signature_ != nullptr);
    if (_this->_impl_.signature_ == nullptr) {
      _this->_impl_.signature_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.signature_);
    } else {
      _this->_impl_.signature_->MergeFrom(*from._impl_.signature_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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


void FunctionDef::InternalSwap(FunctionDef* 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_.node_.InternalSwap(&other->_impl_.node_);
  swap(_impl_.signature_, other->_impl_.signature_);
}

::google::protobuf::Metadata FunctionDef::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

class GradientDef::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<GradientDef>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(GradientDef, _impl_._has_bits_);
};

GradientDef::GradientDef(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, GradientDef_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GradientDef)
}
PROTOBUF_NDEBUG_INLINE GradientDef::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::opencv_tensorflow::GradientDef& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        function_name_(arena, from.function_name_),
        gradient_func_(arena, from.gradient_func_) {}

GradientDef::GradientDef(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const GradientDef& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, GradientDef_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  GradientDef* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GradientDef)
}
PROTOBUF_NDEBUG_INLINE GradientDef::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        function_name_(arena),
        gradient_func_(arena) {}

inline void GradientDef::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
GradientDef::~GradientDef() {
  // @@protoc_insertion_point(destructor:opencv_tensorflow.GradientDef)
  SharedDtor(*this);
}
inline void GradientDef::SharedDtor(MessageLite& self) {
  GradientDef& this_ = static_cast<GradientDef&>(self);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    this_.VerifyHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.function_name_.Destroy();
  this_._impl_.gradient_func_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL GradientDef::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) GradientDef(arena);
}
constexpr auto GradientDef::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(GradientDef),
                                            alignof(GradientDef));
}
constexpr auto GradientDef::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_GradientDef_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &GradientDef::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<GradientDef>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &GradientDef::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<GradientDef>(), &GradientDef::ByteSizeLong,
              &GradientDef::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(GradientDef, _impl_._cached_size_),
          false,
      },
      &GradientDef::kDescriptorMethods,
      &descriptor_table_function_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull GradientDef_class_data_ =
        GradientDef::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
GradientDef::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&GradientDef_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(GradientDef_class_data_.tc_table);
  return GradientDef_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 64, 2>
GradientDef::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(GradientDef, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    GradientDef_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::GradientDef>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // string gradient_func = 2;
    {::_pbi::TcParser::FastUS1,
     {18, 1, 0, PROTOBUF_FIELD_OFFSET(GradientDef, _impl_.gradient_func_)}},
    // string function_name = 1;
    {::_pbi::TcParser::FastUS1,
     {10, 0, 0, PROTOBUF_FIELD_OFFSET(GradientDef, _impl_.function_name_)}},
  }}, {{
    65535, 65535
  }}, {{
    // string function_name = 1;
    {PROTOBUF_FIELD_OFFSET(GradientDef, _impl_.function_name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // string gradient_func = 2;
    {PROTOBUF_FIELD_OFFSET(GradientDef, _impl_.gradient_func_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
  }},
  // no aux_entries
  {{
    "\35\15\15\0\0\0\0\0"
    "opencv_tensorflow.GradientDef"
    "function_name"
    "gradient_func"
  }},
};
PROTOBUF_NOINLINE void GradientDef::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GradientDef)
  ::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 ((cached_has_bits & 0x00000003U) != 0) {
    if ((cached_has_bits & 0x00000001U) != 0) {
      _impl_.function_name_.ClearNonDefaultToEmpty();
    }
    if ((cached_has_bits & 0x00000002U) != 0) {
      _impl_.gradient_func_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

  // string function_name = 1;
  if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) {
    if (!this_._internal_function_name().empty()) {
      const ::std::string& _s = this_._internal_function_name();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.GradientDef.function_name");
      target = stream->WriteStringMaybeAliased(1, _s, target);
    }
  }

  // string gradient_func = 2;
  if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) {
    if (!this_._internal_gradient_func().empty()) {
      const ::std::string& _s = this_._internal_gradient_func();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.GradientDef.gradient_func");
      target = stream->WriteStringMaybeAliased(2, _s, target);
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GradientDef)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t GradientDef::ByteSizeLong(const MessageLite& base) {
  const GradientDef& this_ = static_cast<const GradientDef&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t GradientDef::ByteSizeLong() const {
  const GradientDef& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GradientDef)
  ::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 ((cached_has_bits & 0x00000003U) != 0) {
    // string function_name = 1;
    if ((cached_has_bits & 0x00000001U) != 0) {
      if (!this_._internal_function_name().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_function_name());
      }
    }
    // string gradient_func = 2;
    if ((cached_has_bits & 0x00000002U) != 0) {
      if (!this_._internal_gradient_func().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_gradient_func());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

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

  cached_has_bits = from._impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000003U) != 0) {
    if ((cached_has_bits & 0x00000001U) != 0) {
      if (!from._internal_function_name().empty()) {
        _this->_internal_set_function_name(from._internal_function_name());
      } else {
        if (_this->_impl_.function_name_.IsDefault()) {
          _this->_internal_set_function_name("");
        }
      }
    }
    if ((cached_has_bits & 0x00000002U) != 0) {
      if (!from._internal_gradient_func().empty()) {
        _this->_internal_set_gradient_func(from._internal_gradient_func());
      } else {
        if (_this->_impl_.gradient_func_.IsDefault()) {
          _this->_internal_set_gradient_func("");
        }
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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


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

::google::protobuf::Metadata GradientDef::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// @@protoc_insertion_point(namespace_scope)
}  // namespace opencv_tensorflow
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
    _static_init2_ [[maybe_unused]] =
        (::_pbi::AddDescriptors(&descriptor_table_function_2eproto),
         ::std::false_type{});
#include "google/protobuf/port_undef.inc"
