// 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/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_onnx {
constexpr AttributeProto::AttributeProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : floats_()
  , ints_()
  , strings_()
  , tensors_()
  , graphs_()
  , type_protos_()
  , sparse_tensors_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , s_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , ref_attr_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , t_(nullptr)
  , g_(nullptr)
  , tp_(nullptr)
  , sparse_tensor_(nullptr)
  , i_(int64_t{0})
  , f_(0)
  , type_(0)
{}
struct AttributeProtoDefaultTypeInternal {
  constexpr AttributeProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AttributeProtoDefaultTypeInternal() {}
  union {
    AttributeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_;
constexpr ValueInfoProto::ValueInfoProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : metadata_props_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , type_(nullptr){}
struct ValueInfoProtoDefaultTypeInternal {
  constexpr ValueInfoProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ValueInfoProtoDefaultTypeInternal() {}
  union {
    ValueInfoProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_;
constexpr NodeProto::NodeProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : input_()
  , output_()
  , attribute_()
  , metadata_props_()
  , device_configurations_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , op_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , overload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct NodeProtoDefaultTypeInternal {
  constexpr NodeProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NodeProtoDefaultTypeInternal() {}
  union {
    NodeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeProtoDefaultTypeInternal _NodeProto_default_instance_;
constexpr IntIntListEntryProto::IntIntListEntryProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : value_()
  , key_(int64_t{0}){}
struct IntIntListEntryProtoDefaultTypeInternal {
  constexpr IntIntListEntryProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~IntIntListEntryProtoDefaultTypeInternal() {}
  union {
    IntIntListEntryProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IntIntListEntryProtoDefaultTypeInternal _IntIntListEntryProto_default_instance_;
constexpr NodeDeviceConfigurationProto::NodeDeviceConfigurationProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : sharding_spec_()
  , configuration_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , pipeline_stage_(0){}
struct NodeDeviceConfigurationProtoDefaultTypeInternal {
  constexpr NodeDeviceConfigurationProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NodeDeviceConfigurationProtoDefaultTypeInternal() {}
  union {
    NodeDeviceConfigurationProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDeviceConfigurationProtoDefaultTypeInternal _NodeDeviceConfigurationProto_default_instance_;
constexpr ShardingSpecProto::ShardingSpecProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : device_()
  , index_to_device_group_map_()
  , sharded_dim_()
  , tensor_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct ShardingSpecProtoDefaultTypeInternal {
  constexpr ShardingSpecProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ShardingSpecProtoDefaultTypeInternal() {}
  union {
    ShardingSpecProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ShardingSpecProtoDefaultTypeInternal _ShardingSpecProto_default_instance_;
constexpr ShardedDimProto::ShardedDimProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : simple_sharding_()
  , axis_(int64_t{0}){}
struct ShardedDimProtoDefaultTypeInternal {
  constexpr ShardedDimProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ShardedDimProtoDefaultTypeInternal() {}
  union {
    ShardedDimProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ShardedDimProtoDefaultTypeInternal _ShardedDimProto_default_instance_;
constexpr SimpleShardedDimProto::SimpleShardedDimProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : num_shards_(int64_t{0})
  , _oneof_case_{}{}
struct SimpleShardedDimProtoDefaultTypeInternal {
  constexpr SimpleShardedDimProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleShardedDimProtoDefaultTypeInternal() {}
  union {
    SimpleShardedDimProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleShardedDimProtoDefaultTypeInternal _SimpleShardedDimProto_default_instance_;
constexpr TrainingInfoProto::TrainingInfoProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : initialization_binding_()
  , update_binding_()
  , initialization_(nullptr)
  , algorithm_(nullptr){}
struct TrainingInfoProtoDefaultTypeInternal {
  constexpr TrainingInfoProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TrainingInfoProtoDefaultTypeInternal() {}
  union {
    TrainingInfoProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TrainingInfoProtoDefaultTypeInternal _TrainingInfoProto_default_instance_;
constexpr ModelProto::ModelProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : opset_import_()
  , metadata_props_()
  , training_info_()
  , functions_()
  , configuration_()
  , producer_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , producer_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , graph_(nullptr)
  , ir_version_(int64_t{0})
  , model_version_(int64_t{0}){}
struct ModelProtoDefaultTypeInternal {
  constexpr ModelProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ModelProtoDefaultTypeInternal() {}
  union {
    ModelProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ModelProtoDefaultTypeInternal _ModelProto_default_instance_;
constexpr DeviceConfigurationProto::DeviceConfigurationProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : device_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , num_devices_(0){}
struct DeviceConfigurationProtoDefaultTypeInternal {
  constexpr DeviceConfigurationProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DeviceConfigurationProtoDefaultTypeInternal() {}
  union {
    DeviceConfigurationProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceConfigurationProtoDefaultTypeInternal _DeviceConfigurationProto_default_instance_;
constexpr StringStringEntryProto::StringStringEntryProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , value_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct StringStringEntryProtoDefaultTypeInternal {
  constexpr StringStringEntryProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~StringStringEntryProtoDefaultTypeInternal() {}
  union {
    StringStringEntryProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_;
constexpr TensorAnnotation::TensorAnnotation(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : quant_parameter_tensor_names_()
  , tensor_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct TensorAnnotationDefaultTypeInternal {
  constexpr TensorAnnotationDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TensorAnnotationDefaultTypeInternal() {}
  union {
    TensorAnnotation _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorAnnotationDefaultTypeInternal _TensorAnnotation_default_instance_;
constexpr GraphProto::GraphProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : node_()
  , initializer_()
  , input_()
  , output_()
  , value_info_()
  , quantization_annotation_()
  , sparse_initializer_()
  , metadata_props_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct GraphProtoDefaultTypeInternal {
  constexpr GraphProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GraphProtoDefaultTypeInternal() {}
  union {
    GraphProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphProtoDefaultTypeInternal _GraphProto_default_instance_;
constexpr TensorProto_Segment::TensorProto_Segment(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : begin_(int64_t{0})
  , end_(int64_t{0}){}
struct TensorProto_SegmentDefaultTypeInternal {
  constexpr TensorProto_SegmentDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TensorProto_SegmentDefaultTypeInternal() {}
  union {
    TensorProto_Segment _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_;
constexpr TensorProto::TensorProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : dims_()
  , float_data_()
  , int32_data_()
  , _int32_data_cached_byte_size_(0)
  , string_data_()
  , int64_data_()
  , _int64_data_cached_byte_size_(0)
  , double_data_()
  , uint64_data_()
  , _uint64_data_cached_byte_size_(0)
  , external_data_()
  , metadata_props_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , raw_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , segment_(nullptr)
  , data_type_(0)
  , data_location_(0)
{}
struct TensorProtoDefaultTypeInternal {
  constexpr TensorProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TensorProtoDefaultTypeInternal() {}
  union {
    TensorProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProtoDefaultTypeInternal _TensorProto_default_instance_;
constexpr SparseTensorProto::SparseTensorProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : dims_()
  , values_(nullptr)
  , indices_(nullptr){}
struct SparseTensorProtoDefaultTypeInternal {
  constexpr SparseTensorProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SparseTensorProtoDefaultTypeInternal() {}
  union {
    SparseTensorProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SparseTensorProtoDefaultTypeInternal _SparseTensorProto_default_instance_;
constexpr TensorShapeProto_Dimension::TensorShapeProto_Dimension(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , _oneof_case_{}{}
struct TensorShapeProto_DimensionDefaultTypeInternal {
  constexpr TensorShapeProto_DimensionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TensorShapeProto_DimensionDefaultTypeInternal() {}
  union {
    TensorShapeProto_Dimension _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_;
constexpr TensorShapeProto::TensorShapeProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : dim_(){}
struct TensorShapeProtoDefaultTypeInternal {
  constexpr TensorShapeProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TensorShapeProtoDefaultTypeInternal() {}
  union {
    TensorShapeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
constexpr TypeProto_Tensor::TypeProto_Tensor(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shape_(nullptr)
  , elem_type_(0){}
struct TypeProto_TensorDefaultTypeInternal {
  constexpr TypeProto_TensorDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProto_TensorDefaultTypeInternal() {}
  union {
    TypeProto_Tensor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_;
constexpr TypeProto_Sequence::TypeProto_Sequence(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : elem_type_(nullptr){}
struct TypeProto_SequenceDefaultTypeInternal {
  constexpr TypeProto_SequenceDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProto_SequenceDefaultTypeInternal() {}
  union {
    TypeProto_Sequence _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_SequenceDefaultTypeInternal _TypeProto_Sequence_default_instance_;
constexpr TypeProto_Map::TypeProto_Map(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : value_type_(nullptr)
  , key_type_(0){}
struct TypeProto_MapDefaultTypeInternal {
  constexpr TypeProto_MapDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProto_MapDefaultTypeInternal() {}
  union {
    TypeProto_Map _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_MapDefaultTypeInternal _TypeProto_Map_default_instance_;
constexpr TypeProto_Optional::TypeProto_Optional(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : elem_type_(nullptr){}
struct TypeProto_OptionalDefaultTypeInternal {
  constexpr TypeProto_OptionalDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProto_OptionalDefaultTypeInternal() {}
  union {
    TypeProto_Optional _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_OptionalDefaultTypeInternal _TypeProto_Optional_default_instance_;
constexpr TypeProto_SparseTensor::TypeProto_SparseTensor(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shape_(nullptr)
  , elem_type_(0){}
struct TypeProto_SparseTensorDefaultTypeInternal {
  constexpr TypeProto_SparseTensorDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProto_SparseTensorDefaultTypeInternal() {}
  union {
    TypeProto_SparseTensor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_SparseTensorDefaultTypeInternal _TypeProto_SparseTensor_default_instance_;
constexpr TypeProto::TypeProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , _oneof_case_{}{}
struct TypeProtoDefaultTypeInternal {
  constexpr TypeProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TypeProtoDefaultTypeInternal() {}
  union {
    TypeProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProtoDefaultTypeInternal _TypeProto_default_instance_;
constexpr OperatorSetIdProto::OperatorSetIdProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , version_(int64_t{0}){}
struct OperatorSetIdProtoDefaultTypeInternal {
  constexpr OperatorSetIdProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~OperatorSetIdProtoDefaultTypeInternal() {}
  union {
    OperatorSetIdProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_;
constexpr FunctionProto::FunctionProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : input_()
  , output_()
  , attribute_()
  , node_()
  , opset_import_()
  , attribute_proto_()
  , value_info_()
  , metadata_props_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , overload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct FunctionProtoDefaultTypeInternal {
  constexpr FunctionProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~FunctionProtoDefaultTypeInternal() {}
  union {
    FunctionProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionProtoDefaultTypeInternal _FunctionProto_default_instance_;
}  // namespace opencv_onnx
namespace opencv_onnx {
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:
    case 11:
    case 12:
    case 13:
    case 14:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> AttributeProto_AttributeType_strings[15] = {};

static const char AttributeProto_AttributeType_names[] =
  "FLOAT"
  "FLOATS"
  "GRAPH"
  "GRAPHS"
  "INT"
  "INTS"
  "SPARSE_TENSOR"
  "SPARSE_TENSORS"
  "STRING"
  "STRINGS"
  "TENSOR"
  "TENSORS"
  "TYPE_PROTO"
  "TYPE_PROTOS"
  "UNDEFINED";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AttributeProto_AttributeType_entries[] = {
  { {AttributeProto_AttributeType_names + 0, 5}, 1 },
  { {AttributeProto_AttributeType_names + 5, 6}, 6 },
  { {AttributeProto_AttributeType_names + 11, 5}, 5 },
  { {AttributeProto_AttributeType_names + 16, 6}, 10 },
  { {AttributeProto_AttributeType_names + 22, 3}, 2 },
  { {AttributeProto_AttributeType_names + 25, 4}, 7 },
  { {AttributeProto_AttributeType_names + 29, 13}, 11 },
  { {AttributeProto_AttributeType_names + 42, 14}, 12 },
  { {AttributeProto_AttributeType_names + 56, 6}, 3 },
  { {AttributeProto_AttributeType_names + 62, 7}, 8 },
  { {AttributeProto_AttributeType_names + 69, 6}, 4 },
  { {AttributeProto_AttributeType_names + 75, 7}, 9 },
  { {AttributeProto_AttributeType_names + 82, 10}, 13 },
  { {AttributeProto_AttributeType_names + 92, 11}, 14 },
  { {AttributeProto_AttributeType_names + 103, 9}, 0 },
};

static const int AttributeProto_AttributeType_entries_by_number[] = {
  14, // 0 -> UNDEFINED
  0, // 1 -> FLOAT
  4, // 2 -> INT
  8, // 3 -> STRING
  10, // 4 -> TENSOR
  2, // 5 -> GRAPH
  1, // 6 -> FLOATS
  5, // 7 -> INTS
  9, // 8 -> STRINGS
  11, // 9 -> TENSORS
  3, // 10 -> GRAPHS
  6, // 11 -> SPARSE_TENSOR
  7, // 12 -> SPARSE_TENSORS
  12, // 13 -> TYPE_PROTO
  13, // 14 -> TYPE_PROTOS
};

const std::string& AttributeProto_AttributeType_Name(
    AttributeProto_AttributeType value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          AttributeProto_AttributeType_entries,
          AttributeProto_AttributeType_entries_by_number,
          15, AttributeProto_AttributeType_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      AttributeProto_AttributeType_entries,
      AttributeProto_AttributeType_entries_by_number,
      15, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     AttributeProto_AttributeType_strings[idx].get();
}
bool AttributeProto_AttributeType_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttributeProto_AttributeType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      AttributeProto_AttributeType_entries, 15, name, &int_value);
  if (success) {
    *value = static_cast<AttributeProto_AttributeType>(int_value);
  }
  return success;
}
#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::SPARSE_TENSOR;
constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTO;
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::SPARSE_TENSORS;
constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTOS;
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))
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:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TensorProto_DataType_strings[24] = {};

static const char TensorProto_DataType_names[] =
  "BFLOAT16"
  "BOOL"
  "COMPLEX128"
  "COMPLEX64"
  "DOUBLE"
  "FLOAT"
  "FLOAT16"
  "FLOAT4E2M1"
  "FLOAT8E4M3FN"
  "FLOAT8E4M3FNUZ"
  "FLOAT8E5M2"
  "FLOAT8E5M2FNUZ"
  "INT16"
  "INT32"
  "INT4"
  "INT64"
  "INT8"
  "STRING"
  "UINT16"
  "UINT32"
  "UINT4"
  "UINT64"
  "UINT8"
  "UNDEFINED";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TensorProto_DataType_entries[] = {
  { {TensorProto_DataType_names + 0, 8}, 16 },
  { {TensorProto_DataType_names + 8, 4}, 9 },
  { {TensorProto_DataType_names + 12, 10}, 15 },
  { {TensorProto_DataType_names + 22, 9}, 14 },
  { {TensorProto_DataType_names + 31, 6}, 11 },
  { {TensorProto_DataType_names + 37, 5}, 1 },
  { {TensorProto_DataType_names + 42, 7}, 10 },
  { {TensorProto_DataType_names + 49, 10}, 23 },
  { {TensorProto_DataType_names + 59, 12}, 17 },
  { {TensorProto_DataType_names + 71, 14}, 18 },
  { {TensorProto_DataType_names + 85, 10}, 19 },
  { {TensorProto_DataType_names + 95, 14}, 20 },
  { {TensorProto_DataType_names + 109, 5}, 5 },
  { {TensorProto_DataType_names + 114, 5}, 6 },
  { {TensorProto_DataType_names + 119, 4}, 22 },
  { {TensorProto_DataType_names + 123, 5}, 7 },
  { {TensorProto_DataType_names + 128, 4}, 3 },
  { {TensorProto_DataType_names + 132, 6}, 8 },
  { {TensorProto_DataType_names + 138, 6}, 4 },
  { {TensorProto_DataType_names + 144, 6}, 12 },
  { {TensorProto_DataType_names + 150, 5}, 21 },
  { {TensorProto_DataType_names + 155, 6}, 13 },
  { {TensorProto_DataType_names + 161, 5}, 2 },
  { {TensorProto_DataType_names + 166, 9}, 0 },
};

static const int TensorProto_DataType_entries_by_number[] = {
  23, // 0 -> UNDEFINED
  5, // 1 -> FLOAT
  22, // 2 -> UINT8
  16, // 3 -> INT8
  18, // 4 -> UINT16
  12, // 5 -> INT16
  13, // 6 -> INT32
  15, // 7 -> INT64
  17, // 8 -> STRING
  1, // 9 -> BOOL
  6, // 10 -> FLOAT16
  4, // 11 -> DOUBLE
  19, // 12 -> UINT32
  21, // 13 -> UINT64
  3, // 14 -> COMPLEX64
  2, // 15 -> COMPLEX128
  0, // 16 -> BFLOAT16
  8, // 17 -> FLOAT8E4M3FN
  9, // 18 -> FLOAT8E4M3FNUZ
  10, // 19 -> FLOAT8E5M2
  11, // 20 -> FLOAT8E5M2FNUZ
  20, // 21 -> UINT4
  14, // 22 -> INT4
  7, // 23 -> FLOAT4E2M1
};

const std::string& TensorProto_DataType_Name(
    TensorProto_DataType value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          TensorProto_DataType_entries,
          TensorProto_DataType_entries_by_number,
          24, TensorProto_DataType_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      TensorProto_DataType_entries,
      TensorProto_DataType_entries_by_number,
      24, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     TensorProto_DataType_strings[idx].get();
}
bool TensorProto_DataType_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      TensorProto_DataType_entries, 24, name, &int_value);
  if (success) {
    *value = static_cast<TensorProto_DataType>(int_value);
  }
  return success;
}
#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::BFLOAT16;
constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FN;
constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FNUZ;
constexpr TensorProto_DataType TensorProto::FLOAT8E5M2;
constexpr TensorProto_DataType TensorProto::FLOAT8E5M2FNUZ;
constexpr TensorProto_DataType TensorProto::UINT4;
constexpr TensorProto_DataType TensorProto::INT4;
constexpr TensorProto_DataType TensorProto::FLOAT4E2M1;
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))
bool TensorProto_DataLocation_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TensorProto_DataLocation_strings[2] = {};

static const char TensorProto_DataLocation_names[] =
  "DEFAULT"
  "EXTERNAL";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TensorProto_DataLocation_entries[] = {
  { {TensorProto_DataLocation_names + 0, 7}, 0 },
  { {TensorProto_DataLocation_names + 7, 8}, 1 },
};

static const int TensorProto_DataLocation_entries_by_number[] = {
  0, // 0 -> DEFAULT
  1, // 1 -> EXTERNAL
};

const std::string& TensorProto_DataLocation_Name(
    TensorProto_DataLocation value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          TensorProto_DataLocation_entries,
          TensorProto_DataLocation_entries_by_number,
          2, TensorProto_DataLocation_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      TensorProto_DataLocation_entries,
      TensorProto_DataLocation_entries_by_number,
      2, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     TensorProto_DataLocation_strings[idx].get();
}
bool TensorProto_DataLocation_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataLocation* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      TensorProto_DataLocation_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<TensorProto_DataLocation>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr TensorProto_DataLocation TensorProto::DEFAULT;
constexpr TensorProto_DataLocation TensorProto::EXTERNAL;
constexpr TensorProto_DataLocation TensorProto::DataLocation_MIN;
constexpr TensorProto_DataLocation TensorProto::DataLocation_MAX;
constexpr int TensorProto::DataLocation_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Version_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:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Version_strings[12] = {};

static const char Version_names[] =
  "IR_VERSION"
  "IR_VERSION_2017_10_10"
  "IR_VERSION_2017_10_30"
  "IR_VERSION_2017_11_3"
  "IR_VERSION_2019_1_22"
  "IR_VERSION_2019_3_18"
  "IR_VERSION_2019_9_19"
  "IR_VERSION_2020_5_8"
  "IR_VERSION_2021_7_30"
  "IR_VERSION_2023_5_5"
  "IR_VERSION_2024_3_25"
  "_START_VERSION";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Version_entries[] = {
  { {Version_names + 0, 10}, 11 },
  { {Version_names + 10, 21}, 1 },
  { {Version_names + 31, 21}, 2 },
  { {Version_names + 52, 20}, 3 },
  { {Version_names + 72, 20}, 4 },
  { {Version_names + 92, 20}, 5 },
  { {Version_names + 112, 20}, 6 },
  { {Version_names + 132, 19}, 7 },
  { {Version_names + 151, 20}, 8 },
  { {Version_names + 171, 19}, 9 },
  { {Version_names + 190, 20}, 10 },
  { {Version_names + 210, 14}, 0 },
};

static const int Version_entries_by_number[] = {
  11, // 0 -> _START_VERSION
  1, // 1 -> IR_VERSION_2017_10_10
  2, // 2 -> IR_VERSION_2017_10_30
  3, // 3 -> IR_VERSION_2017_11_3
  4, // 4 -> IR_VERSION_2019_1_22
  5, // 5 -> IR_VERSION_2019_3_18
  6, // 6 -> IR_VERSION_2019_9_19
  7, // 7 -> IR_VERSION_2020_5_8
  8, // 8 -> IR_VERSION_2021_7_30
  9, // 9 -> IR_VERSION_2023_5_5
  10, // 10 -> IR_VERSION_2024_3_25
  0, // 11 -> IR_VERSION
};

const std::string& Version_Name(
    Version value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Version_entries,
          Version_entries_by_number,
          12, Version_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Version_entries,
      Version_entries_by_number,
      12, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     Version_strings[idx].get();
}
bool Version_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Version* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Version_entries, 12, name, &int_value);
  if (success) {
    *value = static_cast<Version>(int_value);
  }
  return success;
}
bool OperatorStatus_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OperatorStatus_strings[2] = {};

static const char OperatorStatus_names[] =
  "EXPERIMENTAL"
  "STABLE";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OperatorStatus_entries[] = {
  { {OperatorStatus_names + 0, 12}, 0 },
  { {OperatorStatus_names + 12, 6}, 1 },
};

static const int OperatorStatus_entries_by_number[] = {
  0, // 0 -> EXPERIMENTAL
  1, // 1 -> STABLE
};

const std::string& OperatorStatus_Name(
    OperatorStatus value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          OperatorStatus_entries,
          OperatorStatus_entries_by_number,
          2, OperatorStatus_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      OperatorStatus_entries,
      OperatorStatus_entries_by_number,
      2, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     OperatorStatus_strings[idx].get();
}
bool OperatorStatus_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OperatorStatus* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      OperatorStatus_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<OperatorStatus>(int_value);
  }
  return success;
}

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

class AttributeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<AttributeProto>()._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] |= 1024u;
  }
  static void set_has_f(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_i(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  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;
  }
  static const ::opencv_onnx::SparseTensorProto& sparse_tensor(const AttributeProto* msg);
  static void set_has_sparse_tensor(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::opencv_onnx::TypeProto& tp(const AttributeProto* msg);
  static void set_has_tp(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

const ::opencv_onnx::TensorProto&
AttributeProto::_Internal::t(const AttributeProto* msg) {
  return *msg->t_;
}
const ::opencv_onnx::GraphProto&
AttributeProto::_Internal::g(const AttributeProto* msg) {
  return *msg->g_;
}
const ::opencv_onnx::SparseTensorProto&
AttributeProto::_Internal::sparse_tensor(const AttributeProto* msg) {
  return *msg->sparse_tensor_;
}
const ::opencv_onnx::TypeProto&
AttributeProto::_Internal::tp(const AttributeProto* msg) {
  return *msg->tp_;
}
AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  floats_(arena),
  ints_(arena),
  strings_(arena),
  tensors_(arena),
  graphs_(arena),
  type_protos_(arena),
  sparse_tensors_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.AttributeProto)
}
AttributeProto::AttributeProto(const AttributeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      floats_(from.floats_),
      ints_(from.ints_),
      strings_(from.strings_),
      tensors_(from.tensors_),
      graphs_(from.graphs_),
      type_protos_(from.type_protos_),
      sparse_tensors_(from.sparse_tensors_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_s()) {
    s_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_s(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_ref_attr_name()) {
    ref_attr_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ref_attr_name(),
      GetArenaForAllocation());
  }
  if (from._internal_has_t()) {
    t_ = new ::opencv_onnx::TensorProto(*from.t_);
  } else {
    t_ = nullptr;
  }
  if (from._internal_has_g()) {
    g_ = new ::opencv_onnx::GraphProto(*from.g_);
  } else {
    g_ = nullptr;
  }
  if (from._internal_has_tp()) {
    tp_ = new ::opencv_onnx::TypeProto(*from.tp_);
  } else {
    tp_ = nullptr;
  }
  if (from._internal_has_sparse_tensor()) {
    sparse_tensor_ = new ::opencv_onnx::SparseTensorProto(*from.sparse_tensor_);
  } else {
    sparse_tensor_ = nullptr;
  }
  ::memcpy(&i_, &from.i_,
    static_cast<size_t>(reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&i_)) + sizeof(type_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
}

inline void AttributeProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&t_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&t_)) + sizeof(type_));
}

AttributeProto::~AttributeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void AttributeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  s_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ref_attr_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete t_;
  if (this != internal_default_instance()) delete g_;
  if (this != internal_default_instance()) delete tp_;
  if (this != internal_default_instance()) delete sparse_tensor_;
}

void AttributeProto::ArenaDtor(void* object) {
  AttributeProto* _this = reinterpret_cast< AttributeProto* >(object);
  (void)_this;
}
void AttributeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AttributeProto::SetCachedSize(int size) const {
  _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;

  floats_.Clear();
  ints_.Clear();
  strings_.Clear();
  tensors_.Clear();
  graphs_.Clear();
  type_protos_.Clear();
  sparse_tensors_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      s_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      ref_attr_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(t_ != nullptr);
      t_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(g_ != nullptr);
      g_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(tp_ != nullptr);
      tp_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(sparse_tensor_ != nullptr);
      sparse_tensor_->Clear();
    }
  }
  if (cached_has_bits & 0x00000700u) {
    ::memset(&i_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&type_) -
        reinterpret_cast<char*>(&i_)) + sizeof(type_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TypeProto tp = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_tp(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.TypeProto type_protos = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_type_protos(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_sparse_tensor(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23;
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_sparse_tensors(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<186>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

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

  // optional int64 i = 3;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::t(this), target, stream);
  }

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

  // repeated float floats = 7;
  for (int i = 0, n = this->_internal_floats_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 int i = 0,
      n = static_cast<unsigned int>(this->_internal_tensors_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, this->_internal_tensors(i), target, stream);
  }

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

  // optional string doc_string = 13;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_doc_string(), target);
  }

  // optional .opencv_onnx.TypeProto tp = 14;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        14, _Internal::tp(this), target, stream);
  }

  // repeated .opencv_onnx.TypeProto type_protos = 15;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_type_protos_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, this->_internal_type_protos(i), target, stream);
  }

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

  // optional string ref_attr_name = 21;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        21, this->_internal_ref_attr_name(), target);
  }

  // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        22, _Internal::sparse_tensor(this), target, stream);
  }

  // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_sparse_tensors_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(23, this->_internal_sparse_tensors(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_floats_size());
    total_size += data_size;
  }

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

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

  // repeated .opencv_onnx.TensorProto tensors = 10;
  total_size += 1UL * this->_internal_tensors_size();
  for (const auto& msg : this->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->graphs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.TypeProto type_protos = 15;
  total_size += 1UL * this->_internal_type_protos_size();
  for (const auto& msg : this->type_protos_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23;
  total_size += 2UL * this->_internal_sparse_tensors_size();
  for (const auto& msg : this->sparse_tensors_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _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(
          *t_);
    }

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

    // optional .opencv_onnx.TypeProto tp = 14;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *tp_);
    }

    // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *sparse_tensor_);
    }

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

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

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

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void AttributeProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const AttributeProto*>(
      &from));
}

void AttributeProto::MergeFrom(const AttributeProto& from) {
// @@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;

  floats_.MergeFrom(from.floats_);
  ints_.MergeFrom(from.ints_);
  strings_.MergeFrom(from.strings_);
  tensors_.MergeFrom(from.tensors_);
  graphs_.MergeFrom(from.graphs_);
  type_protos_.MergeFrom(from.type_protos_);
  sparse_tensors_.MergeFrom(from.sparse_tensors_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_s(from._internal_s());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_ref_attr_name(from._internal_ref_attr_name());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from._internal_t());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from._internal_g());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_mutable_tp()->::opencv_onnx::TypeProto::MergeFrom(from._internal_tp());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_mutable_sparse_tensor()->::opencv_onnx::SparseTensorProto::MergeFrom(from._internal_sparse_tensor());
    }
  }
  if (cached_has_bits & 0x00000700u) {
    if (cached_has_bits & 0x00000100u) {
      i_ = from.i_;
    }
    if (cached_has_bits & 0x00000200u) {
      f_ = from.f_;
    }
    if (cached_has_bits & 0x00000400u) {
      type_ = from.type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  floats_.InternalSwap(&other->floats_);
  ints_.InternalSwap(&other->ints_);
  strings_.InternalSwap(&other->strings_);
  tensors_.InternalSwap(&other->tensors_);
  graphs_.InternalSwap(&other->graphs_);
  type_protos_.InternalSwap(&other->type_protos_);
  sparse_tensors_.InternalSwap(&other->sparse_tensors_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &s_, lhs_arena,
      &other->s_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &ref_attr_name_, lhs_arena,
      &other->ref_attr_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(AttributeProto, type_)
      + sizeof(AttributeProto::type_)
      - PROTOBUF_FIELD_OFFSET(AttributeProto, t_)>(
          reinterpret_cast<char*>(&t_),
          reinterpret_cast<char*>(&other->t_));
}

std::string AttributeProto::GetTypeName() const {
  return "opencv_onnx.AttributeProto";
}


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

class ValueInfoProto::_Internal {
 public:
  using HasBits = decltype(std::declval<ValueInfoProto>()._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->type_;
}
ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  metadata_props_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ValueInfoProto)
}
ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      metadata_props_(from.metadata_props_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  if (from._internal_has_type()) {
    type_ = new ::opencv_onnx::TypeProto(*from.type_);
  } else {
    type_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
}

inline void ValueInfoProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_ = nullptr;
}

ValueInfoProto::~ValueInfoProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void ValueInfoProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete type_;
}

void ValueInfoProto::ArenaDtor(void* object) {
  ValueInfoProto* _this = reinterpret_cast< ValueInfoProto* >(object);
  (void)_this;
}
void ValueInfoProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ValueInfoProto::SetCachedSize(int size) const {
  _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;

  metadata_props_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(type_ != nullptr);
      type_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          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<34>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

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

  // optional string doc_string = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_doc_string(), target);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, this->_internal_metadata_props(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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;

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

  cached_has_bits = _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(
          *type_);
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ValueInfoProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ValueInfoProto*>(
      &from));
}

void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
// @@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;

  metadata_props_.MergeFrom(from.metadata_props_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_type());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  metadata_props_.InternalSwap(&other->metadata_props_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  swap(type_, other->type_);
}

std::string ValueInfoProto::GetTypeName() const {
  return "opencv_onnx.ValueInfoProto";
}


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

class NodeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<NodeProto>()._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_overload(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  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::MessageLite(arena, is_message_owned),
  input_(arena),
  output_(arena),
  attribute_(arena),
  metadata_props_(arena),
  device_configurations_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeProto)
}
NodeProto::NodeProto(const NodeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      input_(from.input_),
      output_(from.output_),
      attribute_(from.attribute_),
      metadata_props_(from.metadata_props_),
      device_configurations_(from.device_configurations_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_op_type()) {
    op_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op_type(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
      GetArenaForAllocation());
  }
  overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_overload()) {
    overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_overload(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
}

inline void NodeProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

NodeProto::~NodeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void NodeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  op_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  overload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void NodeProto::ArenaDtor(void* object) {
  NodeProto* _this = reinterpret_cast< NodeProto* >(object);
  (void)_this;
}
void NodeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NodeProto::SetCachedSize(int size) const {
  _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;

  input_.Clear();
  output_.Clear();
  attribute_.Clear();
  metadata_props_.Clear();
  device_configurations_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      op_type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      domain_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      overload_.ClearNonDefaultToEmpty();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string overload = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_overload();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          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<74>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_device_configurations(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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);
    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);
    target = stream->WriteString(2, s, target);
  }

  cached_has_bits = _has_bits_[0];
  // optional string name = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_name(), target);
  }

  // optional string op_type = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_op_type(), target);
  }

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

  // optional string doc_string = 6;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_doc_string(), target);
  }

  // optional string domain = 7;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        7, this->_internal_domain(), target);
  }

  // optional string overload = 8;
  if (cached_has_bits & 0x00000010u) {
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_overload(), target);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, this->_internal_metadata_props(i), target, stream);
  }

  // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_device_configurations_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, this->_internal_device_configurations(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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(input_.size());
  for (int i = 0, n = input_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      input_.Get(i));
  }

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

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

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

  // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10;
  total_size += 1UL * this->_internal_device_configurations_size();
  for (const auto& msg : this->device_configurations_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // 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());
    }

    // optional string overload = 8;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_overload());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void NodeProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const NodeProto*>(
      &from));
}

void NodeProto::MergeFrom(const NodeProto& from) {
// @@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;

  input_.MergeFrom(from.input_);
  output_.MergeFrom(from.output_);
  attribute_.MergeFrom(from.attribute_);
  metadata_props_.MergeFrom(from.metadata_props_);
  device_configurations_.MergeFrom(from.device_configurations_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_op_type(from._internal_op_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_set_overload(from._internal_overload());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  input_.InternalSwap(&other->input_);
  output_.InternalSwap(&other->output_);
  attribute_.InternalSwap(&other->attribute_);
  metadata_props_.InternalSwap(&other->metadata_props_);
  device_configurations_.InternalSwap(&other->device_configurations_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &op_type_, lhs_arena,
      &other->op_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &domain_, lhs_arena,
      &other->domain_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &overload_, lhs_arena,
      &other->overload_, rhs_arena
  );
}

std::string NodeProto::GetTypeName() const {
  return "opencv_onnx.NodeProto";
}


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

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

IntIntListEntryProto::IntIntListEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  value_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.IntIntListEntryProto)
}
IntIntListEntryProto::IntIntListEntryProto(const IntIntListEntryProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      value_(from.value_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  key_ = from.key_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.IntIntListEntryProto)
}

inline void IntIntListEntryProto::SharedCtor() {
key_ = int64_t{0};
}

IntIntListEntryProto::~IntIntListEntryProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.IntIntListEntryProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void IntIntListEntryProto::ArenaDtor(void* object) {
  IntIntListEntryProto* _this = reinterpret_cast< IntIntListEntryProto* >(object);
  (void)_this;
}
void IntIntListEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void IntIntListEntryProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  value_.Clear();
  key_ = int64_t{0};
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* IntIntListEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 key = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_key(&has_bits);
          key_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int64 value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_value(), ptr, ctx);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 key = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_key(), target);
  }

  // repeated int64 value = 2;
  for (int i = 0, n = this->_internal_value_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_value(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.IntIntListEntryProto)
  return target;
}

size_t IntIntListEntryProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.IntIntListEntryProto)
  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 value = 2;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->value_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_value_size());
    total_size += data_size;
  }

  // optional int64 key = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_key());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void IntIntListEntryProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const IntIntListEntryProto*>(
      &from));
}

void IntIntListEntryProto::MergeFrom(const IntIntListEntryProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.IntIntListEntryProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  value_.MergeFrom(from.value_);
  if (from._internal_has_key()) {
    _internal_set_key(from._internal_key());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void IntIntListEntryProto::InternalSwap(IntIntListEntryProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  value_.InternalSwap(&other->value_);
  swap(key_, other->key_);
}

std::string IntIntListEntryProto::GetTypeName() const {
  return "opencv_onnx.IntIntListEntryProto";
}


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

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

NodeDeviceConfigurationProto::NodeDeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  sharding_spec_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeDeviceConfigurationProto)
}
NodeDeviceConfigurationProto::NodeDeviceConfigurationProto(const NodeDeviceConfigurationProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      sharding_spec_(from.sharding_spec_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  configuration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_configuration_id()) {
    configuration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_configuration_id(),
      GetArenaForAllocation());
  }
  pipeline_stage_ = from.pipeline_stage_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeDeviceConfigurationProto)
}

inline void NodeDeviceConfigurationProto::SharedCtor() {
configuration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
pipeline_stage_ = 0;
}

NodeDeviceConfigurationProto::~NodeDeviceConfigurationProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.NodeDeviceConfigurationProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void NodeDeviceConfigurationProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  configuration_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void NodeDeviceConfigurationProto::ArenaDtor(void* object) {
  NodeDeviceConfigurationProto* _this = reinterpret_cast< NodeDeviceConfigurationProto* >(object);
  (void)_this;
}
void NodeDeviceConfigurationProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NodeDeviceConfigurationProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  sharding_spec_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    configuration_id_.ClearNonDefaultToEmpty();
  }
  pipeline_stage_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* NodeDeviceConfigurationProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string configuration_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_configuration_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_sharding_spec(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional int32 pipeline_stage = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_pipeline_stage(&has_bits);
          pipeline_stage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string configuration_id = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_configuration_id(), target);
  }

  // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_sharding_spec_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_sharding_spec(i), target, stream);
  }

  // optional int32 pipeline_stage = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_pipeline_stage(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeDeviceConfigurationProto)
  return target;
}

size_t NodeDeviceConfigurationProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeDeviceConfigurationProto)
  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.ShardingSpecProto sharding_spec = 2;
  total_size += 1UL * this->_internal_sharding_spec_size();
  for (const auto& msg : this->sharding_spec_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

    // optional int32 pipeline_stage = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_pipeline_stage());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void NodeDeviceConfigurationProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const NodeDeviceConfigurationProto*>(
      &from));
}

void NodeDeviceConfigurationProto::MergeFrom(const NodeDeviceConfigurationProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeDeviceConfigurationProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  sharding_spec_.MergeFrom(from.sharding_spec_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_configuration_id(from._internal_configuration_id());
    }
    if (cached_has_bits & 0x00000002u) {
      pipeline_stage_ = from.pipeline_stage_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void NodeDeviceConfigurationProto::InternalSwap(NodeDeviceConfigurationProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  sharding_spec_.InternalSwap(&other->sharding_spec_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &configuration_id_, lhs_arena,
      &other->configuration_id_, rhs_arena
  );
  swap(pipeline_stage_, other->pipeline_stage_);
}

std::string NodeDeviceConfigurationProto::GetTypeName() const {
  return "opencv_onnx.NodeDeviceConfigurationProto";
}


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

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

ShardingSpecProto::ShardingSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  device_(arena),
  index_to_device_group_map_(arena),
  sharded_dim_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ShardingSpecProto)
}
ShardingSpecProto::ShardingSpecProto(const ShardingSpecProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      device_(from.device_),
      index_to_device_group_map_(from.index_to_device_group_map_),
      sharded_dim_(from.sharded_dim_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_tensor_name()) {
    tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tensor_name(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ShardingSpecProto)
}

inline void ShardingSpecProto::SharedCtor() {
tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ShardingSpecProto::~ShardingSpecProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ShardingSpecProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void ShardingSpecProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  tensor_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ShardingSpecProto::ArenaDtor(void* object) {
  ShardingSpecProto* _this = reinterpret_cast< ShardingSpecProto* >(object);
  (void)_this;
}
void ShardingSpecProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ShardingSpecProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  device_.Clear();
  index_to_device_group_map_.Clear();
  sharded_dim_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    tensor_name_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* ShardingSpecProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string tensor_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_tensor_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int64 device = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_device(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_device(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_index_to_device_group_map(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_sharded_dim(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string tensor_name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_tensor_name(), target);
  }

  // repeated int64 device = 2;
  for (int i = 0, n = this->_internal_device_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_device(i), target);
  }

  // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_index_to_device_group_map_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_index_to_device_group_map(i), target, stream);
  }

  // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_sharded_dim_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, this->_internal_sharded_dim(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ShardingSpecProto)
  return target;
}

size_t ShardingSpecProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ShardingSpecProto)
  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 device = 2;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->device_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_device_size());
    total_size += data_size;
  }

  // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3;
  total_size += 1UL * this->_internal_index_to_device_group_map_size();
  for (const auto& msg : this->index_to_device_group_map_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4;
  total_size += 1UL * this->_internal_sharded_dim_size();
  for (const auto& msg : this->sharded_dim_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ShardingSpecProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ShardingSpecProto*>(
      &from));
}

void ShardingSpecProto::MergeFrom(const ShardingSpecProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ShardingSpecProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  device_.MergeFrom(from.device_);
  index_to_device_group_map_.MergeFrom(from.index_to_device_group_map_);
  sharded_dim_.MergeFrom(from.sharded_dim_);
  if (from._internal_has_tensor_name()) {
    _internal_set_tensor_name(from._internal_tensor_name());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void ShardingSpecProto::InternalSwap(ShardingSpecProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  device_.InternalSwap(&other->device_);
  index_to_device_group_map_.InternalSwap(&other->index_to_device_group_map_);
  sharded_dim_.InternalSwap(&other->sharded_dim_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &tensor_name_, lhs_arena,
      &other->tensor_name_, rhs_arena
  );
}

std::string ShardingSpecProto::GetTypeName() const {
  return "opencv_onnx.ShardingSpecProto";
}


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

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

ShardedDimProto::ShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  simple_sharding_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ShardedDimProto)
}
ShardedDimProto::ShardedDimProto(const ShardedDimProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      simple_sharding_(from.simple_sharding_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  axis_ = from.axis_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ShardedDimProto)
}

inline void ShardedDimProto::SharedCtor() {
axis_ = int64_t{0};
}

ShardedDimProto::~ShardedDimProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ShardedDimProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void ShardedDimProto::ArenaDtor(void* object) {
  ShardedDimProto* _this = reinterpret_cast< ShardedDimProto* >(object);
  (void)_this;
}
void ShardedDimProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ShardedDimProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  simple_sharding_.Clear();
  axis_ = int64_t{0};
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* ShardedDimProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 axis = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_simple_sharding(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 axis = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_axis(), target);
  }

  // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_simple_sharding_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_simple_sharding(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ShardedDimProto)
  return target;
}

size_t ShardedDimProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ShardedDimProto)
  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.SimpleShardedDimProto simple_sharding = 2;
  total_size += 1UL * this->_internal_simple_sharding_size();
  for (const auto& msg : this->simple_sharding_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // optional int64 axis = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_axis());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ShardedDimProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ShardedDimProto*>(
      &from));
}

void ShardedDimProto::MergeFrom(const ShardedDimProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ShardedDimProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  simple_sharding_.MergeFrom(from.simple_sharding_);
  if (from._internal_has_axis()) {
    _internal_set_axis(from._internal_axis());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void ShardedDimProto::InternalSwap(ShardedDimProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  simple_sharding_.InternalSwap(&other->simple_sharding_);
  swap(axis_, other->axis_);
}

std::string ShardedDimProto::GetTypeName() const {
  return "opencv_onnx.ShardedDimProto";
}


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

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

SimpleShardedDimProto::SimpleShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.SimpleShardedDimProto)
}
SimpleShardedDimProto::SimpleShardedDimProto(const SimpleShardedDimProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  num_shards_ = from.num_shards_;
  clear_has_dim();
  switch (from.dim_case()) {
    case kDimValue: {
      _internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _internal_set_dim_param(from._internal_dim_param());
      break;
    }
    case DIM_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.SimpleShardedDimProto)
}

inline void SimpleShardedDimProto::SharedCtor() {
num_shards_ = int64_t{0};
clear_has_dim();
}

SimpleShardedDimProto::~SimpleShardedDimProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.SimpleShardedDimProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void SimpleShardedDimProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_dim()) {
    clear_dim();
  }
}

void SimpleShardedDimProto::ArenaDtor(void* object) {
  SimpleShardedDimProto* _this = reinterpret_cast< SimpleShardedDimProto* >(object);
  (void)_this;
}
void SimpleShardedDimProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleShardedDimProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleShardedDimProto::clear_dim() {
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.SimpleShardedDimProto)
  switch (dim_case()) {
    case kDimValue: {
      // No need to clear
      break;
    }
    case kDimParam: {
      dim_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
      break;
    }
    case DIM_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = DIM_NOT_SET;
}


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

  num_shards_ = int64_t{0};
  clear_dim();
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* SimpleShardedDimProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 num_shards = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_num_shards(&has_bits);
          num_shards_ = ::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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (dim_case()) {
    case kDimValue: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target);
      break;
    }
    case kDimParam: {
      target = stream->WriteStringMaybeAliased(
          2, this->_internal_dim_param(), target);
      break;
    }
    default: ;
  }
  cached_has_bits = _has_bits_[0];
  // optional int64 num_shards = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_num_shards(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.SimpleShardedDimProto)
  return target;
}

size_t SimpleShardedDimProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.SimpleShardedDimProto)
  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 int64 num_shards = 3;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_num_shards());
  }

  switch (dim_case()) {
    // int64 dim_value = 1;
    case kDimValue: {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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 DIM_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void SimpleShardedDimProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const SimpleShardedDimProto*>(
      &from));
}

void SimpleShardedDimProto::MergeFrom(const SimpleShardedDimProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.SimpleShardedDimProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_num_shards()) {
    _internal_set_num_shards(from._internal_num_shards());
  }
  switch (from.dim_case()) {
    case kDimValue: {
      _internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _internal_set_dim_param(from._internal_dim_param());
      break;
    }
    case DIM_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void SimpleShardedDimProto::InternalSwap(SimpleShardedDimProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(num_shards_, other->num_shards_);
  swap(dim_, other->dim_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

std::string SimpleShardedDimProto::GetTypeName() const {
  return "opencv_onnx.SimpleShardedDimProto";
}


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

class TrainingInfoProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TrainingInfoProto>()._has_bits_);
  static const ::opencv_onnx::GraphProto& initialization(const TrainingInfoProto* msg);
  static void set_has_initialization(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_onnx::GraphProto& algorithm(const TrainingInfoProto* msg);
  static void set_has_algorithm(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_onnx::GraphProto&
TrainingInfoProto::_Internal::initialization(const TrainingInfoProto* msg) {
  return *msg->initialization_;
}
const ::opencv_onnx::GraphProto&
TrainingInfoProto::_Internal::algorithm(const TrainingInfoProto* msg) {
  return *msg->algorithm_;
}
TrainingInfoProto::TrainingInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  initialization_binding_(arena),
  update_binding_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TrainingInfoProto)
}
TrainingInfoProto::TrainingInfoProto(const TrainingInfoProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      initialization_binding_(from.initialization_binding_),
      update_binding_(from.update_binding_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_initialization()) {
    initialization_ = new ::opencv_onnx::GraphProto(*from.initialization_);
  } else {
    initialization_ = nullptr;
  }
  if (from._internal_has_algorithm()) {
    algorithm_ = new ::opencv_onnx::GraphProto(*from.algorithm_);
  } else {
    algorithm_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TrainingInfoProto)
}

inline void TrainingInfoProto::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&initialization_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&algorithm_) -
    reinterpret_cast<char*>(&initialization_)) + sizeof(algorithm_));
}

TrainingInfoProto::~TrainingInfoProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TrainingInfoProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TrainingInfoProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete initialization_;
  if (this != internal_default_instance()) delete algorithm_;
}

void TrainingInfoProto::ArenaDtor(void* object) {
  TrainingInfoProto* _this = reinterpret_cast< TrainingInfoProto* >(object);
  (void)_this;
}
void TrainingInfoProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TrainingInfoProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  initialization_binding_.Clear();
  update_binding_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(initialization_ != nullptr);
      initialization_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(algorithm_ != nullptr);
      algorithm_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TrainingInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .opencv_onnx.GraphProto initialization = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_initialization(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.GraphProto algorithm = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_algorithm(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_initialization_binding(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto update_binding = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_update_binding(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .opencv_onnx.GraphProto initialization = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::initialization(this), target, stream);
  }

  // optional .opencv_onnx.GraphProto algorithm = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::algorithm(this), target, stream);
  }

  // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_initialization_binding_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_initialization_binding(i), target, stream);
  }

  // repeated .opencv_onnx.StringStringEntryProto update_binding = 4;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_update_binding_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, this->_internal_update_binding(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TrainingInfoProto)
  return target;
}

size_t TrainingInfoProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TrainingInfoProto)
  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.StringStringEntryProto initialization_binding = 3;
  total_size += 1UL * this->_internal_initialization_binding_size();
  for (const auto& msg : this->initialization_binding_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.StringStringEntryProto update_binding = 4;
  total_size += 1UL * this->_internal_update_binding_size();
  for (const auto& msg : this->update_binding_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .opencv_onnx.GraphProto initialization = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *initialization_);
    }

    // optional .opencv_onnx.GraphProto algorithm = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *algorithm_);
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TrainingInfoProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TrainingInfoProto*>(
      &from));
}

void TrainingInfoProto::MergeFrom(const TrainingInfoProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TrainingInfoProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  initialization_binding_.MergeFrom(from.initialization_binding_);
  update_binding_.MergeFrom(from.update_binding_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_initialization()->::opencv_onnx::GraphProto::MergeFrom(from._internal_initialization());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_algorithm()->::opencv_onnx::GraphProto::MergeFrom(from._internal_algorithm());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void TrainingInfoProto::InternalSwap(TrainingInfoProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  initialization_binding_.InternalSwap(&other->initialization_binding_);
  update_binding_.InternalSwap(&other->update_binding_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TrainingInfoProto, algorithm_)
      + sizeof(TrainingInfoProto::algorithm_)
      - PROTOBUF_FIELD_OFFSET(TrainingInfoProto, initialization_)>(
          reinterpret_cast<char*>(&initialization_),
          reinterpret_cast<char*>(&other->initialization_));
}

std::string TrainingInfoProto::GetTypeName() const {
  return "opencv_onnx.TrainingInfoProto";
}


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

class ModelProto::_Internal {
 public:
  using HasBits = decltype(std::declval<ModelProto>()._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->graph_;
}
ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  opset_import_(arena),
  metadata_props_(arena),
  training_info_(arena),
  functions_(arena),
  configuration_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.ModelProto)
}
ModelProto::ModelProto(const ModelProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      opset_import_(from.opset_import_),
      metadata_props_(from.metadata_props_),
      training_info_(from.training_info_),
      functions_(from.functions_),
      configuration_(from.configuration_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_producer_name()) {
    producer_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_name(),
      GetArenaForAllocation());
  }
  producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_producer_version()) {
    producer_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_version(),
      GetArenaForAllocation());
  }
  domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  if (from._internal_has_graph()) {
    graph_ = new ::opencv_onnx::GraphProto(*from.graph_);
  } else {
    graph_ = nullptr;
  }
  ::memcpy(&ir_version_, &from.ir_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
    reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
}

inline void ModelProto::SharedCtor() {
producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&graph_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
    reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
}

ModelProto::~ModelProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void ModelProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  producer_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  producer_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete graph_;
}

void ModelProto::ArenaDtor(void* object) {
  ModelProto* _this = reinterpret_cast< ModelProto* >(object);
  (void)_this;
}
void ModelProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ModelProto::SetCachedSize(int size) const {
  _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;

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

const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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;
      // repeated .opencv_onnx.TrainingInfoProto training_info = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_training_info(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.FunctionProto functions = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_functions(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<202>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_configuration(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<210>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional int64 ir_version = 1;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_ir_version(), target);
  }

  // optional string producer_name = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_producer_name(), target);
  }

  // optional string producer_version = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_producer_version(), target);
  }

  // optional string domain = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_domain(), target);
  }

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

  // optional string doc_string = 6;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_doc_string(), target);
  }

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

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

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

  // repeated .opencv_onnx.TrainingInfoProto training_info = 20;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_training_info_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, this->_internal_training_info(i), target, stream);
  }

  // repeated .opencv_onnx.FunctionProto functions = 25;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_functions_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(25, this->_internal_functions(i), target, stream);
  }

  // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_configuration_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(26, this->_internal_configuration(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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->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->metadata_props_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.TrainingInfoProto training_info = 20;
  total_size += 2UL * this->_internal_training_info_size();
  for (const auto& msg : this->training_info_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.FunctionProto functions = 25;
  total_size += 2UL * this->_internal_functions_size();
  for (const auto& msg : this->functions_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26;
  total_size += 2UL * this->_internal_configuration_size();
  for (const auto& msg : this->configuration_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _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(
          *graph_);
    }

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

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

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ModelProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ModelProto*>(
      &from));
}

void ModelProto::MergeFrom(const ModelProto& from) {
// @@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;

  opset_import_.MergeFrom(from.opset_import_);
  metadata_props_.MergeFrom(from.metadata_props_);
  training_info_.MergeFrom(from.training_info_);
  functions_.MergeFrom(from.functions_);
  configuration_.MergeFrom(from.configuration_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_producer_name(from._internal_producer_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_producer_version(from._internal_producer_version());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from._internal_graph());
    }
    if (cached_has_bits & 0x00000020u) {
      ir_version_ = from.ir_version_;
    }
    if (cached_has_bits & 0x00000040u) {
      model_version_ = from.model_version_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  opset_import_.InternalSwap(&other->opset_import_);
  metadata_props_.InternalSwap(&other->metadata_props_);
  training_info_.InternalSwap(&other->training_info_);
  functions_.InternalSwap(&other->functions_);
  configuration_.InternalSwap(&other->configuration_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &producer_name_, lhs_arena,
      &other->producer_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &producer_version_, lhs_arena,
      &other->producer_version_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &domain_, lhs_arena,
      &other->domain_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ModelProto, model_version_)
      + sizeof(ModelProto::model_version_)
      - PROTOBUF_FIELD_OFFSET(ModelProto, graph_)>(
          reinterpret_cast<char*>(&graph_),
          reinterpret_cast<char*>(&other->graph_));
}

std::string ModelProto::GetTypeName() const {
  return "opencv_onnx.ModelProto";
}


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

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

DeviceConfigurationProto::DeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  device_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.DeviceConfigurationProto)
}
DeviceConfigurationProto::DeviceConfigurationProto(const DeviceConfigurationProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      device_(from.device_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  num_devices_ = from.num_devices_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.DeviceConfigurationProto)
}

inline void DeviceConfigurationProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
num_devices_ = 0;
}

DeviceConfigurationProto::~DeviceConfigurationProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.DeviceConfigurationProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void DeviceConfigurationProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void DeviceConfigurationProto::ArenaDtor(void* object) {
  DeviceConfigurationProto* _this = reinterpret_cast< DeviceConfigurationProto* >(object);
  (void)_this;
}
void DeviceConfigurationProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DeviceConfigurationProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  device_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    name_.ClearNonDefaultToEmpty();
  }
  num_devices_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* DeviceConfigurationProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_devices = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_num_devices(&has_bits);
          num_devices_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string device = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_device();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional int32 num_devices = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_devices(), target);
  }

  // repeated string device = 3;
  for (int i = 0, n = this->_internal_device_size(); i < n; i++) {
    const auto& s = this->_internal_device(i);
    target = stream->WriteString(3, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.DeviceConfigurationProto)
  return target;
}

size_t DeviceConfigurationProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.DeviceConfigurationProto)
  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 device = 3;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(device_.size());
  for (int i = 0, n = device_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      device_.Get(i));
  }

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

    // optional int32 num_devices = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_devices());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DeviceConfigurationProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const DeviceConfigurationProto*>(
      &from));
}

void DeviceConfigurationProto::MergeFrom(const DeviceConfigurationProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.DeviceConfigurationProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  device_.MergeFrom(from.device_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      num_devices_ = from.num_devices_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string DeviceConfigurationProto::GetTypeName() const {
  return "opencv_onnx.DeviceConfigurationProto";
}


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

class StringStringEntryProto::_Internal {
 public:
  using HasBits = decltype(std::declval<StringStringEntryProto>()._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::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.StringStringEntryProto)
}
StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_key()) {
    key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key(),
      GetArenaForAllocation());
  }
  value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_value()) {
    value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
}

inline void StringStringEntryProto::SharedCtor() {
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

StringStringEntryProto::~StringStringEntryProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void StringStringEntryProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void StringStringEntryProto::ArenaDtor(void* object) {
  StringStringEntryProto* _this = reinterpret_cast< StringStringEntryProto* >(object);
  (void)_this;
}
void StringStringEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void StringStringEntryProto::SetCachedSize(int size) const {
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      key_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      value_.ClearNonDefaultToEmpty();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional string key = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_key(), target);
  }

  // optional string value = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_value(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _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());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void StringStringEntryProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const StringStringEntryProto*>(
      &from));
}

void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
// @@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._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_key(from._internal_key());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_value(from._internal_value());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &key_, lhs_arena,
      &other->key_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &value_, lhs_arena,
      &other->value_, rhs_arena
  );
}

std::string StringStringEntryProto::GetTypeName() const {
  return "opencv_onnx.StringStringEntryProto";
}


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

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

TensorAnnotation::TensorAnnotation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  quant_parameter_tensor_names_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorAnnotation)
}
TensorAnnotation::TensorAnnotation(const TensorAnnotation& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      quant_parameter_tensor_names_(from.quant_parameter_tensor_names_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_tensor_name()) {
    tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tensor_name(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorAnnotation)
}

inline void TensorAnnotation::SharedCtor() {
tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

TensorAnnotation::~TensorAnnotation() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorAnnotation)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TensorAnnotation::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  tensor_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void TensorAnnotation::ArenaDtor(void* object) {
  TensorAnnotation* _this = reinterpret_cast< TensorAnnotation* >(object);
  (void)_this;
}
void TensorAnnotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorAnnotation::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  quant_parameter_tensor_names_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    tensor_name_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TensorAnnotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string tensor_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_tensor_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_quant_parameter_tensor_names(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string tensor_name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_tensor_name(), target);
  }

  // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_quant_parameter_tensor_names_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_quant_parameter_tensor_names(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorAnnotation)
  return target;
}

size_t TensorAnnotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorAnnotation)
  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.StringStringEntryProto quant_parameter_tensor_names = 2;
  total_size += 1UL * this->_internal_quant_parameter_tensor_names_size();
  for (const auto& msg : this->quant_parameter_tensor_names_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorAnnotation::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TensorAnnotation*>(
      &from));
}

void TensorAnnotation::MergeFrom(const TensorAnnotation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorAnnotation)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  quant_parameter_tensor_names_.MergeFrom(from.quant_parameter_tensor_names_);
  if (from._internal_has_tensor_name()) {
    _internal_set_tensor_name(from._internal_tensor_name());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void TensorAnnotation::InternalSwap(TensorAnnotation* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  quant_parameter_tensor_names_.InternalSwap(&other->quant_parameter_tensor_names_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &tensor_name_, lhs_arena,
      &other->tensor_name_, rhs_arena
  );
}

std::string TensorAnnotation::GetTypeName() const {
  return "opencv_onnx.TensorAnnotation";
}


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

class GraphProto::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphProto>()._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::MessageLite(arena, is_message_owned),
  node_(arena),
  initializer_(arena),
  input_(arena),
  output_(arena),
  value_info_(arena),
  quantization_annotation_(arena),
  sparse_initializer_(arena),
  metadata_props_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.GraphProto)
}
GraphProto::GraphProto(const GraphProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      node_(from.node_),
      initializer_(from.initializer_),
      input_(from.input_),
      output_(from.output_),
      value_info_(from.value_info_),
      quantization_annotation_(from.quantization_annotation_),
      sparse_initializer_(from.sparse_initializer_),
      metadata_props_(from.metadata_props_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
}

inline void GraphProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

GraphProto::~GraphProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void GraphProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void GraphProto::ArenaDtor(void* object) {
  GraphProto* _this = reinterpret_cast< GraphProto* >(object);
  (void)_this;
}
void GraphProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphProto::SetCachedSize(int size) const {
  _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;

  node_.Clear();
  initializer_.Clear();
  input_.Clear();
  output_.Clear();
  value_info_.Clear();
  quantization_annotation_.Clear();
  sparse_initializer_.Clear();
  metadata_props_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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;
      // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_quantization_annotation(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_sparse_initializer(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 int i = 0,
      n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_node(i), target, stream);
  }

  cached_has_bits = _has_bits_[0];
  // optional string name = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_name(), target);
  }

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

  // optional string doc_string = 10;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        10, this->_internal_doc_string(), target);
  }

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

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

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

  // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_quantization_annotation_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(14, this->_internal_quantization_annotation(i), target, stream);
  }

  // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_sparse_initializer_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, this->_internal_sparse_initializer(i), target, stream);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(16, this->_internal_metadata_props(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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->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->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->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->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->value_info_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14;
  total_size += 1UL * this->_internal_quantization_annotation_size();
  for (const auto& msg : this->quantization_annotation_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15;
  total_size += 1UL * this->_internal_sparse_initializer_size();
  for (const auto& msg : this->sparse_initializer_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  cached_has_bits = _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());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GraphProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const GraphProto*>(
      &from));
}

void GraphProto::MergeFrom(const GraphProto& from) {
// @@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;

  node_.MergeFrom(from.node_);
  initializer_.MergeFrom(from.initializer_);
  input_.MergeFrom(from.input_);
  output_.MergeFrom(from.output_);
  value_info_.MergeFrom(from.value_info_);
  quantization_annotation_.MergeFrom(from.quantization_annotation_);
  sparse_initializer_.MergeFrom(from.sparse_initializer_);
  metadata_props_.MergeFrom(from.metadata_props_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  node_.InternalSwap(&other->node_);
  initializer_.InternalSwap(&other->initializer_);
  input_.InternalSwap(&other->input_);
  output_.InternalSwap(&other->output_);
  value_info_.InternalSwap(&other->value_info_);
  quantization_annotation_.InternalSwap(&other->quantization_annotation_);
  sparse_initializer_.InternalSwap(&other->sparse_initializer_);
  metadata_props_.InternalSwap(&other->metadata_props_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
}

std::string GraphProto::GetTypeName() const {
  return "opencv_onnx.GraphProto";
}


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

class TensorProto_Segment::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorProto_Segment>()._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::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto.Segment)
}
TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&begin_, &from.begin_,
    static_cast<size_t>(reinterpret_cast<char*>(&end_) -
    reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
}

inline void TensorProto_Segment::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
    reinterpret_cast<char*>(&begin_)) + sizeof(end_));
}

TensorProto_Segment::~TensorProto_Segment() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void TensorProto_Segment::ArenaDtor(void* object) {
  TensorProto_Segment* _this = reinterpret_cast< TensorProto_Segment* >(object);
  (void)_this;
}
void TensorProto_Segment::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorProto_Segment::SetCachedSize(int size) const {
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    ::memset(&begin_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&end_) -
        reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TensorProto_Segment::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional int64 begin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_begin(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int64 begin = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_begin());
    }

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

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorProto_Segment::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TensorProto_Segment*>(
      &from));
}

void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
// @@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._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      begin_ = from.begin_;
    }
    if (cached_has_bits & 0x00000002u) {
      end_ = from.end_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TensorProto_Segment, end_)
      + sizeof(TensorProto_Segment::end_)
      - PROTOBUF_FIELD_OFFSET(TensorProto_Segment, begin_)>(
          reinterpret_cast<char*>(&begin_),
          reinterpret_cast<char*>(&other->begin_));
}

std::string TensorProto_Segment::GetTypeName() const {
  return "opencv_onnx.TensorProto.Segment";
}


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

class TensorProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorProto>()._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;
  }
  static void set_has_data_location(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::opencv_onnx::TensorProto_Segment&
TensorProto::_Internal::segment(const TensorProto* msg) {
  return *msg->segment_;
}
TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  dims_(arena),
  float_data_(arena),
  int32_data_(arena),
  string_data_(arena),
  int64_data_(arena),
  double_data_(arena),
  uint64_data_(arena),
  external_data_(arena),
  metadata_props_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto)
}
TensorProto::TensorProto(const TensorProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      dims_(from.dims_),
      float_data_(from.float_data_),
      int32_data_(from.int32_data_),
      string_data_(from.string_data_),
      int64_data_(from.int64_data_),
      double_data_(from.double_data_),
      uint64_data_(from.uint64_data_),
      external_data_(from.external_data_),
      metadata_props_(from.metadata_props_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_raw_data()) {
    raw_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_raw_data(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  if (from._internal_has_segment()) {
    segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_);
  } else {
    segment_ = nullptr;
  }
  ::memcpy(&data_type_, &from.data_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&data_location_) -
    reinterpret_cast<char*>(&data_type_)) + sizeof(data_location_));
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
}

inline void TensorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&segment_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&data_location_) -
    reinterpret_cast<char*>(&segment_)) + sizeof(data_location_));
}

TensorProto::~TensorProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TensorProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  raw_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete segment_;
}

void TensorProto::ArenaDtor(void* object) {
  TensorProto* _this = reinterpret_cast< TensorProto* >(object);
  (void)_this;
}
void TensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorProto::SetCachedSize(int size) const {
  _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;

  dims_.Clear();
  float_data_.Clear();
  int32_data_.Clear();
  string_data_.Clear();
  int64_data_.Clear();
  double_data_.Clear();
  uint64_data_.Clear();
  external_data_.Clear();
  metadata_props_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      raw_data_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(segment_ != nullptr);
      segment_->Clear();
    }
  }
  if (cached_has_bits & 0x00000030u) {
    ::memset(&data_type_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&data_location_) -
        reinterpret_cast<char*>(&data_type_)) + sizeof(data_location_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 int32 data_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_data_type(&has_bits);
          data_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto external_data = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_external_data(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorProto.DataLocation data_location = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataLocation_IsValid(val))) {
            _internal_set_data_location(static_cast<::opencv_onnx::TensorProto_DataLocation>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dims(i), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional int32 data_type = 2;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_data_type(), target);
  }

  // optional .opencv_onnx.TensorProto.Segment segment = 3;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::segment(this), 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 = _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 = _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) {
    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 = _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) {
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_doc_string(), target);
  }

  // repeated .opencv_onnx.StringStringEntryProto external_data = 13;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_external_data_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, this->_internal_external_data(i), target, stream);
  }

  // optional .opencv_onnx.TensorProto.DataLocation data_location = 14;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      14, this->_internal_data_location(), target);
  }

  // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(16, this->_internal_metadata_props(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->dims_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated int32 int32_data = 5 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->int32_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _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(string_data_.size());
  for (int i = 0, n = string_data_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
      string_data_.Get(i));
  }

  // repeated int64 int64_data = 7 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->int64_data_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _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 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

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

  // repeated .opencv_onnx.StringStringEntryProto external_data = 13;
  total_size += 1UL * this->_internal_external_data_size();
  for (const auto& msg : this->external_data_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // 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(
          *segment_);
    }

    // optional int32 data_type = 2;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_data_type());
    }

    // optional .opencv_onnx.TensorProto.DataLocation data_location = 14;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_data_location());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TensorProto*>(
      &from));
}

void TensorProto::MergeFrom(const TensorProto& from) {
// @@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;

  dims_.MergeFrom(from.dims_);
  float_data_.MergeFrom(from.float_data_);
  int32_data_.MergeFrom(from.int32_data_);
  string_data_.MergeFrom(from.string_data_);
  int64_data_.MergeFrom(from.int64_data_);
  double_data_.MergeFrom(from.double_data_);
  uint64_data_.MergeFrom(from.uint64_data_);
  external_data_.MergeFrom(from.external_data_);
  metadata_props_.MergeFrom(from.metadata_props_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_raw_data(from._internal_raw_data());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from._internal_segment());
    }
    if (cached_has_bits & 0x00000010u) {
      data_type_ = from.data_type_;
    }
    if (cached_has_bits & 0x00000020u) {
      data_location_ = from.data_location_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  dims_.InternalSwap(&other->dims_);
  float_data_.InternalSwap(&other->float_data_);
  int32_data_.InternalSwap(&other->int32_data_);
  string_data_.InternalSwap(&other->string_data_);
  int64_data_.InternalSwap(&other->int64_data_);
  double_data_.InternalSwap(&other->double_data_);
  uint64_data_.InternalSwap(&other->uint64_data_);
  external_data_.InternalSwap(&other->external_data_);
  metadata_props_.InternalSwap(&other->metadata_props_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &raw_data_, lhs_arena,
      &other->raw_data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TensorProto, data_location_)
      + sizeof(TensorProto::data_location_)
      - PROTOBUF_FIELD_OFFSET(TensorProto, segment_)>(
          reinterpret_cast<char*>(&segment_),
          reinterpret_cast<char*>(&other->segment_));
}

std::string TensorProto::GetTypeName() const {
  return "opencv_onnx.TensorProto";
}


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

class SparseTensorProto::_Internal {
 public:
  using HasBits = decltype(std::declval<SparseTensorProto>()._has_bits_);
  static const ::opencv_onnx::TensorProto& values(const SparseTensorProto* msg);
  static void set_has_values(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_onnx::TensorProto& indices(const SparseTensorProto* msg);
  static void set_has_indices(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_onnx::TensorProto&
SparseTensorProto::_Internal::values(const SparseTensorProto* msg) {
  return *msg->values_;
}
const ::opencv_onnx::TensorProto&
SparseTensorProto::_Internal::indices(const SparseTensorProto* msg) {
  return *msg->indices_;
}
SparseTensorProto::SparseTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  dims_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.SparseTensorProto)
}
SparseTensorProto::SparseTensorProto(const SparseTensorProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      dims_(from.dims_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_values()) {
    values_ = new ::opencv_onnx::TensorProto(*from.values_);
  } else {
    values_ = nullptr;
  }
  if (from._internal_has_indices()) {
    indices_ = new ::opencv_onnx::TensorProto(*from.indices_);
  } else {
    indices_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.SparseTensorProto)
}

inline void SparseTensorProto::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&values_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&indices_) -
    reinterpret_cast<char*>(&values_)) + sizeof(indices_));
}

SparseTensorProto::~SparseTensorProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.SparseTensorProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void SparseTensorProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete values_;
  if (this != internal_default_instance()) delete indices_;
}

void SparseTensorProto::ArenaDtor(void* object) {
  SparseTensorProto* _this = reinterpret_cast< SparseTensorProto* >(object);
  (void)_this;
}
void SparseTensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SparseTensorProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  dims_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(values_ != nullptr);
      values_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(indices_ != nullptr);
      indices_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* SparseTensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .opencv_onnx.TensorProto values = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_values(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TensorProto indices = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_indices(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int64 dims = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          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<24>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dims(), ptr, ctx);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .opencv_onnx.TensorProto values = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::values(this), target, stream);
  }

  // optional .opencv_onnx.TensorProto indices = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::indices(this), target, stream);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.SparseTensorProto)
  return target;
}

size_t SparseTensorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.SparseTensorProto)
  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 = 3;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->dims_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dims_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .opencv_onnx.TensorProto values = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *values_);
    }

    // optional .opencv_onnx.TensorProto indices = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *indices_);
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void SparseTensorProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const SparseTensorProto*>(
      &from));
}

void SparseTensorProto::MergeFrom(const SparseTensorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.SparseTensorProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  dims_.MergeFrom(from.dims_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_values()->::opencv_onnx::TensorProto::MergeFrom(from._internal_values());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_indices()->::opencv_onnx::TensorProto::MergeFrom(from._internal_indices());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string SparseTensorProto::GetTypeName() const {
  return "opencv_onnx.SparseTensorProto";
}


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

class TensorShapeProto_Dimension::_Internal {
 public:
  using HasBits = decltype(std::declval<TensorShapeProto_Dimension>()._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::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto.Dimension)
}
TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_denotation()) {
    denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
      GetArenaForAllocation());
  }
  clear_has_value();
  switch (from.value_case()) {
    case kDimValue: {
      _internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _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() {
denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
clear_has_value();
}

TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TensorShapeProto_Dimension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_value()) {
    clear_value();
  }
}

void TensorShapeProto_Dimension::ArenaDtor(void* object) {
  TensorShapeProto_Dimension* _this = reinterpret_cast< TensorShapeProto_Dimension* >(object);
  (void)_this;
}
void TensorShapeProto_Dimension::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorShapeProto_Dimension::SetCachedSize(int size) const {
  _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: {
      value_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    denotation_.ClearNonDefaultToEmpty();
  }
  clear_value();
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target);
      break;
    }
    case kDimParam: {
      target = stream->WriteStringMaybeAliased(
          2, this->_internal_dim_param(), target);
      break;
    }
    default: ;
  }
  cached_has_bits = _has_bits_[0];
  // optional string denotation = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_denotation(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::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;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorShapeProto_Dimension::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TensorShapeProto_Dimension*>(
      &from));
}

void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
// @@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()) {
    _internal_set_denotation(from._internal_denotation());
  }
  switch (from.value_case()) {
    case kDimValue: {
      _internal_set_dim_value(from._internal_dim_value());
      break;
    }
    case kDimParam: {
      _internal_set_dim_param(from._internal_dim_param());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &denotation_, lhs_arena,
      &other->denotation_, rhs_arena
  );
  swap(value_, other->value_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

std::string TensorShapeProto_Dimension::GetTypeName() const {
  return "opencv_onnx.TensorShapeProto.Dimension";
}


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

class TensorShapeProto::_Internal {
 public:
};

TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  dim_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto)
}
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      dim_(from.dim_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
}

inline void TensorShapeProto::SharedCtor() {
}

TensorShapeProto::~TensorShapeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void TensorShapeProto::ArenaDtor(void* object) {
  TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
  (void)_this;
}
void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorShapeProto::SetCachedSize(int size) const {
  _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;

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

const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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<std::string>(),
        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 int i = 0,
      n = static_cast<unsigned int>(this->_internal_dim_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_dim(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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->dim_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TensorShapeProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TensorShapeProto*>(
      &from));
}

void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
// @@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;

  dim_.MergeFrom(from.dim_);
  _internal_metadata_.MergeFrom<std::string>(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_);
  dim_.InternalSwap(&other->dim_);
}

std::string TensorShapeProto::GetTypeName() const {
  return "opencv_onnx.TensorShapeProto";
}


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

class TypeProto_Tensor::_Internal {
 public:
  using HasBits = decltype(std::declval<TypeProto_Tensor>()._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->shape_;
}
TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Tensor)
}
TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  elem_type_ = from.elem_type_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
}

inline void TypeProto_Tensor::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&elem_type_) -
    reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
}

TypeProto_Tensor::~TypeProto_Tensor() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void TypeProto_Tensor::ArenaDtor(void* object) {
  TypeProto_Tensor* _this = reinterpret_cast< TypeProto_Tensor* >(object);
  (void)_this;
}
void TypeProto_Tensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto_Tensor::SetCachedSize(int size) const {
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(shape_ != nullptr);
    shape_->Clear();
  }
  elem_type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 elem_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_elem_type(&has_bits);
          elem_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional int32 elem_type = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_elem_type(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _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(
          *shape_);
    }

    // optional int32 elem_type = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_elem_type());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_Tensor::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto_Tensor*>(
      &from));
}

void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
// @@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._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      elem_type_ = from.elem_type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, elem_type_)
      + sizeof(TypeProto_Tensor::elem_type_)
      - PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, shape_)>(
          reinterpret_cast<char*>(&shape_),
          reinterpret_cast<char*>(&other->shape_));
}

std::string TypeProto_Tensor::GetTypeName() const {
  return "opencv_onnx.TypeProto.Tensor";
}


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

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

const ::opencv_onnx::TypeProto&
TypeProto_Sequence::_Internal::elem_type(const TypeProto_Sequence* msg) {
  return *msg->elem_type_;
}
TypeProto_Sequence::TypeProto_Sequence(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Sequence)
}
TypeProto_Sequence::TypeProto_Sequence(const TypeProto_Sequence& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_elem_type()) {
    elem_type_ = new ::opencv_onnx::TypeProto(*from.elem_type_);
  } else {
    elem_type_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Sequence)
}

inline void TypeProto_Sequence::SharedCtor() {
elem_type_ = nullptr;
}

TypeProto_Sequence::~TypeProto_Sequence() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Sequence)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TypeProto_Sequence::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete elem_type_;
}

void TypeProto_Sequence::ArenaDtor(void* object) {
  TypeProto_Sequence* _this = reinterpret_cast< TypeProto_Sequence* >(object);
  (void)_this;
}
void TypeProto_Sequence::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto_Sequence::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(elem_type_ != nullptr);
    elem_type_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto_Sequence::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .opencv_onnx.TypeProto elem_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_elem_type(), 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .opencv_onnx.TypeProto elem_type = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::elem_type(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Sequence)
  return target;
}

size_t TypeProto_Sequence::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Sequence)
  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 .opencv_onnx.TypeProto elem_type = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *elem_type_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_Sequence::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto_Sequence*>(
      &from));
}

void TypeProto_Sequence::MergeFrom(const TypeProto_Sequence& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Sequence)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_elem_type()) {
    _internal_mutable_elem_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_elem_type());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void TypeProto_Sequence::InternalSwap(TypeProto_Sequence* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(elem_type_, other->elem_type_);
}

std::string TypeProto_Sequence::GetTypeName() const {
  return "opencv_onnx.TypeProto.Sequence";
}


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

class TypeProto_Map::_Internal {
 public:
  using HasBits = decltype(std::declval<TypeProto_Map>()._has_bits_);
  static void set_has_key_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::opencv_onnx::TypeProto& value_type(const TypeProto_Map* msg);
  static void set_has_value_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::opencv_onnx::TypeProto&
TypeProto_Map::_Internal::value_type(const TypeProto_Map* msg) {
  return *msg->value_type_;
}
TypeProto_Map::TypeProto_Map(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Map)
}
TypeProto_Map::TypeProto_Map(const TypeProto_Map& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_value_type()) {
    value_type_ = new ::opencv_onnx::TypeProto(*from.value_type_);
  } else {
    value_type_ = nullptr;
  }
  key_type_ = from.key_type_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Map)
}

inline void TypeProto_Map::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&value_type_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&key_type_) -
    reinterpret_cast<char*>(&value_type_)) + sizeof(key_type_));
}

TypeProto_Map::~TypeProto_Map() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Map)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TypeProto_Map::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete value_type_;
}

void TypeProto_Map::ArenaDtor(void* object) {
  TypeProto_Map* _this = reinterpret_cast< TypeProto_Map* >(object);
  (void)_this;
}
void TypeProto_Map::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto_Map::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(value_type_ != nullptr);
    value_type_->Clear();
  }
  key_type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto_Map::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 key_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_key_type(&has_bits);
          key_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_onnx.TypeProto value_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_value_type(), 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 key_type = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_key_type(), target);
  }

  // optional .opencv_onnx.TypeProto value_type = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::value_type(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Map)
  return target;
}

size_t TypeProto_Map::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Map)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .opencv_onnx.TypeProto value_type = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_type_);
    }

    // optional int32 key_type = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_key_type());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_Map::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto_Map*>(
      &from));
}

void TypeProto_Map::MergeFrom(const TypeProto_Map& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Map)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_value_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_value_type());
    }
    if (cached_has_bits & 0x00000002u) {
      key_type_ = from.key_type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string TypeProto_Map::GetTypeName() const {
  return "opencv_onnx.TypeProto.Map";
}


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

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

const ::opencv_onnx::TypeProto&
TypeProto_Optional::_Internal::elem_type(const TypeProto_Optional* msg) {
  return *msg->elem_type_;
}
TypeProto_Optional::TypeProto_Optional(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Optional)
}
TypeProto_Optional::TypeProto_Optional(const TypeProto_Optional& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_elem_type()) {
    elem_type_ = new ::opencv_onnx::TypeProto(*from.elem_type_);
  } else {
    elem_type_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Optional)
}

inline void TypeProto_Optional::SharedCtor() {
elem_type_ = nullptr;
}

TypeProto_Optional::~TypeProto_Optional() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Optional)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TypeProto_Optional::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete elem_type_;
}

void TypeProto_Optional::ArenaDtor(void* object) {
  TypeProto_Optional* _this = reinterpret_cast< TypeProto_Optional* >(object);
  (void)_this;
}
void TypeProto_Optional::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto_Optional::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(elem_type_ != nullptr);
    elem_type_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto_Optional::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .opencv_onnx.TypeProto elem_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_elem_type(), 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .opencv_onnx.TypeProto elem_type = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::elem_type(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Optional)
  return target;
}

size_t TypeProto_Optional::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Optional)
  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 .opencv_onnx.TypeProto elem_type = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *elem_type_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_Optional::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto_Optional*>(
      &from));
}

void TypeProto_Optional::MergeFrom(const TypeProto_Optional& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Optional)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_elem_type()) {
    _internal_mutable_elem_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_elem_type());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void TypeProto_Optional::InternalSwap(TypeProto_Optional* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(elem_type_, other->elem_type_);
}

std::string TypeProto_Optional::GetTypeName() const {
  return "opencv_onnx.TypeProto.Optional";
}


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

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

const ::opencv_onnx::TensorShapeProto&
TypeProto_SparseTensor::_Internal::shape(const TypeProto_SparseTensor* msg) {
  return *msg->shape_;
}
TypeProto_SparseTensor::TypeProto_SparseTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.SparseTensor)
}
TypeProto_SparseTensor::TypeProto_SparseTensor(const TypeProto_SparseTensor& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  elem_type_ = from.elem_type_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.SparseTensor)
}

inline void TypeProto_SparseTensor::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&elem_type_) -
    reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
}

TypeProto_SparseTensor::~TypeProto_SparseTensor() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.SparseTensor)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

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

void TypeProto_SparseTensor::ArenaDtor(void* object) {
  TypeProto_SparseTensor* _this = reinterpret_cast< TypeProto_SparseTensor* >(object);
  (void)_this;
}
void TypeProto_SparseTensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto_SparseTensor::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(shape_ != nullptr);
    shape_->Clear();
  }
  elem_type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto_SparseTensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 elem_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_elem_type(&has_bits);
          elem_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 elem_type = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_elem_type(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.SparseTensor)
  return target;
}

size_t TypeProto_SparseTensor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.SparseTensor)
  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 = _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(
          *shape_);
    }

    // optional int32 elem_type = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_elem_type());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto_SparseTensor::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto_SparseTensor*>(
      &from));
}

void TypeProto_SparseTensor::MergeFrom(const TypeProto_SparseTensor& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.SparseTensor)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      elem_type_ = from.elem_type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string TypeProto_SparseTensor::GetTypeName() const {
  return "opencv_onnx.TypeProto.SparseTensor";
}


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

class TypeProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TypeProto>()._has_bits_);
  static const ::opencv_onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg);
  static const ::opencv_onnx::TypeProto_Sequence& sequence_type(const TypeProto* msg);
  static const ::opencv_onnx::TypeProto_Map& map_type(const TypeProto* msg);
  static const ::opencv_onnx::TypeProto_Optional& optional_type(const TypeProto* msg);
  static const ::opencv_onnx::TypeProto_SparseTensor& sparse_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->value_.tensor_type_;
}
const ::opencv_onnx::TypeProto_Sequence&
TypeProto::_Internal::sequence_type(const TypeProto* msg) {
  return *msg->value_.sequence_type_;
}
const ::opencv_onnx::TypeProto_Map&
TypeProto::_Internal::map_type(const TypeProto* msg) {
  return *msg->value_.map_type_;
}
const ::opencv_onnx::TypeProto_Optional&
TypeProto::_Internal::optional_type(const TypeProto* msg) {
  return *msg->value_.optional_type_;
}
const ::opencv_onnx::TypeProto_SparseTensor&
TypeProto::_Internal::sparse_tensor_type(const TypeProto* msg) {
  return *msg->value_.sparse_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::InternalHelper<::opencv_onnx::TypeProto_Tensor>::GetOwningArena(tensor_type);
    if (message_arena != submessage_arena) {
      tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, tensor_type, submessage_arena);
    }
    set_has_tensor_type();
    value_.tensor_type_ = tensor_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
}
void TypeProto::set_allocated_sequence_type(::opencv_onnx::TypeProto_Sequence* sequence_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_value();
  if (sequence_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Sequence>::GetOwningArena(sequence_type);
    if (message_arena != submessage_arena) {
      sequence_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, sequence_type, submessage_arena);
    }
    set_has_sequence_type();
    value_.sequence_type_ = sequence_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.sequence_type)
}
void TypeProto::set_allocated_map_type(::opencv_onnx::TypeProto_Map* map_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_value();
  if (map_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Map>::GetOwningArena(map_type);
    if (message_arena != submessage_arena) {
      map_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, map_type, submessage_arena);
    }
    set_has_map_type();
    value_.map_type_ = map_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.map_type)
}
void TypeProto::set_allocated_optional_type(::opencv_onnx::TypeProto_Optional* optional_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_value();
  if (optional_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Optional>::GetOwningArena(optional_type);
    if (message_arena != submessage_arena) {
      optional_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, optional_type, submessage_arena);
    }
    set_has_optional_type();
    value_.optional_type_ = optional_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.optional_type)
}
void TypeProto::set_allocated_sparse_tensor_type(::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_value();
  if (sparse_tensor_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_SparseTensor>::GetOwningArena(sparse_tensor_type);
    if (message_arena != submessage_arena) {
      sparse_tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, sparse_tensor_type, submessage_arena);
    }
    set_has_sparse_tensor_type();
    value_.sparse_tensor_type_ = sparse_tensor_type;
  }
  // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.sparse_tensor_type)
}
TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto)
}
TypeProto::TypeProto(const TypeProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_denotation()) {
    denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
      GetArenaForAllocation());
  }
  clear_has_value();
  switch (from.value_case()) {
    case kTensorType: {
      _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
      break;
    }
    case kSequenceType: {
      _internal_mutable_sequence_type()->::opencv_onnx::TypeProto_Sequence::MergeFrom(from._internal_sequence_type());
      break;
    }
    case kMapType: {
      _internal_mutable_map_type()->::opencv_onnx::TypeProto_Map::MergeFrom(from._internal_map_type());
      break;
    }
    case kOptionalType: {
      _internal_mutable_optional_type()->::opencv_onnx::TypeProto_Optional::MergeFrom(from._internal_optional_type());
      break;
    }
    case kSparseTensorType: {
      _internal_mutable_sparse_tensor_type()->::opencv_onnx::TypeProto_SparseTensor::MergeFrom(from._internal_sparse_tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
}

inline void TypeProto::SharedCtor() {
denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
clear_has_value();
}

TypeProto::~TypeProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void TypeProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_value()) {
    clear_value();
  }
}

void TypeProto::ArenaDtor(void* object) {
  TypeProto* _this = reinterpret_cast< TypeProto* >(object);
  (void)_this;
}
void TypeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TypeProto::SetCachedSize(int size) const {
  _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 value_.tensor_type_;
      }
      break;
    }
    case kSequenceType: {
      if (GetArenaForAllocation() == nullptr) {
        delete value_.sequence_type_;
      }
      break;
    }
    case kMapType: {
      if (GetArenaForAllocation() == nullptr) {
        delete value_.map_type_;
      }
      break;
    }
    case kOptionalType: {
      if (GetArenaForAllocation() == nullptr) {
        delete value_.optional_type_;
      }
      break;
    }
    case kSparseTensorType: {
      if (GetArenaForAllocation() == nullptr) {
        delete value_.sparse_tensor_type_;
      }
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    denotation_.ClearNonDefaultToEmpty();
  }
  clear_value();
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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;
      // .opencv_onnx.TypeProto.Sequence sequence_type = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_sequence_type(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .opencv_onnx.TypeProto.Map map_type = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_map_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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_sparse_tensor_type(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .opencv_onnx.TypeProto.Optional optional_type = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_optional_type(), 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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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;

  switch (value_case()) {
    case kTensorType: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::tensor_type(this), target, stream);
      break;
    }
    case kSequenceType: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          4, _Internal::sequence_type(this), target, stream);
      break;
    }
    case kMapType: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          5, _Internal::map_type(this), target, stream);
      break;
    }
    default: ;
  }
  cached_has_bits = _has_bits_[0];
  // optional string denotation = 6;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_denotation(), target);
  }

  switch (value_case()) {
    case kSparseTensorType: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          8, _Internal::sparse_tensor_type(this), target, stream);
      break;
    }
    case kOptionalType: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          9, _Internal::optional_type(this), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _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(
          *value_.tensor_type_);
      break;
    }
    // .opencv_onnx.TypeProto.Sequence sequence_type = 4;
    case kSequenceType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_.sequence_type_);
      break;
    }
    // .opencv_onnx.TypeProto.Map map_type = 5;
    case kMapType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_.map_type_);
      break;
    }
    // .opencv_onnx.TypeProto.Optional optional_type = 9;
    case kOptionalType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_.optional_type_);
      break;
    }
    // .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8;
    case kSparseTensorType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_.sparse_tensor_type_);
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TypeProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TypeProto*>(
      &from));
}

void TypeProto::MergeFrom(const TypeProto& from) {
// @@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()) {
    _internal_set_denotation(from._internal_denotation());
  }
  switch (from.value_case()) {
    case kTensorType: {
      _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
      break;
    }
    case kSequenceType: {
      _internal_mutable_sequence_type()->::opencv_onnx::TypeProto_Sequence::MergeFrom(from._internal_sequence_type());
      break;
    }
    case kMapType: {
      _internal_mutable_map_type()->::opencv_onnx::TypeProto_Map::MergeFrom(from._internal_map_type());
      break;
    }
    case kOptionalType: {
      _internal_mutable_optional_type()->::opencv_onnx::TypeProto_Optional::MergeFrom(from._internal_optional_type());
      break;
    }
    case kSparseTensorType: {
      _internal_mutable_sparse_tensor_type()->::opencv_onnx::TypeProto_SparseTensor::MergeFrom(from._internal_sparse_tensor_type());
      break;
    }
    case VALUE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &denotation_, lhs_arena,
      &other->denotation_, rhs_arena
  );
  swap(value_, other->value_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

std::string TypeProto::GetTypeName() const {
  return "opencv_onnx.TypeProto";
}


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

class OperatorSetIdProto::_Internal {
 public:
  using HasBits = decltype(std::declval<OperatorSetIdProto>()._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::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.OperatorSetIdProto)
}
OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
      GetArenaForAllocation());
  }
  version_ = from.version_;
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
}

inline void OperatorSetIdProto::SharedCtor() {
domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
version_ = int64_t{0};
}

OperatorSetIdProto::~OperatorSetIdProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void OperatorSetIdProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void OperatorSetIdProto::ArenaDtor(void* object) {
  OperatorSetIdProto* _this = reinterpret_cast< OperatorSetIdProto* >(object);
  (void)_this;
}
void OperatorSetIdProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void OperatorSetIdProto::SetCachedSize(int size) const {
  _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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    domain_.ClearNonDefaultToEmpty();
  }
  version_ = int64_t{0};
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } 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);
          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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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 = _has_bits_[0];
  // optional string domain = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_domain(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_version());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void OperatorSetIdProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const OperatorSetIdProto*>(
      &from));
}

void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
// @@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._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000002u) {
      version_ = from.version_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &domain_, lhs_arena,
      &other->domain_, rhs_arena
  );
  swap(version_, other->version_);
}

std::string OperatorSetIdProto::GetTypeName() const {
  return "opencv_onnx.OperatorSetIdProto";
}


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

class FunctionProto::_Internal {
 public:
  using HasBits = decltype(std::declval<FunctionProto>()._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;
  }
  static void set_has_domain(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_overload(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

FunctionProto::FunctionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  input_(arena),
  output_(arena),
  attribute_(arena),
  node_(arena),
  opset_import_(arena),
  attribute_proto_(arena),
  value_info_(arena),
  metadata_props_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:opencv_onnx.FunctionProto)
}
FunctionProto::FunctionProto(const FunctionProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      input_(from.input_),
      output_(from.output_),
      attribute_(from.attribute_),
      node_(from.node_),
      opset_import_(from.opset_import_),
      attribute_proto_(from.attribute_proto_),
      value_info_(from.value_info_),
      metadata_props_(from.metadata_props_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
      GetArenaForAllocation());
  }
  doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_doc_string()) {
    doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
      GetArenaForAllocation());
  }
  domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_domain()) {
    domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
      GetArenaForAllocation());
  }
  overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_overload()) {
    overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_overload(),
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_onnx.FunctionProto)
}

inline void FunctionProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

FunctionProto::~FunctionProto() {
  // @@protoc_insertion_point(destructor:opencv_onnx.FunctionProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void FunctionProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  overload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void FunctionProto::ArenaDtor(void* object) {
  FunctionProto* _this = reinterpret_cast< FunctionProto* >(object);
  (void)_this;
}
void FunctionProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FunctionProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  input_.Clear();
  output_.Clear();
  attribute_.Clear();
  node_.Clear();
  opset_import_.Clear();
  attribute_proto_.Clear();
  value_info_.Clear();
  metadata_props_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      doc_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      domain_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      overload_.ClearNonDefaultToEmpty();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* FunctionProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string input = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_input();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string output = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_output();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string attribute = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_attribute();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 .opencv_onnx.NodeProto node = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          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<58>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string doc_string = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_doc_string();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          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<74>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string domain = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_domain();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_onnx.AttributeProto attribute_proto = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_attribute_proto(), 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 value_info = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          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<98>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string overload = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          auto str = _internal_mutable_overload();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(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<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // repeated string input = 4;
  for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
    const auto& s = this->_internal_input(i);
    target = stream->WriteString(4, s, target);
  }

  // repeated string output = 5;
  for (int i = 0, n = this->_internal_output_size(); i < n; i++) {
    const auto& s = this->_internal_output(i);
    target = stream->WriteString(5, s, target);
  }

  // repeated string attribute = 6;
  for (int i = 0, n = this->_internal_attribute_size(); i < n; i++) {
    const auto& s = this->_internal_attribute(i);
    target = stream->WriteString(6, s, target);
  }

  // repeated .opencv_onnx.NodeProto node = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, this->_internal_node(i), target, stream);
  }

  // optional string doc_string = 8;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_doc_string(), target);
  }

  // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_opset_import_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, this->_internal_opset_import(i), target, stream);
  }

  // optional string domain = 10;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        10, this->_internal_domain(), target);
  }

  // repeated .opencv_onnx.AttributeProto attribute_proto = 11;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_attribute_proto_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, this->_internal_attribute_proto(i), target, stream);
  }

  // repeated .opencv_onnx.ValueInfoProto value_info = 12;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_value_info_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, this->_internal_value_info(i), target, stream);
  }

  // optional string overload = 13;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_overload(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.FunctionProto)
  return target;
}

size_t FunctionProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.FunctionProto)
  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 = 4;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
  for (int i = 0, n = input_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      input_.Get(i));
  }

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

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

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

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

  // repeated .opencv_onnx.AttributeProto attribute_proto = 11;
  total_size += 1UL * this->_internal_attribute_proto_size();
  for (const auto& msg : this->attribute_proto_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_onnx.ValueInfoProto value_info = 12;
  total_size += 1UL * this->_internal_value_info_size();
  for (const auto& msg : this->value_info_) {
    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->metadata_props_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // 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 = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_doc_string());
    }

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

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

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FunctionProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const FunctionProto*>(
      &from));
}

void FunctionProto::MergeFrom(const FunctionProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.FunctionProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  input_.MergeFrom(from.input_);
  output_.MergeFrom(from.output_);
  attribute_.MergeFrom(from.attribute_);
  node_.MergeFrom(from.node_);
  opset_import_.MergeFrom(from.opset_import_);
  attribute_proto_.MergeFrom(from.attribute_proto_);
  value_info_.MergeFrom(from.value_info_);
  metadata_props_.MergeFrom(from.metadata_props_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_doc_string(from._internal_doc_string());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_domain(from._internal_domain());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_overload(from._internal_overload());
    }
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void FunctionProto::InternalSwap(FunctionProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  input_.InternalSwap(&other->input_);
  output_.InternalSwap(&other->output_);
  attribute_.InternalSwap(&other->attribute_);
  node_.InternalSwap(&other->node_);
  opset_import_.InternalSwap(&other->opset_import_);
  attribute_proto_.InternalSwap(&other->attribute_proto_);
  value_info_.InternalSwap(&other->value_info_);
  metadata_props_.InternalSwap(&other->metadata_props_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &doc_string_, lhs_arena,
      &other->doc_string_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &domain_, lhs_arena,
      &other->domain_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &overload_, lhs_arena,
      &other->overload_, rhs_arena
  );
}

std::string FunctionProto::GetTypeName() const {
  return "opencv_onnx.FunctionProto";
}


// @@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::IntIntListEntryProto* Arena::CreateMaybeMessage< ::opencv_onnx::IntIntListEntryProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::IntIntListEntryProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeDeviceConfigurationProto* Arena::CreateMaybeMessage< ::opencv_onnx::NodeDeviceConfigurationProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::NodeDeviceConfigurationProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::ShardingSpecProto* Arena::CreateMaybeMessage< ::opencv_onnx::ShardingSpecProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::ShardingSpecProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::ShardedDimProto* Arena::CreateMaybeMessage< ::opencv_onnx::ShardedDimProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::ShardedDimProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::SimpleShardedDimProto* Arena::CreateMaybeMessage< ::opencv_onnx::SimpleShardedDimProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::SimpleShardedDimProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TrainingInfoProto* Arena::CreateMaybeMessage< ::opencv_onnx::TrainingInfoProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TrainingInfoProto >(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::DeviceConfigurationProto* Arena::CreateMaybeMessage< ::opencv_onnx::DeviceConfigurationProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::DeviceConfigurationProto >(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::TensorAnnotation* Arena::CreateMaybeMessage< ::opencv_onnx::TensorAnnotation >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TensorAnnotation >(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::SparseTensorProto* Arena::CreateMaybeMessage< ::opencv_onnx::SparseTensorProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::SparseTensorProto >(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_Sequence* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Sequence >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Sequence >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Map* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Map >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Map >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Optional* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Optional >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Optional >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_SparseTensor* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_SparseTensor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_SparseTensor >(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);
}
template<> PROTOBUF_NOINLINE ::opencv_onnx::FunctionProto* Arena::CreateMaybeMessage< ::opencv_onnx::FunctionProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_onnx::FunctionProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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