/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.9.1 */

#ifndef PB_ONNX_ONNX_PB_H_INCLUDED
#define PB_ONNX_ONNX_PB_H_INCLUDED
#include <pb.h>

#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif

/* Enum definitions */
/* Versioning

 ONNX versioning is specified in docs/IR.md and elaborated on in docs/Versioning.md

 To be compatible with both proto2 and proto3, we will use a version number
 that is not defined by the default value but an explicit enum number. */
typedef enum _onnx_Version {
    /* proto3 requires the first enum value to be zero.
 We add this just to appease the compiler. */
    onnx_Version__START_VERSION = 0,
    /* The version field is always serialized and we will use it to store the
 version that the  graph is generated from. This helps us set up version
 control.
 For the IR, we are using simple numbers starting with 0x00000001,
 which was the version we published on Oct 10, 2017. */
    onnx_Version_IR_VERSION_2017_10_10 = 1,
    /* IR_VERSION 2 published on Oct 30, 2017
 - Added type discriminator to AttributeProto to support proto3 users */
    onnx_Version_IR_VERSION_2017_10_30 = 2,
    /* IR VERSION 3 published on Nov 3, 2017
 - For operator versioning:
    - Added new message OperatorSetIdProto
    - Added opset_import in ModelProto
 - For vendor extensions, added domain in NodeProto */
    onnx_Version_IR_VERSION_2017_11_3 = 3,
    /* IR VERSION 4 published on Jan 22, 2019
 - Relax constraint that initializers should be a subset of graph inputs
 - Add type BFLOAT16 */
    onnx_Version_IR_VERSION_2019_1_22 = 4,
    /* IR VERSION 5 published on March 18, 2019
 - Add message TensorAnnotation.
 - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. */
    onnx_Version_IR_VERSION_2019_3_18 = 5,
    /* IR VERSION 6 published on Sep 19, 2019
 - Add support for sparse tensor constants stored in model.
   - Add message SparseTensorProto
   - Add sparse initializers */
    onnx_Version_IR_VERSION_2019_9_19 = 6,
    /* IR VERSION 7 published on May 8, 2020
 - Add support to allow function body graph to rely on multiple external operator sets.
 - Add a list to promote inference graph's initializers to global and
   mutable variables. Global variables are visible in all graphs of the
   stored models.
 - Add message TrainingInfoProto to store initialization
   method and training algorithm. The execution of TrainingInfoProto
   can modify the values of mutable variables.
 - Implicitly add inference graph into each TrainingInfoProto's algorithm. */
    onnx_Version_IR_VERSION_2020_5_8 = 7,
    /* IR VERSION 8 published on July 30, 2021
 Introduce TypeProto.SparseTensor
 Introduce TypeProto.Optional
 Added a list of FunctionProtos local to the model
 Deprecated since_version and operator status from FunctionProto */
    onnx_Version_IR_VERSION_2021_7_30 = 8,
    /* IR VERSION 9 published on May 5, 2023
 Added AttributeProto to FunctionProto so that default attribute values can be set.
 Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ. */
    onnx_Version_IR_VERSION_2023_5_5 = 9,
    /* IR VERSION 10 published on March 25, 2024
 Added UINT4, INT4, overload field for functions and metadata_props on multiple proto definitions. */
    onnx_Version_IR_VERSION_2024_3_25 = 10,
    /* IR VERSION 11 published on May 12, 2025
 Added FLOAT4E2M1, multi-device protobuf classes. */
    onnx_Version_IR_VERSION_2025_05_12 = 11,
    /* IR VERSION 12 published on August 26, 2025
 Added FLOAT8E8M0. */
    onnx_Version_IR_VERSION_2025_08_26 = 12,
    /* IR VERSION 13 published on November 6, 2025
 Added UINT2, INT2. */
    onnx_Version_IR_VERSION = 13
} onnx_Version;

/* Operator/function status. */
typedef enum _onnx_OperatorStatus {
    onnx_OperatorStatus_EXPERIMENTAL = 0,
    onnx_OperatorStatus_STABLE = 1
} onnx_OperatorStatus;

/* Note: this enum is structurally identical to the OpSchema::AttrType
 enum defined in schema.h.  If you rev one, you likely need to rev the other. */
typedef enum _onnx_AttributeProto_AttributeType {
    onnx_AttributeProto_AttributeType_UNDEFINED = 0,
    onnx_AttributeProto_AttributeType_FLOAT = 1,
    onnx_AttributeProto_AttributeType_INT = 2,
    onnx_AttributeProto_AttributeType_STRING = 3,
    onnx_AttributeProto_AttributeType_TENSOR = 4,
    onnx_AttributeProto_AttributeType_GRAPH = 5,
    onnx_AttributeProto_AttributeType_SPARSE_TENSOR = 11,
    onnx_AttributeProto_AttributeType_TYPE_PROTO = 13,
    onnx_AttributeProto_AttributeType_FLOATS = 6,
    onnx_AttributeProto_AttributeType_INTS = 7,
    onnx_AttributeProto_AttributeType_STRINGS = 8,
    onnx_AttributeProto_AttributeType_TENSORS = 9,
    onnx_AttributeProto_AttributeType_GRAPHS = 10,
    onnx_AttributeProto_AttributeType_SPARSE_TENSORS = 12,
    onnx_AttributeProto_AttributeType_TYPE_PROTOS = 14
} onnx_AttributeProto_AttributeType;

typedef enum _onnx_TensorProto_DataType {
    onnx_TensorProto_DataType_UNDEFINED = 0,
    /* Basic types. */
    onnx_TensorProto_DataType_FLOAT = 1, /* float */
    onnx_TensorProto_DataType_UINT8 = 2, /* uint8_t */
    onnx_TensorProto_DataType_INT8 = 3, /* int8_t */
    onnx_TensorProto_DataType_UINT16 = 4, /* uint16_t */
    onnx_TensorProto_DataType_INT16 = 5, /* int16_t */
    onnx_TensorProto_DataType_INT32 = 6, /* int32_t */
    onnx_TensorProto_DataType_INT64 = 7, /* int64_t */
    onnx_TensorProto_DataType_STRING = 8, /* string */
    onnx_TensorProto_DataType_BOOL = 9, /* bool */
    /* IEEE754 half-precision floating-point format (16 bits wide).
 This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits. */
    onnx_TensorProto_DataType_FLOAT16 = 10,
    onnx_TensorProto_DataType_DOUBLE = 11,
    onnx_TensorProto_DataType_UINT32 = 12,
    onnx_TensorProto_DataType_UINT64 = 13,
    onnx_TensorProto_DataType_COMPLEX64 = 14, /* complex with float32 real and imaginary components */
    onnx_TensorProto_DataType_COMPLEX128 = 15, /* complex with float64 real and imaginary components */
    /* Non-IEEE floating-point format based on IEEE754 single-precision
 floating-point number truncated to 16 bits.
 This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits. */
    onnx_TensorProto_DataType_BFLOAT16 = 16,
    /* Non-IEEE floating-point format based on papers
 FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433,
 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf.
 Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear.
 The computation usually happens inside a block quantize / dequantize
 fused by the runtime. */
    onnx_TensorProto_DataType_FLOAT8E4M3FN = 17, /* float 8, mostly used for coefficients, supports nan, not inf */
    onnx_TensorProto_DataType_FLOAT8E4M3FNUZ = 18, /* float 8, mostly used for coefficients, supports nan, not inf, no negative zero */
    onnx_TensorProto_DataType_FLOAT8E5M2 = 19, /* follows IEEE 754, supports nan, inf, mostly used for gradients */
    onnx_TensorProto_DataType_FLOAT8E5M2FNUZ = 20, /* follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero */
    /* 4-bit integer data types */
    onnx_TensorProto_DataType_UINT4 = 21, /* Unsigned integer in range [0, 15] */
    onnx_TensorProto_DataType_INT4 = 22, /* Signed integer in range [-8, 7], using two's-complement representation */
    /* 4-bit floating point data types */
    onnx_TensorProto_DataType_FLOAT4E2M1 = 23,
    /* E8M0 type used as the scale for microscaling (MX) formats:
 https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf */
    onnx_TensorProto_DataType_FLOAT8E8M0 = 24,
    /* 2-bit integer data type */
    onnx_TensorProto_DataType_UINT2 = 25, /* Unsigned integer in range [0, 3] */
    onnx_TensorProto_DataType_INT2 = 26 /* Signed integer in range [-2, 1], using two's complement representation */
} onnx_TensorProto_DataType;

/* Location of the data for this tensor. MUST be one of:
 - DEFAULT - data stored inside the protobuf message. Data is stored in raw_data (if set) otherwise in type-specified field.
 - EXTERNAL - data stored in an external location as described by external_data field. */
typedef enum _onnx_TensorProto_DataLocation {
    onnx_TensorProto_DataLocation_DEFAULT = 0,
    onnx_TensorProto_DataLocation_EXTERNAL = 1
} onnx_TensorProto_DataLocation;

/* Struct definitions */
/* Nodes

 Computation graphs are made up of a DAG of nodes, which represent what is
 commonly called a "layer" or "pipeline stage" in machine learning frameworks.

 For example, it can be a node of type "Conv" that takes in an image, a filter
 tensor and a bias tensor, and produces the convolved output. */
typedef struct _onnx_NodeProto {
    pb_callback_t input; /* namespace Value */
    pb_callback_t output; /* namespace Value */
    /* An optional identifier for this node in a graph.
 This field MAY be absent in this version of the IR. */
    char name[256]; /* namespace Node */
    /* The symbolic identifier of the Operator to execute. */
    char op_type[128]; /* namespace Operator */
    /* Additional named attributes. */
    pb_callback_t attribute;
    /* The domain of the OperatorSet that specifies the operator named by op_type. */
    char domain[128]; /* namespace Domain */
    /* Overload identifier, used only to map this to a model-local function. */
    char overload[128];
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
    /* Configuration of multi-device annotations. */
    pb_callback_t device_configurations;
} onnx_NodeProto;

/* IntIntListEntryProto follows the pattern for cross-proto-version maps.
 See https://developers.google.com/protocol-buffers/docs/proto3#maps */
typedef struct _onnx_IntIntListEntryProto {
    int64_t key;
    pb_callback_t value;
} onnx_IntIntListEntryProto;

/* Multi-device configuration proto for NodeProto. */
typedef struct _onnx_NodeDeviceConfigurationProto {
    /* This field MUST be present for this version of the IR.
 ID of the configuration. MUST match the name of a DeviceConfigurationProto. */
    pb_callback_t configuration_id;
    /* Sharding spec for the node. */
    pb_callback_t sharding_spec;
    /* Pipeline stage of this node. */
    int32_t pipeline_stage;
} onnx_NodeDeviceConfigurationProto;

/* ShardingSpecProto: This describes the sharding spec for a specific
 input or output tensor of a node. */
typedef struct _onnx_ShardingSpecProto {
    /* This field MUST be present for this version of the IR.
 Identifies the input or output of the node that is being sharded.
 Required to match a name specified in the node's input or output list of ValueInfoProtos.
 It is called `logical tensor` in subsequent descriptions. */
    pb_callback_t tensor_name;
    /* The following is the list of devices across which the logical
 tensor is sharded or replicated. */
    pb_callback_t device;
    /* Each element v in above field devices may represent either a
 device or a set of devices (when we want the same shard/tensor
 to be replicated across a subset of devices), as indicated by
 the following optional map. If the map contains an entry for v,
 then v represents a device group, and the map indicates the set
 of devices in that group. */
    pb_callback_t index_to_device_group_map;
    /* The following is the sharded-shape of the tensor, consisting of
 the sharding-spec for each axis of the tensor. */
    pb_callback_t sharded_dim;
} onnx_ShardingSpecProto;

/* ShardedDimProto: This describes the sharding spec for a single
 axis of a sharded tensor. */
typedef struct _onnx_ShardedDimProto {
    /* This field MUST be present for this version of the IR.
 The axis this sharding corresponds to. Must be in the range of
 [-r, r - 1], where r is the rank of the tensor. Negative axis values means
 counting from the back. */
    int64_t axis;
    /* Describes how the tensor on the provided axis is sharded.
 The common-case is described by a single instance of SimpleShardedDimProto.
 Multiple instances can be used to handle cases where a sharded
 tensor is reshaped, fusing multiple axes into one. */
    pb_callback_t simple_sharding;
} onnx_ShardedDimProto;

/* SimpleShardedDimProto: Indicates that N blocks are divided into M shards.
 N is allowed to be symbolic where M is required to be a constant. */
typedef struct _onnx_SimpleShardedDimProto {
    pb_size_t which_dim;
    union {
        int64_t dim_value;
        pb_callback_t dim_param;
    } dim;
    /* This field MUST be present for this version of the IR.
 Number of shards to split dim into. */
    int64_t num_shards;
} onnx_SimpleShardedDimProto;

/* DeviceConfigurationProto describes a multi-device configuration for a model. */
typedef struct _onnx_DeviceConfigurationProto {
    /* This field MUST be present for this version of the IR.
 Name of the configuration. */
    pb_callback_t name;
    /* This field MUST be present for this version of the IR.
 Number of devices inside this configuration. */
    int32_t num_devices;
    /* Optional names of the devices. MUST be length of num_devices if provided. */
    pb_callback_t device;
} onnx_DeviceConfigurationProto;

/* StringStringEntryProto follows the pattern for cross-proto-version maps.
 See https://developers.google.com/protocol-buffers/docs/proto3#maps */
typedef struct _onnx_StringStringEntryProto {
    char key[256];
    char value[1024];
} onnx_StringStringEntryProto;

typedef struct _onnx_TensorAnnotation {
    pb_callback_t tensor_name;
    /* <key, value> pairs to annotate tensor specified by <tensor_name> above.
 The keys used in the mapping below must be pre-defined in ONNX spec.
 For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
 quantization parameter keys. */
    pb_callback_t quant_parameter_tensor_names;
} onnx_TensorAnnotation;

/* Graphs

 A graph defines the computational logic of a model and is comprised of a parameterized
 list of nodes that form a directed acyclic graph based on their inputs and outputs.
 This is the equivalent of the "network" or "graph" in many deep learning
 frameworks. */
typedef struct _onnx_GraphProto {
    /* The nodes in the graph, sorted topologically. */
    pb_callback_t node;
    /* The name of the graph. */
    char name[256]; /* namespace Graph */
    /* A list of named tensor values, used to specify constant inputs of the graph.
 Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
 The name MUST be unique across both initializer and sparse_initializer,
 but the name MAY also appear in the input list. */
    pb_callback_t initializer;
    /* The inputs and outputs of the graph. */
    pb_callback_t input;
    pb_callback_t output;
    /* Information for the values in the graph. The ValueInfoProto.name's
 must be distinct. It is optional for a value to appear in value_info list. */
    pb_callback_t value_info;
    /* This field carries information to indicate the mapping among a tensor and its
 quantization parameter tensors. For example:
 For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
 which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model. */
    pb_callback_t quantization_annotation;
    /* Initializers (see above) stored in sparse format. */
    pb_callback_t sparse_initializer;
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
} onnx_GraphProto;

/* Training information
 TrainingInfoProto stores information for training a model.
 In particular, this defines two functionalities: an initialization-step
 and a training-algorithm-step. Initialization resets the model
 back to its original state as if no training has been performed.
 Training algorithm improves the model based on input data.

 The semantics of the initialization-step is that the initializers
 in ModelProto.graph and in TrainingInfoProto.algorithm are first
 initialized as specified by the initializers in the graph, and then
 updated by the "initialization_binding" in every instance in
 ModelProto.training_info.

 The field "algorithm" defines a computation graph which represents a
 training algorithm's step. After the execution of a
 TrainingInfoProto.algorithm, the initializers specified by "update_binding"
 may be immediately updated. If the targeted training algorithm contains
 consecutive update steps (such as block coordinate descent methods),
 the user needs to create a TrainingInfoProto for each step. */
typedef struct _onnx_TrainingInfoProto {
    /* This field describes a graph to compute the initial tensors
 upon starting the training process. Initialization graph has no input
 and can have multiple outputs. Usually, trainable tensors in neural
 networks are randomly initialized. To achieve that, for each tensor,
 the user can put a random number operator such as RandomNormal or
 RandomUniform in TrainingInfoProto.initialization.node and assign its
 random output to the specific tensor using "initialization_binding".
 This graph can also set the initializers in "algorithm" in the same
 TrainingInfoProto; a use case is resetting the number of training
 iteration to zero.

 By default, this field is an empty graph and its evaluation does not
 produce any output. Thus, no initializer would be changed by default. */
    bool has_initialization;
    onnx_GraphProto initialization;
    /* This field represents a training algorithm step. Given required inputs,
 it computes outputs to update initializers in its own or inference graph's
 initializer lists. In general, this field contains loss node, gradient node,
 optimizer node, increment of iteration count.

 An execution of the training algorithm step is performed by executing the
 graph obtained by combining the inference graph (namely "ModelProto.graph")
 and the "algorithm" graph. That is, the actual
 input/initializer/output/node/value_info/sparse_initializer list of
 the training graph is the concatenation of
 "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
 and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
 in that order. This combined graph must satisfy the normal ONNX conditions.
 Now, let's provide a visualization of graph combination for clarity.
 Let the inference graph (i.e., "ModelProto.graph") be
    tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
 and the "algorithm" graph be
    tensor_d -> Add -> tensor_e
 The combination process results
    tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e

 Notice that an input of a node in the "algorithm" graph may reference the
 output of a node in the inference graph (but not the other way round). Also, inference
 node cannot reference inputs of "algorithm". With these restrictions, inference graph
 can always be run independently without training information.

 By default, this field is an empty graph and its evaluation does not
 produce any output. Evaluating the default training step never
 update any initializers. */
    bool has_algorithm;
    onnx_GraphProto algorithm;
    /* This field specifies the bindings from the outputs of "initialization" to
 some initializers in "ModelProto.graph.initializer" and
 the "algorithm.initializer" in the same TrainingInfoProto.
 See "update_binding" below for details.

 By default, this field is empty and no initializer would be changed
 by the execution of "initialization". */
    pb_callback_t initialization_binding;
    /* Gradient-based training is usually an iterative procedure. In one gradient
 descent iteration, we apply

 x = x - r * g

 where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
 gradient of "x" with respect to a chosen loss. To avoid adding assignments
 into the training graph, we split the update equation into

 y = x - r * g
 x = y

 The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
 tell that "y" should be assigned to "x", the field "update_binding" may
 contain a key-value pair of strings, "x" (key of StringStringEntryProto)
 and "y" (value of StringStringEntryProto).
 For a neural network with multiple trainable (mutable) tensors, there can
 be multiple key-value pairs in "update_binding".

 The initializers appears as keys in "update_binding" are considered
 mutable variables. This implies some behaviors
 as described below.

  1. We have only unique keys in all "update_binding"s so that two
     variables may not have the same name. This ensures that one
     variable is assigned up to once.
  2. The keys must appear in names of "ModelProto.graph.initializer" or
     "TrainingInfoProto.algorithm.initializer".
  3. The values must be output names of "algorithm" or "ModelProto.graph.output".
  4. Mutable variables are initialized to the value specified by the
     corresponding initializer, and then potentially updated by
     "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.

 This field usually contains names of trainable tensors
 (in ModelProto.graph), optimizer states such as momentums in advanced
 stochastic gradient methods (in TrainingInfoProto.graph),
 and number of training iterations (in TrainingInfoProto.graph).

 By default, this field is empty and no initializer would be changed
 by the execution of "algorithm". */
    pb_callback_t update_binding;
} onnx_TrainingInfoProto;

/* Models

 ModelProto is a top-level file/container format for bundling a ML model and
 associating its computation graph with metadata.

 The semantics of the model are described by the associated GraphProto's. */
typedef struct _onnx_ModelProto {
    /* The version of the IR this model targets. See Version enum above.
 This field MUST be present. */
    int64_t ir_version;
    /* The name of the framework or tool used to generate this model.
 This field SHOULD be present to indicate which implementation/tool/framework
 emitted the model. */
    char producer_name[256];
    /* The version of the framework or tool used to generate this model.
 This field SHOULD be present to indicate which implementation/tool/framework
 emitted the model. */
    char producer_version[256];
    /* Domain name of the model.
 We use reverse domain names as name space indicators. For example:
 `com.facebook.fair` or `com.microsoft.cognitiveservices`

 Together with `model_version` and GraphProto.name, this forms the unique identity of
 the graph. */
    char domain[256];
    /* The version of the graph encoded. See Version enum below. */
    int64_t model_version;
    /* The parameterized graph that is evaluated to execute the model. */
    bool has_graph;
    onnx_GraphProto graph;
    /* The OperatorSets this model relies on.
 All ModelProtos MUST have at least one entry that
 specifies which version of the ONNX OperatorSet is
 being imported.

 All nodes in the ModelProto's graph will bind against the operator
 with the same-domain/same-op_type operator with the HIGHEST version
 in the referenced operator sets. */
    pb_callback_t opset_import;
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
    /* A list of function protos local to the model.

 The (domain, name, overload) tuple must be unique across the function protos in this list.
 In case of any conflicts the behavior (whether the model local functions are given higher priority,
 or standard operator sets are given higher priority or this is treated as error) is defined by
 the runtimes.

 The operator sets imported by FunctionProto should be compatible with the ones
 imported by ModelProto and other model local FunctionProtos.
 Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
 or by 2 FunctionProtos then versions for the operator set may be different but,
 the operator schema returned for op_type, domain, version combination
 for both the versions should be same for every node in the function body.

 One FunctionProto can reference other FunctionProto in the model, however, recursive reference
 is not allowed. */
    pb_callback_t functions;
    /* Describes different target configurations for a multi-device use case.
 A model MAY describe multiple multi-device configurations for execution. */
    pb_callback_t configuration;
} onnx_ModelProto;

/* For very large tensors, we may want to store them in chunks, in which
 case the following fields will specify the segment that is stored in
 the current TensorProto. */
typedef struct _onnx_TensorProto_Segment {
    int64_t begin;
    int64_t end;
} onnx_TensorProto_Segment;

/* Tensors

 A serialized tensor value. */
typedef struct _onnx_TensorProto {
    /* The shape of the tensor. */
    pb_size_t dims_count;
    int64_t dims[8];
    /* The data type of the tensor.
 This field MUST have a valid TensorProto.DataType value */
    int32_t data_type;
    bool has_segment;
    onnx_TensorProto_Segment segment;
    /* For float and complex64 values
 Complex64 tensors are encoded as a single array of floats,
 with the real components appearing in odd numbered positions,
 and the corresponding imaginary component appearing in the
 subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
 is encoded as [1.0, 2.0 ,3.0 ,4.0]
 When this field is present, the data_type field MUST be FLOAT or COMPLEX64. */
    pb_callback_t float_data;
    /* For int32, uint8, int8, uint16, int16, uint4, int4, uint2, int2, bool, (b)float16, float8, and float4:
 - (b)float16 and float8 values MUST be converted bit-wise into an unsigned integer
   representation before being written to the buffer.
 - Each pair of uint4, int4, and float4 values MUST be packed as two 4-bit elements into a single byte.
   The first element is stored in the 4 least significant bits (LSB),
   and the second element is stored in the 4 most significant bits (MSB).
 - Each group of four uint2, int2 values MUST be packed as four 2-bit elements into a single byte.
   The elements are packed from LSB to MSB, with the first element in bits 0-1, second element in bits 2-3,
   third element in bits 4-5, and fourth element in bits 6-7.

 Consequently:
 - For data types with a bit-width of 8 or greater, each `int32_data` stores one element.
 - For 4-bit data types, each `int32_data` stores two elements.
 - For 2-bit data types, each `int32_data` stores four elements.

 When this field is present, the data_type field MUST be
 INT32, INT16, INT8, INT4, INT2, UINT16, UINT8, UINT4, UINT2, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ, FLOAT8E8M0, FLOAT4E2M1 */
    pb_callback_t int32_data;
    /* For strings.
 Each element of string_data is a UTF-8 encoded Unicode
 string. No trailing null, no leading BOM. The protobuf "string"
 scalar type is not used to match ML community conventions.
 When this field is present, the data_type field MUST be STRING */
    pb_callback_t string_data;
    /* For int64.
 When this field is present, the data_type field MUST be INT64 */
    pb_callback_t int64_data;
    /* Optionally, a name for the tensor. */
    char name[256]; /* namespace Value */
    /* Serializations can either use one of the fields above, or use this
 raw bytes field. The only exception is the string case, where one is
 required to store the content in the repeated bytes string_data field.

 When this raw_data field is used to store tensor value, elements MUST
 be stored in as fixed-width, little-endian order.
 Floating-point data types MUST be stored in IEEE 754 format.
 Complex64 elements must be written as two consecutive FLOAT values, real component first.
 Complex128 elements must be written as two consecutive DOUBLE values, real component first.
 Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
 uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
 uint2 and int2 values must be packed to 2bitx4, with elements packed from LSB to MSB in a single byte as: x0 | (x1 << 2) | (x2 << 4) | (x3 << 6)
 where x0, x1, x2, x3 are consecutive elements.

 Note: the advantage of specific field rather than the raw_data field is
 that in some cases (e.g. int data), protobuf does a better packing via
 variable length storage, and may lead to smaller binary footprint.
 When this field is present, the data_type field MUST NOT be STRING or UNDEFINED */
    pb_callback_t raw_data;
    /* For double
 Complex128 tensors are encoded as a single array of doubles,
 with the real components appearing in odd numbered positions,
 and the corresponding imaginary component appearing in the
 subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
 is encoded as [1.0, 2.0 ,3.0 ,4.0]
 When this field is present, the data_type field MUST be DOUBLE or COMPLEX128 */
    pb_callback_t double_data;
    /* For uint64 and uint32 values
 When this field is present, the data_type field MUST be
 UINT32 or UINT64 */
    pb_callback_t uint64_data;
    /* Data can be stored inside the protobuf file using type-specific fields or raw_data.
 Alternatively, raw bytes data can be stored in an external file, using the external_data field.
 external_data stores key-value pairs describing data location. Recognized keys are:
 - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
                           protobuf model was stored
 - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
                         Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
 - "length" (optional) - number of bytes containing data. Integer stored as string.
 - "checksum" (optional) - SHA1 digest of file specified in under 'location' key. */
    pb_callback_t external_data;
    /* If value not set, data is stored in raw_data (if set) otherwise in type-specified field. */
    onnx_TensorProto_DataLocation data_location;
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
} onnx_TensorProto;

/* A serialized sparse-tensor value */
typedef struct _onnx_SparseTensorProto {
    /* The sequence of non-default values are encoded as a tensor of shape [NNZ].
 The default-value is zero for numeric tensors, and empty-string for string tensors.
 values must have a non-empty name present which serves as a name for SparseTensorProto
 when used in sparse_initializer list. */
    bool has_values;
    onnx_TensorProto values;
    /* The indices of the non-default values, which may be stored in one of two formats.
 (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
 corresponding to the j-th index of the i-th value (in the values tensor).
 (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
 must be the linearized-index of the i-th value (in the values tensor).
 The linearized-index can be converted into an index tuple (k_1,...,k_rank)
 using the shape provided below.
 The indices must appear in ascending order without duplication.
 In the first format, the ordering is lexicographic-ordering:
 e.g., index-value [1,4] must appear before [2,1] */
    bool has_indices;
    onnx_TensorProto indices;
    /* The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] */
    pb_size_t dims_count;
    int64_t dims[8];
} onnx_SparseTensorProto;

/* Attributes

 A named attribute containing either singular float, integer, string, graph,
 and tensor values, or repeated float, integer, string, graph, and tensor values.
 An AttributeProto MUST contain the name field, and *only one* of the
 following content fields, effectively enforcing a C/C++ union equivalent. */
typedef struct _onnx_AttributeProto {
    /* The name field MUST be present for this version of the IR. */
    char name[256]; /* namespace Attribute */
    /* Exactly ONE of the following fields must be present for this version of the IR */
    float f; /* float */
    int64_t i; /* int */
    pb_callback_t s; /* UTF-8 string */
    pb_callback_t t; /* tensor value */
    pb_callback_t g; /* graph */
    pb_callback_t floats; /* list of floats */
    pb_callback_t ints; /* list of ints */
    pb_callback_t strings; /* list of UTF-8 strings */
    pb_callback_t tensors; /* list of tensors */
    pb_callback_t graphs; /* list of graph */
    /* Do not use field below, it's deprecated.
 optional ValueProto v = 12;         // value - subsumes everything but graph */
    pb_callback_t tp; /* type proto */
    pb_callback_t type_protos; /* list of type protos */
    /* The type field MUST be present for this version of the IR.
 For 0.0.1 versions of the IR, this field was not defined, and
 implementations needed to use has_field heuristics to determine
 which value field was in use.  For IR_VERSION 0.0.2 or later, this
 field MUST be set and match the f|i|s|t|... field in use.  This
 change was made to accommodate proto3 implementations. */
    onnx_AttributeProto_AttributeType type; /* discriminator that indicates which field below is in use */
    /* if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
 In this case, this AttributeProto does not contain data, and it's a reference of attribute
 in parent scope.
 NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph. */
    char ref_attr_name[256];
    bool has_sparse_tensor;
    onnx_SparseTensorProto sparse_tensor; /* sparse tensor value */
    pb_callback_t sparse_tensors; /* list of sparse tensors */
} onnx_AttributeProto;

typedef struct _onnx_TensorShapeProto_Dimension {
    pb_size_t which_value;
    union {
        int64_t dim_value;
        char dim_param[128]; /* namespace Shape */
    } value;
    /* Standard denotation can optionally be used to denote tensor
 dimensions with standard semantic descriptions to ensure
 that operations are applied to the correct axis of a tensor.
 Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
 for pre-defined dimension denotations. */
    pb_callback_t denotation;
} onnx_TensorShapeProto_Dimension;

/* Defines a tensor shape. A dimension can be either an integer value
 or a symbolic variable. A symbolic variable represents an unknown
 dimension. */
typedef struct _onnx_TensorShapeProto {
    pb_size_t dim_count;
    onnx_TensorShapeProto_Dimension dim[8];
} onnx_TensorShapeProto;

typedef struct _onnx_TypeProto_Tensor {
    /* This field MUST NOT have the value of UNDEFINED
 This field MUST have a valid TensorProto.DataType value
 This field MUST be present for this version of the IR. */
    int32_t elem_type;
    bool has_shape;
    onnx_TensorShapeProto shape;
} onnx_TypeProto_Tensor;

/* repeated T */
typedef struct _onnx_TypeProto_Sequence {
    /* The type and optional shape of each element of the sequence.
 This field MUST be present for this version of the IR. */
    pb_callback_t elem_type;
} onnx_TypeProto_Sequence;

/* map<K,V> */
typedef struct _onnx_TypeProto_Map {
    /* This field MUST have a valid TensorProto.DataType value
 This field MUST be present for this version of the IR.
 This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING */
    pb_callback_t key_type;
    /* This field MUST be present for this version of the IR. */
    pb_callback_t value_type;
} onnx_TypeProto_Map;

/* wrapper for Tensor, Sequence, or Map */
typedef struct _onnx_TypeProto_Optional {
    /* The type and optional shape of the element wrapped.
 This field MUST be present for this version of the IR.
 Possible values correspond to OptionalProto.DataType enum */
    pb_callback_t elem_type;
} onnx_TypeProto_Optional;

typedef struct _onnx_TypeProto_SparseTensor {
    /* This field MUST NOT have the value of UNDEFINED
 This field MUST have a valid TensorProto.DataType value
 This field MUST be present for this version of the IR. */
    int32_t elem_type;
    bool has_shape;
    onnx_TensorShapeProto shape;
} onnx_TypeProto_SparseTensor;

/* Types

 The standard ONNX data types. */
typedef struct _onnx_TypeProto {
    pb_size_t which_value;
    union {
        /* The type of a tensor. */
        onnx_TypeProto_Tensor tensor_type;
        /* The type of a sequence. */
        onnx_TypeProto_Sequence sequence_type;
        /* The type of a map. */
        onnx_TypeProto_Map map_type;
        /* Type of the sparse tensor */
        onnx_TypeProto_SparseTensor sparse_tensor_type;
        /* The type of an optional. */
        onnx_TypeProto_Optional optional_type;
    } value;
    /* An optional denotation can be used to denote the whole
 type with a standard semantic description as to what is
 stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
 for pre-defined type denotations. */
    char denotation[256];
} onnx_TypeProto;

/* Defines information on value, including the name, the type, and
 the shape of the value. */
typedef struct _onnx_ValueInfoProto {
    /* This field MUST be present in this version of the IR. */
    char name[256]; /* namespace Value */
    /* This field MUST be present in this version of the IR for
 inputs and outputs of the top-level graph. */
    bool has_type;
    onnx_TypeProto type;
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
} onnx_ValueInfoProto;

/* Operator Sets

 OperatorSets are uniquely identified by a (domain, opset_version) pair. */
typedef struct _onnx_OperatorSetIdProto {
    /* The domain of the operator set being identified.
 The empty string ("") or absence of this field implies the operator
 set that is defined as part of the ONNX specification.
 This field MUST be present in this version of the IR when referring to any other operator set. */
    char domain[256];
    /* The version of the operator set being identified.
 This field MUST be present in this version of the IR. */
    int64_t version;
} onnx_OperatorSetIdProto;

typedef struct _onnx_FunctionProto {
    /* The name of the function, similar to op_type in NodeProto.
 This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. */
    pb_callback_t name;
    /* The inputs and outputs of the function. */
    pb_callback_t input;
    pb_callback_t output;
    /* The attribute parameters of the function.
 It is for function parameters without default values. */
    pb_callback_t attribute;
    /* The nodes in the function. */
    pb_callback_t node;
    /* A human-readable documentation for this function. Markdown is allowed. */
    pb_callback_t doc_string;
    pb_callback_t opset_import;
    /* The domain which this function belongs to.
 This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. */
    pb_callback_t domain;
    /* The attribute protos of the function.
 It is for function attributes with default values.
 A function attribute shall be represented either as
 a string attribute or an AttributeProto, not both. */
    pb_callback_t attribute_proto;
    /* Information for the values in the function. The ValueInfoProto.name's
 must be distinct and refer to names in the function (including inputs,
 outputs, and intermediate values). It is optional for a value to appear
 in value_info list. */
    pb_callback_t value_info;
    /* The overload identifier of the function.
 This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. */
    pb_callback_t overload;
    /* Named metadata values; keys should be distinct. */
    pb_callback_t metadata_props;
} onnx_FunctionProto;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _onnx_Version_MIN onnx_Version__START_VERSION
#define _onnx_Version_MAX onnx_Version_IR_VERSION
#define _onnx_Version_ARRAYSIZE ((onnx_Version)(onnx_Version_IR_VERSION+1))

#define _onnx_OperatorStatus_MIN onnx_OperatorStatus_EXPERIMENTAL
#define _onnx_OperatorStatus_MAX onnx_OperatorStatus_STABLE
#define _onnx_OperatorStatus_ARRAYSIZE ((onnx_OperatorStatus)(onnx_OperatorStatus_STABLE+1))

#define _onnx_AttributeProto_AttributeType_MIN onnx_AttributeProto_AttributeType_UNDEFINED
#define _onnx_AttributeProto_AttributeType_MAX onnx_AttributeProto_AttributeType_TYPE_PROTOS
#define _onnx_AttributeProto_AttributeType_ARRAYSIZE ((onnx_AttributeProto_AttributeType)(onnx_AttributeProto_AttributeType_TYPE_PROTOS+1))

#define _onnx_TensorProto_DataType_MIN onnx_TensorProto_DataType_UNDEFINED
#define _onnx_TensorProto_DataType_MAX onnx_TensorProto_DataType_INT2
#define _onnx_TensorProto_DataType_ARRAYSIZE ((onnx_TensorProto_DataType)(onnx_TensorProto_DataType_INT2+1))

#define _onnx_TensorProto_DataLocation_MIN onnx_TensorProto_DataLocation_DEFAULT
#define _onnx_TensorProto_DataLocation_MAX onnx_TensorProto_DataLocation_EXTERNAL
#define _onnx_TensorProto_DataLocation_ARRAYSIZE ((onnx_TensorProto_DataLocation)(onnx_TensorProto_DataLocation_EXTERNAL+1))

#define onnx_AttributeProto_type_ENUMTYPE onnx_AttributeProto_AttributeType














#define onnx_TensorProto_data_location_ENUMTYPE onnx_TensorProto_DataLocation














/* Initializer values for message structs */
#define onnx_AttributeProto_init_default         {"", 0, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, _onnx_AttributeProto_AttributeType_MIN, "", false, onnx_SparseTensorProto_init_default, {{NULL}, NULL}}
#define onnx_ValueInfoProto_init_default         {"", false, onnx_TypeProto_init_default, {{NULL}, NULL}}
#define onnx_NodeProto_init_default              {{{NULL}, NULL}, {{NULL}, NULL}, "", "", {{NULL}, NULL}, "", "", {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_IntIntListEntryProto_init_default   {0, {{NULL}, NULL}}
#define onnx_NodeDeviceConfigurationProto_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0}
#define onnx_ShardingSpecProto_init_default      {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_ShardedDimProto_init_default        {0, {{NULL}, NULL}}
#define onnx_SimpleShardedDimProto_init_default  {0, {0}, 0}
#define onnx_TrainingInfoProto_init_default      {false, onnx_GraphProto_init_default, false, onnx_GraphProto_init_default, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_ModelProto_init_default             {0, "", "", "", 0, false, onnx_GraphProto_init_default, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_DeviceConfigurationProto_init_default {{{NULL}, NULL}, 0, {{NULL}, NULL}}
#define onnx_StringStringEntryProto_init_default {"", ""}
#define onnx_TensorAnnotation_init_default       {{{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_GraphProto_init_default             {{{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_TensorProto_init_default            {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, false, onnx_TensorProto_Segment_init_default, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, _onnx_TensorProto_DataLocation_MIN, {{NULL}, NULL}}
#define onnx_TensorProto_Segment_init_default    {0, 0}
#define onnx_SparseTensorProto_init_default      {false, onnx_TensorProto_init_default, false, onnx_TensorProto_init_default, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
#define onnx_TensorShapeProto_init_default       {0, {onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default, onnx_TensorShapeProto_Dimension_init_default}}
#define onnx_TensorShapeProto_Dimension_init_default {0, {0}, {{NULL}, NULL}}
#define onnx_TypeProto_init_default              {0, {onnx_TypeProto_Tensor_init_default}, ""}
#define onnx_TypeProto_Tensor_init_default       {0, false, onnx_TensorShapeProto_init_default}
#define onnx_TypeProto_Sequence_init_default     {{{NULL}, NULL}}
#define onnx_TypeProto_Map_init_default          {{{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_TypeProto_Optional_init_default     {{{NULL}, NULL}}
#define onnx_TypeProto_SparseTensor_init_default {0, false, onnx_TensorShapeProto_init_default}
#define onnx_OperatorSetIdProto_init_default     {"", 0}
#define onnx_FunctionProto_init_default          {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_AttributeProto_init_zero            {"", 0, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, _onnx_AttributeProto_AttributeType_MIN, "", false, onnx_SparseTensorProto_init_zero, {{NULL}, NULL}}
#define onnx_ValueInfoProto_init_zero            {"", false, onnx_TypeProto_init_zero, {{NULL}, NULL}}
#define onnx_NodeProto_init_zero                 {{{NULL}, NULL}, {{NULL}, NULL}, "", "", {{NULL}, NULL}, "", "", {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_IntIntListEntryProto_init_zero      {0, {{NULL}, NULL}}
#define onnx_NodeDeviceConfigurationProto_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0}
#define onnx_ShardingSpecProto_init_zero         {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_ShardedDimProto_init_zero           {0, {{NULL}, NULL}}
#define onnx_SimpleShardedDimProto_init_zero     {0, {0}, 0}
#define onnx_TrainingInfoProto_init_zero         {false, onnx_GraphProto_init_zero, false, onnx_GraphProto_init_zero, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_ModelProto_init_zero                {0, "", "", "", 0, false, onnx_GraphProto_init_zero, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_DeviceConfigurationProto_init_zero  {{{NULL}, NULL}, 0, {{NULL}, NULL}}
#define onnx_StringStringEntryProto_init_zero    {"", ""}
#define onnx_TensorAnnotation_init_zero          {{{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_GraphProto_init_zero                {{{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_TensorProto_init_zero               {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, false, onnx_TensorProto_Segment_init_zero, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, _onnx_TensorProto_DataLocation_MIN, {{NULL}, NULL}}
#define onnx_TensorProto_Segment_init_zero       {0, 0}
#define onnx_SparseTensorProto_init_zero         {false, onnx_TensorProto_init_zero, false, onnx_TensorProto_init_zero, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
#define onnx_TensorShapeProto_init_zero          {0, {onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero, onnx_TensorShapeProto_Dimension_init_zero}}
#define onnx_TensorShapeProto_Dimension_init_zero {0, {0}, {{NULL}, NULL}}
#define onnx_TypeProto_init_zero                 {0, {onnx_TypeProto_Tensor_init_zero}, ""}
#define onnx_TypeProto_Tensor_init_zero          {0, false, onnx_TensorShapeProto_init_zero}
#define onnx_TypeProto_Sequence_init_zero        {{{NULL}, NULL}}
#define onnx_TypeProto_Map_init_zero             {{{NULL}, NULL}, {{NULL}, NULL}}
#define onnx_TypeProto_Optional_init_zero        {{{NULL}, NULL}}
#define onnx_TypeProto_SparseTensor_init_zero    {0, false, onnx_TensorShapeProto_init_zero}
#define onnx_OperatorSetIdProto_init_zero        {"", 0}
#define onnx_FunctionProto_init_zero             {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}

/* Field tags (for use in manual encoding/decoding) */
#define onnx_NodeProto_input_tag                 1
#define onnx_NodeProto_output_tag                2
#define onnx_NodeProto_name_tag                  3
#define onnx_NodeProto_op_type_tag               4
#define onnx_NodeProto_attribute_tag             5
#define onnx_NodeProto_domain_tag                7
#define onnx_NodeProto_overload_tag              8
#define onnx_NodeProto_metadata_props_tag        9
#define onnx_NodeProto_device_configurations_tag 10
#define onnx_IntIntListEntryProto_key_tag        1
#define onnx_IntIntListEntryProto_value_tag      2
#define onnx_NodeDeviceConfigurationProto_configuration_id_tag 1
#define onnx_NodeDeviceConfigurationProto_sharding_spec_tag 2
#define onnx_NodeDeviceConfigurationProto_pipeline_stage_tag 3
#define onnx_ShardingSpecProto_tensor_name_tag   1
#define onnx_ShardingSpecProto_device_tag        2
#define onnx_ShardingSpecProto_index_to_device_group_map_tag 3
#define onnx_ShardingSpecProto_sharded_dim_tag   4
#define onnx_ShardedDimProto_axis_tag            1
#define onnx_ShardedDimProto_simple_sharding_tag 2
#define onnx_SimpleShardedDimProto_dim_value_tag 1
#define onnx_SimpleShardedDimProto_dim_param_tag 2
#define onnx_SimpleShardedDimProto_num_shards_tag 3
#define onnx_DeviceConfigurationProto_name_tag   1
#define onnx_DeviceConfigurationProto_num_devices_tag 2
#define onnx_DeviceConfigurationProto_device_tag 3
#define onnx_StringStringEntryProto_key_tag      1
#define onnx_StringStringEntryProto_value_tag    2
#define onnx_TensorAnnotation_tensor_name_tag    1
#define onnx_TensorAnnotation_quant_parameter_tensor_names_tag 2
#define onnx_GraphProto_node_tag                 1
#define onnx_GraphProto_name_tag                 2
#define onnx_GraphProto_initializer_tag          5
#define onnx_GraphProto_input_tag                11
#define onnx_GraphProto_output_tag               12
#define onnx_GraphProto_value_info_tag           13
#define onnx_GraphProto_quantization_annotation_tag 14
#define onnx_GraphProto_sparse_initializer_tag   15
#define onnx_GraphProto_metadata_props_tag       16
#define onnx_TrainingInfoProto_initialization_tag 1
#define onnx_TrainingInfoProto_algorithm_tag     2
#define onnx_TrainingInfoProto_initialization_binding_tag 3
#define onnx_TrainingInfoProto_update_binding_tag 4
#define onnx_ModelProto_ir_version_tag           1
#define onnx_ModelProto_producer_name_tag        2
#define onnx_ModelProto_producer_version_tag     3
#define onnx_ModelProto_domain_tag               4
#define onnx_ModelProto_model_version_tag        5
#define onnx_ModelProto_graph_tag                7
#define onnx_ModelProto_opset_import_tag         8
#define onnx_ModelProto_metadata_props_tag       14
#define onnx_ModelProto_functions_tag            25
#define onnx_ModelProto_configuration_tag        26
#define onnx_TensorProto_Segment_begin_tag       1
#define onnx_TensorProto_Segment_end_tag         2
#define onnx_TensorProto_dims_tag                1
#define onnx_TensorProto_data_type_tag           2
#define onnx_TensorProto_segment_tag             3
#define onnx_TensorProto_float_data_tag          4
#define onnx_TensorProto_int32_data_tag          5
#define onnx_TensorProto_string_data_tag         6
#define onnx_TensorProto_int64_data_tag          7
#define onnx_TensorProto_name_tag                8
#define onnx_TensorProto_raw_data_tag            9
#define onnx_TensorProto_double_data_tag         10
#define onnx_TensorProto_uint64_data_tag         11
#define onnx_TensorProto_external_data_tag       13
#define onnx_TensorProto_data_location_tag       14
#define onnx_TensorProto_metadata_props_tag      16
#define onnx_SparseTensorProto_values_tag        1
#define onnx_SparseTensorProto_indices_tag       2
#define onnx_SparseTensorProto_dims_tag          3
#define onnx_AttributeProto_name_tag             1
#define onnx_AttributeProto_f_tag                2
#define onnx_AttributeProto_i_tag                3
#define onnx_AttributeProto_s_tag                4
#define onnx_AttributeProto_t_tag                5
#define onnx_AttributeProto_g_tag                6
#define onnx_AttributeProto_floats_tag           7
#define onnx_AttributeProto_ints_tag             8
#define onnx_AttributeProto_strings_tag          9
#define onnx_AttributeProto_tensors_tag          10
#define onnx_AttributeProto_graphs_tag           11
#define onnx_AttributeProto_tp_tag               14
#define onnx_AttributeProto_type_protos_tag      15
#define onnx_AttributeProto_type_tag             20
#define onnx_AttributeProto_ref_attr_name_tag    21
#define onnx_AttributeProto_sparse_tensor_tag    22
#define onnx_AttributeProto_sparse_tensors_tag   23
#define onnx_TensorShapeProto_Dimension_dim_value_tag 1
#define onnx_TensorShapeProto_Dimension_dim_param_tag 2
#define onnx_TensorShapeProto_Dimension_denotation_tag 3
#define onnx_TensorShapeProto_dim_tag            1
#define onnx_TypeProto_Tensor_elem_type_tag      1
#define onnx_TypeProto_Tensor_shape_tag          2
#define onnx_TypeProto_Sequence_elem_type_tag    1
#define onnx_TypeProto_Map_key_type_tag          1
#define onnx_TypeProto_Map_value_type_tag        2
#define onnx_TypeProto_Optional_elem_type_tag    1
#define onnx_TypeProto_SparseTensor_elem_type_tag 1
#define onnx_TypeProto_SparseTensor_shape_tag    2
#define onnx_TypeProto_tensor_type_tag           1
#define onnx_TypeProto_sequence_type_tag         4
#define onnx_TypeProto_map_type_tag              5
#define onnx_TypeProto_sparse_tensor_type_tag    8
#define onnx_TypeProto_optional_type_tag         9
#define onnx_TypeProto_denotation_tag            6
#define onnx_ValueInfoProto_name_tag             1
#define onnx_ValueInfoProto_type_tag             2
#define onnx_ValueInfoProto_metadata_props_tag   4
#define onnx_OperatorSetIdProto_domain_tag       1
#define onnx_OperatorSetIdProto_version_tag      2
#define onnx_FunctionProto_name_tag              1
#define onnx_FunctionProto_input_tag             4
#define onnx_FunctionProto_output_tag            5
#define onnx_FunctionProto_attribute_tag         6
#define onnx_FunctionProto_node_tag              7
#define onnx_FunctionProto_doc_string_tag        8
#define onnx_FunctionProto_opset_import_tag      9
#define onnx_FunctionProto_domain_tag            10
#define onnx_FunctionProto_attribute_proto_tag   11
#define onnx_FunctionProto_value_info_tag        12
#define onnx_FunctionProto_overload_tag          13
#define onnx_FunctionProto_metadata_props_tag    14

/* Struct field encoding specification for nanopb */
#define onnx_AttributeProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, STRING,   name,              1) \
X(a, STATIC,   SINGULAR, FLOAT,    f,                 2) \
X(a, STATIC,   SINGULAR, INT64,    i,                 3) \
X(a, CALLBACK, SINGULAR, BYTES,    s,                 4) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  t,                 5) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  g,                 6) \
X(a, CALLBACK, REPEATED, FLOAT,    floats,            7) \
X(a, CALLBACK, REPEATED, INT64,    ints,              8) \
X(a, CALLBACK, REPEATED, BYTES,    strings,           9) \
X(a, CALLBACK, REPEATED, MESSAGE,  tensors,          10) \
X(a, CALLBACK, REPEATED, MESSAGE,  graphs,           11) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  tp,               14) \
X(a, CALLBACK, REPEATED, MESSAGE,  type_protos,      15) \
X(a, STATIC,   SINGULAR, UENUM,    type,             20) \
X(a, STATIC,   SINGULAR, STRING,   ref_attr_name,    21) \
X(a, STATIC,   OPTIONAL, MESSAGE,  sparse_tensor,    22) \
X(a, CALLBACK, REPEATED, MESSAGE,  sparse_tensors,   23)
#define onnx_AttributeProto_CALLBACK pb_default_field_callback
#define onnx_AttributeProto_DEFAULT NULL
#define onnx_AttributeProto_t_MSGTYPE onnx_TensorProto
#define onnx_AttributeProto_g_MSGTYPE onnx_GraphProto
#define onnx_AttributeProto_tensors_MSGTYPE onnx_TensorProto
#define onnx_AttributeProto_graphs_MSGTYPE onnx_GraphProto
#define onnx_AttributeProto_tp_MSGTYPE onnx_TypeProto
#define onnx_AttributeProto_type_protos_MSGTYPE onnx_TypeProto
#define onnx_AttributeProto_sparse_tensor_MSGTYPE onnx_SparseTensorProto
#define onnx_AttributeProto_sparse_tensors_MSGTYPE onnx_SparseTensorProto

#define onnx_ValueInfoProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, STRING,   name,              1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  type,              2) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,    4)
#define onnx_ValueInfoProto_CALLBACK pb_default_field_callback
#define onnx_ValueInfoProto_DEFAULT NULL
#define onnx_ValueInfoProto_type_MSGTYPE onnx_TypeProto
#define onnx_ValueInfoProto_metadata_props_MSGTYPE onnx_StringStringEntryProto

#define onnx_NodeProto_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, STRING,   input,             1) \
X(a, CALLBACK, REPEATED, STRING,   output,            2) \
X(a, STATIC,   SINGULAR, STRING,   name,              3) \
X(a, STATIC,   SINGULAR, STRING,   op_type,           4) \
X(a, CALLBACK, REPEATED, MESSAGE,  attribute,         5) \
X(a, STATIC,   SINGULAR, STRING,   domain,            7) \
X(a, STATIC,   SINGULAR, STRING,   overload,          8) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,    9) \
X(a, CALLBACK, REPEATED, MESSAGE,  device_configurations,  10)
#define onnx_NodeProto_CALLBACK pb_default_field_callback
#define onnx_NodeProto_DEFAULT NULL
#define onnx_NodeProto_attribute_MSGTYPE onnx_AttributeProto
#define onnx_NodeProto_metadata_props_MSGTYPE onnx_StringStringEntryProto
#define onnx_NodeProto_device_configurations_MSGTYPE onnx_NodeDeviceConfigurationProto

#define onnx_IntIntListEntryProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT64,    key,               1) \
X(a, CALLBACK, REPEATED, INT64,    value,             2)
#define onnx_IntIntListEntryProto_CALLBACK pb_default_field_callback
#define onnx_IntIntListEntryProto_DEFAULT NULL

#define onnx_NodeDeviceConfigurationProto_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, STRING,   configuration_id,   1) \
X(a, CALLBACK, REPEATED, MESSAGE,  sharding_spec,     2) \
X(a, STATIC,   SINGULAR, INT32,    pipeline_stage,    3)
#define onnx_NodeDeviceConfigurationProto_CALLBACK pb_default_field_callback
#define onnx_NodeDeviceConfigurationProto_DEFAULT NULL
#define onnx_NodeDeviceConfigurationProto_sharding_spec_MSGTYPE onnx_ShardingSpecProto

#define onnx_ShardingSpecProto_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, STRING,   tensor_name,       1) \
X(a, CALLBACK, REPEATED, INT64,    device,            2) \
X(a, CALLBACK, REPEATED, MESSAGE,  index_to_device_group_map,   3) \
X(a, CALLBACK, REPEATED, MESSAGE,  sharded_dim,       4)
#define onnx_ShardingSpecProto_CALLBACK pb_default_field_callback
#define onnx_ShardingSpecProto_DEFAULT NULL
#define onnx_ShardingSpecProto_index_to_device_group_map_MSGTYPE onnx_IntIntListEntryProto
#define onnx_ShardingSpecProto_sharded_dim_MSGTYPE onnx_ShardedDimProto

#define onnx_ShardedDimProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT64,    axis,              1) \
X(a, CALLBACK, REPEATED, MESSAGE,  simple_sharding,   2)
#define onnx_ShardedDimProto_CALLBACK pb_default_field_callback
#define onnx_ShardedDimProto_DEFAULT NULL
#define onnx_ShardedDimProto_simple_sharding_MSGTYPE onnx_SimpleShardedDimProto

#define onnx_SimpleShardedDimProto_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    INT64,    (dim,dim_value,dim.dim_value),   1) \
X(a, CALLBACK, ONEOF,    STRING,   (dim,dim_param,dim.dim_param),   2) \
X(a, STATIC,   SINGULAR, INT64,    num_shards,        3)
#define onnx_SimpleShardedDimProto_CALLBACK pb_default_field_callback
#define onnx_SimpleShardedDimProto_DEFAULT NULL

#define onnx_TrainingInfoProto_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, MESSAGE,  initialization,    1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  algorithm,         2) \
X(a, CALLBACK, REPEATED, MESSAGE,  initialization_binding,   3) \
X(a, CALLBACK, REPEATED, MESSAGE,  update_binding,    4)
#define onnx_TrainingInfoProto_CALLBACK pb_default_field_callback
#define onnx_TrainingInfoProto_DEFAULT NULL
#define onnx_TrainingInfoProto_initialization_MSGTYPE onnx_GraphProto
#define onnx_TrainingInfoProto_algorithm_MSGTYPE onnx_GraphProto
#define onnx_TrainingInfoProto_initialization_binding_MSGTYPE onnx_StringStringEntryProto
#define onnx_TrainingInfoProto_update_binding_MSGTYPE onnx_StringStringEntryProto

#define onnx_ModelProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT64,    ir_version,        1) \
X(a, STATIC,   SINGULAR, STRING,   producer_name,     2) \
X(a, STATIC,   SINGULAR, STRING,   producer_version,   3) \
X(a, STATIC,   SINGULAR, STRING,   domain,            4) \
X(a, STATIC,   SINGULAR, INT64,    model_version,     5) \
X(a, STATIC,   OPTIONAL, MESSAGE,  graph,             7) \
X(a, CALLBACK, REPEATED, MESSAGE,  opset_import,      8) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,   14) \
X(a, CALLBACK, REPEATED, MESSAGE,  functions,        25) \
X(a, CALLBACK, REPEATED, MESSAGE,  configuration,    26)
#define onnx_ModelProto_CALLBACK pb_default_field_callback
#define onnx_ModelProto_DEFAULT NULL
#define onnx_ModelProto_graph_MSGTYPE onnx_GraphProto
#define onnx_ModelProto_opset_import_MSGTYPE onnx_OperatorSetIdProto
#define onnx_ModelProto_metadata_props_MSGTYPE onnx_StringStringEntryProto
#define onnx_ModelProto_functions_MSGTYPE onnx_FunctionProto
#define onnx_ModelProto_configuration_MSGTYPE onnx_DeviceConfigurationProto

#define onnx_DeviceConfigurationProto_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, STRING,   name,              1) \
X(a, STATIC,   SINGULAR, INT32,    num_devices,       2) \
X(a, CALLBACK, REPEATED, STRING,   device,            3)
#define onnx_DeviceConfigurationProto_CALLBACK pb_default_field_callback
#define onnx_DeviceConfigurationProto_DEFAULT NULL

#define onnx_StringStringEntryProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, STRING,   key,               1) \
X(a, STATIC,   SINGULAR, STRING,   value,             2)
#define onnx_StringStringEntryProto_CALLBACK NULL
#define onnx_StringStringEntryProto_DEFAULT NULL

#define onnx_TensorAnnotation_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, STRING,   tensor_name,       1) \
X(a, CALLBACK, REPEATED, MESSAGE,  quant_parameter_tensor_names,   2)
#define onnx_TensorAnnotation_CALLBACK pb_default_field_callback
#define onnx_TensorAnnotation_DEFAULT NULL
#define onnx_TensorAnnotation_quant_parameter_tensor_names_MSGTYPE onnx_StringStringEntryProto

#define onnx_GraphProto_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, MESSAGE,  node,              1) \
X(a, STATIC,   SINGULAR, STRING,   name,              2) \
X(a, CALLBACK, REPEATED, MESSAGE,  initializer,       5) \
X(a, CALLBACK, REPEATED, MESSAGE,  input,            11) \
X(a, CALLBACK, REPEATED, MESSAGE,  output,           12) \
X(a, CALLBACK, REPEATED, MESSAGE,  value_info,       13) \
X(a, CALLBACK, REPEATED, MESSAGE,  quantization_annotation,  14) \
X(a, CALLBACK, REPEATED, MESSAGE,  sparse_initializer,  15) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,   16)
#define onnx_GraphProto_CALLBACK pb_default_field_callback
#define onnx_GraphProto_DEFAULT NULL
#define onnx_GraphProto_node_MSGTYPE onnx_NodeProto
#define onnx_GraphProto_initializer_MSGTYPE onnx_TensorProto
#define onnx_GraphProto_input_MSGTYPE onnx_ValueInfoProto
#define onnx_GraphProto_output_MSGTYPE onnx_ValueInfoProto
#define onnx_GraphProto_value_info_MSGTYPE onnx_ValueInfoProto
#define onnx_GraphProto_quantization_annotation_MSGTYPE onnx_TensorAnnotation
#define onnx_GraphProto_sparse_initializer_MSGTYPE onnx_SparseTensorProto
#define onnx_GraphProto_metadata_props_MSGTYPE onnx_StringStringEntryProto

#define onnx_TensorProto_FIELDLIST(X, a) \
X(a, STATIC,   REPEATED, INT64,    dims,              1) \
X(a, STATIC,   SINGULAR, INT32,    data_type,         2) \
X(a, STATIC,   OPTIONAL, MESSAGE,  segment,           3) \
X(a, CALLBACK, REPEATED, FLOAT,    float_data,        4) \
X(a, CALLBACK, REPEATED, INT32,    int32_data,        5) \
X(a, CALLBACK, REPEATED, BYTES,    string_data,       6) \
X(a, CALLBACK, REPEATED, INT64,    int64_data,        7) \
X(a, STATIC,   SINGULAR, STRING,   name,              8) \
X(a, CALLBACK, SINGULAR, BYTES,    raw_data,          9) \
X(a, CALLBACK, REPEATED, DOUBLE,   double_data,      10) \
X(a, CALLBACK, REPEATED, UINT64,   uint64_data,      11) \
X(a, CALLBACK, REPEATED, MESSAGE,  external_data,    13) \
X(a, STATIC,   SINGULAR, UENUM,    data_location,    14) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,   16)
#define onnx_TensorProto_CALLBACK pb_default_field_callback
#define onnx_TensorProto_DEFAULT NULL
#define onnx_TensorProto_segment_MSGTYPE onnx_TensorProto_Segment
#define onnx_TensorProto_external_data_MSGTYPE onnx_StringStringEntryProto
#define onnx_TensorProto_metadata_props_MSGTYPE onnx_StringStringEntryProto

#define onnx_TensorProto_Segment_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT64,    begin,             1) \
X(a, STATIC,   SINGULAR, INT64,    end,               2)
#define onnx_TensorProto_Segment_CALLBACK NULL
#define onnx_TensorProto_Segment_DEFAULT NULL

#define onnx_SparseTensorProto_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, MESSAGE,  values,            1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  indices,           2) \
X(a, STATIC,   REPEATED, INT64,    dims,              3)
#define onnx_SparseTensorProto_CALLBACK NULL
#define onnx_SparseTensorProto_DEFAULT NULL
#define onnx_SparseTensorProto_values_MSGTYPE onnx_TensorProto
#define onnx_SparseTensorProto_indices_MSGTYPE onnx_TensorProto

#define onnx_TensorShapeProto_FIELDLIST(X, a) \
X(a, STATIC,   REPEATED, MESSAGE,  dim,               1)
#define onnx_TensorShapeProto_CALLBACK NULL
#define onnx_TensorShapeProto_DEFAULT NULL
#define onnx_TensorShapeProto_dim_MSGTYPE onnx_TensorShapeProto_Dimension

#define onnx_TensorShapeProto_Dimension_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    INT64,    (value,dim_value,value.dim_value),   1) \
X(a, STATIC,   ONEOF,    STRING,   (value,dim_param,value.dim_param),   2) \
X(a, CALLBACK, SINGULAR, STRING,   denotation,        3)
#define onnx_TensorShapeProto_Dimension_CALLBACK pb_default_field_callback
#define onnx_TensorShapeProto_Dimension_DEFAULT NULL

#define onnx_TypeProto_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    MESSAGE,  (value,tensor_type,value.tensor_type),   1) \
X(a, STATIC,   ONEOF,    MESSAGE,  (value,sequence_type,value.sequence_type),   4) \
X(a, STATIC,   ONEOF,    MESSAGE,  (value,map_type,value.map_type),   5) \
X(a, STATIC,   SINGULAR, STRING,   denotation,        6) \
X(a, STATIC,   ONEOF,    MESSAGE,  (value,sparse_tensor_type,value.sparse_tensor_type),   8) \
X(a, STATIC,   ONEOF,    MESSAGE,  (value,optional_type,value.optional_type),   9)
#define onnx_TypeProto_CALLBACK NULL
#define onnx_TypeProto_DEFAULT NULL
#define onnx_TypeProto_value_tensor_type_MSGTYPE onnx_TypeProto_Tensor
#define onnx_TypeProto_value_sequence_type_MSGTYPE onnx_TypeProto_Sequence
#define onnx_TypeProto_value_map_type_MSGTYPE onnx_TypeProto_Map
#define onnx_TypeProto_value_sparse_tensor_type_MSGTYPE onnx_TypeProto_SparseTensor
#define onnx_TypeProto_value_optional_type_MSGTYPE onnx_TypeProto_Optional

#define onnx_TypeProto_Tensor_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT32,    elem_type,         1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  shape,             2)
#define onnx_TypeProto_Tensor_CALLBACK NULL
#define onnx_TypeProto_Tensor_DEFAULT NULL
#define onnx_TypeProto_Tensor_shape_MSGTYPE onnx_TensorShapeProto

#define onnx_TypeProto_Sequence_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  elem_type,         1)
#define onnx_TypeProto_Sequence_CALLBACK pb_default_field_callback
#define onnx_TypeProto_Sequence_DEFAULT NULL
#define onnx_TypeProto_Sequence_elem_type_MSGTYPE onnx_TypeProto

#define onnx_TypeProto_Map_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, INT32,    key_type,          1) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  value_type,        2)
#define onnx_TypeProto_Map_CALLBACK pb_default_field_callback
#define onnx_TypeProto_Map_DEFAULT NULL
#define onnx_TypeProto_Map_value_type_MSGTYPE onnx_TypeProto

#define onnx_TypeProto_Optional_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, MESSAGE,  elem_type,         1)
#define onnx_TypeProto_Optional_CALLBACK pb_default_field_callback
#define onnx_TypeProto_Optional_DEFAULT NULL
#define onnx_TypeProto_Optional_elem_type_MSGTYPE onnx_TypeProto

#define onnx_TypeProto_SparseTensor_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, INT32,    elem_type,         1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  shape,             2)
#define onnx_TypeProto_SparseTensor_CALLBACK NULL
#define onnx_TypeProto_SparseTensor_DEFAULT NULL
#define onnx_TypeProto_SparseTensor_shape_MSGTYPE onnx_TensorShapeProto

#define onnx_OperatorSetIdProto_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, STRING,   domain,            1) \
X(a, STATIC,   SINGULAR, INT64,    version,           2)
#define onnx_OperatorSetIdProto_CALLBACK NULL
#define onnx_OperatorSetIdProto_DEFAULT NULL

#define onnx_FunctionProto_FIELDLIST(X, a) \
X(a, CALLBACK, SINGULAR, STRING,   name,              1) \
X(a, CALLBACK, REPEATED, STRING,   input,             4) \
X(a, CALLBACK, REPEATED, STRING,   output,            5) \
X(a, CALLBACK, REPEATED, STRING,   attribute,         6) \
X(a, CALLBACK, REPEATED, MESSAGE,  node,              7) \
X(a, CALLBACK, SINGULAR, STRING,   doc_string,        8) \
X(a, CALLBACK, REPEATED, MESSAGE,  opset_import,      9) \
X(a, CALLBACK, SINGULAR, STRING,   domain,           10) \
X(a, CALLBACK, REPEATED, MESSAGE,  attribute_proto,  11) \
X(a, CALLBACK, REPEATED, MESSAGE,  value_info,       12) \
X(a, CALLBACK, SINGULAR, STRING,   overload,         13) \
X(a, CALLBACK, REPEATED, MESSAGE,  metadata_props,   14)
#define onnx_FunctionProto_CALLBACK pb_default_field_callback
#define onnx_FunctionProto_DEFAULT NULL
#define onnx_FunctionProto_node_MSGTYPE onnx_NodeProto
#define onnx_FunctionProto_opset_import_MSGTYPE onnx_OperatorSetIdProto
#define onnx_FunctionProto_attribute_proto_MSGTYPE onnx_AttributeProto
#define onnx_FunctionProto_value_info_MSGTYPE onnx_ValueInfoProto
#define onnx_FunctionProto_metadata_props_MSGTYPE onnx_StringStringEntryProto

extern const pb_msgdesc_t onnx_AttributeProto_msg;
extern const pb_msgdesc_t onnx_ValueInfoProto_msg;
extern const pb_msgdesc_t onnx_NodeProto_msg;
extern const pb_msgdesc_t onnx_IntIntListEntryProto_msg;
extern const pb_msgdesc_t onnx_NodeDeviceConfigurationProto_msg;
extern const pb_msgdesc_t onnx_ShardingSpecProto_msg;
extern const pb_msgdesc_t onnx_ShardedDimProto_msg;
extern const pb_msgdesc_t onnx_SimpleShardedDimProto_msg;
extern const pb_msgdesc_t onnx_TrainingInfoProto_msg;
extern const pb_msgdesc_t onnx_ModelProto_msg;
extern const pb_msgdesc_t onnx_DeviceConfigurationProto_msg;
extern const pb_msgdesc_t onnx_StringStringEntryProto_msg;
extern const pb_msgdesc_t onnx_TensorAnnotation_msg;
extern const pb_msgdesc_t onnx_GraphProto_msg;
extern const pb_msgdesc_t onnx_TensorProto_msg;
extern const pb_msgdesc_t onnx_TensorProto_Segment_msg;
extern const pb_msgdesc_t onnx_SparseTensorProto_msg;
extern const pb_msgdesc_t onnx_TensorShapeProto_msg;
extern const pb_msgdesc_t onnx_TensorShapeProto_Dimension_msg;
extern const pb_msgdesc_t onnx_TypeProto_msg;
extern const pb_msgdesc_t onnx_TypeProto_Tensor_msg;
extern const pb_msgdesc_t onnx_TypeProto_Sequence_msg;
extern const pb_msgdesc_t onnx_TypeProto_Map_msg;
extern const pb_msgdesc_t onnx_TypeProto_Optional_msg;
extern const pb_msgdesc_t onnx_TypeProto_SparseTensor_msg;
extern const pb_msgdesc_t onnx_OperatorSetIdProto_msg;
extern const pb_msgdesc_t onnx_FunctionProto_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define onnx_AttributeProto_fields &onnx_AttributeProto_msg
#define onnx_ValueInfoProto_fields &onnx_ValueInfoProto_msg
#define onnx_NodeProto_fields &onnx_NodeProto_msg
#define onnx_IntIntListEntryProto_fields &onnx_IntIntListEntryProto_msg
#define onnx_NodeDeviceConfigurationProto_fields &onnx_NodeDeviceConfigurationProto_msg
#define onnx_ShardingSpecProto_fields &onnx_ShardingSpecProto_msg
#define onnx_ShardedDimProto_fields &onnx_ShardedDimProto_msg
#define onnx_SimpleShardedDimProto_fields &onnx_SimpleShardedDimProto_msg
#define onnx_TrainingInfoProto_fields &onnx_TrainingInfoProto_msg
#define onnx_ModelProto_fields &onnx_ModelProto_msg
#define onnx_DeviceConfigurationProto_fields &onnx_DeviceConfigurationProto_msg
#define onnx_StringStringEntryProto_fields &onnx_StringStringEntryProto_msg
#define onnx_TensorAnnotation_fields &onnx_TensorAnnotation_msg
#define onnx_GraphProto_fields &onnx_GraphProto_msg
#define onnx_TensorProto_fields &onnx_TensorProto_msg
#define onnx_TensorProto_Segment_fields &onnx_TensorProto_Segment_msg
#define onnx_SparseTensorProto_fields &onnx_SparseTensorProto_msg
#define onnx_TensorShapeProto_fields &onnx_TensorShapeProto_msg
#define onnx_TensorShapeProto_Dimension_fields &onnx_TensorShapeProto_Dimension_msg
#define onnx_TypeProto_fields &onnx_TypeProto_msg
#define onnx_TypeProto_Tensor_fields &onnx_TypeProto_Tensor_msg
#define onnx_TypeProto_Sequence_fields &onnx_TypeProto_Sequence_msg
#define onnx_TypeProto_Map_fields &onnx_TypeProto_Map_msg
#define onnx_TypeProto_Optional_fields &onnx_TypeProto_Optional_msg
#define onnx_TypeProto_SparseTensor_fields &onnx_TypeProto_SparseTensor_msg
#define onnx_OperatorSetIdProto_fields &onnx_OperatorSetIdProto_msg
#define onnx_FunctionProto_fields &onnx_FunctionProto_msg

/* Maximum encoded size of messages (where known) */
/* onnx_AttributeProto_size depends on runtime parameters */
/* onnx_ValueInfoProto_size depends on runtime parameters */
/* onnx_NodeProto_size depends on runtime parameters */
/* onnx_IntIntListEntryProto_size depends on runtime parameters */
/* onnx_NodeDeviceConfigurationProto_size depends on runtime parameters */
/* onnx_ShardingSpecProto_size depends on runtime parameters */
/* onnx_ShardedDimProto_size depends on runtime parameters */
/* onnx_SimpleShardedDimProto_size depends on runtime parameters */
/* onnx_TrainingInfoProto_size depends on runtime parameters */
/* onnx_ModelProto_size depends on runtime parameters */
/* onnx_DeviceConfigurationProto_size depends on runtime parameters */
/* onnx_TensorAnnotation_size depends on runtime parameters */
/* onnx_GraphProto_size depends on runtime parameters */
/* onnx_TensorProto_size depends on runtime parameters */
/* onnx_SparseTensorProto_size depends on runtime parameters */
/* onnx_TensorShapeProto_size depends on runtime parameters */
/* onnx_TensorShapeProto_Dimension_size depends on runtime parameters */
/* onnx_TypeProto_size depends on runtime parameters */
/* onnx_TypeProto_Tensor_size depends on runtime parameters */
/* onnx_TypeProto_Sequence_size depends on runtime parameters */
/* onnx_TypeProto_Map_size depends on runtime parameters */
/* onnx_TypeProto_Optional_size depends on runtime parameters */
/* onnx_TypeProto_SparseTensor_size depends on runtime parameters */
/* onnx_FunctionProto_size depends on runtime parameters */
#define ONNX_ONNX_PB_H_MAX_SIZE                  onnx_StringStringEntryProto_size
#define onnx_OperatorSetIdProto_size             269
#define onnx_StringStringEntryProto_size         1284
#define onnx_TensorProto_Segment_size            22

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
