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

#include "tensor_shape.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 TensorShapeProto_Dim::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        name_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        size_{::int64_t{0}} {}

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_;

inline constexpr TensorShapeProto::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        dim_{},
        unknown_rank_{false} {}

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
}  // namespace opencv_tensorflow
static constexpr const ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
    file_level_enum_descriptors_tensor_5fshape_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
    file_level_service_descriptors_tensor_5fshape_2eproto = nullptr;
const ::uint32_t
    TableStruct_tensor_5fshape_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
        protodesc_cold) = {
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _impl_._has_bits_),
        5, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _impl_.size_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _impl_.name_),
        1,
        0,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _impl_._has_bits_),
        5, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _impl_.dim_),
        PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _impl_.unknown_rank_),
        ~0u,
        0,
};

static const ::_pbi::MigrationSchema
    schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        {0, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)},
        {7, sizeof(::opencv_tensorflow::TensorShapeProto)},
};
static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
    &::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_._instance,
    &::opencv_tensorflow::_TensorShapeProto_default_instance_._instance,
};
const char descriptor_table_protodef_tensor_5fshape_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
    protodesc_cold) = {
    "\n\022tensor_shape.proto\022\021opencv_tensorflow\""
    "\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open"
    "cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un"
    "known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n"
    "\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB"
    "\021TensorShapeProtosP\001\370\001\001b\006proto3"
};
static ::absl::once_flag descriptor_table_tensor_5fshape_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_tensor_5fshape_2eproto = {
    false,
    false,
    231,
    descriptor_table_protodef_tensor_5fshape_2eproto,
    "tensor_shape.proto",
    &descriptor_table_tensor_5fshape_2eproto_once,
    nullptr,
    0,
    2,
    schemas,
    file_default_instances,
    TableStruct_tensor_5fshape_2eproto::offsets,
    file_level_enum_descriptors_tensor_5fshape_2eproto,
    file_level_service_descriptors_tensor_5fshape_2eproto,
};
namespace opencv_tensorflow {
// ===================================================================

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

TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, TensorShapeProto_Dim_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim)
}
PROTOBUF_NDEBUG_INLINE TensorShapeProto_Dim::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::TensorShapeProto_Dim& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        name_(arena, from.name_) {}

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

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

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

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

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull TensorShapeProto_Dim_class_data_ =
        TensorShapeProto_Dim::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TensorShapeProto_Dim::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&TensorShapeProto_Dim_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(TensorShapeProto_Dim_class_data_.tc_table);
  return TensorShapeProto_Dim_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 51, 2>
TensorShapeProto_Dim::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dim, _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
    TensorShapeProto_Dim_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::TensorShapeProto_Dim>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // string name = 2;
    {::_pbi::TcParser::FastUS1,
     {18, 0, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dim, _impl_.name_)}},
    // int64 size = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(TensorShapeProto_Dim, _impl_.size_), 1>(),
     {8, 1, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dim, _impl_.size_)}},
  }}, {{
    65535, 65535
  }}, {{
    // int64 size = 1;
    {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dim, _impl_.size_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
    // string name = 2;
    {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dim, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
  }},
  // no aux_entries
  {{
    "\46\0\4\0\0\0\0\0"
    "opencv_tensorflow.TensorShapeProto.Dim"
    "name"
  }},
};
PROTOBUF_NOINLINE void TensorShapeProto_Dim::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim)
  ::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 & 0x00000001U) != 0) {
    _impl_.name_.ClearNonDefaultToEmpty();
  }
  _impl_.size_ = ::int64_t{0};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

  // int64 size = 1;
  if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) {
    if (this_._internal_size() != 0) {
      target =
          ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
              stream, this_._internal_size(), target);
    }
  }

  // string name = 2;
  if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) {
    if (!this_._internal_name().empty()) {
      const ::std::string& _s = this_._internal_name();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "opencv_tensorflow.TensorShapeProto.Dim.name");
      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.TensorShapeProto.Dim)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t TensorShapeProto_Dim::ByteSizeLong(const MessageLite& base) {
  const TensorShapeProto_Dim& this_ = static_cast<const TensorShapeProto_Dim&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t TensorShapeProto_Dim::ByteSizeLong() const {
  const TensorShapeProto_Dim& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim)
  ::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 name = 2;
    if ((cached_has_bits & 0x00000001U) != 0) {
      if (!this_._internal_name().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_name());
      }
    }
    // int64 size = 1;
    if ((cached_has_bits & 0x00000002U) != 0) {
      if (this_._internal_size() != 0) {
        total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
            this_._internal_size());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void TensorShapeProto_Dim::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<TensorShapeProto_Dim*>(&to_msg);
  auto& from = static_cast<const TensorShapeProto_Dim&>(from_msg);
  if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) {
    from.VerifyHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)
  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_name().empty()) {
        _this->_internal_set_name(from._internal_name());
      } else {
        if (_this->_impl_.name_.IsDefault()) {
          _this->_internal_set_name("");
        }
      }
    }
    if ((cached_has_bits & 0x00000002U) != 0) {
      if (from._internal_size() != 0) {
        _this->_impl_.size_ = from._impl_.size_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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


void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* 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);
  swap(_impl_.size_, other->_impl_.size_);
}

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

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

TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, TensorShapeProto_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto)
}
PROTOBUF_NDEBUG_INLINE TensorShapeProto::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::TensorShapeProto& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        dim_{visibility, arena, from.dim_} {}

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

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

inline void TensorShapeProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.unknown_rank_ = {};
}
TensorShapeProto::~TensorShapeProto() {
  // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto)
  SharedDtor(*this);
}
inline void TensorShapeProto::SharedDtor(MessageLite& self) {
  TensorShapeProto& this_ = static_cast<TensorShapeProto&>(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 TensorShapeProto::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) TensorShapeProto(arena);
}
constexpr auto TensorShapeProto::InternalNewImpl_() {
  constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
      PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_) +
          decltype(TensorShapeProto::_impl_.dim_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
  });
  if (arena_bits.has_value()) {
    return ::google::protobuf::internal::MessageCreator::ZeroInit(
        sizeof(TensorShapeProto), alignof(TensorShapeProto), *arena_bits);
  } else {
    return ::google::protobuf::internal::MessageCreator(&TensorShapeProto::PlacementNew_,
                                 sizeof(TensorShapeProto),
                                 alignof(TensorShapeProto));
  }
}
constexpr auto TensorShapeProto::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_TensorShapeProto_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &TensorShapeProto::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<TensorShapeProto>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &TensorShapeProto::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<TensorShapeProto>(), &TensorShapeProto::ByteSizeLong,
              &TensorShapeProto::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_._cached_size_),
          false,
      },
      &TensorShapeProto::kDescriptorMethods,
      &descriptor_table_tensor_5fshape_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull TensorShapeProto_class_data_ =
        TensorShapeProto::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TensorShapeProto::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&TensorShapeProto_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(TensorShapeProto_class_data_.tc_table);
  return TensorShapeProto_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 0, 2>
TensorShapeProto::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_._has_bits_),
    0, // no _extensions_
    3, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967289,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    TensorShapeProto_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::opencv_tensorflow::TensorShapeProto>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
    {::_pbi::TcParser::FastMtR1,
     {18, 63, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_)}},
    // bool unknown_rank = 3;
    {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(TensorShapeProto, _impl_.unknown_rank_), 0>(),
     {24, 0, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.unknown_rank_)}},
  }}, {{
    65535, 65535
  }}, {{
    // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
    {PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    // bool unknown_rank = 3;
    {PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.unknown_rank_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::opencv_tensorflow::TensorShapeProto_Dim>()},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void TensorShapeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto)
  ::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_.dim_.Clear();
  _impl_.unknown_rank_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

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

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

  // bool unknown_rank = 3;
  if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) {
    if (this_._internal_unknown_rank() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteBoolToArray(
          3, this_._internal_unknown_rank(), 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.TensorShapeProto)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t TensorShapeProto::ByteSizeLong(const MessageLite& base) {
  const TensorShapeProto& this_ = static_cast<const TensorShapeProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t TensorShapeProto::ByteSizeLong() const {
  const TensorShapeProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto)
  ::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.TensorShapeProto.Dim dim = 2;
    {
      total_size += 1UL * this_._internal_dim_size();
      for (const auto& msg : this_._internal_dim()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
   {
    // bool unknown_rank = 3;
    cached_has_bits = this_._impl_._has_bits_[0];
    if ((cached_has_bits & 0x00000001U) != 0) {
      if (this_._internal_unknown_rank() != 0) {
        total_size += 2;
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

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

  _this->_internal_mutable_dim()->MergeFrom(
      from._internal_dim());
  cached_has_bits = from._impl_._has_bits_[0];
  if ((cached_has_bits & 0x00000001U) != 0) {
    if (from._internal_unknown_rank() != 0) {
      _this->_impl_.unknown_rank_ = from._impl_.unknown_rank_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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


void TensorShapeProto::InternalSwap(TensorShapeProto* 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_.dim_.InternalSwap(&other->_impl_.dim_);
  swap(_impl_.unknown_rank_, other->_impl_.unknown_rank_);
}

::google::protobuf::Metadata TensorShapeProto::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_tensor_5fshape_2eproto),
         ::std::false_type{});
#include "google/protobuf/port_undef.inc"
