// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: opencv-onnx.proto

#include "opencv-onnx.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.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)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace opencv_onnx {
PROTOBUF_CONSTEXPR AttributeProto::AttributeProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.floats_)*/{}
  , /*decltype(_impl_.ints_)*/{}
  , /*decltype(_impl_.strings_)*/{}
  , /*decltype(_impl_.tensors_)*/{}
  , /*decltype(_impl_.graphs_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.s_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.ref_attr_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.t_)*/nullptr
  , /*decltype(_impl_.g_)*/nullptr
  , /*decltype(_impl_.i_)*/int64_t{0}
  , /*decltype(_impl_.f_)*/0
  , /*decltype(_impl_.type_)*/0} {}
struct AttributeProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR AttributeProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~AttributeProtoDefaultTypeInternal() {}
  union {
    AttributeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_;
PROTOBUF_CONSTEXPR ValueInfoProto::ValueInfoProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/nullptr} {}
struct ValueInfoProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ValueInfoProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ValueInfoProtoDefaultTypeInternal() {}
  union {
    ValueInfoProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_;
PROTOBUF_CONSTEXPR NodeProto::NodeProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.input_)*/{}
  , /*decltype(_impl_.output_)*/{}
  , /*decltype(_impl_.attribute_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.op_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.domain_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct NodeProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NodeProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NodeProtoDefaultTypeInternal() {}
  union {
    NodeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeProtoDefaultTypeInternal _NodeProto_default_instance_;
PROTOBUF_CONSTEXPR ModelProto::ModelProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.opset_import_)*/{}
  , /*decltype(_impl_.metadata_props_)*/{}
  , /*decltype(_impl_.producer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.producer_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.domain_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.graph_)*/nullptr
  , /*decltype(_impl_.ir_version_)*/int64_t{0}
  , /*decltype(_impl_.model_version_)*/int64_t{0}} {}
struct ModelProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ModelProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ModelProtoDefaultTypeInternal() {}
  union {
    ModelProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModelProtoDefaultTypeInternal _ModelProto_default_instance_;
PROTOBUF_CONSTEXPR StringStringEntryProto::StringStringEntryProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct StringStringEntryProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR StringStringEntryProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~StringStringEntryProtoDefaultTypeInternal() {}
  union {
    StringStringEntryProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_;
PROTOBUF_CONSTEXPR GraphProto::GraphProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.node_)*/{}
  , /*decltype(_impl_.initializer_)*/{}
  , /*decltype(_impl_.input_)*/{}
  , /*decltype(_impl_.output_)*/{}
  , /*decltype(_impl_.value_info_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct GraphProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GraphProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~GraphProtoDefaultTypeInternal() {}
  union {
    GraphProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphProtoDefaultTypeInternal _GraphProto_default_instance_;
PROTOBUF_CONSTEXPR TensorProto_Segment::TensorProto_Segment(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.begin_)*/int64_t{0}
  , /*decltype(_impl_.end_)*/int64_t{0}} {}
struct TensorProto_SegmentDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TensorProto_SegmentDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TensorProto_SegmentDefaultTypeInternal() {}
  union {
    TensorProto_Segment _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_;
PROTOBUF_CONSTEXPR TensorProto::TensorProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.dims_)*/{}
  , /*decltype(_impl_.float_data_)*/{}
  , /*decltype(_impl_.int32_data_)*/{}
  , /*decltype(_impl_._int32_data_cached_byte_size_)*/{0}
  , /*decltype(_impl_.string_data_)*/{}
  , /*decltype(_impl_.int64_data_)*/{}
  , /*decltype(_impl_._int64_data_cached_byte_size_)*/{0}
  , /*decltype(_impl_.double_data_)*/{}
  , /*decltype(_impl_.uint64_data_)*/{}
  , /*decltype(_impl_._uint64_data_cached_byte_size_)*/{0}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.raw_data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.doc_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.segment_)*/nullptr
  , /*decltype(_impl_.data_type_)*/0} {}
struct TensorProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TensorProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TensorProtoDefaultTypeInternal() {}
  union {
    TensorProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorProtoDefaultTypeInternal _TensorProto_default_instance_;
PROTOBUF_CONSTEXPR TensorShapeProto_Dimension::TensorShapeProto_Dimension(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.denotation_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct TensorShapeProto_DimensionDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TensorShapeProto_DimensionDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TensorShapeProto_DimensionDefaultTypeInternal() {}
  union {
    TensorShapeProto_Dimension _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_;
PROTOBUF_CONSTEXPR TensorShapeProto::TensorShapeProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.dim_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
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_;
PROTOBUF_CONSTEXPR TypeProto_Tensor::TypeProto_Tensor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shape_)*/nullptr
  , /*decltype(_impl_.elem_type_)*/0} {}
struct TypeProto_TensorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TypeProto_TensorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TypeProto_TensorDefaultTypeInternal() {}
  union {
    TypeProto_Tensor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_;
PROTOBUF_CONSTEXPR TypeProto::TypeProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.denotation_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct TypeProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TypeProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TypeProtoDefaultTypeInternal() {}
  union {
    TypeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProtoDefaultTypeInternal _TypeProto_default_instance_;
PROTOBUF_CONSTEXPR OperatorSetIdProto::OperatorSetIdProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.domain_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.version_)*/int64_t{0}} {}
struct OperatorSetIdProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR OperatorSetIdProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~OperatorSetIdProtoDefaultTypeInternal() {}
  union {
    OperatorSetIdProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_;
}  // namespace opencv_onnx
static ::_pb::Metadata file_level_metadata_opencv_2donnx_2eproto[13];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_opencv_2donnx_2eproto[3];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_opencv_2donnx_2eproto = nullptr;

const uint32_t TableStruct_opencv_2donnx_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.ref_attr_name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.doc_string_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.f_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.i_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.s_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.t_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.g_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.floats_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.ints_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.strings_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.tensors_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _impl_.graphs_),
  0,
  3,
  2,
  8,
  7,
  6,
  1,
  4,
  5,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _impl_.doc_string_),
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.input_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.output_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.op_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.domain_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.attribute_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _impl_.doc_string_),
  ~0u,
  ~0u,
  0,
  1,
  3,
  ~0u,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.ir_version_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.opset_import_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.producer_name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.producer_version_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.domain_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.model_version_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.doc_string_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.graph_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _impl_.metadata_props_),
  5,
  ~0u,
  0,
  1,
  2,
  6,
  3,
  4,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _impl_.key_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _impl_.value_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.node_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.initializer_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.doc_string_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.input_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.output_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _impl_.value_info_),
  ~0u,
  0,
  ~0u,
  1,
  ~0u,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _impl_.begin_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _impl_.end_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.dims_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.data_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.segment_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.float_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.int32_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.string_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.int64_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.doc_string_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.raw_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.double_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _impl_.uint64_data_),
  ~0u,
  4,
  3,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  0,
  2,
  1,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _impl_.denotation_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _impl_.value_),
  ~0u,
  ~0u,
  0,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _impl_.dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _impl_.elem_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _impl_.shape_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _impl_.denotation_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _impl_.value_),
  ~0u,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _impl_.domain_),
  PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _impl_.version_),
  0,
  1,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 20, -1, sizeof(::opencv_onnx::AttributeProto)},
  { 34, 43, -1, sizeof(::opencv_onnx::ValueInfoProto)},
  { 46, 59, -1, sizeof(::opencv_onnx::NodeProto)},
  { 66, 81, -1, sizeof(::opencv_onnx::ModelProto)},
  { 90, 98, -1, sizeof(::opencv_onnx::StringStringEntryProto)},
  { 100, 113, -1, sizeof(::opencv_onnx::GraphProto)},
  { 120, 128, -1, sizeof(::opencv_onnx::TensorProto_Segment)},
  { 130, 148, -1, sizeof(::opencv_onnx::TensorProto)},
  { 160, 170, -1, sizeof(::opencv_onnx::TensorShapeProto_Dimension)},
  { 173, -1, -1, sizeof(::opencv_onnx::TensorShapeProto)},
  { 180, 188, -1, sizeof(::opencv_onnx::TypeProto_Tensor)},
  { 190, 199, -1, sizeof(::opencv_onnx::TypeProto)},
  { 201, 209, -1, sizeof(::opencv_onnx::OperatorSetIdProto)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::opencv_onnx::_AttributeProto_default_instance_._instance,
  &::opencv_onnx::_ValueInfoProto_default_instance_._instance,
  &::opencv_onnx::_NodeProto_default_instance_._instance,
  &::opencv_onnx::_ModelProto_default_instance_._instance,
  &::opencv_onnx::_StringStringEntryProto_default_instance_._instance,
  &::opencv_onnx::_GraphProto_default_instance_._instance,
  &::opencv_onnx::_TensorProto_Segment_default_instance_._instance,
  &::opencv_onnx::_TensorProto_default_instance_._instance,
  &::opencv_onnx::_TensorShapeProto_Dimension_default_instance_._instance,
  &::opencv_onnx::_TensorShapeProto_default_instance_._instance,
  &::opencv_onnx::_TypeProto_Tensor_default_instance_._instance,
  &::opencv_onnx::_TypeProto_default_instance_._instance,
  &::opencv_onnx::_OperatorSetIdProto_default_instance_._instance,
};

const char descriptor_table_protodef_opencv_2donnx_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att"
  "ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na"
  "me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001"
  "(\0162).opencv_onnx.AttributeProto.Attribut"
  "eType\022\t\n\001f\030\002 \001(\002\022\t\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022#"
  "\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g"
  "\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float"
  "s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)"
  "\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt"
  "o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro"
  "to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F"
  "LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022"
  "\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI"
  "NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI"
  "nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o"
  "pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t"
  "\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030"
  "\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006"
  "domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv"
  "_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t"
  "\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o"
  "pset_import\030\010 \003(\0132\037.opencv_onnx.Operator"
  "SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro"
  "ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm"
  "odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&"
  "\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;"
  "\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str"
  "ingStringEntryProto\"4\n\026StringStringEntry"
  "Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr"
  "aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod"
  "eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003("
  "\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin"
  "g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val"
  "ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn"
  "x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o"
  "pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt"
  "o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope"
  "ncv_onnx.TensorProto.DataType\0221\n\007segment"
  "\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment"
  "\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
  " \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
  "ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
  "g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data"
  "\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S"
  "egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D"
  "ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN"
  "T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n"
  "\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020"
  "\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n"
  "\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020"
  "\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op"
  "encv_onnx.TensorShapeProto.Dimension\032R\n\t"
  "Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa"
  "ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value"
  "\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op"
  "encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati"
  "on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!."
  "opencv_onnx.TensorProto.DataType\022,\n\005shap"
  "e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007"
  "\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030"
  "\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST"
  "ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001"
  "\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO"
  "N\020\003"
  ;
static ::_pbi::once_flag descriptor_table_opencv_2donnx_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_opencv_2donnx_2eproto = {
    false, false, 2523, descriptor_table_protodef_opencv_2donnx_2eproto,
    "opencv-onnx.proto",
    &descriptor_table_opencv_2donnx_2eproto_once, nullptr, 0, 13,
    schemas, file_default_instances, TableStruct_opencv_2donnx_2eproto::offsets,
    file_level_metadata_opencv_2donnx_2eproto, file_level_enum_descriptors_opencv_2donnx_2eproto,
    file_level_service_descriptors_opencv_2donnx_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_opencv_2donnx_2eproto_getter() {
  return &descriptor_table_opencv_2donnx_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_opencv_2donnx_2eproto(&descriptor_table_opencv_2donnx_2eproto);
namespace opencv_onnx {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  return file_level_enum_descriptors_opencv_2donnx_2eproto[0];
}
bool AttributeProto_AttributeType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr AttributeProto_AttributeType AttributeProto::UNDEFINED;
constexpr AttributeProto_AttributeType AttributeProto::FLOAT;
constexpr AttributeProto_AttributeType AttributeProto::INT;
constexpr AttributeProto_AttributeType AttributeProto::STRING;
constexpr AttributeProto_AttributeType AttributeProto::TENSOR;
constexpr AttributeProto_AttributeType AttributeProto::GRAPH;
constexpr AttributeProto_AttributeType AttributeProto::FLOATS;
constexpr AttributeProto_AttributeType AttributeProto::INTS;
constexpr AttributeProto_AttributeType AttributeProto::STRINGS;
constexpr AttributeProto_AttributeType AttributeProto::TENSORS;
constexpr AttributeProto_AttributeType AttributeProto::GRAPHS;
constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
constexpr int AttributeProto::AttributeType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorProto_DataType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  return file_level_enum_descriptors_opencv_2donnx_2eproto[1];
}
bool TensorProto_DataType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr TensorProto_DataType TensorProto::UNDEFINED;
constexpr TensorProto_DataType TensorProto::FLOAT;
constexpr TensorProto_DataType TensorProto::UINT8;
constexpr TensorProto_DataType TensorProto::INT8;
constexpr TensorProto_DataType TensorProto::UINT16;
constexpr TensorProto_DataType TensorProto::INT16;
constexpr TensorProto_DataType TensorProto::INT32;
constexpr TensorProto_DataType TensorProto::INT64;
constexpr TensorProto_DataType TensorProto::STRING;
constexpr TensorProto_DataType TensorProto::BOOL;
constexpr TensorProto_DataType TensorProto::FLOAT16;
constexpr TensorProto_DataType TensorProto::DOUBLE;
constexpr TensorProto_DataType TensorProto::UINT32;
constexpr TensorProto_DataType TensorProto::UINT64;
constexpr TensorProto_DataType TensorProto::COMPLEX64;
constexpr TensorProto_DataType TensorProto::COMPLEX128;
constexpr TensorProto_DataType TensorProto::DataType_MIN;
constexpr TensorProto_DataType TensorProto::DataType_MAX;
constexpr int TensorProto::DataType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Version_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  return file_level_enum_descriptors_opencv_2donnx_2eproto[2];
}
bool Version_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}


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

class AttributeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<AttributeProto>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_ref_attr_name(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_f(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_i(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_s(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::opencv_onnx::TensorProto& t(const AttributeProto* msg);
  static void set_has_t(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_onnx::GraphProto& g(const AttributeProto* msg);
  static void set_has_g(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::opencv_onnx::TensorProto&
AttributeProto::_Internal::t(const AttributeProto* msg) {
  return *msg->_impl_.t_;
}
const ::opencv_onnx::GraphProto&
AttributeProto::_Internal::g(const AttributeProto* msg) {
  return *msg->_impl_.g_;
}
AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.AttributeProto)
}
AttributeProto::AttributeProto(const AttributeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  AttributeProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.floats_){from._impl_.floats_}
    , decltype(_impl_.ints_){from._impl_.ints_}
    , decltype(_impl_.strings_){from._impl_.strings_}
    , decltype(_impl_.tensors_){from._impl_.tensors_}
    , decltype(_impl_.graphs_){from._impl_.graphs_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.s_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.ref_attr_name_){}
    , decltype(_impl_.t_){nullptr}
    , decltype(_impl_.g_){nullptr}
    , decltype(_impl_.i_){}
    , decltype(_impl_.f_){}
    , decltype(_impl_.type_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.s_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.s_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_s()) {
    _this->_impl_.s_.Set(from._internal_s(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  _impl_.ref_attr_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.ref_attr_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_ref_attr_name()) {
    _this->_impl_.ref_attr_name_.Set(from._internal_ref_attr_name(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_t()) {
    _this->_impl_.t_ = new ::opencv_onnx::TensorProto(*from._impl_.t_);
  }
  if (from._internal_has_g()) {
    _this->_impl_.g_ = new ::opencv_onnx::GraphProto(*from._impl_.g_);
  }
  ::memcpy(&_impl_.i_, &from._impl_.i_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
    reinterpret_cast<char*>(&_impl_.i_)) + sizeof(_impl_.type_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
}

inline void AttributeProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.floats_){arena}
    , decltype(_impl_.ints_){arena}
    , decltype(_impl_.strings_){arena}
    , decltype(_impl_.tensors_){arena}
    , decltype(_impl_.graphs_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.s_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.ref_attr_name_){}
    , decltype(_impl_.t_){nullptr}
    , decltype(_impl_.g_){nullptr}
    , decltype(_impl_.i_){int64_t{0}}
    , decltype(_impl_.f_){0}
    , decltype(_impl_.type_){0}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.s_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.s_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.ref_attr_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.ref_attr_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

AttributeProto::~AttributeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void AttributeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.floats_.~RepeatedField();
  _impl_.ints_.~RepeatedField();
  _impl_.strings_.~RepeatedPtrField();
  _impl_.tensors_.~RepeatedPtrField();
  _impl_.graphs_.~RepeatedPtrField();
  _impl_.name_.Destroy();
  _impl_.s_.Destroy();
  _impl_.doc_string_.Destroy();
  _impl_.ref_attr_name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.t_;
  if (this != internal_default_instance()) delete _impl_.g_;
}

void AttributeProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void AttributeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.floats_.Clear();
  _impl_.ints_.Clear();
  _impl_.strings_.Clear();
  _impl_.tensors_.Clear();
  _impl_.graphs_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.s_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.ref_attr_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.t_ != nullptr);
      _impl_.t_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(_impl_.g_ != nullptr);
      _impl_.g_->Clear();
    }
  }
  if (cached_has_bits & 0x000000c0u) {
    ::memset(&_impl_.i_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.f_) -
        reinterpret_cast<char*>(&_impl_.i_)) + sizeof(_impl_.f_));
  }
  _impl_.type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AttributeProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.AttributeProto.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float f = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_f(&has_bits);
          _impl_.f_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int64 i = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_i(&has_bits);
          _impl_.i_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes s = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_s();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorProto t = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_t(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.GraphProto g = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_g(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float floats = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_floats(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<61>(ptr));
        } else if (static_cast<uint8_t>(tag) == 58) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_floats(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int64 ints = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_ints(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
        } else if (static_cast<uint8_t>(tag) == 66) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_ints(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated bytes strings = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_strings();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.TensorProto tensors = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_tensors(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.GraphProto graphs = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_graphs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.AttributeProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::AttributeProto_AttributeType_IsValid(val))) {
            _internal_set_type(static_cast<::opencv_onnx::AttributeProto_AttributeType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(20, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional string ref_attr_name = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          auto str = _internal_mutable_ref_attr_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.AttributeProto.ref_attr_name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* AttributeProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.AttributeProto.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional float f = 2;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_f(), target);
  }

  // optional int64 i = 3;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_i(), target);
  }

  // optional bytes s = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_s(), target);
  }

  // optional .opencv_onnx.TensorProto t = 5;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::t(this),
        _Internal::t(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_onnx.GraphProto g = 6;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::g(this),
        _Internal::g(this).GetCachedSize(), target, stream);
  }

  // repeated float floats = 7;
  for (int i = 0, n = this->_internal_floats_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_floats(i), target);
  }

  // repeated int64 ints = 8;
  for (int i = 0, n = this->_internal_ints_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_ints(i), target);
  }

  // repeated bytes strings = 9;
  for (int i = 0, n = this->_internal_strings_size(); i < n; i++) {
    const auto& s = this->_internal_strings(i);
    target = stream->WriteBytes(9, s, target);
  }

  // repeated .opencv_onnx.TensorProto tensors = 10;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_tensors_size()); i < n; i++) {
    const auto& repfield = this->_internal_tensors(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(10, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_onnx.GraphProto graphs = 11;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_graphs_size()); i < n; i++) {
    const auto& repfield = this->_internal_graphs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional string doc_string = 13;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.AttributeProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_doc_string(), target);
  }

  // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      20, this->_internal_type(), target);
  }

  // optional string ref_attr_name = 21;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_ref_attr_name().data(), static_cast<int>(this->_internal_ref_attr_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.AttributeProto.ref_attr_name");
    target = stream->WriteStringMaybeAliased(
        21, this->_internal_ref_attr_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto)
  return target;
}

size_t AttributeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto)
  size_t total_size = 0;

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

  // repeated float floats = 7;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_floats_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_floats_size());
    total_size += data_size;
  }

  // repeated int64 ints = 8;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int64Size(this->_impl_.ints_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_ints_size());
    total_size += data_size;
  }

  // repeated bytes strings = 9;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.strings_.size());
  for (int i = 0, n = _impl_.strings_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
      _impl_.strings_.Get(i));
  }

  // repeated .opencv_onnx.TensorProto tensors = 10;
  total_size += 1UL * this->_internal_tensors_size();
  for (const auto& msg : this->_impl_.tensors_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.GraphProto graphs = 11;
  total_size += 1UL * this->_internal_graphs_size();
  for (const auto& msg : this->_impl_.graphs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional bytes s = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_s());
    }

    // optional string doc_string = 13;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

    // optional string ref_attr_name = 21;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_ref_attr_name());
    }

    // optional .opencv_onnx.TensorProto t = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.t_);
    }

    // optional .opencv_onnx.GraphProto g = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.g_);
    }

    // optional int64 i = 3;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_i());
    }

    // optional float f = 2;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 4;
    }

  }
  // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
  if (cached_has_bits & 0x00000100u) {
    total_size += 2 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttributeProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    AttributeProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttributeProto::GetClassData() const { return &_class_data_; }


void AttributeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<AttributeProto*>(&to_msg);
  auto& from = static_cast<const AttributeProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.floats_.MergeFrom(from._impl_.floats_);
  _this->_impl_.ints_.MergeFrom(from._impl_.ints_);
  _this->_impl_.strings_.MergeFrom(from._impl_.strings_);
  _this->_impl_.tensors_.MergeFrom(from._impl_.tensors_);
  _this->_impl_.graphs_.MergeFrom(from._impl_.graphs_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_s(from._internal_s());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_ref_attr_name(from._internal_ref_attr_name());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_t()->::opencv_onnx::TensorProto::MergeFrom(
          from._internal_t());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_g()->::opencv_onnx::GraphProto::MergeFrom(
          from._internal_g());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.i_ = from._impl_.i_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.f_ = from._impl_.f_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000100u) {
    _this->_internal_set_type(from._internal_type());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool AttributeProto::IsInitialized() const {
  return true;
}

void AttributeProto::InternalSwap(AttributeProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.floats_.InternalSwap(&other->_impl_.floats_);
  _impl_.ints_.InternalSwap(&other->_impl_.ints_);
  _impl_.strings_.InternalSwap(&other->_impl_.strings_);
  _impl_.tensors_.InternalSwap(&other->_impl_.tensors_);
  _impl_.graphs_.InternalSwap(&other->_impl_.graphs_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.s_, lhs_arena,
      &other->_impl_.s_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.ref_attr_name_, lhs_arena,
      &other->_impl_.ref_attr_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_)
      + sizeof(AttributeProto::_impl_.type_)
      - PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_)>(
          reinterpret_cast<char*>(&_impl_.t_),
          reinterpret_cast<char*>(&other->_impl_.t_));
}

::PROTOBUF_NAMESPACE_ID::Metadata AttributeProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[0]);
}

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

class ValueInfoProto::_Internal {
 public:
  using HasBits = decltype(std::declval<ValueInfoProto>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_onnx::TypeProto& type(const ValueInfoProto* msg);
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_onnx::TypeProto&
ValueInfoProto::_Internal::type(const ValueInfoProto* msg) {
  return *msg->_impl_.type_;
}
ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ValueInfoProto)
}
ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ValueInfoProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.name_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.type_){nullptr}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_type()) {
    _this->_impl_.type_ = new ::opencv_onnx::TypeProto(*from._impl_.type_);
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
}

inline void ValueInfoProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.name_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.type_){nullptr}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ValueInfoProto::~ValueInfoProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ValueInfoProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.name_.Destroy();
  _impl_.doc_string_.Destroy();
  if (this != internal_default_instance()) delete _impl_.type_;
}

void ValueInfoProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ValueInfoProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto)
  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 & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(_impl_.type_ != nullptr);
      _impl_.type_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ValueInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TypeProto type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_type(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ValueInfoProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ValueInfoProto.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional .opencv_onnx.TypeProto type = 2;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::type(this),
        _Internal::type(this).GetCachedSize(), target, stream);
  }

  // optional string doc_string = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ValueInfoProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_doc_string(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto)
  return target;
}

size_t ValueInfoProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto)
  size_t total_size = 0;

  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 & 0x00000007u) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional string doc_string = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

    // optional .opencv_onnx.TypeProto type = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_);
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValueInfoProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ValueInfoProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValueInfoProto::GetClassData() const { return &_class_data_; }


void ValueInfoProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ValueInfoProto*>(&to_msg);
  auto& from = static_cast<const ValueInfoProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto)
  GOOGLE_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 & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_type()->::opencv_onnx::TypeProto::MergeFrom(
          from._internal_type());
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool ValueInfoProto::IsInitialized() const {
  return true;
}

void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
  swap(_impl_.type_, other->_impl_.type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ValueInfoProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[1]);
}

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

class NodeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<NodeProto>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_op_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_domain(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

NodeProto::NodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeProto)
}
NodeProto::NodeProto(const NodeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NodeProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.input_){from._impl_.input_}
    , decltype(_impl_.output_){from._impl_.output_}
    , decltype(_impl_.attribute_){from._impl_.attribute_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.op_type_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.domain_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.op_type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.op_type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_op_type()) {
    _this->_impl_.op_type_.Set(from._internal_op_type(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    _this->_impl_.domain_.Set(from._internal_domain(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
}

inline void NodeProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.input_){arena}
    , decltype(_impl_.output_){arena}
    , decltype(_impl_.attribute_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.op_type_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.domain_){}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.op_type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.op_type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

NodeProto::~NodeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void NodeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.input_.~RepeatedPtrField();
  _impl_.output_.~RepeatedPtrField();
  _impl_.attribute_.~RepeatedPtrField();
  _impl_.name_.Destroy();
  _impl_.op_type_.Destroy();
  _impl_.doc_string_.Destroy();
  _impl_.domain_.Destroy();
}

void NodeProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void NodeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.input_.Clear();
  _impl_.output_.Clear();
  _impl_.attribute_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.op_type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.domain_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NodeProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated string input = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_input();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.input");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string output = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_output();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.output");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string name = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string op_type = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_op_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.op_type");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.AttributeProto attribute = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_attribute(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string domain = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_domain();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.NodeProto.domain");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* NodeProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string input = 1;
  for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
    const auto& s = this->_internal_input(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.input");
    target = stream->WriteString(1, s, target);
  }

  // repeated string output = 2;
  for (int i = 0, n = this->_internal_output_size(); i < n; i++) {
    const auto& s = this->_internal_output(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.output");
    target = stream->WriteString(2, s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 3;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.name");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_name(), target);
  }

  // optional string op_type = 4;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_op_type().data(), static_cast<int>(this->_internal_op_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.op_type");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_op_type(), target);
  }

  // repeated .opencv_onnx.AttributeProto attribute = 5;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_attribute_size()); i < n; i++) {
    const auto& repfield = this->_internal_attribute(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional string doc_string = 6;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_doc_string(), target);
  }

  // optional string domain = 7;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.NodeProto.domain");
    target = stream->WriteStringMaybeAliased(
        7, this->_internal_domain(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto)
  return target;
}

size_t NodeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto)
  size_t total_size = 0;

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

  // repeated string input = 1;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.input_.size());
  for (int i = 0, n = _impl_.input_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.input_.Get(i));
  }

  // repeated string output = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.output_.size());
  for (int i = 0, n = _impl_.output_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.output_.Get(i));
  }

  // repeated .opencv_onnx.AttributeProto attribute = 5;
  total_size += 1UL * this->_internal_attribute_size();
  for (const auto& msg : this->_impl_.attribute_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional string name = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional string op_type = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_op_type());
    }

    // optional string doc_string = 6;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

    // optional string domain = 7;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_domain());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    NodeProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeProto::GetClassData() const { return &_class_data_; }


void NodeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<NodeProto*>(&to_msg);
  auto& from = static_cast<const NodeProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.input_.MergeFrom(from._impl_.input_);
  _this->_impl_.output_.MergeFrom(from._impl_.output_);
  _this->_impl_.attribute_.MergeFrom(from._impl_.attribute_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_op_type(from._internal_op_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_domain(from._internal_domain());
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool NodeProto::IsInitialized() const {
  return true;
}

void NodeProto::InternalSwap(NodeProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.input_.InternalSwap(&other->_impl_.input_);
  _impl_.output_.InternalSwap(&other->_impl_.output_);
  _impl_.attribute_.InternalSwap(&other->_impl_.attribute_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.op_type_, lhs_arena,
      &other->_impl_.op_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.domain_, lhs_arena,
      &other->_impl_.domain_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata NodeProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[2]);
}

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

class ModelProto::_Internal {
 public:
  using HasBits = decltype(std::declval<ModelProto>()._impl_._has_bits_);
  static void set_has_ir_version(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_producer_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_producer_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_domain(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_model_version(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::opencv_onnx::GraphProto& graph(const ModelProto* msg);
  static void set_has_graph(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

const ::opencv_onnx::GraphProto&
ModelProto::_Internal::graph(const ModelProto* msg) {
  return *msg->_impl_.graph_;
}
ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ModelProto)
}
ModelProto::ModelProto(const ModelProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ModelProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.opset_import_){from._impl_.opset_import_}
    , decltype(_impl_.metadata_props_){from._impl_.metadata_props_}
    , decltype(_impl_.producer_name_){}
    , decltype(_impl_.producer_version_){}
    , decltype(_impl_.domain_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.graph_){nullptr}
    , decltype(_impl_.ir_version_){}
    , decltype(_impl_.model_version_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.producer_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.producer_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_producer_name()) {
    _this->_impl_.producer_name_.Set(from._internal_producer_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.producer_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.producer_version_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_producer_version()) {
    _this->_impl_.producer_version_.Set(from._internal_producer_version(), 
      _this->GetArenaForAllocation());
  }
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    _this->_impl_.domain_.Set(from._internal_domain(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_graph()) {
    _this->_impl_.graph_ = new ::opencv_onnx::GraphProto(*from._impl_.graph_);
  }
  ::memcpy(&_impl_.ir_version_, &from._impl_.ir_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.model_version_) -
    reinterpret_cast<char*>(&_impl_.ir_version_)) + sizeof(_impl_.model_version_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
}

inline void ModelProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.opset_import_){arena}
    , decltype(_impl_.metadata_props_){arena}
    , decltype(_impl_.producer_name_){}
    , decltype(_impl_.producer_version_){}
    , decltype(_impl_.domain_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.graph_){nullptr}
    , decltype(_impl_.ir_version_){int64_t{0}}
    , decltype(_impl_.model_version_){int64_t{0}}
  };
  _impl_.producer_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.producer_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.producer_version_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.producer_version_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ModelProto::~ModelProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ModelProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.opset_import_.~RepeatedPtrField();
  _impl_.metadata_props_.~RepeatedPtrField();
  _impl_.producer_name_.Destroy();
  _impl_.producer_version_.Destroy();
  _impl_.domain_.Destroy();
  _impl_.doc_string_.Destroy();
  if (this != internal_default_instance()) delete _impl_.graph_;
}

void ModelProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ModelProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.opset_import_.Clear();
  _impl_.metadata_props_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.producer_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.producer_version_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.domain_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.graph_ != nullptr);
      _impl_.graph_->Clear();
    }
  }
  if (cached_has_bits & 0x00000060u) {
    ::memset(&_impl_.ir_version_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.model_version_) -
        reinterpret_cast<char*>(&_impl_.ir_version_)) + sizeof(_impl_.model_version_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ModelProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 ir_version = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_ir_version(&has_bits);
          _impl_.ir_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string producer_name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_producer_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string producer_version = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_producer_version();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_version");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string domain = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_domain();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ModelProto.domain");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional int64 model_version = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_model_version(&has_bits);
          _impl_.model_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.ModelProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.GraphProto graph = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_graph(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_opset_import(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ModelProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int64 ir_version = 1;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_ir_version(), target);
  }

  // optional string producer_name = 2;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_producer_name().data(), static_cast<int>(this->_internal_producer_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ModelProto.producer_name");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_producer_name(), target);
  }

  // optional string producer_version = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_producer_version().data(), static_cast<int>(this->_internal_producer_version().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ModelProto.producer_version");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_producer_version(), target);
  }

  // optional string domain = 4;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ModelProto.domain");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_domain(), target);
  }

  // optional int64 model_version = 5;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_model_version(), target);
  }

  // optional string doc_string = 6;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.ModelProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_doc_string(), target);
  }

  // optional .opencv_onnx.GraphProto graph = 7;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::graph(this),
        _Internal::graph(this).GetCachedSize(), target, stream);
  }

  // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_opset_import_size()); i < n; i++) {
    const auto& repfield = this->_internal_opset_import(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_metadata_props_size()); i < n; i++) {
    const auto& repfield = this->_internal_metadata_props(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto)
  return target;
}

size_t ModelProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto)
  size_t total_size = 0;

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

  // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
  total_size += 1UL * this->_internal_opset_import_size();
  for (const auto& msg : this->_impl_.opset_import_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
  total_size += 1UL * this->_internal_metadata_props_size();
  for (const auto& msg : this->_impl_.metadata_props_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional string producer_name = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_producer_name());
    }

    // optional string producer_version = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_producer_version());
    }

    // optional string domain = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_domain());
    }

    // optional string doc_string = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

    // optional .opencv_onnx.GraphProto graph = 7;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.graph_);
    }

    // optional int64 ir_version = 1;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_ir_version());
    }

    // optional int64 model_version = 5;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_model_version());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ModelProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelProto::GetClassData() const { return &_class_data_; }


void ModelProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ModelProto*>(&to_msg);
  auto& from = static_cast<const ModelProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.opset_import_.MergeFrom(from._impl_.opset_import_);
  _this->_impl_.metadata_props_.MergeFrom(from._impl_.metadata_props_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_producer_name(from._internal_producer_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_producer_version(from._internal_producer_version());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(
          from._internal_graph());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.ir_version_ = from._impl_.ir_version_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.model_version_ = from._impl_.model_version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool ModelProto::IsInitialized() const {
  return true;
}

void ModelProto::InternalSwap(ModelProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.opset_import_.InternalSwap(&other->_impl_.opset_import_);
  _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.producer_name_, lhs_arena,
      &other->_impl_.producer_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.producer_version_, lhs_arena,
      &other->_impl_.producer_version_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.domain_, lhs_arena,
      &other->_impl_.domain_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_)
      + sizeof(ModelProto::_impl_.model_version_)
      - PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.graph_)>(
          reinterpret_cast<char*>(&_impl_.graph_),
          reinterpret_cast<char*>(&other->_impl_.graph_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ModelProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[3]);
}

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

class StringStringEntryProto::_Internal {
 public:
  using HasBits = decltype(std::declval<StringStringEntryProto>()._impl_._has_bits_);
  static void set_has_key(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_value(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

StringStringEntryProto::StringStringEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.StringStringEntryProto)
}
StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  StringStringEntryProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.key_){}
    , decltype(_impl_.value_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.key_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.key_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_key()) {
    _this->_impl_.key_.Set(from._internal_key(), 
      _this->GetArenaForAllocation());
  }
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_value()) {
    _this->_impl_.value_.Set(from._internal_value(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
}

inline void StringStringEntryProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.key_){}
    , decltype(_impl_.value_){}
  };
  _impl_.key_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.key_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

StringStringEntryProto::~StringStringEntryProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void StringStringEntryProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.key_.Destroy();
  _impl_.value_.Destroy();
}

void StringStringEntryProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void StringStringEntryProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto)
  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) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.key_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.value_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* StringStringEntryProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string key = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_key();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.key");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_value();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.value");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* StringStringEntryProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string key = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_key().data(), static_cast<int>(this->_internal_key().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.StringStringEntryProto.key");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_key(), target);
  }

  // optional string value = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.StringStringEntryProto.value");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_value(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto)
  return target;
}

size_t StringStringEntryProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto)
  size_t total_size = 0;

  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) {
    // optional string key = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_key());
    }

    // optional string value = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_value());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StringStringEntryProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    StringStringEntryProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StringStringEntryProto::GetClassData() const { return &_class_data_; }


void StringStringEntryProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<StringStringEntryProto*>(&to_msg);
  auto& from = static_cast<const StringStringEntryProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto)
  GOOGLE_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) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_key(from._internal_key());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_value(from._internal_value());
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool StringStringEntryProto::IsInitialized() const {
  return true;
}

void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.key_, lhs_arena,
      &other->_impl_.key_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.value_, lhs_arena,
      &other->_impl_.value_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata StringStringEntryProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[4]);
}

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

class GraphProto::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphProto>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

GraphProto::GraphProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.GraphProto)
}
GraphProto::GraphProto(const GraphProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  GraphProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.node_){from._impl_.node_}
    , decltype(_impl_.initializer_){from._impl_.initializer_}
    , decltype(_impl_.input_){from._impl_.input_}
    , decltype(_impl_.output_){from._impl_.output_}
    , decltype(_impl_.value_info_){from._impl_.value_info_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.doc_string_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
}

inline void GraphProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.node_){arena}
    , decltype(_impl_.initializer_){arena}
    , decltype(_impl_.input_){arena}
    , decltype(_impl_.output_){arena}
    , decltype(_impl_.value_info_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.doc_string_){}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

GraphProto::~GraphProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GraphProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.node_.~RepeatedPtrField();
  _impl_.initializer_.~RepeatedPtrField();
  _impl_.input_.~RepeatedPtrField();
  _impl_.output_.~RepeatedPtrField();
  _impl_.value_info_.~RepeatedPtrField();
  _impl_.name_.Destroy();
  _impl_.doc_string_.Destroy();
}

void GraphProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GraphProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.node_.Clear();
  _impl_.initializer_.Clear();
  _impl_.input_.Clear();
  _impl_.output_.Clear();
  _impl_.value_info_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GraphProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .opencv_onnx.NodeProto node = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_node(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.GraphProto.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.TensorProto initializer = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_initializer(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.GraphProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.ValueInfoProto input = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_input(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.ValueInfoProto output = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_output(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.ValueInfoProto value_info = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_value_info(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* GraphProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .opencv_onnx.NodeProto node = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_node_size()); i < n; i++) {
    const auto& repfield = this->_internal_node(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 2;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.GraphProto.name");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_name(), target);
  }

  // repeated .opencv_onnx.TensorProto initializer = 5;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_initializer_size()); i < n; i++) {
    const auto& repfield = this->_internal_initializer(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional string doc_string = 10;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.GraphProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        10, this->_internal_doc_string(), target);
  }

  // repeated .opencv_onnx.ValueInfoProto input = 11;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_input_size()); i < n; i++) {
    const auto& repfield = this->_internal_input(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_onnx.ValueInfoProto output = 12;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_output_size()); i < n; i++) {
    const auto& repfield = this->_internal_output(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_onnx.ValueInfoProto value_info = 13;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_value_info_size()); i < n; i++) {
    const auto& repfield = this->_internal_value_info(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(13, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto)
  return target;
}

size_t GraphProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto)
  size_t total_size = 0;

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

  // repeated .opencv_onnx.NodeProto node = 1;
  total_size += 1UL * this->_internal_node_size();
  for (const auto& msg : this->_impl_.node_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.TensorProto initializer = 5;
  total_size += 1UL * this->_internal_initializer_size();
  for (const auto& msg : this->_impl_.initializer_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.ValueInfoProto input = 11;
  total_size += 1UL * this->_internal_input_size();
  for (const auto& msg : this->_impl_.input_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.ValueInfoProto output = 12;
  total_size += 1UL * this->_internal_output_size();
  for (const auto& msg : this->_impl_.output_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.ValueInfoProto value_info = 13;
  total_size += 1UL * this->_internal_value_info_size();
  for (const auto& msg : this->_impl_.value_info_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional string name = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional string doc_string = 10;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    GraphProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphProto::GetClassData() const { return &_class_data_; }


void GraphProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<GraphProto*>(&to_msg);
  auto& from = static_cast<const GraphProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.node_.MergeFrom(from._impl_.node_);
  _this->_impl_.initializer_.MergeFrom(from._impl_.initializer_);
  _this->_impl_.input_.MergeFrom(from._impl_.input_);
  _this->_impl_.output_.MergeFrom(from._impl_.output_);
  _this->_impl_.value_info_.MergeFrom(from._impl_.value_info_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool GraphProto::IsInitialized() const {
  return true;
}

void GraphProto::InternalSwap(GraphProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.node_.InternalSwap(&other->_impl_.node_);
  _impl_.initializer_.InternalSwap(&other->_impl_.initializer_);
  _impl_.input_.InternalSwap(&other->_impl_.input_);
  _impl_.output_.InternalSwap(&other->_impl_.output_);
  _impl_.value_info_.InternalSwap(&other->_impl_.value_info_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata GraphProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[5]);
}

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

class TensorProto_Segment::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorProto_Segment>()._impl_._has_bits_);
  static void set_has_begin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_end(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

TensorProto_Segment::TensorProto_Segment(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto.Segment)
}
TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TensorProto_Segment* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.begin_){}
    , decltype(_impl_.end_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.begin_, &from._impl_.begin_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
    reinterpret_cast<char*>(&_impl_.begin_)) + sizeof(_impl_.end_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
}

inline void TensorProto_Segment::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.begin_){int64_t{0}}
    , decltype(_impl_.end_){int64_t{0}}
  };
}

TensorProto_Segment::~TensorProto_Segment() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TensorProto_Segment::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void TensorProto_Segment::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TensorProto_Segment::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment)
  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) {
    ::memset(&_impl_.begin_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.end_) -
        reinterpret_cast<char*>(&_impl_.begin_)) + sizeof(_impl_.end_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TensorProto_Segment::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 begin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_begin(&has_bits);
          _impl_.begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 end = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_end(&has_bits);
          _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TensorProto_Segment::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int64 begin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_begin(), target);
  }

  // optional int64 end = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_end(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment)
  return target;
}

size_t TensorProto_Segment::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment)
  size_t total_size = 0;

  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) {
    // optional int64 begin = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_begin());
    }

    // optional int64 end = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_end());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto_Segment::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TensorProto_Segment::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto_Segment::GetClassData() const { return &_class_data_; }


void TensorProto_Segment::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TensorProto_Segment*>(&to_msg);
  auto& from = static_cast<const TensorProto_Segment&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment)
  GOOGLE_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) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.begin_ = from._impl_.begin_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.end_ = from._impl_.end_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TensorProto_Segment::IsInitialized() const {
  return true;
}

void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_)
      + sizeof(TensorProto_Segment::_impl_.end_)
      - PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_)>(
          reinterpret_cast<char*>(&_impl_.begin_),
          reinterpret_cast<char*>(&other->_impl_.begin_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TensorProto_Segment::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[6]);
}

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

class TensorProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorProto>()._impl_._has_bits_);
  static void set_has_data_type(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_onnx::TensorProto_Segment& segment(const TensorProto* msg);
  static void set_has_segment(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_doc_string(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_raw_data(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_onnx::TensorProto_Segment&
TensorProto::_Internal::segment(const TensorProto* msg) {
  return *msg->_impl_.segment_;
}
TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto)
}
TensorProto::TensorProto(const TensorProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TensorProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.dims_){from._impl_.dims_}
    , decltype(_impl_.float_data_){from._impl_.float_data_}
    , decltype(_impl_.int32_data_){from._impl_.int32_data_}
    , /*decltype(_impl_._int32_data_cached_byte_size_)*/{0}
    , decltype(_impl_.string_data_){from._impl_.string_data_}
    , decltype(_impl_.int64_data_){from._impl_.int64_data_}
    , /*decltype(_impl_._int64_data_cached_byte_size_)*/{0}
    , decltype(_impl_.double_data_){from._impl_.double_data_}
    , decltype(_impl_.uint64_data_){from._impl_.uint64_data_}
    , /*decltype(_impl_._uint64_data_cached_byte_size_)*/{0}
    , decltype(_impl_.name_){}
    , decltype(_impl_.raw_data_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.segment_){nullptr}
    , decltype(_impl_.data_type_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.raw_data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.raw_data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_raw_data()) {
    _this->_impl_.raw_data_.Set(from._internal_raw_data(), 
      _this->GetArenaForAllocation());
  }
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    _this->_impl_.doc_string_.Set(from._internal_doc_string(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_segment()) {
    _this->_impl_.segment_ = new ::opencv_onnx::TensorProto_Segment(*from._impl_.segment_);
  }
  _this->_impl_.data_type_ = from._impl_.data_type_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
}

inline void TensorProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.dims_){arena}
    , decltype(_impl_.float_data_){arena}
    , decltype(_impl_.int32_data_){arena}
    , /*decltype(_impl_._int32_data_cached_byte_size_)*/{0}
    , decltype(_impl_.string_data_){arena}
    , decltype(_impl_.int64_data_){arena}
    , /*decltype(_impl_._int64_data_cached_byte_size_)*/{0}
    , decltype(_impl_.double_data_){arena}
    , decltype(_impl_.uint64_data_){arena}
    , /*decltype(_impl_._uint64_data_cached_byte_size_)*/{0}
    , decltype(_impl_.name_){}
    , decltype(_impl_.raw_data_){}
    , decltype(_impl_.doc_string_){}
    , decltype(_impl_.segment_){nullptr}
    , decltype(_impl_.data_type_){0}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.raw_data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.raw_data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.doc_string_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.doc_string_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

TensorProto::~TensorProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TensorProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.dims_.~RepeatedField();
  _impl_.float_data_.~RepeatedField();
  _impl_.int32_data_.~RepeatedField();
  _impl_.string_data_.~RepeatedPtrField();
  _impl_.int64_data_.~RepeatedField();
  _impl_.double_data_.~RepeatedField();
  _impl_.uint64_data_.~RepeatedField();
  _impl_.name_.Destroy();
  _impl_.raw_data_.Destroy();
  _impl_.doc_string_.Destroy();
  if (this != internal_default_instance()) delete _impl_.segment_;
}

void TensorProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TensorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.dims_.Clear();
  _impl_.float_data_.Clear();
  _impl_.int32_data_.Clear();
  _impl_.string_data_.Clear();
  _impl_.int64_data_.Clear();
  _impl_.double_data_.Clear();
  _impl_.uint64_data_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.raw_data_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(_impl_.segment_ != nullptr);
      _impl_.segment_->Clear();
    }
  }
  _impl_.data_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TensorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated int64 dims = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_dims(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
        } else if (static_cast<uint8_t>(tag) == 10) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dims(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorProto.DataType data_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
            _internal_set_data_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorProto.Segment segment = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_segment(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float float_data = 4 [packed = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 37) {
          _internal_add_float_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 int32_data = 5 [packed = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_int32_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 40) {
          _internal_add_int32_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated bytes string_data = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_string_data();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated int64 int64_data = 7 [packed = true];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_int64_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 56) {
          _internal_add_int64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string name = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.TensorProto.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bytes raw_data = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          auto str = _internal_mutable_raw_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated double double_data = 10 [packed = true];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 81) {
          _internal_add_double_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // repeated uint64 uint64_data = 11 [packed = true];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_uint64_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 88) {
          _internal_add_uint64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.TensorProto.doc_string");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TensorProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int64 dims = 1;
  for (int i = 0, n = this->_internal_dims_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_dims(i), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_onnx.TensorProto.DataType data_type = 2;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      2, this->_internal_data_type(), target);
  }

  // optional .opencv_onnx.TensorProto.Segment segment = 3;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::segment(this),
        _Internal::segment(this).GetCachedSize(), target, stream);
  }

  // repeated float float_data = 4 [packed = true];
  if (this->_internal_float_data_size() > 0) {
    target = stream->WriteFixedPacked(4, _internal_float_data(), target);
  }

  // repeated int32 int32_data = 5 [packed = true];
  {
    int byte_size = _impl_._int32_data_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          5, _internal_int32_data(), byte_size, target);
    }
  }

  // repeated bytes string_data = 6;
  for (int i = 0, n = this->_internal_string_data_size(); i < n; i++) {
    const auto& s = this->_internal_string_data(i);
    target = stream->WriteBytes(6, s, target);
  }

  // repeated int64 int64_data = 7 [packed = true];
  {
    int byte_size = _impl_._int64_data_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt64Packed(
          7, _internal_int64_data(), byte_size, target);
    }
  }

  // optional string name = 8;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.TensorProto.name");
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_name(), target);
  }

  // optional bytes raw_data = 9;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        9, this->_internal_raw_data(), target);
  }

  // repeated double double_data = 10 [packed = true];
  if (this->_internal_double_data_size() > 0) {
    target = stream->WriteFixedPacked(10, _internal_double_data(), target);
  }

  // repeated uint64 uint64_data = 11 [packed = true];
  {
    int byte_size = _impl_._uint64_data_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteUInt64Packed(
          11, _internal_uint64_data(), byte_size, target);
    }
  }

  // optional string doc_string = 12;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.TensorProto.doc_string");
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_doc_string(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto)
  return target;
}

size_t TensorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto)
  size_t total_size = 0;

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

  // repeated int64 dims = 1;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int64Size(this->_impl_.dims_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_dims_size());
    total_size += data_size;
  }

  // repeated float float_data = 4 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_float_data_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated int32 int32_data = 5 [packed = true];
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.int32_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    int cached_size = ::_pbi::ToCachedSize(data_size);
    _impl_._int32_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated bytes string_data = 6;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.string_data_.size());
  for (int i = 0, n = _impl_.string_data_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
      _impl_.string_data_.Get(i));
  }

  // repeated int64 int64_data = 7 [packed = true];
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int64Size(this->_impl_.int64_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    int cached_size = ::_pbi::ToCachedSize(data_size);
    _impl_._int64_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated double double_data = 10 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_double_data_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated uint64 uint64_data = 11 [packed = true];
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt64Size(this->_impl_.uint64_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    int cached_size = ::_pbi::ToCachedSize(data_size);
    _impl_._uint64_data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional string name = 8;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional bytes raw_data = 9;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_raw_data());
    }

    // optional string doc_string = 12;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

    // optional .opencv_onnx.TensorProto.Segment segment = 3;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.segment_);
    }

    // optional .opencv_onnx.TensorProto.DataType data_type = 2;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_data_type());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TensorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto::GetClassData() const { return &_class_data_; }


void TensorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TensorProto*>(&to_msg);
  auto& from = static_cast<const TensorProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.dims_.MergeFrom(from._impl_.dims_);
  _this->_impl_.float_data_.MergeFrom(from._impl_.float_data_);
  _this->_impl_.int32_data_.MergeFrom(from._impl_.int32_data_);
  _this->_impl_.string_data_.MergeFrom(from._impl_.string_data_);
  _this->_impl_.int64_data_.MergeFrom(from._impl_.int64_data_);
  _this->_impl_.double_data_.MergeFrom(from._impl_.double_data_);
  _this->_impl_.uint64_data_.MergeFrom(from._impl_.uint64_data_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_raw_data(from._internal_raw_data());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(
          from._internal_segment());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.data_type_ = from._impl_.data_type_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool TensorProto::IsInitialized() const {
  return true;
}

void TensorProto::InternalSwap(TensorProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.dims_.InternalSwap(&other->_impl_.dims_);
  _impl_.float_data_.InternalSwap(&other->_impl_.float_data_);
  _impl_.int32_data_.InternalSwap(&other->_impl_.int32_data_);
  _impl_.string_data_.InternalSwap(&other->_impl_.string_data_);
  _impl_.int64_data_.InternalSwap(&other->_impl_.int64_data_);
  _impl_.double_data_.InternalSwap(&other->_impl_.double_data_);
  _impl_.uint64_data_.InternalSwap(&other->_impl_.uint64_data_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.raw_data_, lhs_arena,
      &other->_impl_.raw_data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.doc_string_, lhs_arena,
      &other->_impl_.doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_type_)
      + sizeof(TensorProto::_impl_.data_type_)
      - PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.segment_)>(
          reinterpret_cast<char*>(&_impl_.segment_),
          reinterpret_cast<char*>(&other->_impl_.segment_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[7]);
}

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

class TensorShapeProto_Dimension::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorShapeProto_Dimension>()._impl_._has_bits_);
  static void set_has_denotation(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

TensorShapeProto_Dimension::TensorShapeProto_Dimension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto.Dimension)
}
TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TensorShapeProto_Dimension* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.denotation_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.denotation_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.denotation_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_denotation()) {
    _this->_impl_.denotation_.Set(from._internal_denotation(), 
      _this->GetArenaForAllocation());
  }
  clear_has_value();
  switch (from.value_case()) {
    case kDimValue: {
      _this->_internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _this->_internal_set_dim_param(from._internal_dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension)
}

inline void TensorShapeProto_Dimension::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.denotation_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  _impl_.denotation_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.denotation_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  clear_has_value();
}

TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TensorShapeProto_Dimension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.denotation_.Destroy();
  if (has_value()) {
    clear_value();
  }
}

void TensorShapeProto_Dimension::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TensorShapeProto_Dimension::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension)
  switch (value_case()) {
    case kDimValue: {
      // No need to clear
      break;
    }
    case kDimParam: {
      _impl_.value_.dim_param_.Destroy();
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = VALUE_NOT_SET;
}


void TensorShapeProto_Dimension::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension)
  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) {
    _impl_.denotation_.ClearNonDefaultToEmpty();
  }
  clear_value();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 dim_value = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _internal_set_dim_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string dim_param = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_dim_param();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.dim_param");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string denotation = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_denotation();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.denotation");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TensorShapeProto_Dimension::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (value_case()) {
    case kDimValue: {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target);
      break;
    }
    case kDimParam: {
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_dim_param().data(), static_cast<int>(this->_internal_dim_param().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "opencv_onnx.TensorShapeProto.Dimension.dim_param");
      target = stream->WriteStringMaybeAliased(
          2, this->_internal_dim_param(), target);
      break;
    }
    default: ;
  }
  cached_has_bits = _impl_._has_bits_[0];
  // optional string denotation = 3;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.TensorShapeProto.Dimension.denotation");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_denotation(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension)
  return target;
}

size_t TensorShapeProto_Dimension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension)
  size_t total_size = 0;

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

  // optional string denotation = 3;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_denotation());
  }

  switch (value_case()) {
    // int64 dim_value = 1;
    case kDimValue: {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_dim_value());
      break;
    }
    // string dim_param = 2;
    case kDimParam: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dimension::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TensorShapeProto_Dimension::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dimension::GetClassData() const { return &_class_data_; }


void TensorShapeProto_Dimension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TensorShapeProto_Dimension*>(&to_msg);
  auto& from = static_cast<const TensorShapeProto_Dimension&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_denotation()) {
    _this->_internal_set_denotation(from._internal_denotation());
  }
  switch (from.value_case()) {
    case kDimValue: {
      _this->_internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _this->_internal_set_dim_param(from._internal_dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool TensorShapeProto_Dimension::IsInitialized() const {
  return true;
}

void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.denotation_, lhs_arena,
      &other->_impl_.denotation_, rhs_arena
  );
  swap(_impl_.value_, other->_impl_.value_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dimension::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[8]);
}

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

class TensorShapeProto::_Internal {
 public:
};

TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto)
}
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TensorShapeProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.dim_){from._impl_.dim_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
}

inline void TensorShapeProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.dim_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

TensorShapeProto::~TensorShapeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TensorShapeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.dim_.~RepeatedPtrField();
}

void TensorShapeProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TensorShapeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.dim_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TensorShapeProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_dim(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TensorShapeProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_dim_size()); i < n; i++) {
    const auto& repfield = this->_internal_dim(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto)
  return target;
}

size_t TensorShapeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.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;

  // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
  total_size += 1UL * this->_internal_dim_size();
  for (const auto& msg : this->_impl_.dim_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TensorShapeProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; }


void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TensorShapeProto*>(&to_msg);
  auto& from = static_cast<const TensorShapeProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.dim_.MergeFrom(from._impl_.dim_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool TensorShapeProto::IsInitialized() const {
  return true;
}

void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.dim_.InternalSwap(&other->_impl_.dim_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[9]);
}

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

class TypeProto_Tensor::_Internal {
 public:
  using HasBits = decltype(std::declval<TypeProto_Tensor>()._impl_._has_bits_);
  static void set_has_elem_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::opencv_onnx::TensorShapeProto& shape(const TypeProto_Tensor* msg);
  static void set_has_shape(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::opencv_onnx::TensorShapeProto&
TypeProto_Tensor::_Internal::shape(const TypeProto_Tensor* msg) {
  return *msg->_impl_.shape_;
}
TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Tensor)
}
TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TypeProto_Tensor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shape_){nullptr}
    , decltype(_impl_.elem_type_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    _this->_impl_.shape_ = new ::opencv_onnx::TensorShapeProto(*from._impl_.shape_);
  }
  _this->_impl_.elem_type_ = from._impl_.elem_type_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
}

inline void TypeProto_Tensor::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shape_){nullptr}
    , decltype(_impl_.elem_type_){0}
  };
}

TypeProto_Tensor::~TypeProto_Tensor() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TypeProto_Tensor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.shape_;
}

void TypeProto_Tensor::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TypeProto_Tensor::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor)
  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) {
    GOOGLE_DCHECK(_impl_.shape_ != nullptr);
    _impl_.shape_->Clear();
  }
  _impl_.elem_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
            _internal_set_elem_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorShapeProto shape = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TypeProto_Tensor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_elem_type(), target);
  }

  // optional .opencv_onnx.TensorShapeProto shape = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::shape(this),
        _Internal::shape(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor)
  return target;
}

size_t TypeProto_Tensor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor)
  size_t total_size = 0;

  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) {
    // optional .opencv_onnx.TensorShapeProto shape = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.shape_);
    }

    // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_elem_type());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto_Tensor::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TypeProto_Tensor::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto_Tensor::GetClassData() const { return &_class_data_; }


void TypeProto_Tensor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TypeProto_Tensor*>(&to_msg);
  auto& from = static_cast<const TypeProto_Tensor&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor)
  GOOGLE_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) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(
          from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.elem_type_ = from._impl_.elem_type_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TypeProto_Tensor::IsInitialized() const {
  return true;
}

void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_)
      + sizeof(TypeProto_Tensor::_impl_.elem_type_)
      - PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.shape_)>(
          reinterpret_cast<char*>(&_impl_.shape_),
          reinterpret_cast<char*>(&other->_impl_.shape_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TypeProto_Tensor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[10]);
}

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

class TypeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TypeProto>()._impl_._has_bits_);
  static const ::opencv_onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg);
  static void set_has_denotation(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::opencv_onnx::TypeProto_Tensor&
TypeProto::_Internal::tensor_type(const TypeProto* msg) {
  return *msg->_impl_.value_.tensor_type_;
}
void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_value();
  if (tensor_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tensor_type);
    if (message_arena != submessage_arena) {
      tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, tensor_type, submessage_arena);
    }
    set_has_tensor_type();
    _impl_.value_.tensor_type_ = tensor_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
}
TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto)
}
TypeProto::TypeProto(const TypeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TypeProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.denotation_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.denotation_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.denotation_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_denotation()) {
    _this->_impl_.denotation_.Set(from._internal_denotation(), 
      _this->GetArenaForAllocation());
  }
  clear_has_value();
  switch (from.value_case()) {
    case kTensorType: {
      _this->_internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(
          from._internal_tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
}

inline void TypeProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.denotation_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  _impl_.denotation_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.denotation_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  clear_has_value();
}

TypeProto::~TypeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TypeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.denotation_.Destroy();
  if (has_value()) {
    clear_value();
  }
}

void TypeProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TypeProto::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto)
  switch (value_case()) {
    case kTensorType: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.value_.tensor_type_;
      }
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = VALUE_NOT_SET;
}


void TypeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto)
  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) {
    _impl_.denotation_.ClearNonDefaultToEmpty();
  }
  clear_value();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TypeProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_tensor_type(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string denotation = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_denotation();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.TypeProto.denotation");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TypeProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
  if (_internal_has_tensor_type()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::tensor_type(this),
        _Internal::tensor_type(this).GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional string denotation = 6;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.TypeProto.denotation");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_denotation(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto)
  return target;
}

size_t TypeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto)
  size_t total_size = 0;

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

  // optional string denotation = 6;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_denotation());
  }

  switch (value_case()) {
    // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
    case kTensorType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.value_.tensor_type_);
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TypeProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto::GetClassData() const { return &_class_data_; }


void TypeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TypeProto*>(&to_msg);
  auto& from = static_cast<const TypeProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_denotation()) {
    _this->_internal_set_denotation(from._internal_denotation());
  }
  switch (from.value_case()) {
    case kTensorType: {
      _this->_internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(
          from._internal_tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool TypeProto::IsInitialized() const {
  return true;
}

void TypeProto::InternalSwap(TypeProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.denotation_, lhs_arena,
      &other->_impl_.denotation_, rhs_arena
  );
  swap(_impl_.value_, other->_impl_.value_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata TypeProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[11]);
}

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

class OperatorSetIdProto::_Internal {
 public:
  using HasBits = decltype(std::declval<OperatorSetIdProto>()._impl_._has_bits_);
  static void set_has_domain(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

OperatorSetIdProto::OperatorSetIdProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.OperatorSetIdProto)
}
OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  OperatorSetIdProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.domain_){}
    , decltype(_impl_.version_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    _this->_impl_.domain_.Set(from._internal_domain(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.version_ = from._impl_.version_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
}

inline void OperatorSetIdProto::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.domain_){}
    , decltype(_impl_.version_){int64_t{0}}
  };
  _impl_.domain_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.domain_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

OperatorSetIdProto::~OperatorSetIdProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void OperatorSetIdProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.domain_.Destroy();
}

void OperatorSetIdProto::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void OperatorSetIdProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto)
  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) {
    _impl_.domain_.ClearNonDefaultToEmpty();
  }
  _impl_.version_ = int64_t{0};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string domain = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_domain();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_onnx.OperatorSetIdProto.domain");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional int64 version = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_version(&has_bits);
          _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* OperatorSetIdProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string domain = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_onnx.OperatorSetIdProto.domain");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_domain(), target);
  }

  // optional int64 version = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_version(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto)
  return target;
}

size_t OperatorSetIdProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto)
  size_t total_size = 0;

  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) {
    // optional string domain = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_domain());
    }

    // optional int64 version = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_version());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OperatorSetIdProto::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    OperatorSetIdProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OperatorSetIdProto::GetClassData() const { return &_class_data_; }


void OperatorSetIdProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<OperatorSetIdProto*>(&to_msg);
  auto& from = static_cast<const OperatorSetIdProto&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto)
  GOOGLE_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) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.version_ = from._impl_.version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool OperatorSetIdProto::IsInitialized() const {
  return true;
}

void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.domain_, lhs_arena,
      &other->_impl_.domain_, rhs_arena
  );
  swap(_impl_.version_, other->_impl_.version_);
}

::PROTOBUF_NAMESPACE_ID::Metadata OperatorSetIdProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
      file_level_metadata_opencv_2donnx_2eproto[12]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace opencv_onnx
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_onnx::AttributeProto*
Arena::CreateMaybeMessage< ::opencv_onnx::AttributeProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::AttributeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::ValueInfoProto*
Arena::CreateMaybeMessage< ::opencv_onnx::ValueInfoProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::ValueInfoProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeProto*
Arena::CreateMaybeMessage< ::opencv_onnx::NodeProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::NodeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::ModelProto*
Arena::CreateMaybeMessage< ::opencv_onnx::ModelProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::ModelProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::StringStringEntryProto*
Arena::CreateMaybeMessage< ::opencv_onnx::StringStringEntryProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::StringStringEntryProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::GraphProto*
Arena::CreateMaybeMessage< ::opencv_onnx::GraphProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::GraphProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto_Segment*
Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto_Segment >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto_Segment >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto*
Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto_Dimension*
Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto_Dimension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto_Dimension >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto*
Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Tensor*
Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Tensor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Tensor >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto*
Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::OperatorSetIdProto*
Arena::CreateMaybeMessage< ::opencv_onnx::OperatorSetIdProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::OperatorSetIdProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
