Skip to main content

hrx/artifacts/
onnx_proto.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by pure
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21//! Generated file from `onnx.proto`
22// Generated for lite runtime
23
24/// Generated files are compatible only with the same version
25/// of protobuf runtime.
26const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
27
28// @@protoc_insertion_point(message:onnx.AttributeProto)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct AttributeProto {
31    // message fields
32    // @@protoc_insertion_point(field:onnx.AttributeProto.name)
33    pub name: ::std::string::String,
34    // @@protoc_insertion_point(field:onnx.AttributeProto.ref_attr_name)
35    pub ref_attr_name: ::std::string::String,
36    // @@protoc_insertion_point(field:onnx.AttributeProto.doc_string)
37    pub doc_string: ::std::string::String,
38    // @@protoc_insertion_point(field:onnx.AttributeProto.type)
39    pub type_: ::protobuf::EnumOrUnknown<attribute_proto::AttributeType>,
40    // @@protoc_insertion_point(field:onnx.AttributeProto.f)
41    pub f: f32,
42    // @@protoc_insertion_point(field:onnx.AttributeProto.i)
43    pub i: i64,
44    // @@protoc_insertion_point(field:onnx.AttributeProto.s)
45    pub s: ::std::vec::Vec<u8>,
46    // @@protoc_insertion_point(field:onnx.AttributeProto.t)
47    pub t: ::protobuf::MessageField<TensorProto>,
48    // @@protoc_insertion_point(field:onnx.AttributeProto.g)
49    pub g: ::protobuf::MessageField<GraphProto>,
50    // @@protoc_insertion_point(field:onnx.AttributeProto.sparse_tensor)
51    pub sparse_tensor: ::protobuf::MessageField<SparseTensorProto>,
52    // @@protoc_insertion_point(field:onnx.AttributeProto.tp)
53    pub tp: ::protobuf::MessageField<TypeProto>,
54    // @@protoc_insertion_point(field:onnx.AttributeProto.floats)
55    pub floats: ::std::vec::Vec<f32>,
56    // @@protoc_insertion_point(field:onnx.AttributeProto.ints)
57    pub ints: ::std::vec::Vec<i64>,
58    // @@protoc_insertion_point(field:onnx.AttributeProto.strings)
59    pub strings: ::std::vec::Vec<::std::vec::Vec<u8>>,
60    // @@protoc_insertion_point(field:onnx.AttributeProto.tensors)
61    pub tensors: ::std::vec::Vec<TensorProto>,
62    // @@protoc_insertion_point(field:onnx.AttributeProto.graphs)
63    pub graphs: ::std::vec::Vec<GraphProto>,
64    // @@protoc_insertion_point(field:onnx.AttributeProto.sparse_tensors)
65    pub sparse_tensors: ::std::vec::Vec<SparseTensorProto>,
66    // @@protoc_insertion_point(field:onnx.AttributeProto.type_protos)
67    pub type_protos: ::std::vec::Vec<TypeProto>,
68    // special fields
69    // @@protoc_insertion_point(special_field:onnx.AttributeProto.special_fields)
70    pub special_fields: ::protobuf::SpecialFields,
71}
72
73impl<'a> ::std::default::Default for &'a AttributeProto {
74    fn default() -> &'a AttributeProto {
75        <AttributeProto as ::protobuf::Message>::default_instance()
76    }
77}
78
79impl AttributeProto {
80    pub fn new() -> AttributeProto {
81        ::std::default::Default::default()
82    }
83}
84
85impl ::protobuf::Message for AttributeProto {
86    const NAME: &'static str = "AttributeProto";
87
88    fn is_initialized(&self) -> bool {
89        true
90    }
91
92    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
93        while let Some(tag) = is.read_raw_tag_or_eof()? {
94            match tag {
95                10 => {
96                    self.name = is.read_string()?;
97                },
98                170 => {
99                    self.ref_attr_name = is.read_string()?;
100                },
101                106 => {
102                    self.doc_string = is.read_string()?;
103                },
104                160 => {
105                    self.type_ = is.read_enum_or_unknown()?;
106                },
107                21 => {
108                    self.f = is.read_float()?;
109                },
110                24 => {
111                    self.i = is.read_int64()?;
112                },
113                34 => {
114                    self.s = is.read_bytes()?;
115                },
116                42 => {
117                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.t)?;
118                },
119                50 => {
120                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.g)?;
121                },
122                178 => {
123                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.sparse_tensor)?;
124                },
125                114 => {
126                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tp)?;
127                },
128                58 => {
129                    is.read_repeated_packed_float_into(&mut self.floats)?;
130                },
131                61 => {
132                    self.floats.push(is.read_float()?);
133                },
134                66 => {
135                    is.read_repeated_packed_int64_into(&mut self.ints)?;
136                },
137                64 => {
138                    self.ints.push(is.read_int64()?);
139                },
140                74 => {
141                    self.strings.push(is.read_bytes()?);
142                },
143                82 => {
144                    self.tensors.push(is.read_message()?);
145                },
146                90 => {
147                    self.graphs.push(is.read_message()?);
148                },
149                186 => {
150                    self.sparse_tensors.push(is.read_message()?);
151                },
152                122 => {
153                    self.type_protos.push(is.read_message()?);
154                },
155                tag => {
156                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
157                },
158            };
159        }
160        ::std::result::Result::Ok(())
161    }
162
163    // Compute sizes of nested messages
164    #[allow(unused_variables)]
165    fn compute_size(&self) -> u64 {
166        let mut my_size = 0;
167        if !self.name.is_empty() {
168            my_size += ::protobuf::rt::string_size(1, &self.name);
169        }
170        if !self.ref_attr_name.is_empty() {
171            my_size += ::protobuf::rt::string_size(21, &self.ref_attr_name);
172        }
173        if !self.doc_string.is_empty() {
174            my_size += ::protobuf::rt::string_size(13, &self.doc_string);
175        }
176        if self.type_ != ::protobuf::EnumOrUnknown::new(attribute_proto::AttributeType::UNDEFINED) {
177            my_size += ::protobuf::rt::int32_size(20, self.type_.value());
178        }
179        if self.f != 0. {
180            my_size += 1 + 4;
181        }
182        if self.i != 0 {
183            my_size += ::protobuf::rt::int64_size(3, self.i);
184        }
185        if !self.s.is_empty() {
186            my_size += ::protobuf::rt::bytes_size(4, &self.s);
187        }
188        if let Some(v) = self.t.as_ref() {
189            let len = v.compute_size();
190            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
191        }
192        if let Some(v) = self.g.as_ref() {
193            let len = v.compute_size();
194            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
195        }
196        if let Some(v) = self.sparse_tensor.as_ref() {
197            let len = v.compute_size();
198            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
199        }
200        if let Some(v) = self.tp.as_ref() {
201            let len = v.compute_size();
202            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
203        }
204        my_size += ::protobuf::rt::vec_packed_float_size(7, &self.floats);
205        my_size += ::protobuf::rt::vec_packed_int64_size(8, &self.ints);
206        for value in &self.strings {
207            my_size += ::protobuf::rt::bytes_size(9, &value);
208        };
209        for value in &self.tensors {
210            let len = value.compute_size();
211            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
212        };
213        for value in &self.graphs {
214            let len = value.compute_size();
215            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
216        };
217        for value in &self.sparse_tensors {
218            let len = value.compute_size();
219            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
220        };
221        for value in &self.type_protos {
222            let len = value.compute_size();
223            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
224        };
225        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
226        self.special_fields.cached_size().set(my_size as u32);
227        my_size
228    }
229
230    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
231        if !self.name.is_empty() {
232            os.write_string(1, &self.name)?;
233        }
234        if !self.ref_attr_name.is_empty() {
235            os.write_string(21, &self.ref_attr_name)?;
236        }
237        if !self.doc_string.is_empty() {
238            os.write_string(13, &self.doc_string)?;
239        }
240        if self.type_ != ::protobuf::EnumOrUnknown::new(attribute_proto::AttributeType::UNDEFINED) {
241            os.write_enum(20, ::protobuf::EnumOrUnknown::value(&self.type_))?;
242        }
243        if self.f != 0. {
244            os.write_float(2, self.f)?;
245        }
246        if self.i != 0 {
247            os.write_int64(3, self.i)?;
248        }
249        if !self.s.is_empty() {
250            os.write_bytes(4, &self.s)?;
251        }
252        if let Some(v) = self.t.as_ref() {
253            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
254        }
255        if let Some(v) = self.g.as_ref() {
256            ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
257        }
258        if let Some(v) = self.sparse_tensor.as_ref() {
259            ::protobuf::rt::write_message_field_with_cached_size(22, v, os)?;
260        }
261        if let Some(v) = self.tp.as_ref() {
262            ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
263        }
264        os.write_repeated_packed_float(7, &self.floats)?;
265        os.write_repeated_packed_int64(8, &self.ints)?;
266        for v in &self.strings {
267            os.write_bytes(9, &v)?;
268        };
269        for v in &self.tensors {
270            ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?;
271        };
272        for v in &self.graphs {
273            ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
274        };
275        for v in &self.sparse_tensors {
276            ::protobuf::rt::write_message_field_with_cached_size(23, v, os)?;
277        };
278        for v in &self.type_protos {
279            ::protobuf::rt::write_message_field_with_cached_size(15, v, os)?;
280        };
281        os.write_unknown_fields(self.special_fields.unknown_fields())?;
282        ::std::result::Result::Ok(())
283    }
284
285    fn special_fields(&self) -> &::protobuf::SpecialFields {
286        &self.special_fields
287    }
288
289    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
290        &mut self.special_fields
291    }
292
293    fn new() -> AttributeProto {
294        AttributeProto::new()
295    }
296
297    fn clear(&mut self) {
298        self.name.clear();
299        self.ref_attr_name.clear();
300        self.doc_string.clear();
301        self.type_ = ::protobuf::EnumOrUnknown::new(attribute_proto::AttributeType::UNDEFINED);
302        self.f = 0.;
303        self.i = 0;
304        self.s.clear();
305        self.t.clear();
306        self.g.clear();
307        self.sparse_tensor.clear();
308        self.tp.clear();
309        self.floats.clear();
310        self.ints.clear();
311        self.strings.clear();
312        self.tensors.clear();
313        self.graphs.clear();
314        self.sparse_tensors.clear();
315        self.type_protos.clear();
316        self.special_fields.clear();
317    }
318
319    fn default_instance() -> &'static AttributeProto {
320        static instance: AttributeProto = AttributeProto {
321            name: ::std::string::String::new(),
322            ref_attr_name: ::std::string::String::new(),
323            doc_string: ::std::string::String::new(),
324            type_: ::protobuf::EnumOrUnknown::from_i32(0),
325            f: 0.,
326            i: 0,
327            s: ::std::vec::Vec::new(),
328            t: ::protobuf::MessageField::none(),
329            g: ::protobuf::MessageField::none(),
330            sparse_tensor: ::protobuf::MessageField::none(),
331            tp: ::protobuf::MessageField::none(),
332            floats: ::std::vec::Vec::new(),
333            ints: ::std::vec::Vec::new(),
334            strings: ::std::vec::Vec::new(),
335            tensors: ::std::vec::Vec::new(),
336            graphs: ::std::vec::Vec::new(),
337            sparse_tensors: ::std::vec::Vec::new(),
338            type_protos: ::std::vec::Vec::new(),
339            special_fields: ::protobuf::SpecialFields::new(),
340        };
341        &instance
342    }
343}
344
345/// Nested message and enums of message `AttributeProto`
346pub mod attribute_proto {
347    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
348    // @@protoc_insertion_point(enum:onnx.AttributeProto.AttributeType)
349    pub enum AttributeType {
350        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.UNDEFINED)
351        UNDEFINED = 0,
352        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.FLOAT)
353        FLOAT = 1,
354        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.INT)
355        INT = 2,
356        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.STRING)
357        STRING = 3,
358        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.TENSOR)
359        TENSOR = 4,
360        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.GRAPH)
361        GRAPH = 5,
362        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.SPARSE_TENSOR)
363        SPARSE_TENSOR = 11,
364        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.TYPE_PROTO)
365        TYPE_PROTO = 13,
366        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.FLOATS)
367        FLOATS = 6,
368        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.INTS)
369        INTS = 7,
370        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.STRINGS)
371        STRINGS = 8,
372        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.TENSORS)
373        TENSORS = 9,
374        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.GRAPHS)
375        GRAPHS = 10,
376        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.SPARSE_TENSORS)
377        SPARSE_TENSORS = 12,
378        // @@protoc_insertion_point(enum_value:onnx.AttributeProto.AttributeType.TYPE_PROTOS)
379        TYPE_PROTOS = 14,
380    }
381
382    impl ::protobuf::Enum for AttributeType {
383        const NAME: &'static str = "AttributeType";
384
385        fn value(&self) -> i32 {
386            *self as i32
387        }
388
389        fn from_i32(value: i32) -> ::std::option::Option<AttributeType> {
390            match value {
391                0 => ::std::option::Option::Some(AttributeType::UNDEFINED),
392                1 => ::std::option::Option::Some(AttributeType::FLOAT),
393                2 => ::std::option::Option::Some(AttributeType::INT),
394                3 => ::std::option::Option::Some(AttributeType::STRING),
395                4 => ::std::option::Option::Some(AttributeType::TENSOR),
396                5 => ::std::option::Option::Some(AttributeType::GRAPH),
397                11 => ::std::option::Option::Some(AttributeType::SPARSE_TENSOR),
398                13 => ::std::option::Option::Some(AttributeType::TYPE_PROTO),
399                6 => ::std::option::Option::Some(AttributeType::FLOATS),
400                7 => ::std::option::Option::Some(AttributeType::INTS),
401                8 => ::std::option::Option::Some(AttributeType::STRINGS),
402                9 => ::std::option::Option::Some(AttributeType::TENSORS),
403                10 => ::std::option::Option::Some(AttributeType::GRAPHS),
404                12 => ::std::option::Option::Some(AttributeType::SPARSE_TENSORS),
405                14 => ::std::option::Option::Some(AttributeType::TYPE_PROTOS),
406                _ => ::std::option::Option::None
407            }
408        }
409
410        fn from_str(str: &str) -> ::std::option::Option<AttributeType> {
411            match str {
412                "UNDEFINED" => ::std::option::Option::Some(AttributeType::UNDEFINED),
413                "FLOAT" => ::std::option::Option::Some(AttributeType::FLOAT),
414                "INT" => ::std::option::Option::Some(AttributeType::INT),
415                "STRING" => ::std::option::Option::Some(AttributeType::STRING),
416                "TENSOR" => ::std::option::Option::Some(AttributeType::TENSOR),
417                "GRAPH" => ::std::option::Option::Some(AttributeType::GRAPH),
418                "SPARSE_TENSOR" => ::std::option::Option::Some(AttributeType::SPARSE_TENSOR),
419                "TYPE_PROTO" => ::std::option::Option::Some(AttributeType::TYPE_PROTO),
420                "FLOATS" => ::std::option::Option::Some(AttributeType::FLOATS),
421                "INTS" => ::std::option::Option::Some(AttributeType::INTS),
422                "STRINGS" => ::std::option::Option::Some(AttributeType::STRINGS),
423                "TENSORS" => ::std::option::Option::Some(AttributeType::TENSORS),
424                "GRAPHS" => ::std::option::Option::Some(AttributeType::GRAPHS),
425                "SPARSE_TENSORS" => ::std::option::Option::Some(AttributeType::SPARSE_TENSORS),
426                "TYPE_PROTOS" => ::std::option::Option::Some(AttributeType::TYPE_PROTOS),
427                _ => ::std::option::Option::None
428            }
429        }
430
431        const VALUES: &'static [AttributeType] = &[
432            AttributeType::UNDEFINED,
433            AttributeType::FLOAT,
434            AttributeType::INT,
435            AttributeType::STRING,
436            AttributeType::TENSOR,
437            AttributeType::GRAPH,
438            AttributeType::SPARSE_TENSOR,
439            AttributeType::TYPE_PROTO,
440            AttributeType::FLOATS,
441            AttributeType::INTS,
442            AttributeType::STRINGS,
443            AttributeType::TENSORS,
444            AttributeType::GRAPHS,
445            AttributeType::SPARSE_TENSORS,
446            AttributeType::TYPE_PROTOS,
447        ];
448    }
449
450    impl ::std::default::Default for AttributeType {
451        fn default() -> Self {
452            AttributeType::UNDEFINED
453        }
454    }
455
456}
457
458// @@protoc_insertion_point(message:onnx.ValueInfoProto)
459#[derive(PartialEq,Clone,Default,Debug)]
460pub struct ValueInfoProto {
461    // message fields
462    // @@protoc_insertion_point(field:onnx.ValueInfoProto.name)
463    pub name: ::std::string::String,
464    // @@protoc_insertion_point(field:onnx.ValueInfoProto.type)
465    pub type_: ::protobuf::MessageField<TypeProto>,
466    // @@protoc_insertion_point(field:onnx.ValueInfoProto.doc_string)
467    pub doc_string: ::std::string::String,
468    // @@protoc_insertion_point(field:onnx.ValueInfoProto.metadata_props)
469    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
470    // special fields
471    // @@protoc_insertion_point(special_field:onnx.ValueInfoProto.special_fields)
472    pub special_fields: ::protobuf::SpecialFields,
473}
474
475impl<'a> ::std::default::Default for &'a ValueInfoProto {
476    fn default() -> &'a ValueInfoProto {
477        <ValueInfoProto as ::protobuf::Message>::default_instance()
478    }
479}
480
481impl ValueInfoProto {
482    pub fn new() -> ValueInfoProto {
483        ::std::default::Default::default()
484    }
485}
486
487impl ::protobuf::Message for ValueInfoProto {
488    const NAME: &'static str = "ValueInfoProto";
489
490    fn is_initialized(&self) -> bool {
491        true
492    }
493
494    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
495        while let Some(tag) = is.read_raw_tag_or_eof()? {
496            match tag {
497                10 => {
498                    self.name = is.read_string()?;
499                },
500                18 => {
501                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.type_)?;
502                },
503                26 => {
504                    self.doc_string = is.read_string()?;
505                },
506                34 => {
507                    self.metadata_props.push(is.read_message()?);
508                },
509                tag => {
510                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
511                },
512            };
513        }
514        ::std::result::Result::Ok(())
515    }
516
517    // Compute sizes of nested messages
518    #[allow(unused_variables)]
519    fn compute_size(&self) -> u64 {
520        let mut my_size = 0;
521        if !self.name.is_empty() {
522            my_size += ::protobuf::rt::string_size(1, &self.name);
523        }
524        if let Some(v) = self.type_.as_ref() {
525            let len = v.compute_size();
526            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
527        }
528        if !self.doc_string.is_empty() {
529            my_size += ::protobuf::rt::string_size(3, &self.doc_string);
530        }
531        for value in &self.metadata_props {
532            let len = value.compute_size();
533            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
534        };
535        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
536        self.special_fields.cached_size().set(my_size as u32);
537        my_size
538    }
539
540    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
541        if !self.name.is_empty() {
542            os.write_string(1, &self.name)?;
543        }
544        if let Some(v) = self.type_.as_ref() {
545            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
546        }
547        if !self.doc_string.is_empty() {
548            os.write_string(3, &self.doc_string)?;
549        }
550        for v in &self.metadata_props {
551            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
552        };
553        os.write_unknown_fields(self.special_fields.unknown_fields())?;
554        ::std::result::Result::Ok(())
555    }
556
557    fn special_fields(&self) -> &::protobuf::SpecialFields {
558        &self.special_fields
559    }
560
561    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
562        &mut self.special_fields
563    }
564
565    fn new() -> ValueInfoProto {
566        ValueInfoProto::new()
567    }
568
569    fn clear(&mut self) {
570        self.name.clear();
571        self.type_.clear();
572        self.doc_string.clear();
573        self.metadata_props.clear();
574        self.special_fields.clear();
575    }
576
577    fn default_instance() -> &'static ValueInfoProto {
578        static instance: ValueInfoProto = ValueInfoProto {
579            name: ::std::string::String::new(),
580            type_: ::protobuf::MessageField::none(),
581            doc_string: ::std::string::String::new(),
582            metadata_props: ::std::vec::Vec::new(),
583            special_fields: ::protobuf::SpecialFields::new(),
584        };
585        &instance
586    }
587}
588
589// @@protoc_insertion_point(message:onnx.NodeProto)
590#[derive(PartialEq,Clone,Default,Debug)]
591pub struct NodeProto {
592    // message fields
593    // @@protoc_insertion_point(field:onnx.NodeProto.input)
594    pub input: ::std::vec::Vec<::std::string::String>,
595    // @@protoc_insertion_point(field:onnx.NodeProto.output)
596    pub output: ::std::vec::Vec<::std::string::String>,
597    // @@protoc_insertion_point(field:onnx.NodeProto.name)
598    pub name: ::std::string::String,
599    // @@protoc_insertion_point(field:onnx.NodeProto.op_type)
600    pub op_type: ::std::string::String,
601    // @@protoc_insertion_point(field:onnx.NodeProto.domain)
602    pub domain: ::std::string::String,
603    // @@protoc_insertion_point(field:onnx.NodeProto.overload)
604    pub overload: ::std::string::String,
605    // @@protoc_insertion_point(field:onnx.NodeProto.attribute)
606    pub attribute: ::std::vec::Vec<AttributeProto>,
607    // @@protoc_insertion_point(field:onnx.NodeProto.doc_string)
608    pub doc_string: ::std::string::String,
609    // @@protoc_insertion_point(field:onnx.NodeProto.metadata_props)
610    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
611    // special fields
612    // @@protoc_insertion_point(special_field:onnx.NodeProto.special_fields)
613    pub special_fields: ::protobuf::SpecialFields,
614}
615
616impl<'a> ::std::default::Default for &'a NodeProto {
617    fn default() -> &'a NodeProto {
618        <NodeProto as ::protobuf::Message>::default_instance()
619    }
620}
621
622impl NodeProto {
623    pub fn new() -> NodeProto {
624        ::std::default::Default::default()
625    }
626}
627
628impl ::protobuf::Message for NodeProto {
629    const NAME: &'static str = "NodeProto";
630
631    fn is_initialized(&self) -> bool {
632        true
633    }
634
635    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
636        while let Some(tag) = is.read_raw_tag_or_eof()? {
637            match tag {
638                10 => {
639                    self.input.push(is.read_string()?);
640                },
641                18 => {
642                    self.output.push(is.read_string()?);
643                },
644                26 => {
645                    self.name = is.read_string()?;
646                },
647                34 => {
648                    self.op_type = is.read_string()?;
649                },
650                58 => {
651                    self.domain = is.read_string()?;
652                },
653                66 => {
654                    self.overload = is.read_string()?;
655                },
656                42 => {
657                    self.attribute.push(is.read_message()?);
658                },
659                50 => {
660                    self.doc_string = is.read_string()?;
661                },
662                74 => {
663                    self.metadata_props.push(is.read_message()?);
664                },
665                tag => {
666                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
667                },
668            };
669        }
670        ::std::result::Result::Ok(())
671    }
672
673    // Compute sizes of nested messages
674    #[allow(unused_variables)]
675    fn compute_size(&self) -> u64 {
676        let mut my_size = 0;
677        for value in &self.input {
678            my_size += ::protobuf::rt::string_size(1, &value);
679        };
680        for value in &self.output {
681            my_size += ::protobuf::rt::string_size(2, &value);
682        };
683        if !self.name.is_empty() {
684            my_size += ::protobuf::rt::string_size(3, &self.name);
685        }
686        if !self.op_type.is_empty() {
687            my_size += ::protobuf::rt::string_size(4, &self.op_type);
688        }
689        if !self.domain.is_empty() {
690            my_size += ::protobuf::rt::string_size(7, &self.domain);
691        }
692        if !self.overload.is_empty() {
693            my_size += ::protobuf::rt::string_size(8, &self.overload);
694        }
695        for value in &self.attribute {
696            let len = value.compute_size();
697            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
698        };
699        if !self.doc_string.is_empty() {
700            my_size += ::protobuf::rt::string_size(6, &self.doc_string);
701        }
702        for value in &self.metadata_props {
703            let len = value.compute_size();
704            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
705        };
706        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
707        self.special_fields.cached_size().set(my_size as u32);
708        my_size
709    }
710
711    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
712        for v in &self.input {
713            os.write_string(1, &v)?;
714        };
715        for v in &self.output {
716            os.write_string(2, &v)?;
717        };
718        if !self.name.is_empty() {
719            os.write_string(3, &self.name)?;
720        }
721        if !self.op_type.is_empty() {
722            os.write_string(4, &self.op_type)?;
723        }
724        if !self.domain.is_empty() {
725            os.write_string(7, &self.domain)?;
726        }
727        if !self.overload.is_empty() {
728            os.write_string(8, &self.overload)?;
729        }
730        for v in &self.attribute {
731            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
732        };
733        if !self.doc_string.is_empty() {
734            os.write_string(6, &self.doc_string)?;
735        }
736        for v in &self.metadata_props {
737            ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
738        };
739        os.write_unknown_fields(self.special_fields.unknown_fields())?;
740        ::std::result::Result::Ok(())
741    }
742
743    fn special_fields(&self) -> &::protobuf::SpecialFields {
744        &self.special_fields
745    }
746
747    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
748        &mut self.special_fields
749    }
750
751    fn new() -> NodeProto {
752        NodeProto::new()
753    }
754
755    fn clear(&mut self) {
756        self.input.clear();
757        self.output.clear();
758        self.name.clear();
759        self.op_type.clear();
760        self.domain.clear();
761        self.overload.clear();
762        self.attribute.clear();
763        self.doc_string.clear();
764        self.metadata_props.clear();
765        self.special_fields.clear();
766    }
767
768    fn default_instance() -> &'static NodeProto {
769        static instance: NodeProto = NodeProto {
770            input: ::std::vec::Vec::new(),
771            output: ::std::vec::Vec::new(),
772            name: ::std::string::String::new(),
773            op_type: ::std::string::String::new(),
774            domain: ::std::string::String::new(),
775            overload: ::std::string::String::new(),
776            attribute: ::std::vec::Vec::new(),
777            doc_string: ::std::string::String::new(),
778            metadata_props: ::std::vec::Vec::new(),
779            special_fields: ::protobuf::SpecialFields::new(),
780        };
781        &instance
782    }
783}
784
785// @@protoc_insertion_point(message:onnx.TrainingInfoProto)
786#[derive(PartialEq,Clone,Default,Debug)]
787pub struct TrainingInfoProto {
788    // message fields
789    // @@protoc_insertion_point(field:onnx.TrainingInfoProto.initialization)
790    pub initialization: ::protobuf::MessageField<GraphProto>,
791    // @@protoc_insertion_point(field:onnx.TrainingInfoProto.algorithm)
792    pub algorithm: ::protobuf::MessageField<GraphProto>,
793    // @@protoc_insertion_point(field:onnx.TrainingInfoProto.initialization_binding)
794    pub initialization_binding: ::std::vec::Vec<StringStringEntryProto>,
795    // @@protoc_insertion_point(field:onnx.TrainingInfoProto.update_binding)
796    pub update_binding: ::std::vec::Vec<StringStringEntryProto>,
797    // special fields
798    // @@protoc_insertion_point(special_field:onnx.TrainingInfoProto.special_fields)
799    pub special_fields: ::protobuf::SpecialFields,
800}
801
802impl<'a> ::std::default::Default for &'a TrainingInfoProto {
803    fn default() -> &'a TrainingInfoProto {
804        <TrainingInfoProto as ::protobuf::Message>::default_instance()
805    }
806}
807
808impl TrainingInfoProto {
809    pub fn new() -> TrainingInfoProto {
810        ::std::default::Default::default()
811    }
812}
813
814impl ::protobuf::Message for TrainingInfoProto {
815    const NAME: &'static str = "TrainingInfoProto";
816
817    fn is_initialized(&self) -> bool {
818        true
819    }
820
821    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
822        while let Some(tag) = is.read_raw_tag_or_eof()? {
823            match tag {
824                10 => {
825                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.initialization)?;
826                },
827                18 => {
828                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.algorithm)?;
829                },
830                26 => {
831                    self.initialization_binding.push(is.read_message()?);
832                },
833                34 => {
834                    self.update_binding.push(is.read_message()?);
835                },
836                tag => {
837                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
838                },
839            };
840        }
841        ::std::result::Result::Ok(())
842    }
843
844    // Compute sizes of nested messages
845    #[allow(unused_variables)]
846    fn compute_size(&self) -> u64 {
847        let mut my_size = 0;
848        if let Some(v) = self.initialization.as_ref() {
849            let len = v.compute_size();
850            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
851        }
852        if let Some(v) = self.algorithm.as_ref() {
853            let len = v.compute_size();
854            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
855        }
856        for value in &self.initialization_binding {
857            let len = value.compute_size();
858            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
859        };
860        for value in &self.update_binding {
861            let len = value.compute_size();
862            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
863        };
864        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
865        self.special_fields.cached_size().set(my_size as u32);
866        my_size
867    }
868
869    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
870        if let Some(v) = self.initialization.as_ref() {
871            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
872        }
873        if let Some(v) = self.algorithm.as_ref() {
874            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
875        }
876        for v in &self.initialization_binding {
877            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
878        };
879        for v in &self.update_binding {
880            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
881        };
882        os.write_unknown_fields(self.special_fields.unknown_fields())?;
883        ::std::result::Result::Ok(())
884    }
885
886    fn special_fields(&self) -> &::protobuf::SpecialFields {
887        &self.special_fields
888    }
889
890    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
891        &mut self.special_fields
892    }
893
894    fn new() -> TrainingInfoProto {
895        TrainingInfoProto::new()
896    }
897
898    fn clear(&mut self) {
899        self.initialization.clear();
900        self.algorithm.clear();
901        self.initialization_binding.clear();
902        self.update_binding.clear();
903        self.special_fields.clear();
904    }
905
906    fn default_instance() -> &'static TrainingInfoProto {
907        static instance: TrainingInfoProto = TrainingInfoProto {
908            initialization: ::protobuf::MessageField::none(),
909            algorithm: ::protobuf::MessageField::none(),
910            initialization_binding: ::std::vec::Vec::new(),
911            update_binding: ::std::vec::Vec::new(),
912            special_fields: ::protobuf::SpecialFields::new(),
913        };
914        &instance
915    }
916}
917
918// @@protoc_insertion_point(message:onnx.ModelProto)
919#[derive(PartialEq,Clone,Default,Debug)]
920pub struct ModelProto {
921    // message fields
922    // @@protoc_insertion_point(field:onnx.ModelProto.ir_version)
923    pub ir_version: i64,
924    // @@protoc_insertion_point(field:onnx.ModelProto.opset_import)
925    pub opset_import: ::std::vec::Vec<OperatorSetIdProto>,
926    // @@protoc_insertion_point(field:onnx.ModelProto.producer_name)
927    pub producer_name: ::std::string::String,
928    // @@protoc_insertion_point(field:onnx.ModelProto.producer_version)
929    pub producer_version: ::std::string::String,
930    // @@protoc_insertion_point(field:onnx.ModelProto.domain)
931    pub domain: ::std::string::String,
932    // @@protoc_insertion_point(field:onnx.ModelProto.model_version)
933    pub model_version: i64,
934    // @@protoc_insertion_point(field:onnx.ModelProto.doc_string)
935    pub doc_string: ::std::string::String,
936    // @@protoc_insertion_point(field:onnx.ModelProto.graph)
937    pub graph: ::protobuf::MessageField<GraphProto>,
938    // @@protoc_insertion_point(field:onnx.ModelProto.metadata_props)
939    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
940    // @@protoc_insertion_point(field:onnx.ModelProto.training_info)
941    pub training_info: ::std::vec::Vec<TrainingInfoProto>,
942    // @@protoc_insertion_point(field:onnx.ModelProto.functions)
943    pub functions: ::std::vec::Vec<FunctionProto>,
944    // special fields
945    // @@protoc_insertion_point(special_field:onnx.ModelProto.special_fields)
946    pub special_fields: ::protobuf::SpecialFields,
947}
948
949impl<'a> ::std::default::Default for &'a ModelProto {
950    fn default() -> &'a ModelProto {
951        <ModelProto as ::protobuf::Message>::default_instance()
952    }
953}
954
955impl ModelProto {
956    pub fn new() -> ModelProto {
957        ::std::default::Default::default()
958    }
959}
960
961impl ::protobuf::Message for ModelProto {
962    const NAME: &'static str = "ModelProto";
963
964    fn is_initialized(&self) -> bool {
965        true
966    }
967
968    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
969        while let Some(tag) = is.read_raw_tag_or_eof()? {
970            match tag {
971                8 => {
972                    self.ir_version = is.read_int64()?;
973                },
974                66 => {
975                    self.opset_import.push(is.read_message()?);
976                },
977                18 => {
978                    self.producer_name = is.read_string()?;
979                },
980                26 => {
981                    self.producer_version = is.read_string()?;
982                },
983                34 => {
984                    self.domain = is.read_string()?;
985                },
986                40 => {
987                    self.model_version = is.read_int64()?;
988                },
989                50 => {
990                    self.doc_string = is.read_string()?;
991                },
992                58 => {
993                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.graph)?;
994                },
995                114 => {
996                    self.metadata_props.push(is.read_message()?);
997                },
998                162 => {
999                    self.training_info.push(is.read_message()?);
1000                },
1001                202 => {
1002                    self.functions.push(is.read_message()?);
1003                },
1004                tag => {
1005                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1006                },
1007            };
1008        }
1009        ::std::result::Result::Ok(())
1010    }
1011
1012    // Compute sizes of nested messages
1013    #[allow(unused_variables)]
1014    fn compute_size(&self) -> u64 {
1015        let mut my_size = 0;
1016        if self.ir_version != 0 {
1017            my_size += ::protobuf::rt::int64_size(1, self.ir_version);
1018        }
1019        for value in &self.opset_import {
1020            let len = value.compute_size();
1021            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1022        };
1023        if !self.producer_name.is_empty() {
1024            my_size += ::protobuf::rt::string_size(2, &self.producer_name);
1025        }
1026        if !self.producer_version.is_empty() {
1027            my_size += ::protobuf::rt::string_size(3, &self.producer_version);
1028        }
1029        if !self.domain.is_empty() {
1030            my_size += ::protobuf::rt::string_size(4, &self.domain);
1031        }
1032        if self.model_version != 0 {
1033            my_size += ::protobuf::rt::int64_size(5, self.model_version);
1034        }
1035        if !self.doc_string.is_empty() {
1036            my_size += ::protobuf::rt::string_size(6, &self.doc_string);
1037        }
1038        if let Some(v) = self.graph.as_ref() {
1039            let len = v.compute_size();
1040            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1041        }
1042        for value in &self.metadata_props {
1043            let len = value.compute_size();
1044            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1045        };
1046        for value in &self.training_info {
1047            let len = value.compute_size();
1048            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1049        };
1050        for value in &self.functions {
1051            let len = value.compute_size();
1052            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1053        };
1054        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1055        self.special_fields.cached_size().set(my_size as u32);
1056        my_size
1057    }
1058
1059    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1060        if self.ir_version != 0 {
1061            os.write_int64(1, self.ir_version)?;
1062        }
1063        for v in &self.opset_import {
1064            ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
1065        };
1066        if !self.producer_name.is_empty() {
1067            os.write_string(2, &self.producer_name)?;
1068        }
1069        if !self.producer_version.is_empty() {
1070            os.write_string(3, &self.producer_version)?;
1071        }
1072        if !self.domain.is_empty() {
1073            os.write_string(4, &self.domain)?;
1074        }
1075        if self.model_version != 0 {
1076            os.write_int64(5, self.model_version)?;
1077        }
1078        if !self.doc_string.is_empty() {
1079            os.write_string(6, &self.doc_string)?;
1080        }
1081        if let Some(v) = self.graph.as_ref() {
1082            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
1083        }
1084        for v in &self.metadata_props {
1085            ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
1086        };
1087        for v in &self.training_info {
1088            ::protobuf::rt::write_message_field_with_cached_size(20, v, os)?;
1089        };
1090        for v in &self.functions {
1091            ::protobuf::rt::write_message_field_with_cached_size(25, v, os)?;
1092        };
1093        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1094        ::std::result::Result::Ok(())
1095    }
1096
1097    fn special_fields(&self) -> &::protobuf::SpecialFields {
1098        &self.special_fields
1099    }
1100
1101    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1102        &mut self.special_fields
1103    }
1104
1105    fn new() -> ModelProto {
1106        ModelProto::new()
1107    }
1108
1109    fn clear(&mut self) {
1110        self.ir_version = 0;
1111        self.opset_import.clear();
1112        self.producer_name.clear();
1113        self.producer_version.clear();
1114        self.domain.clear();
1115        self.model_version = 0;
1116        self.doc_string.clear();
1117        self.graph.clear();
1118        self.metadata_props.clear();
1119        self.training_info.clear();
1120        self.functions.clear();
1121        self.special_fields.clear();
1122    }
1123
1124    fn default_instance() -> &'static ModelProto {
1125        static instance: ModelProto = ModelProto {
1126            ir_version: 0,
1127            opset_import: ::std::vec::Vec::new(),
1128            producer_name: ::std::string::String::new(),
1129            producer_version: ::std::string::String::new(),
1130            domain: ::std::string::String::new(),
1131            model_version: 0,
1132            doc_string: ::std::string::String::new(),
1133            graph: ::protobuf::MessageField::none(),
1134            metadata_props: ::std::vec::Vec::new(),
1135            training_info: ::std::vec::Vec::new(),
1136            functions: ::std::vec::Vec::new(),
1137            special_fields: ::protobuf::SpecialFields::new(),
1138        };
1139        &instance
1140    }
1141}
1142
1143// @@protoc_insertion_point(message:onnx.StringStringEntryProto)
1144#[derive(PartialEq,Clone,Default,Debug)]
1145pub struct StringStringEntryProto {
1146    // message fields
1147    // @@protoc_insertion_point(field:onnx.StringStringEntryProto.key)
1148    pub key: ::std::string::String,
1149    // @@protoc_insertion_point(field:onnx.StringStringEntryProto.value)
1150    pub value: ::std::string::String,
1151    // special fields
1152    // @@protoc_insertion_point(special_field:onnx.StringStringEntryProto.special_fields)
1153    pub special_fields: ::protobuf::SpecialFields,
1154}
1155
1156impl<'a> ::std::default::Default for &'a StringStringEntryProto {
1157    fn default() -> &'a StringStringEntryProto {
1158        <StringStringEntryProto as ::protobuf::Message>::default_instance()
1159    }
1160}
1161
1162impl StringStringEntryProto {
1163    pub fn new() -> StringStringEntryProto {
1164        ::std::default::Default::default()
1165    }
1166}
1167
1168impl ::protobuf::Message for StringStringEntryProto {
1169    const NAME: &'static str = "StringStringEntryProto";
1170
1171    fn is_initialized(&self) -> bool {
1172        true
1173    }
1174
1175    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1176        while let Some(tag) = is.read_raw_tag_or_eof()? {
1177            match tag {
1178                10 => {
1179                    self.key = is.read_string()?;
1180                },
1181                18 => {
1182                    self.value = is.read_string()?;
1183                },
1184                tag => {
1185                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1186                },
1187            };
1188        }
1189        ::std::result::Result::Ok(())
1190    }
1191
1192    // Compute sizes of nested messages
1193    #[allow(unused_variables)]
1194    fn compute_size(&self) -> u64 {
1195        let mut my_size = 0;
1196        if !self.key.is_empty() {
1197            my_size += ::protobuf::rt::string_size(1, &self.key);
1198        }
1199        if !self.value.is_empty() {
1200            my_size += ::protobuf::rt::string_size(2, &self.value);
1201        }
1202        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1203        self.special_fields.cached_size().set(my_size as u32);
1204        my_size
1205    }
1206
1207    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1208        if !self.key.is_empty() {
1209            os.write_string(1, &self.key)?;
1210        }
1211        if !self.value.is_empty() {
1212            os.write_string(2, &self.value)?;
1213        }
1214        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1215        ::std::result::Result::Ok(())
1216    }
1217
1218    fn special_fields(&self) -> &::protobuf::SpecialFields {
1219        &self.special_fields
1220    }
1221
1222    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1223        &mut self.special_fields
1224    }
1225
1226    fn new() -> StringStringEntryProto {
1227        StringStringEntryProto::new()
1228    }
1229
1230    fn clear(&mut self) {
1231        self.key.clear();
1232        self.value.clear();
1233        self.special_fields.clear();
1234    }
1235
1236    fn default_instance() -> &'static StringStringEntryProto {
1237        static instance: StringStringEntryProto = StringStringEntryProto {
1238            key: ::std::string::String::new(),
1239            value: ::std::string::String::new(),
1240            special_fields: ::protobuf::SpecialFields::new(),
1241        };
1242        &instance
1243    }
1244}
1245
1246// @@protoc_insertion_point(message:onnx.TensorAnnotation)
1247#[derive(PartialEq,Clone,Default,Debug)]
1248pub struct TensorAnnotation {
1249    // message fields
1250    // @@protoc_insertion_point(field:onnx.TensorAnnotation.tensor_name)
1251    pub tensor_name: ::std::string::String,
1252    // @@protoc_insertion_point(field:onnx.TensorAnnotation.quant_parameter_tensor_names)
1253    pub quant_parameter_tensor_names: ::std::vec::Vec<StringStringEntryProto>,
1254    // special fields
1255    // @@protoc_insertion_point(special_field:onnx.TensorAnnotation.special_fields)
1256    pub special_fields: ::protobuf::SpecialFields,
1257}
1258
1259impl<'a> ::std::default::Default for &'a TensorAnnotation {
1260    fn default() -> &'a TensorAnnotation {
1261        <TensorAnnotation as ::protobuf::Message>::default_instance()
1262    }
1263}
1264
1265impl TensorAnnotation {
1266    pub fn new() -> TensorAnnotation {
1267        ::std::default::Default::default()
1268    }
1269}
1270
1271impl ::protobuf::Message for TensorAnnotation {
1272    const NAME: &'static str = "TensorAnnotation";
1273
1274    fn is_initialized(&self) -> bool {
1275        true
1276    }
1277
1278    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1279        while let Some(tag) = is.read_raw_tag_or_eof()? {
1280            match tag {
1281                10 => {
1282                    self.tensor_name = is.read_string()?;
1283                },
1284                18 => {
1285                    self.quant_parameter_tensor_names.push(is.read_message()?);
1286                },
1287                tag => {
1288                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1289                },
1290            };
1291        }
1292        ::std::result::Result::Ok(())
1293    }
1294
1295    // Compute sizes of nested messages
1296    #[allow(unused_variables)]
1297    fn compute_size(&self) -> u64 {
1298        let mut my_size = 0;
1299        if !self.tensor_name.is_empty() {
1300            my_size += ::protobuf::rt::string_size(1, &self.tensor_name);
1301        }
1302        for value in &self.quant_parameter_tensor_names {
1303            let len = value.compute_size();
1304            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1305        };
1306        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1307        self.special_fields.cached_size().set(my_size as u32);
1308        my_size
1309    }
1310
1311    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1312        if !self.tensor_name.is_empty() {
1313            os.write_string(1, &self.tensor_name)?;
1314        }
1315        for v in &self.quant_parameter_tensor_names {
1316            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
1317        };
1318        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1319        ::std::result::Result::Ok(())
1320    }
1321
1322    fn special_fields(&self) -> &::protobuf::SpecialFields {
1323        &self.special_fields
1324    }
1325
1326    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1327        &mut self.special_fields
1328    }
1329
1330    fn new() -> TensorAnnotation {
1331        TensorAnnotation::new()
1332    }
1333
1334    fn clear(&mut self) {
1335        self.tensor_name.clear();
1336        self.quant_parameter_tensor_names.clear();
1337        self.special_fields.clear();
1338    }
1339
1340    fn default_instance() -> &'static TensorAnnotation {
1341        static instance: TensorAnnotation = TensorAnnotation {
1342            tensor_name: ::std::string::String::new(),
1343            quant_parameter_tensor_names: ::std::vec::Vec::new(),
1344            special_fields: ::protobuf::SpecialFields::new(),
1345        };
1346        &instance
1347    }
1348}
1349
1350// @@protoc_insertion_point(message:onnx.GraphProto)
1351#[derive(PartialEq,Clone,Default,Debug)]
1352pub struct GraphProto {
1353    // message fields
1354    // @@protoc_insertion_point(field:onnx.GraphProto.node)
1355    pub node: ::std::vec::Vec<NodeProto>,
1356    // @@protoc_insertion_point(field:onnx.GraphProto.name)
1357    pub name: ::std::string::String,
1358    // @@protoc_insertion_point(field:onnx.GraphProto.initializer)
1359    pub initializer: ::std::vec::Vec<TensorProto>,
1360    // @@protoc_insertion_point(field:onnx.GraphProto.sparse_initializer)
1361    pub sparse_initializer: ::std::vec::Vec<SparseTensorProto>,
1362    // @@protoc_insertion_point(field:onnx.GraphProto.doc_string)
1363    pub doc_string: ::std::string::String,
1364    // @@protoc_insertion_point(field:onnx.GraphProto.input)
1365    pub input: ::std::vec::Vec<ValueInfoProto>,
1366    // @@protoc_insertion_point(field:onnx.GraphProto.output)
1367    pub output: ::std::vec::Vec<ValueInfoProto>,
1368    // @@protoc_insertion_point(field:onnx.GraphProto.value_info)
1369    pub value_info: ::std::vec::Vec<ValueInfoProto>,
1370    // @@protoc_insertion_point(field:onnx.GraphProto.quantization_annotation)
1371    pub quantization_annotation: ::std::vec::Vec<TensorAnnotation>,
1372    // @@protoc_insertion_point(field:onnx.GraphProto.metadata_props)
1373    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
1374    // special fields
1375    // @@protoc_insertion_point(special_field:onnx.GraphProto.special_fields)
1376    pub special_fields: ::protobuf::SpecialFields,
1377}
1378
1379impl<'a> ::std::default::Default for &'a GraphProto {
1380    fn default() -> &'a GraphProto {
1381        <GraphProto as ::protobuf::Message>::default_instance()
1382    }
1383}
1384
1385impl GraphProto {
1386    pub fn new() -> GraphProto {
1387        ::std::default::Default::default()
1388    }
1389}
1390
1391impl ::protobuf::Message for GraphProto {
1392    const NAME: &'static str = "GraphProto";
1393
1394    fn is_initialized(&self) -> bool {
1395        true
1396    }
1397
1398    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1399        while let Some(tag) = is.read_raw_tag_or_eof()? {
1400            match tag {
1401                10 => {
1402                    self.node.push(is.read_message()?);
1403                },
1404                18 => {
1405                    self.name = is.read_string()?;
1406                },
1407                42 => {
1408                    self.initializer.push(is.read_message()?);
1409                },
1410                122 => {
1411                    self.sparse_initializer.push(is.read_message()?);
1412                },
1413                82 => {
1414                    self.doc_string = is.read_string()?;
1415                },
1416                90 => {
1417                    self.input.push(is.read_message()?);
1418                },
1419                98 => {
1420                    self.output.push(is.read_message()?);
1421                },
1422                106 => {
1423                    self.value_info.push(is.read_message()?);
1424                },
1425                114 => {
1426                    self.quantization_annotation.push(is.read_message()?);
1427                },
1428                130 => {
1429                    self.metadata_props.push(is.read_message()?);
1430                },
1431                tag => {
1432                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1433                },
1434            };
1435        }
1436        ::std::result::Result::Ok(())
1437    }
1438
1439    // Compute sizes of nested messages
1440    #[allow(unused_variables)]
1441    fn compute_size(&self) -> u64 {
1442        let mut my_size = 0;
1443        for value in &self.node {
1444            let len = value.compute_size();
1445            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1446        };
1447        if !self.name.is_empty() {
1448            my_size += ::protobuf::rt::string_size(2, &self.name);
1449        }
1450        for value in &self.initializer {
1451            let len = value.compute_size();
1452            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1453        };
1454        for value in &self.sparse_initializer {
1455            let len = value.compute_size();
1456            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1457        };
1458        if !self.doc_string.is_empty() {
1459            my_size += ::protobuf::rt::string_size(10, &self.doc_string);
1460        }
1461        for value in &self.input {
1462            let len = value.compute_size();
1463            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1464        };
1465        for value in &self.output {
1466            let len = value.compute_size();
1467            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1468        };
1469        for value in &self.value_info {
1470            let len = value.compute_size();
1471            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1472        };
1473        for value in &self.quantization_annotation {
1474            let len = value.compute_size();
1475            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1476        };
1477        for value in &self.metadata_props {
1478            let len = value.compute_size();
1479            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1480        };
1481        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1482        self.special_fields.cached_size().set(my_size as u32);
1483        my_size
1484    }
1485
1486    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1487        for v in &self.node {
1488            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
1489        };
1490        if !self.name.is_empty() {
1491            os.write_string(2, &self.name)?;
1492        }
1493        for v in &self.initializer {
1494            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
1495        };
1496        for v in &self.sparse_initializer {
1497            ::protobuf::rt::write_message_field_with_cached_size(15, v, os)?;
1498        };
1499        if !self.doc_string.is_empty() {
1500            os.write_string(10, &self.doc_string)?;
1501        }
1502        for v in &self.input {
1503            ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
1504        };
1505        for v in &self.output {
1506            ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
1507        };
1508        for v in &self.value_info {
1509            ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?;
1510        };
1511        for v in &self.quantization_annotation {
1512            ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
1513        };
1514        for v in &self.metadata_props {
1515            ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?;
1516        };
1517        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1518        ::std::result::Result::Ok(())
1519    }
1520
1521    fn special_fields(&self) -> &::protobuf::SpecialFields {
1522        &self.special_fields
1523    }
1524
1525    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1526        &mut self.special_fields
1527    }
1528
1529    fn new() -> GraphProto {
1530        GraphProto::new()
1531    }
1532
1533    fn clear(&mut self) {
1534        self.node.clear();
1535        self.name.clear();
1536        self.initializer.clear();
1537        self.sparse_initializer.clear();
1538        self.doc_string.clear();
1539        self.input.clear();
1540        self.output.clear();
1541        self.value_info.clear();
1542        self.quantization_annotation.clear();
1543        self.metadata_props.clear();
1544        self.special_fields.clear();
1545    }
1546
1547    fn default_instance() -> &'static GraphProto {
1548        static instance: GraphProto = GraphProto {
1549            node: ::std::vec::Vec::new(),
1550            name: ::std::string::String::new(),
1551            initializer: ::std::vec::Vec::new(),
1552            sparse_initializer: ::std::vec::Vec::new(),
1553            doc_string: ::std::string::String::new(),
1554            input: ::std::vec::Vec::new(),
1555            output: ::std::vec::Vec::new(),
1556            value_info: ::std::vec::Vec::new(),
1557            quantization_annotation: ::std::vec::Vec::new(),
1558            metadata_props: ::std::vec::Vec::new(),
1559            special_fields: ::protobuf::SpecialFields::new(),
1560        };
1561        &instance
1562    }
1563}
1564
1565// @@protoc_insertion_point(message:onnx.TensorProto)
1566#[derive(PartialEq,Clone,Default,Debug)]
1567pub struct TensorProto {
1568    // message fields
1569    // @@protoc_insertion_point(field:onnx.TensorProto.dims)
1570    pub dims: ::std::vec::Vec<i64>,
1571    // @@protoc_insertion_point(field:onnx.TensorProto.data_type)
1572    pub data_type: i32,
1573    // @@protoc_insertion_point(field:onnx.TensorProto.segment)
1574    pub segment: ::protobuf::MessageField<tensor_proto::Segment>,
1575    // @@protoc_insertion_point(field:onnx.TensorProto.float_data)
1576    pub float_data: ::std::vec::Vec<f32>,
1577    // @@protoc_insertion_point(field:onnx.TensorProto.int32_data)
1578    pub int32_data: ::std::vec::Vec<i32>,
1579    // @@protoc_insertion_point(field:onnx.TensorProto.string_data)
1580    pub string_data: ::std::vec::Vec<::std::vec::Vec<u8>>,
1581    // @@protoc_insertion_point(field:onnx.TensorProto.int64_data)
1582    pub int64_data: ::std::vec::Vec<i64>,
1583    // @@protoc_insertion_point(field:onnx.TensorProto.name)
1584    pub name: ::std::string::String,
1585    // @@protoc_insertion_point(field:onnx.TensorProto.doc_string)
1586    pub doc_string: ::std::string::String,
1587    // @@protoc_insertion_point(field:onnx.TensorProto.raw_data)
1588    pub raw_data: ::std::vec::Vec<u8>,
1589    // @@protoc_insertion_point(field:onnx.TensorProto.external_data)
1590    pub external_data: ::std::vec::Vec<StringStringEntryProto>,
1591    // @@protoc_insertion_point(field:onnx.TensorProto.data_location)
1592    pub data_location: ::protobuf::EnumOrUnknown<tensor_proto::DataLocation>,
1593    // @@protoc_insertion_point(field:onnx.TensorProto.double_data)
1594    pub double_data: ::std::vec::Vec<f64>,
1595    // @@protoc_insertion_point(field:onnx.TensorProto.uint64_data)
1596    pub uint64_data: ::std::vec::Vec<u64>,
1597    // @@protoc_insertion_point(field:onnx.TensorProto.metadata_props)
1598    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
1599    // special fields
1600    // @@protoc_insertion_point(special_field:onnx.TensorProto.special_fields)
1601    pub special_fields: ::protobuf::SpecialFields,
1602}
1603
1604impl<'a> ::std::default::Default for &'a TensorProto {
1605    fn default() -> &'a TensorProto {
1606        <TensorProto as ::protobuf::Message>::default_instance()
1607    }
1608}
1609
1610impl TensorProto {
1611    pub fn new() -> TensorProto {
1612        ::std::default::Default::default()
1613    }
1614}
1615
1616impl ::protobuf::Message for TensorProto {
1617    const NAME: &'static str = "TensorProto";
1618
1619    fn is_initialized(&self) -> bool {
1620        true
1621    }
1622
1623    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1624        while let Some(tag) = is.read_raw_tag_or_eof()? {
1625            match tag {
1626                10 => {
1627                    is.read_repeated_packed_int64_into(&mut self.dims)?;
1628                },
1629                8 => {
1630                    self.dims.push(is.read_int64()?);
1631                },
1632                16 => {
1633                    self.data_type = is.read_int32()?;
1634                },
1635                26 => {
1636                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.segment)?;
1637                },
1638                34 => {
1639                    is.read_repeated_packed_float_into(&mut self.float_data)?;
1640                },
1641                37 => {
1642                    self.float_data.push(is.read_float()?);
1643                },
1644                42 => {
1645                    is.read_repeated_packed_int32_into(&mut self.int32_data)?;
1646                },
1647                40 => {
1648                    self.int32_data.push(is.read_int32()?);
1649                },
1650                50 => {
1651                    self.string_data.push(is.read_bytes()?);
1652                },
1653                58 => {
1654                    is.read_repeated_packed_int64_into(&mut self.int64_data)?;
1655                },
1656                56 => {
1657                    self.int64_data.push(is.read_int64()?);
1658                },
1659                66 => {
1660                    self.name = is.read_string()?;
1661                },
1662                98 => {
1663                    self.doc_string = is.read_string()?;
1664                },
1665                74 => {
1666                    self.raw_data = is.read_bytes()?;
1667                },
1668                106 => {
1669                    self.external_data.push(is.read_message()?);
1670                },
1671                112 => {
1672                    self.data_location = is.read_enum_or_unknown()?;
1673                },
1674                82 => {
1675                    is.read_repeated_packed_double_into(&mut self.double_data)?;
1676                },
1677                81 => {
1678                    self.double_data.push(is.read_double()?);
1679                },
1680                90 => {
1681                    is.read_repeated_packed_uint64_into(&mut self.uint64_data)?;
1682                },
1683                88 => {
1684                    self.uint64_data.push(is.read_uint64()?);
1685                },
1686                130 => {
1687                    self.metadata_props.push(is.read_message()?);
1688                },
1689                tag => {
1690                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1691                },
1692            };
1693        }
1694        ::std::result::Result::Ok(())
1695    }
1696
1697    // Compute sizes of nested messages
1698    #[allow(unused_variables)]
1699    fn compute_size(&self) -> u64 {
1700        let mut my_size = 0;
1701        my_size += ::protobuf::rt::vec_packed_int64_size(1, &self.dims);
1702        if self.data_type != 0 {
1703            my_size += ::protobuf::rt::int32_size(2, self.data_type);
1704        }
1705        if let Some(v) = self.segment.as_ref() {
1706            let len = v.compute_size();
1707            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1708        }
1709        my_size += ::protobuf::rt::vec_packed_float_size(4, &self.float_data);
1710        my_size += ::protobuf::rt::vec_packed_int32_size(5, &self.int32_data);
1711        for value in &self.string_data {
1712            my_size += ::protobuf::rt::bytes_size(6, &value);
1713        };
1714        my_size += ::protobuf::rt::vec_packed_int64_size(7, &self.int64_data);
1715        if !self.name.is_empty() {
1716            my_size += ::protobuf::rt::string_size(8, &self.name);
1717        }
1718        if !self.doc_string.is_empty() {
1719            my_size += ::protobuf::rt::string_size(12, &self.doc_string);
1720        }
1721        if !self.raw_data.is_empty() {
1722            my_size += ::protobuf::rt::bytes_size(9, &self.raw_data);
1723        }
1724        for value in &self.external_data {
1725            let len = value.compute_size();
1726            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1727        };
1728        if self.data_location != ::protobuf::EnumOrUnknown::new(tensor_proto::DataLocation::DEFAULT) {
1729            my_size += ::protobuf::rt::int32_size(14, self.data_location.value());
1730        }
1731        my_size += ::protobuf::rt::vec_packed_double_size(10, &self.double_data);
1732        my_size += ::protobuf::rt::vec_packed_uint64_size(11, &self.uint64_data);
1733        for value in &self.metadata_props {
1734            let len = value.compute_size();
1735            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1736        };
1737        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1738        self.special_fields.cached_size().set(my_size as u32);
1739        my_size
1740    }
1741
1742    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1743        os.write_repeated_packed_int64(1, &self.dims)?;
1744        if self.data_type != 0 {
1745            os.write_int32(2, self.data_type)?;
1746        }
1747        if let Some(v) = self.segment.as_ref() {
1748            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
1749        }
1750        os.write_repeated_packed_float(4, &self.float_data)?;
1751        os.write_repeated_packed_int32(5, &self.int32_data)?;
1752        for v in &self.string_data {
1753            os.write_bytes(6, &v)?;
1754        };
1755        os.write_repeated_packed_int64(7, &self.int64_data)?;
1756        if !self.name.is_empty() {
1757            os.write_string(8, &self.name)?;
1758        }
1759        if !self.doc_string.is_empty() {
1760            os.write_string(12, &self.doc_string)?;
1761        }
1762        if !self.raw_data.is_empty() {
1763            os.write_bytes(9, &self.raw_data)?;
1764        }
1765        for v in &self.external_data {
1766            ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?;
1767        };
1768        if self.data_location != ::protobuf::EnumOrUnknown::new(tensor_proto::DataLocation::DEFAULT) {
1769            os.write_enum(14, ::protobuf::EnumOrUnknown::value(&self.data_location))?;
1770        }
1771        os.write_repeated_packed_double(10, &self.double_data)?;
1772        os.write_repeated_packed_uint64(11, &self.uint64_data)?;
1773        for v in &self.metadata_props {
1774            ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?;
1775        };
1776        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1777        ::std::result::Result::Ok(())
1778    }
1779
1780    fn special_fields(&self) -> &::protobuf::SpecialFields {
1781        &self.special_fields
1782    }
1783
1784    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1785        &mut self.special_fields
1786    }
1787
1788    fn new() -> TensorProto {
1789        TensorProto::new()
1790    }
1791
1792    fn clear(&mut self) {
1793        self.dims.clear();
1794        self.data_type = 0;
1795        self.segment.clear();
1796        self.float_data.clear();
1797        self.int32_data.clear();
1798        self.string_data.clear();
1799        self.int64_data.clear();
1800        self.name.clear();
1801        self.doc_string.clear();
1802        self.raw_data.clear();
1803        self.external_data.clear();
1804        self.data_location = ::protobuf::EnumOrUnknown::new(tensor_proto::DataLocation::DEFAULT);
1805        self.double_data.clear();
1806        self.uint64_data.clear();
1807        self.metadata_props.clear();
1808        self.special_fields.clear();
1809    }
1810
1811    fn default_instance() -> &'static TensorProto {
1812        static instance: TensorProto = TensorProto {
1813            dims: ::std::vec::Vec::new(),
1814            data_type: 0,
1815            segment: ::protobuf::MessageField::none(),
1816            float_data: ::std::vec::Vec::new(),
1817            int32_data: ::std::vec::Vec::new(),
1818            string_data: ::std::vec::Vec::new(),
1819            int64_data: ::std::vec::Vec::new(),
1820            name: ::std::string::String::new(),
1821            doc_string: ::std::string::String::new(),
1822            raw_data: ::std::vec::Vec::new(),
1823            external_data: ::std::vec::Vec::new(),
1824            data_location: ::protobuf::EnumOrUnknown::from_i32(0),
1825            double_data: ::std::vec::Vec::new(),
1826            uint64_data: ::std::vec::Vec::new(),
1827            metadata_props: ::std::vec::Vec::new(),
1828            special_fields: ::protobuf::SpecialFields::new(),
1829        };
1830        &instance
1831    }
1832}
1833
1834/// Nested message and enums of message `TensorProto`
1835pub mod tensor_proto {
1836    // @@protoc_insertion_point(message:onnx.TensorProto.Segment)
1837    #[derive(PartialEq,Clone,Default,Debug)]
1838    pub struct Segment {
1839        // message fields
1840        // @@protoc_insertion_point(field:onnx.TensorProto.Segment.begin)
1841        pub begin: i64,
1842        // @@protoc_insertion_point(field:onnx.TensorProto.Segment.end)
1843        pub end: i64,
1844        // special fields
1845        // @@protoc_insertion_point(special_field:onnx.TensorProto.Segment.special_fields)
1846        pub special_fields: ::protobuf::SpecialFields,
1847    }
1848
1849    impl<'a> ::std::default::Default for &'a Segment {
1850        fn default() -> &'a Segment {
1851            <Segment as ::protobuf::Message>::default_instance()
1852        }
1853    }
1854
1855    impl Segment {
1856        pub fn new() -> Segment {
1857            ::std::default::Default::default()
1858        }
1859    }
1860
1861    impl ::protobuf::Message for Segment {
1862        const NAME: &'static str = "Segment";
1863
1864        fn is_initialized(&self) -> bool {
1865            true
1866        }
1867
1868        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1869            while let Some(tag) = is.read_raw_tag_or_eof()? {
1870                match tag {
1871                    8 => {
1872                        self.begin = is.read_int64()?;
1873                    },
1874                    16 => {
1875                        self.end = is.read_int64()?;
1876                    },
1877                    tag => {
1878                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1879                    },
1880                };
1881            }
1882            ::std::result::Result::Ok(())
1883        }
1884
1885        // Compute sizes of nested messages
1886        #[allow(unused_variables)]
1887        fn compute_size(&self) -> u64 {
1888            let mut my_size = 0;
1889            if self.begin != 0 {
1890                my_size += ::protobuf::rt::int64_size(1, self.begin);
1891            }
1892            if self.end != 0 {
1893                my_size += ::protobuf::rt::int64_size(2, self.end);
1894            }
1895            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1896            self.special_fields.cached_size().set(my_size as u32);
1897            my_size
1898        }
1899
1900        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1901            if self.begin != 0 {
1902                os.write_int64(1, self.begin)?;
1903            }
1904            if self.end != 0 {
1905                os.write_int64(2, self.end)?;
1906            }
1907            os.write_unknown_fields(self.special_fields.unknown_fields())?;
1908            ::std::result::Result::Ok(())
1909        }
1910
1911        fn special_fields(&self) -> &::protobuf::SpecialFields {
1912            &self.special_fields
1913        }
1914
1915        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1916            &mut self.special_fields
1917        }
1918
1919        fn new() -> Segment {
1920            Segment::new()
1921        }
1922
1923        fn clear(&mut self) {
1924            self.begin = 0;
1925            self.end = 0;
1926            self.special_fields.clear();
1927        }
1928
1929        fn default_instance() -> &'static Segment {
1930            static instance: Segment = Segment {
1931                begin: 0,
1932                end: 0,
1933                special_fields: ::protobuf::SpecialFields::new(),
1934            };
1935            &instance
1936        }
1937    }
1938
1939    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
1940    // @@protoc_insertion_point(enum:onnx.TensorProto.DataType)
1941    pub enum DataType {
1942        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UNDEFINED)
1943        UNDEFINED = 0,
1944        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT)
1945        FLOAT = 1,
1946        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UINT8)
1947        UINT8 = 2,
1948        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.INT8)
1949        INT8 = 3,
1950        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UINT16)
1951        UINT16 = 4,
1952        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.INT16)
1953        INT16 = 5,
1954        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.INT32)
1955        INT32 = 6,
1956        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.INT64)
1957        INT64 = 7,
1958        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.STRING)
1959        STRING = 8,
1960        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.BOOL)
1961        BOOL = 9,
1962        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT16)
1963        FLOAT16 = 10,
1964        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.DOUBLE)
1965        DOUBLE = 11,
1966        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UINT32)
1967        UINT32 = 12,
1968        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UINT64)
1969        UINT64 = 13,
1970        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.COMPLEX64)
1971        COMPLEX64 = 14,
1972        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.COMPLEX128)
1973        COMPLEX128 = 15,
1974        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.BFLOAT16)
1975        BFLOAT16 = 16,
1976        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT8E4M3FN)
1977        FLOAT8E4M3FN = 17,
1978        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT8E4M3FNUZ)
1979        FLOAT8E4M3FNUZ = 18,
1980        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT8E5M2)
1981        FLOAT8E5M2 = 19,
1982        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.FLOAT8E5M2FNUZ)
1983        FLOAT8E5M2FNUZ = 20,
1984        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.UINT4)
1985        UINT4 = 21,
1986        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataType.INT4)
1987        INT4 = 22,
1988    }
1989
1990    impl ::protobuf::Enum for DataType {
1991        const NAME: &'static str = "DataType";
1992
1993        fn value(&self) -> i32 {
1994            *self as i32
1995        }
1996
1997        fn from_i32(value: i32) -> ::std::option::Option<DataType> {
1998            match value {
1999                0 => ::std::option::Option::Some(DataType::UNDEFINED),
2000                1 => ::std::option::Option::Some(DataType::FLOAT),
2001                2 => ::std::option::Option::Some(DataType::UINT8),
2002                3 => ::std::option::Option::Some(DataType::INT8),
2003                4 => ::std::option::Option::Some(DataType::UINT16),
2004                5 => ::std::option::Option::Some(DataType::INT16),
2005                6 => ::std::option::Option::Some(DataType::INT32),
2006                7 => ::std::option::Option::Some(DataType::INT64),
2007                8 => ::std::option::Option::Some(DataType::STRING),
2008                9 => ::std::option::Option::Some(DataType::BOOL),
2009                10 => ::std::option::Option::Some(DataType::FLOAT16),
2010                11 => ::std::option::Option::Some(DataType::DOUBLE),
2011                12 => ::std::option::Option::Some(DataType::UINT32),
2012                13 => ::std::option::Option::Some(DataType::UINT64),
2013                14 => ::std::option::Option::Some(DataType::COMPLEX64),
2014                15 => ::std::option::Option::Some(DataType::COMPLEX128),
2015                16 => ::std::option::Option::Some(DataType::BFLOAT16),
2016                17 => ::std::option::Option::Some(DataType::FLOAT8E4M3FN),
2017                18 => ::std::option::Option::Some(DataType::FLOAT8E4M3FNUZ),
2018                19 => ::std::option::Option::Some(DataType::FLOAT8E5M2),
2019                20 => ::std::option::Option::Some(DataType::FLOAT8E5M2FNUZ),
2020                21 => ::std::option::Option::Some(DataType::UINT4),
2021                22 => ::std::option::Option::Some(DataType::INT4),
2022                _ => ::std::option::Option::None
2023            }
2024        }
2025
2026        fn from_str(str: &str) -> ::std::option::Option<DataType> {
2027            match str {
2028                "UNDEFINED" => ::std::option::Option::Some(DataType::UNDEFINED),
2029                "FLOAT" => ::std::option::Option::Some(DataType::FLOAT),
2030                "UINT8" => ::std::option::Option::Some(DataType::UINT8),
2031                "INT8" => ::std::option::Option::Some(DataType::INT8),
2032                "UINT16" => ::std::option::Option::Some(DataType::UINT16),
2033                "INT16" => ::std::option::Option::Some(DataType::INT16),
2034                "INT32" => ::std::option::Option::Some(DataType::INT32),
2035                "INT64" => ::std::option::Option::Some(DataType::INT64),
2036                "STRING" => ::std::option::Option::Some(DataType::STRING),
2037                "BOOL" => ::std::option::Option::Some(DataType::BOOL),
2038                "FLOAT16" => ::std::option::Option::Some(DataType::FLOAT16),
2039                "DOUBLE" => ::std::option::Option::Some(DataType::DOUBLE),
2040                "UINT32" => ::std::option::Option::Some(DataType::UINT32),
2041                "UINT64" => ::std::option::Option::Some(DataType::UINT64),
2042                "COMPLEX64" => ::std::option::Option::Some(DataType::COMPLEX64),
2043                "COMPLEX128" => ::std::option::Option::Some(DataType::COMPLEX128),
2044                "BFLOAT16" => ::std::option::Option::Some(DataType::BFLOAT16),
2045                "FLOAT8E4M3FN" => ::std::option::Option::Some(DataType::FLOAT8E4M3FN),
2046                "FLOAT8E4M3FNUZ" => ::std::option::Option::Some(DataType::FLOAT8E4M3FNUZ),
2047                "FLOAT8E5M2" => ::std::option::Option::Some(DataType::FLOAT8E5M2),
2048                "FLOAT8E5M2FNUZ" => ::std::option::Option::Some(DataType::FLOAT8E5M2FNUZ),
2049                "UINT4" => ::std::option::Option::Some(DataType::UINT4),
2050                "INT4" => ::std::option::Option::Some(DataType::INT4),
2051                _ => ::std::option::Option::None
2052            }
2053        }
2054
2055        const VALUES: &'static [DataType] = &[
2056            DataType::UNDEFINED,
2057            DataType::FLOAT,
2058            DataType::UINT8,
2059            DataType::INT8,
2060            DataType::UINT16,
2061            DataType::INT16,
2062            DataType::INT32,
2063            DataType::INT64,
2064            DataType::STRING,
2065            DataType::BOOL,
2066            DataType::FLOAT16,
2067            DataType::DOUBLE,
2068            DataType::UINT32,
2069            DataType::UINT64,
2070            DataType::COMPLEX64,
2071            DataType::COMPLEX128,
2072            DataType::BFLOAT16,
2073            DataType::FLOAT8E4M3FN,
2074            DataType::FLOAT8E4M3FNUZ,
2075            DataType::FLOAT8E5M2,
2076            DataType::FLOAT8E5M2FNUZ,
2077            DataType::UINT4,
2078            DataType::INT4,
2079        ];
2080    }
2081
2082    impl ::std::default::Default for DataType {
2083        fn default() -> Self {
2084            DataType::UNDEFINED
2085        }
2086    }
2087
2088
2089    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
2090    // @@protoc_insertion_point(enum:onnx.TensorProto.DataLocation)
2091    pub enum DataLocation {
2092        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataLocation.DEFAULT)
2093        DEFAULT = 0,
2094        // @@protoc_insertion_point(enum_value:onnx.TensorProto.DataLocation.EXTERNAL)
2095        EXTERNAL = 1,
2096    }
2097
2098    impl ::protobuf::Enum for DataLocation {
2099        const NAME: &'static str = "DataLocation";
2100
2101        fn value(&self) -> i32 {
2102            *self as i32
2103        }
2104
2105        fn from_i32(value: i32) -> ::std::option::Option<DataLocation> {
2106            match value {
2107                0 => ::std::option::Option::Some(DataLocation::DEFAULT),
2108                1 => ::std::option::Option::Some(DataLocation::EXTERNAL),
2109                _ => ::std::option::Option::None
2110            }
2111        }
2112
2113        fn from_str(str: &str) -> ::std::option::Option<DataLocation> {
2114            match str {
2115                "DEFAULT" => ::std::option::Option::Some(DataLocation::DEFAULT),
2116                "EXTERNAL" => ::std::option::Option::Some(DataLocation::EXTERNAL),
2117                _ => ::std::option::Option::None
2118            }
2119        }
2120
2121        const VALUES: &'static [DataLocation] = &[
2122            DataLocation::DEFAULT,
2123            DataLocation::EXTERNAL,
2124        ];
2125    }
2126
2127    impl ::std::default::Default for DataLocation {
2128        fn default() -> Self {
2129            DataLocation::DEFAULT
2130        }
2131    }
2132
2133}
2134
2135// @@protoc_insertion_point(message:onnx.SparseTensorProto)
2136#[derive(PartialEq,Clone,Default,Debug)]
2137pub struct SparseTensorProto {
2138    // message fields
2139    // @@protoc_insertion_point(field:onnx.SparseTensorProto.values)
2140    pub values: ::protobuf::MessageField<TensorProto>,
2141    // @@protoc_insertion_point(field:onnx.SparseTensorProto.indices)
2142    pub indices: ::protobuf::MessageField<TensorProto>,
2143    // @@protoc_insertion_point(field:onnx.SparseTensorProto.dims)
2144    pub dims: ::std::vec::Vec<i64>,
2145    // special fields
2146    // @@protoc_insertion_point(special_field:onnx.SparseTensorProto.special_fields)
2147    pub special_fields: ::protobuf::SpecialFields,
2148}
2149
2150impl<'a> ::std::default::Default for &'a SparseTensorProto {
2151    fn default() -> &'a SparseTensorProto {
2152        <SparseTensorProto as ::protobuf::Message>::default_instance()
2153    }
2154}
2155
2156impl SparseTensorProto {
2157    pub fn new() -> SparseTensorProto {
2158        ::std::default::Default::default()
2159    }
2160}
2161
2162impl ::protobuf::Message for SparseTensorProto {
2163    const NAME: &'static str = "SparseTensorProto";
2164
2165    fn is_initialized(&self) -> bool {
2166        true
2167    }
2168
2169    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
2170        while let Some(tag) = is.read_raw_tag_or_eof()? {
2171            match tag {
2172                10 => {
2173                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.values)?;
2174                },
2175                18 => {
2176                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.indices)?;
2177                },
2178                26 => {
2179                    is.read_repeated_packed_int64_into(&mut self.dims)?;
2180                },
2181                24 => {
2182                    self.dims.push(is.read_int64()?);
2183                },
2184                tag => {
2185                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
2186                },
2187            };
2188        }
2189        ::std::result::Result::Ok(())
2190    }
2191
2192    // Compute sizes of nested messages
2193    #[allow(unused_variables)]
2194    fn compute_size(&self) -> u64 {
2195        let mut my_size = 0;
2196        if let Some(v) = self.values.as_ref() {
2197            let len = v.compute_size();
2198            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2199        }
2200        if let Some(v) = self.indices.as_ref() {
2201            let len = v.compute_size();
2202            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2203        }
2204        my_size += ::protobuf::rt::vec_packed_int64_size(3, &self.dims);
2205        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
2206        self.special_fields.cached_size().set(my_size as u32);
2207        my_size
2208    }
2209
2210    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
2211        if let Some(v) = self.values.as_ref() {
2212            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
2213        }
2214        if let Some(v) = self.indices.as_ref() {
2215            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
2216        }
2217        os.write_repeated_packed_int64(3, &self.dims)?;
2218        os.write_unknown_fields(self.special_fields.unknown_fields())?;
2219        ::std::result::Result::Ok(())
2220    }
2221
2222    fn special_fields(&self) -> &::protobuf::SpecialFields {
2223        &self.special_fields
2224    }
2225
2226    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
2227        &mut self.special_fields
2228    }
2229
2230    fn new() -> SparseTensorProto {
2231        SparseTensorProto::new()
2232    }
2233
2234    fn clear(&mut self) {
2235        self.values.clear();
2236        self.indices.clear();
2237        self.dims.clear();
2238        self.special_fields.clear();
2239    }
2240
2241    fn default_instance() -> &'static SparseTensorProto {
2242        static instance: SparseTensorProto = SparseTensorProto {
2243            values: ::protobuf::MessageField::none(),
2244            indices: ::protobuf::MessageField::none(),
2245            dims: ::std::vec::Vec::new(),
2246            special_fields: ::protobuf::SpecialFields::new(),
2247        };
2248        &instance
2249    }
2250}
2251
2252// @@protoc_insertion_point(message:onnx.TensorShapeProto)
2253#[derive(PartialEq,Clone,Default,Debug)]
2254pub struct TensorShapeProto {
2255    // message fields
2256    // @@protoc_insertion_point(field:onnx.TensorShapeProto.dim)
2257    pub dim: ::std::vec::Vec<tensor_shape_proto::Dimension>,
2258    // special fields
2259    // @@protoc_insertion_point(special_field:onnx.TensorShapeProto.special_fields)
2260    pub special_fields: ::protobuf::SpecialFields,
2261}
2262
2263impl<'a> ::std::default::Default for &'a TensorShapeProto {
2264    fn default() -> &'a TensorShapeProto {
2265        <TensorShapeProto as ::protobuf::Message>::default_instance()
2266    }
2267}
2268
2269impl TensorShapeProto {
2270    pub fn new() -> TensorShapeProto {
2271        ::std::default::Default::default()
2272    }
2273}
2274
2275impl ::protobuf::Message for TensorShapeProto {
2276    const NAME: &'static str = "TensorShapeProto";
2277
2278    fn is_initialized(&self) -> bool {
2279        true
2280    }
2281
2282    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
2283        while let Some(tag) = is.read_raw_tag_or_eof()? {
2284            match tag {
2285                10 => {
2286                    self.dim.push(is.read_message()?);
2287                },
2288                tag => {
2289                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
2290                },
2291            };
2292        }
2293        ::std::result::Result::Ok(())
2294    }
2295
2296    // Compute sizes of nested messages
2297    #[allow(unused_variables)]
2298    fn compute_size(&self) -> u64 {
2299        let mut my_size = 0;
2300        for value in &self.dim {
2301            let len = value.compute_size();
2302            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2303        };
2304        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
2305        self.special_fields.cached_size().set(my_size as u32);
2306        my_size
2307    }
2308
2309    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
2310        for v in &self.dim {
2311            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
2312        };
2313        os.write_unknown_fields(self.special_fields.unknown_fields())?;
2314        ::std::result::Result::Ok(())
2315    }
2316
2317    fn special_fields(&self) -> &::protobuf::SpecialFields {
2318        &self.special_fields
2319    }
2320
2321    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
2322        &mut self.special_fields
2323    }
2324
2325    fn new() -> TensorShapeProto {
2326        TensorShapeProto::new()
2327    }
2328
2329    fn clear(&mut self) {
2330        self.dim.clear();
2331        self.special_fields.clear();
2332    }
2333
2334    fn default_instance() -> &'static TensorShapeProto {
2335        static instance: TensorShapeProto = TensorShapeProto {
2336            dim: ::std::vec::Vec::new(),
2337            special_fields: ::protobuf::SpecialFields::new(),
2338        };
2339        &instance
2340    }
2341}
2342
2343/// Nested message and enums of message `TensorShapeProto`
2344pub mod tensor_shape_proto {
2345    // @@protoc_insertion_point(message:onnx.TensorShapeProto.Dimension)
2346    #[derive(PartialEq,Clone,Default,Debug)]
2347    pub struct Dimension {
2348        // message fields
2349        // @@protoc_insertion_point(field:onnx.TensorShapeProto.Dimension.denotation)
2350        pub denotation: ::std::string::String,
2351        // message oneof groups
2352        pub value: ::std::option::Option<dimension::Value>,
2353        // special fields
2354        // @@protoc_insertion_point(special_field:onnx.TensorShapeProto.Dimension.special_fields)
2355        pub special_fields: ::protobuf::SpecialFields,
2356    }
2357
2358    impl<'a> ::std::default::Default for &'a Dimension {
2359        fn default() -> &'a Dimension {
2360            <Dimension as ::protobuf::Message>::default_instance()
2361        }
2362    }
2363
2364    impl Dimension {
2365        pub fn new() -> Dimension {
2366            ::std::default::Default::default()
2367        }
2368
2369        // int64 dim_value = 1;
2370
2371        pub fn dim_value(&self) -> i64 {
2372            match self.value {
2373                ::std::option::Option::Some(dimension::Value::DimValue(v)) => v,
2374                _ => 0,
2375            }
2376        }
2377
2378        pub fn clear_dim_value(&mut self) {
2379            self.value = ::std::option::Option::None;
2380        }
2381
2382        pub fn has_dim_value(&self) -> bool {
2383            match self.value {
2384                ::std::option::Option::Some(dimension::Value::DimValue(..)) => true,
2385                _ => false,
2386            }
2387        }
2388
2389        // Param is passed by value, moved
2390        pub fn set_dim_value(&mut self, v: i64) {
2391            self.value = ::std::option::Option::Some(dimension::Value::DimValue(v))
2392        }
2393
2394        // string dim_param = 2;
2395
2396        pub fn dim_param(&self) -> &str {
2397            match self.value {
2398                ::std::option::Option::Some(dimension::Value::DimParam(ref v)) => v,
2399                _ => "",
2400            }
2401        }
2402
2403        pub fn clear_dim_param(&mut self) {
2404            self.value = ::std::option::Option::None;
2405        }
2406
2407        pub fn has_dim_param(&self) -> bool {
2408            match self.value {
2409                ::std::option::Option::Some(dimension::Value::DimParam(..)) => true,
2410                _ => false,
2411            }
2412        }
2413
2414        // Param is passed by value, moved
2415        pub fn set_dim_param(&mut self, v: ::std::string::String) {
2416            self.value = ::std::option::Option::Some(dimension::Value::DimParam(v))
2417        }
2418
2419        // Mutable pointer to the field.
2420        pub fn mut_dim_param(&mut self) -> &mut ::std::string::String {
2421            if let ::std::option::Option::Some(dimension::Value::DimParam(_)) = self.value {
2422            } else {
2423                self.value = ::std::option::Option::Some(dimension::Value::DimParam(::std::string::String::new()));
2424            }
2425            match self.value {
2426                ::std::option::Option::Some(dimension::Value::DimParam(ref mut v)) => v,
2427                _ => panic!(),
2428            }
2429        }
2430
2431        // Take field
2432        pub fn take_dim_param(&mut self) -> ::std::string::String {
2433            if self.has_dim_param() {
2434                match self.value.take() {
2435                    ::std::option::Option::Some(dimension::Value::DimParam(v)) => v,
2436                    _ => panic!(),
2437                }
2438            } else {
2439                ::std::string::String::new()
2440            }
2441        }
2442    }
2443
2444    impl ::protobuf::Message for Dimension {
2445        const NAME: &'static str = "Dimension";
2446
2447        fn is_initialized(&self) -> bool {
2448            true
2449        }
2450
2451        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
2452            while let Some(tag) = is.read_raw_tag_or_eof()? {
2453                match tag {
2454                    8 => {
2455                        self.value = ::std::option::Option::Some(dimension::Value::DimValue(is.read_int64()?));
2456                    },
2457                    18 => {
2458                        self.value = ::std::option::Option::Some(dimension::Value::DimParam(is.read_string()?));
2459                    },
2460                    26 => {
2461                        self.denotation = is.read_string()?;
2462                    },
2463                    tag => {
2464                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
2465                    },
2466                };
2467            }
2468            ::std::result::Result::Ok(())
2469        }
2470
2471        // Compute sizes of nested messages
2472        #[allow(unused_variables)]
2473        fn compute_size(&self) -> u64 {
2474            let mut my_size = 0;
2475            if !self.denotation.is_empty() {
2476                my_size += ::protobuf::rt::string_size(3, &self.denotation);
2477            }
2478            if let ::std::option::Option::Some(ref v) = self.value {
2479                match v {
2480                    &dimension::Value::DimValue(v) => {
2481                        my_size += ::protobuf::rt::int64_size(1, v);
2482                    },
2483                    &dimension::Value::DimParam(ref v) => {
2484                        my_size += ::protobuf::rt::string_size(2, &v);
2485                    },
2486                };
2487            }
2488            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
2489            self.special_fields.cached_size().set(my_size as u32);
2490            my_size
2491        }
2492
2493        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
2494            if !self.denotation.is_empty() {
2495                os.write_string(3, &self.denotation)?;
2496            }
2497            if let ::std::option::Option::Some(ref v) = self.value {
2498                match v {
2499                    &dimension::Value::DimValue(v) => {
2500                        os.write_int64(1, v)?;
2501                    },
2502                    &dimension::Value::DimParam(ref v) => {
2503                        os.write_string(2, v)?;
2504                    },
2505                };
2506            }
2507            os.write_unknown_fields(self.special_fields.unknown_fields())?;
2508            ::std::result::Result::Ok(())
2509        }
2510
2511        fn special_fields(&self) -> &::protobuf::SpecialFields {
2512            &self.special_fields
2513        }
2514
2515        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
2516            &mut self.special_fields
2517        }
2518
2519        fn new() -> Dimension {
2520            Dimension::new()
2521        }
2522
2523        fn clear(&mut self) {
2524            self.value = ::std::option::Option::None;
2525            self.value = ::std::option::Option::None;
2526            self.denotation.clear();
2527            self.special_fields.clear();
2528        }
2529
2530        fn default_instance() -> &'static Dimension {
2531            static instance: Dimension = Dimension {
2532                denotation: ::std::string::String::new(),
2533                value: ::std::option::Option::None,
2534                special_fields: ::protobuf::SpecialFields::new(),
2535            };
2536            &instance
2537        }
2538    }
2539
2540    /// Nested message and enums of message `Dimension`
2541    pub mod dimension {
2542
2543        #[derive(Clone,PartialEq,Debug)]
2544        #[non_exhaustive]
2545        // @@protoc_insertion_point(oneof:onnx.TensorShapeProto.Dimension.value)
2546        pub enum Value {
2547            // @@protoc_insertion_point(oneof_field:onnx.TensorShapeProto.Dimension.dim_value)
2548            DimValue(i64),
2549            // @@protoc_insertion_point(oneof_field:onnx.TensorShapeProto.Dimension.dim_param)
2550            DimParam(::std::string::String),
2551        }
2552
2553        impl ::protobuf::Oneof for Value {
2554        }
2555
2556        impl Value {
2557        }
2558    }
2559}
2560
2561// @@protoc_insertion_point(message:onnx.TypeProto)
2562#[derive(PartialEq,Clone,Default,Debug)]
2563pub struct TypeProto {
2564    // message fields
2565    // @@protoc_insertion_point(field:onnx.TypeProto.denotation)
2566    pub denotation: ::std::string::String,
2567    // message oneof groups
2568    pub value: ::std::option::Option<type_proto::Value>,
2569    // special fields
2570    // @@protoc_insertion_point(special_field:onnx.TypeProto.special_fields)
2571    pub special_fields: ::protobuf::SpecialFields,
2572}
2573
2574impl<'a> ::std::default::Default for &'a TypeProto {
2575    fn default() -> &'a TypeProto {
2576        <TypeProto as ::protobuf::Message>::default_instance()
2577    }
2578}
2579
2580impl TypeProto {
2581    pub fn new() -> TypeProto {
2582        ::std::default::Default::default()
2583    }
2584
2585    // .onnx.TypeProto.Tensor tensor_type = 1;
2586
2587    pub fn tensor_type(&self) -> &type_proto::Tensor {
2588        match self.value {
2589            ::std::option::Option::Some(type_proto::Value::TensorType(ref v)) => v,
2590            _ => <type_proto::Tensor as ::protobuf::Message>::default_instance(),
2591        }
2592    }
2593
2594    pub fn clear_tensor_type(&mut self) {
2595        self.value = ::std::option::Option::None;
2596    }
2597
2598    pub fn has_tensor_type(&self) -> bool {
2599        match self.value {
2600            ::std::option::Option::Some(type_proto::Value::TensorType(..)) => true,
2601            _ => false,
2602        }
2603    }
2604
2605    // Param is passed by value, moved
2606    pub fn set_tensor_type(&mut self, v: type_proto::Tensor) {
2607        self.value = ::std::option::Option::Some(type_proto::Value::TensorType(v))
2608    }
2609
2610    // Mutable pointer to the field.
2611    pub fn mut_tensor_type(&mut self) -> &mut type_proto::Tensor {
2612        if let ::std::option::Option::Some(type_proto::Value::TensorType(_)) = self.value {
2613        } else {
2614            self.value = ::std::option::Option::Some(type_proto::Value::TensorType(type_proto::Tensor::new()));
2615        }
2616        match self.value {
2617            ::std::option::Option::Some(type_proto::Value::TensorType(ref mut v)) => v,
2618            _ => panic!(),
2619        }
2620    }
2621
2622    // Take field
2623    pub fn take_tensor_type(&mut self) -> type_proto::Tensor {
2624        if self.has_tensor_type() {
2625            match self.value.take() {
2626                ::std::option::Option::Some(type_proto::Value::TensorType(v)) => v,
2627                _ => panic!(),
2628            }
2629        } else {
2630            type_proto::Tensor::new()
2631        }
2632    }
2633
2634    // .onnx.TypeProto.Sequence sequence_type = 4;
2635
2636    pub fn sequence_type(&self) -> &type_proto::Sequence {
2637        match self.value {
2638            ::std::option::Option::Some(type_proto::Value::SequenceType(ref v)) => v,
2639            _ => <type_proto::Sequence as ::protobuf::Message>::default_instance(),
2640        }
2641    }
2642
2643    pub fn clear_sequence_type(&mut self) {
2644        self.value = ::std::option::Option::None;
2645    }
2646
2647    pub fn has_sequence_type(&self) -> bool {
2648        match self.value {
2649            ::std::option::Option::Some(type_proto::Value::SequenceType(..)) => true,
2650            _ => false,
2651        }
2652    }
2653
2654    // Param is passed by value, moved
2655    pub fn set_sequence_type(&mut self, v: type_proto::Sequence) {
2656        self.value = ::std::option::Option::Some(type_proto::Value::SequenceType(v))
2657    }
2658
2659    // Mutable pointer to the field.
2660    pub fn mut_sequence_type(&mut self) -> &mut type_proto::Sequence {
2661        if let ::std::option::Option::Some(type_proto::Value::SequenceType(_)) = self.value {
2662        } else {
2663            self.value = ::std::option::Option::Some(type_proto::Value::SequenceType(type_proto::Sequence::new()));
2664        }
2665        match self.value {
2666            ::std::option::Option::Some(type_proto::Value::SequenceType(ref mut v)) => v,
2667            _ => panic!(),
2668        }
2669    }
2670
2671    // Take field
2672    pub fn take_sequence_type(&mut self) -> type_proto::Sequence {
2673        if self.has_sequence_type() {
2674            match self.value.take() {
2675                ::std::option::Option::Some(type_proto::Value::SequenceType(v)) => v,
2676                _ => panic!(),
2677            }
2678        } else {
2679            type_proto::Sequence::new()
2680        }
2681    }
2682
2683    // .onnx.TypeProto.Map map_type = 5;
2684
2685    pub fn map_type(&self) -> &type_proto::Map {
2686        match self.value {
2687            ::std::option::Option::Some(type_proto::Value::MapType(ref v)) => v,
2688            _ => <type_proto::Map as ::protobuf::Message>::default_instance(),
2689        }
2690    }
2691
2692    pub fn clear_map_type(&mut self) {
2693        self.value = ::std::option::Option::None;
2694    }
2695
2696    pub fn has_map_type(&self) -> bool {
2697        match self.value {
2698            ::std::option::Option::Some(type_proto::Value::MapType(..)) => true,
2699            _ => false,
2700        }
2701    }
2702
2703    // Param is passed by value, moved
2704    pub fn set_map_type(&mut self, v: type_proto::Map) {
2705        self.value = ::std::option::Option::Some(type_proto::Value::MapType(v))
2706    }
2707
2708    // Mutable pointer to the field.
2709    pub fn mut_map_type(&mut self) -> &mut type_proto::Map {
2710        if let ::std::option::Option::Some(type_proto::Value::MapType(_)) = self.value {
2711        } else {
2712            self.value = ::std::option::Option::Some(type_proto::Value::MapType(type_proto::Map::new()));
2713        }
2714        match self.value {
2715            ::std::option::Option::Some(type_proto::Value::MapType(ref mut v)) => v,
2716            _ => panic!(),
2717        }
2718    }
2719
2720    // Take field
2721    pub fn take_map_type(&mut self) -> type_proto::Map {
2722        if self.has_map_type() {
2723            match self.value.take() {
2724                ::std::option::Option::Some(type_proto::Value::MapType(v)) => v,
2725                _ => panic!(),
2726            }
2727        } else {
2728            type_proto::Map::new()
2729        }
2730    }
2731
2732    // .onnx.TypeProto.Optional optional_type = 9;
2733
2734    pub fn optional_type(&self) -> &type_proto::Optional {
2735        match self.value {
2736            ::std::option::Option::Some(type_proto::Value::OptionalType(ref v)) => v,
2737            _ => <type_proto::Optional as ::protobuf::Message>::default_instance(),
2738        }
2739    }
2740
2741    pub fn clear_optional_type(&mut self) {
2742        self.value = ::std::option::Option::None;
2743    }
2744
2745    pub fn has_optional_type(&self) -> bool {
2746        match self.value {
2747            ::std::option::Option::Some(type_proto::Value::OptionalType(..)) => true,
2748            _ => false,
2749        }
2750    }
2751
2752    // Param is passed by value, moved
2753    pub fn set_optional_type(&mut self, v: type_proto::Optional) {
2754        self.value = ::std::option::Option::Some(type_proto::Value::OptionalType(v))
2755    }
2756
2757    // Mutable pointer to the field.
2758    pub fn mut_optional_type(&mut self) -> &mut type_proto::Optional {
2759        if let ::std::option::Option::Some(type_proto::Value::OptionalType(_)) = self.value {
2760        } else {
2761            self.value = ::std::option::Option::Some(type_proto::Value::OptionalType(type_proto::Optional::new()));
2762        }
2763        match self.value {
2764            ::std::option::Option::Some(type_proto::Value::OptionalType(ref mut v)) => v,
2765            _ => panic!(),
2766        }
2767    }
2768
2769    // Take field
2770    pub fn take_optional_type(&mut self) -> type_proto::Optional {
2771        if self.has_optional_type() {
2772            match self.value.take() {
2773                ::std::option::Option::Some(type_proto::Value::OptionalType(v)) => v,
2774                _ => panic!(),
2775            }
2776        } else {
2777            type_proto::Optional::new()
2778        }
2779    }
2780
2781    // .onnx.TypeProto.SparseTensor sparse_tensor_type = 8;
2782
2783    pub fn sparse_tensor_type(&self) -> &type_proto::SparseTensor {
2784        match self.value {
2785            ::std::option::Option::Some(type_proto::Value::SparseTensorType(ref v)) => v,
2786            _ => <type_proto::SparseTensor as ::protobuf::Message>::default_instance(),
2787        }
2788    }
2789
2790    pub fn clear_sparse_tensor_type(&mut self) {
2791        self.value = ::std::option::Option::None;
2792    }
2793
2794    pub fn has_sparse_tensor_type(&self) -> bool {
2795        match self.value {
2796            ::std::option::Option::Some(type_proto::Value::SparseTensorType(..)) => true,
2797            _ => false,
2798        }
2799    }
2800
2801    // Param is passed by value, moved
2802    pub fn set_sparse_tensor_type(&mut self, v: type_proto::SparseTensor) {
2803        self.value = ::std::option::Option::Some(type_proto::Value::SparseTensorType(v))
2804    }
2805
2806    // Mutable pointer to the field.
2807    pub fn mut_sparse_tensor_type(&mut self) -> &mut type_proto::SparseTensor {
2808        if let ::std::option::Option::Some(type_proto::Value::SparseTensorType(_)) = self.value {
2809        } else {
2810            self.value = ::std::option::Option::Some(type_proto::Value::SparseTensorType(type_proto::SparseTensor::new()));
2811        }
2812        match self.value {
2813            ::std::option::Option::Some(type_proto::Value::SparseTensorType(ref mut v)) => v,
2814            _ => panic!(),
2815        }
2816    }
2817
2818    // Take field
2819    pub fn take_sparse_tensor_type(&mut self) -> type_proto::SparseTensor {
2820        if self.has_sparse_tensor_type() {
2821            match self.value.take() {
2822                ::std::option::Option::Some(type_proto::Value::SparseTensorType(v)) => v,
2823                _ => panic!(),
2824            }
2825        } else {
2826            type_proto::SparseTensor::new()
2827        }
2828    }
2829}
2830
2831impl ::protobuf::Message for TypeProto {
2832    const NAME: &'static str = "TypeProto";
2833
2834    fn is_initialized(&self) -> bool {
2835        true
2836    }
2837
2838    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
2839        while let Some(tag) = is.read_raw_tag_or_eof()? {
2840            match tag {
2841                10 => {
2842                    self.value = ::std::option::Option::Some(type_proto::Value::TensorType(is.read_message()?));
2843                },
2844                34 => {
2845                    self.value = ::std::option::Option::Some(type_proto::Value::SequenceType(is.read_message()?));
2846                },
2847                42 => {
2848                    self.value = ::std::option::Option::Some(type_proto::Value::MapType(is.read_message()?));
2849                },
2850                74 => {
2851                    self.value = ::std::option::Option::Some(type_proto::Value::OptionalType(is.read_message()?));
2852                },
2853                66 => {
2854                    self.value = ::std::option::Option::Some(type_proto::Value::SparseTensorType(is.read_message()?));
2855                },
2856                50 => {
2857                    self.denotation = is.read_string()?;
2858                },
2859                tag => {
2860                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
2861                },
2862            };
2863        }
2864        ::std::result::Result::Ok(())
2865    }
2866
2867    // Compute sizes of nested messages
2868    #[allow(unused_variables)]
2869    fn compute_size(&self) -> u64 {
2870        let mut my_size = 0;
2871        if !self.denotation.is_empty() {
2872            my_size += ::protobuf::rt::string_size(6, &self.denotation);
2873        }
2874        if let ::std::option::Option::Some(ref v) = self.value {
2875            match v {
2876                &type_proto::Value::TensorType(ref v) => {
2877                    let len = v.compute_size();
2878                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2879                },
2880                &type_proto::Value::SequenceType(ref v) => {
2881                    let len = v.compute_size();
2882                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2883                },
2884                &type_proto::Value::MapType(ref v) => {
2885                    let len = v.compute_size();
2886                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2887                },
2888                &type_proto::Value::OptionalType(ref v) => {
2889                    let len = v.compute_size();
2890                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2891                },
2892                &type_proto::Value::SparseTensorType(ref v) => {
2893                    let len = v.compute_size();
2894                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
2895                },
2896            };
2897        }
2898        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
2899        self.special_fields.cached_size().set(my_size as u32);
2900        my_size
2901    }
2902
2903    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
2904        if !self.denotation.is_empty() {
2905            os.write_string(6, &self.denotation)?;
2906        }
2907        if let ::std::option::Option::Some(ref v) = self.value {
2908            match v {
2909                &type_proto::Value::TensorType(ref v) => {
2910                    ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
2911                },
2912                &type_proto::Value::SequenceType(ref v) => {
2913                    ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
2914                },
2915                &type_proto::Value::MapType(ref v) => {
2916                    ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
2917                },
2918                &type_proto::Value::OptionalType(ref v) => {
2919                    ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
2920                },
2921                &type_proto::Value::SparseTensorType(ref v) => {
2922                    ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
2923                },
2924            };
2925        }
2926        os.write_unknown_fields(self.special_fields.unknown_fields())?;
2927        ::std::result::Result::Ok(())
2928    }
2929
2930    fn special_fields(&self) -> &::protobuf::SpecialFields {
2931        &self.special_fields
2932    }
2933
2934    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
2935        &mut self.special_fields
2936    }
2937
2938    fn new() -> TypeProto {
2939        TypeProto::new()
2940    }
2941
2942    fn clear(&mut self) {
2943        self.value = ::std::option::Option::None;
2944        self.value = ::std::option::Option::None;
2945        self.value = ::std::option::Option::None;
2946        self.value = ::std::option::Option::None;
2947        self.value = ::std::option::Option::None;
2948        self.denotation.clear();
2949        self.special_fields.clear();
2950    }
2951
2952    fn default_instance() -> &'static TypeProto {
2953        static instance: TypeProto = TypeProto {
2954            denotation: ::std::string::String::new(),
2955            value: ::std::option::Option::None,
2956            special_fields: ::protobuf::SpecialFields::new(),
2957        };
2958        &instance
2959    }
2960}
2961
2962/// Nested message and enums of message `TypeProto`
2963pub mod type_proto {
2964
2965    #[derive(Clone,PartialEq,Debug)]
2966    #[non_exhaustive]
2967    // @@protoc_insertion_point(oneof:onnx.TypeProto.value)
2968    pub enum Value {
2969        // @@protoc_insertion_point(oneof_field:onnx.TypeProto.tensor_type)
2970        TensorType(Tensor),
2971        // @@protoc_insertion_point(oneof_field:onnx.TypeProto.sequence_type)
2972        SequenceType(Sequence),
2973        // @@protoc_insertion_point(oneof_field:onnx.TypeProto.map_type)
2974        MapType(Map),
2975        // @@protoc_insertion_point(oneof_field:onnx.TypeProto.optional_type)
2976        OptionalType(Optional),
2977        // @@protoc_insertion_point(oneof_field:onnx.TypeProto.sparse_tensor_type)
2978        SparseTensorType(SparseTensor),
2979    }
2980
2981    impl ::protobuf::Oneof for Value {
2982    }
2983
2984    impl Value {
2985    }
2986    // @@protoc_insertion_point(message:onnx.TypeProto.Tensor)
2987    #[derive(PartialEq,Clone,Default,Debug)]
2988    pub struct Tensor {
2989        // message fields
2990        // @@protoc_insertion_point(field:onnx.TypeProto.Tensor.elem_type)
2991        pub elem_type: i32,
2992        // @@protoc_insertion_point(field:onnx.TypeProto.Tensor.shape)
2993        pub shape: ::protobuf::MessageField<super::TensorShapeProto>,
2994        // special fields
2995        // @@protoc_insertion_point(special_field:onnx.TypeProto.Tensor.special_fields)
2996        pub special_fields: ::protobuf::SpecialFields,
2997    }
2998
2999    impl<'a> ::std::default::Default for &'a Tensor {
3000        fn default() -> &'a Tensor {
3001            <Tensor as ::protobuf::Message>::default_instance()
3002        }
3003    }
3004
3005    impl Tensor {
3006        pub fn new() -> Tensor {
3007            ::std::default::Default::default()
3008        }
3009    }
3010
3011    impl ::protobuf::Message for Tensor {
3012        const NAME: &'static str = "Tensor";
3013
3014        fn is_initialized(&self) -> bool {
3015            true
3016        }
3017
3018        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3019            while let Some(tag) = is.read_raw_tag_or_eof()? {
3020                match tag {
3021                    8 => {
3022                        self.elem_type = is.read_int32()?;
3023                    },
3024                    18 => {
3025                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.shape)?;
3026                    },
3027                    tag => {
3028                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3029                    },
3030                };
3031            }
3032            ::std::result::Result::Ok(())
3033        }
3034
3035        // Compute sizes of nested messages
3036        #[allow(unused_variables)]
3037        fn compute_size(&self) -> u64 {
3038            let mut my_size = 0;
3039            if self.elem_type != 0 {
3040                my_size += ::protobuf::rt::int32_size(1, self.elem_type);
3041            }
3042            if let Some(v) = self.shape.as_ref() {
3043                let len = v.compute_size();
3044                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3045            }
3046            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3047            self.special_fields.cached_size().set(my_size as u32);
3048            my_size
3049        }
3050
3051        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3052            if self.elem_type != 0 {
3053                os.write_int32(1, self.elem_type)?;
3054            }
3055            if let Some(v) = self.shape.as_ref() {
3056                ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
3057            }
3058            os.write_unknown_fields(self.special_fields.unknown_fields())?;
3059            ::std::result::Result::Ok(())
3060        }
3061
3062        fn special_fields(&self) -> &::protobuf::SpecialFields {
3063            &self.special_fields
3064        }
3065
3066        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3067            &mut self.special_fields
3068        }
3069
3070        fn new() -> Tensor {
3071            Tensor::new()
3072        }
3073
3074        fn clear(&mut self) {
3075            self.elem_type = 0;
3076            self.shape.clear();
3077            self.special_fields.clear();
3078        }
3079
3080        fn default_instance() -> &'static Tensor {
3081            static instance: Tensor = Tensor {
3082                elem_type: 0,
3083                shape: ::protobuf::MessageField::none(),
3084                special_fields: ::protobuf::SpecialFields::new(),
3085            };
3086            &instance
3087        }
3088    }
3089
3090    // @@protoc_insertion_point(message:onnx.TypeProto.Sequence)
3091    #[derive(PartialEq,Clone,Default,Debug)]
3092    pub struct Sequence {
3093        // message fields
3094        // @@protoc_insertion_point(field:onnx.TypeProto.Sequence.elem_type)
3095        pub elem_type: ::protobuf::MessageField<super::TypeProto>,
3096        // special fields
3097        // @@protoc_insertion_point(special_field:onnx.TypeProto.Sequence.special_fields)
3098        pub special_fields: ::protobuf::SpecialFields,
3099    }
3100
3101    impl<'a> ::std::default::Default for &'a Sequence {
3102        fn default() -> &'a Sequence {
3103            <Sequence as ::protobuf::Message>::default_instance()
3104        }
3105    }
3106
3107    impl Sequence {
3108        pub fn new() -> Sequence {
3109            ::std::default::Default::default()
3110        }
3111    }
3112
3113    impl ::protobuf::Message for Sequence {
3114        const NAME: &'static str = "Sequence";
3115
3116        fn is_initialized(&self) -> bool {
3117            true
3118        }
3119
3120        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3121            while let Some(tag) = is.read_raw_tag_or_eof()? {
3122                match tag {
3123                    10 => {
3124                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.elem_type)?;
3125                    },
3126                    tag => {
3127                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3128                    },
3129                };
3130            }
3131            ::std::result::Result::Ok(())
3132        }
3133
3134        // Compute sizes of nested messages
3135        #[allow(unused_variables)]
3136        fn compute_size(&self) -> u64 {
3137            let mut my_size = 0;
3138            if let Some(v) = self.elem_type.as_ref() {
3139                let len = v.compute_size();
3140                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3141            }
3142            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3143            self.special_fields.cached_size().set(my_size as u32);
3144            my_size
3145        }
3146
3147        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3148            if let Some(v) = self.elem_type.as_ref() {
3149                ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
3150            }
3151            os.write_unknown_fields(self.special_fields.unknown_fields())?;
3152            ::std::result::Result::Ok(())
3153        }
3154
3155        fn special_fields(&self) -> &::protobuf::SpecialFields {
3156            &self.special_fields
3157        }
3158
3159        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3160            &mut self.special_fields
3161        }
3162
3163        fn new() -> Sequence {
3164            Sequence::new()
3165        }
3166
3167        fn clear(&mut self) {
3168            self.elem_type.clear();
3169            self.special_fields.clear();
3170        }
3171
3172        fn default_instance() -> &'static Sequence {
3173            static instance: Sequence = Sequence {
3174                elem_type: ::protobuf::MessageField::none(),
3175                special_fields: ::protobuf::SpecialFields::new(),
3176            };
3177            &instance
3178        }
3179    }
3180
3181    // @@protoc_insertion_point(message:onnx.TypeProto.Map)
3182    #[derive(PartialEq,Clone,Default,Debug)]
3183    pub struct Map {
3184        // message fields
3185        // @@protoc_insertion_point(field:onnx.TypeProto.Map.key_type)
3186        pub key_type: i32,
3187        // @@protoc_insertion_point(field:onnx.TypeProto.Map.value_type)
3188        pub value_type: ::protobuf::MessageField<super::TypeProto>,
3189        // special fields
3190        // @@protoc_insertion_point(special_field:onnx.TypeProto.Map.special_fields)
3191        pub special_fields: ::protobuf::SpecialFields,
3192    }
3193
3194    impl<'a> ::std::default::Default for &'a Map {
3195        fn default() -> &'a Map {
3196            <Map as ::protobuf::Message>::default_instance()
3197        }
3198    }
3199
3200    impl Map {
3201        pub fn new() -> Map {
3202            ::std::default::Default::default()
3203        }
3204    }
3205
3206    impl ::protobuf::Message for Map {
3207        const NAME: &'static str = "Map";
3208
3209        fn is_initialized(&self) -> bool {
3210            true
3211        }
3212
3213        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3214            while let Some(tag) = is.read_raw_tag_or_eof()? {
3215                match tag {
3216                    8 => {
3217                        self.key_type = is.read_int32()?;
3218                    },
3219                    18 => {
3220                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.value_type)?;
3221                    },
3222                    tag => {
3223                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3224                    },
3225                };
3226            }
3227            ::std::result::Result::Ok(())
3228        }
3229
3230        // Compute sizes of nested messages
3231        #[allow(unused_variables)]
3232        fn compute_size(&self) -> u64 {
3233            let mut my_size = 0;
3234            if self.key_type != 0 {
3235                my_size += ::protobuf::rt::int32_size(1, self.key_type);
3236            }
3237            if let Some(v) = self.value_type.as_ref() {
3238                let len = v.compute_size();
3239                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3240            }
3241            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3242            self.special_fields.cached_size().set(my_size as u32);
3243            my_size
3244        }
3245
3246        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3247            if self.key_type != 0 {
3248                os.write_int32(1, self.key_type)?;
3249            }
3250            if let Some(v) = self.value_type.as_ref() {
3251                ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
3252            }
3253            os.write_unknown_fields(self.special_fields.unknown_fields())?;
3254            ::std::result::Result::Ok(())
3255        }
3256
3257        fn special_fields(&self) -> &::protobuf::SpecialFields {
3258            &self.special_fields
3259        }
3260
3261        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3262            &mut self.special_fields
3263        }
3264
3265        fn new() -> Map {
3266            Map::new()
3267        }
3268
3269        fn clear(&mut self) {
3270            self.key_type = 0;
3271            self.value_type.clear();
3272            self.special_fields.clear();
3273        }
3274
3275        fn default_instance() -> &'static Map {
3276            static instance: Map = Map {
3277                key_type: 0,
3278                value_type: ::protobuf::MessageField::none(),
3279                special_fields: ::protobuf::SpecialFields::new(),
3280            };
3281            &instance
3282        }
3283    }
3284
3285    // @@protoc_insertion_point(message:onnx.TypeProto.Optional)
3286    #[derive(PartialEq,Clone,Default,Debug)]
3287    pub struct Optional {
3288        // message fields
3289        // @@protoc_insertion_point(field:onnx.TypeProto.Optional.elem_type)
3290        pub elem_type: ::protobuf::MessageField<super::TypeProto>,
3291        // special fields
3292        // @@protoc_insertion_point(special_field:onnx.TypeProto.Optional.special_fields)
3293        pub special_fields: ::protobuf::SpecialFields,
3294    }
3295
3296    impl<'a> ::std::default::Default for &'a Optional {
3297        fn default() -> &'a Optional {
3298            <Optional as ::protobuf::Message>::default_instance()
3299        }
3300    }
3301
3302    impl Optional {
3303        pub fn new() -> Optional {
3304            ::std::default::Default::default()
3305        }
3306    }
3307
3308    impl ::protobuf::Message for Optional {
3309        const NAME: &'static str = "Optional";
3310
3311        fn is_initialized(&self) -> bool {
3312            true
3313        }
3314
3315        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3316            while let Some(tag) = is.read_raw_tag_or_eof()? {
3317                match tag {
3318                    10 => {
3319                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.elem_type)?;
3320                    },
3321                    tag => {
3322                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3323                    },
3324                };
3325            }
3326            ::std::result::Result::Ok(())
3327        }
3328
3329        // Compute sizes of nested messages
3330        #[allow(unused_variables)]
3331        fn compute_size(&self) -> u64 {
3332            let mut my_size = 0;
3333            if let Some(v) = self.elem_type.as_ref() {
3334                let len = v.compute_size();
3335                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3336            }
3337            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3338            self.special_fields.cached_size().set(my_size as u32);
3339            my_size
3340        }
3341
3342        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3343            if let Some(v) = self.elem_type.as_ref() {
3344                ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
3345            }
3346            os.write_unknown_fields(self.special_fields.unknown_fields())?;
3347            ::std::result::Result::Ok(())
3348        }
3349
3350        fn special_fields(&self) -> &::protobuf::SpecialFields {
3351            &self.special_fields
3352        }
3353
3354        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3355            &mut self.special_fields
3356        }
3357
3358        fn new() -> Optional {
3359            Optional::new()
3360        }
3361
3362        fn clear(&mut self) {
3363            self.elem_type.clear();
3364            self.special_fields.clear();
3365        }
3366
3367        fn default_instance() -> &'static Optional {
3368            static instance: Optional = Optional {
3369                elem_type: ::protobuf::MessageField::none(),
3370                special_fields: ::protobuf::SpecialFields::new(),
3371            };
3372            &instance
3373        }
3374    }
3375
3376    // @@protoc_insertion_point(message:onnx.TypeProto.SparseTensor)
3377    #[derive(PartialEq,Clone,Default,Debug)]
3378    pub struct SparseTensor {
3379        // message fields
3380        // @@protoc_insertion_point(field:onnx.TypeProto.SparseTensor.elem_type)
3381        pub elem_type: i32,
3382        // @@protoc_insertion_point(field:onnx.TypeProto.SparseTensor.shape)
3383        pub shape: ::protobuf::MessageField<super::TensorShapeProto>,
3384        // special fields
3385        // @@protoc_insertion_point(special_field:onnx.TypeProto.SparseTensor.special_fields)
3386        pub special_fields: ::protobuf::SpecialFields,
3387    }
3388
3389    impl<'a> ::std::default::Default for &'a SparseTensor {
3390        fn default() -> &'a SparseTensor {
3391            <SparseTensor as ::protobuf::Message>::default_instance()
3392        }
3393    }
3394
3395    impl SparseTensor {
3396        pub fn new() -> SparseTensor {
3397            ::std::default::Default::default()
3398        }
3399    }
3400
3401    impl ::protobuf::Message for SparseTensor {
3402        const NAME: &'static str = "SparseTensor";
3403
3404        fn is_initialized(&self) -> bool {
3405            true
3406        }
3407
3408        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3409            while let Some(tag) = is.read_raw_tag_or_eof()? {
3410                match tag {
3411                    8 => {
3412                        self.elem_type = is.read_int32()?;
3413                    },
3414                    18 => {
3415                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.shape)?;
3416                    },
3417                    tag => {
3418                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3419                    },
3420                };
3421            }
3422            ::std::result::Result::Ok(())
3423        }
3424
3425        // Compute sizes of nested messages
3426        #[allow(unused_variables)]
3427        fn compute_size(&self) -> u64 {
3428            let mut my_size = 0;
3429            if self.elem_type != 0 {
3430                my_size += ::protobuf::rt::int32_size(1, self.elem_type);
3431            }
3432            if let Some(v) = self.shape.as_ref() {
3433                let len = v.compute_size();
3434                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3435            }
3436            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3437            self.special_fields.cached_size().set(my_size as u32);
3438            my_size
3439        }
3440
3441        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3442            if self.elem_type != 0 {
3443                os.write_int32(1, self.elem_type)?;
3444            }
3445            if let Some(v) = self.shape.as_ref() {
3446                ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
3447            }
3448            os.write_unknown_fields(self.special_fields.unknown_fields())?;
3449            ::std::result::Result::Ok(())
3450        }
3451
3452        fn special_fields(&self) -> &::protobuf::SpecialFields {
3453            &self.special_fields
3454        }
3455
3456        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3457            &mut self.special_fields
3458        }
3459
3460        fn new() -> SparseTensor {
3461            SparseTensor::new()
3462        }
3463
3464        fn clear(&mut self) {
3465            self.elem_type = 0;
3466            self.shape.clear();
3467            self.special_fields.clear();
3468        }
3469
3470        fn default_instance() -> &'static SparseTensor {
3471            static instance: SparseTensor = SparseTensor {
3472                elem_type: 0,
3473                shape: ::protobuf::MessageField::none(),
3474                special_fields: ::protobuf::SpecialFields::new(),
3475            };
3476            &instance
3477        }
3478    }
3479}
3480
3481// @@protoc_insertion_point(message:onnx.OperatorSetIdProto)
3482#[derive(PartialEq,Clone,Default,Debug)]
3483pub struct OperatorSetIdProto {
3484    // message fields
3485    // @@protoc_insertion_point(field:onnx.OperatorSetIdProto.domain)
3486    pub domain: ::std::string::String,
3487    // @@protoc_insertion_point(field:onnx.OperatorSetIdProto.version)
3488    pub version: i64,
3489    // special fields
3490    // @@protoc_insertion_point(special_field:onnx.OperatorSetIdProto.special_fields)
3491    pub special_fields: ::protobuf::SpecialFields,
3492}
3493
3494impl<'a> ::std::default::Default for &'a OperatorSetIdProto {
3495    fn default() -> &'a OperatorSetIdProto {
3496        <OperatorSetIdProto as ::protobuf::Message>::default_instance()
3497    }
3498}
3499
3500impl OperatorSetIdProto {
3501    pub fn new() -> OperatorSetIdProto {
3502        ::std::default::Default::default()
3503    }
3504}
3505
3506impl ::protobuf::Message for OperatorSetIdProto {
3507    const NAME: &'static str = "OperatorSetIdProto";
3508
3509    fn is_initialized(&self) -> bool {
3510        true
3511    }
3512
3513    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3514        while let Some(tag) = is.read_raw_tag_or_eof()? {
3515            match tag {
3516                10 => {
3517                    self.domain = is.read_string()?;
3518                },
3519                16 => {
3520                    self.version = is.read_int64()?;
3521                },
3522                tag => {
3523                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3524                },
3525            };
3526        }
3527        ::std::result::Result::Ok(())
3528    }
3529
3530    // Compute sizes of nested messages
3531    #[allow(unused_variables)]
3532    fn compute_size(&self) -> u64 {
3533        let mut my_size = 0;
3534        if !self.domain.is_empty() {
3535            my_size += ::protobuf::rt::string_size(1, &self.domain);
3536        }
3537        if self.version != 0 {
3538            my_size += ::protobuf::rt::int64_size(2, self.version);
3539        }
3540        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3541        self.special_fields.cached_size().set(my_size as u32);
3542        my_size
3543    }
3544
3545    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3546        if !self.domain.is_empty() {
3547            os.write_string(1, &self.domain)?;
3548        }
3549        if self.version != 0 {
3550            os.write_int64(2, self.version)?;
3551        }
3552        os.write_unknown_fields(self.special_fields.unknown_fields())?;
3553        ::std::result::Result::Ok(())
3554    }
3555
3556    fn special_fields(&self) -> &::protobuf::SpecialFields {
3557        &self.special_fields
3558    }
3559
3560    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3561        &mut self.special_fields
3562    }
3563
3564    fn new() -> OperatorSetIdProto {
3565        OperatorSetIdProto::new()
3566    }
3567
3568    fn clear(&mut self) {
3569        self.domain.clear();
3570        self.version = 0;
3571        self.special_fields.clear();
3572    }
3573
3574    fn default_instance() -> &'static OperatorSetIdProto {
3575        static instance: OperatorSetIdProto = OperatorSetIdProto {
3576            domain: ::std::string::String::new(),
3577            version: 0,
3578            special_fields: ::protobuf::SpecialFields::new(),
3579        };
3580        &instance
3581    }
3582}
3583
3584// @@protoc_insertion_point(message:onnx.FunctionProto)
3585#[derive(PartialEq,Clone,Default,Debug)]
3586pub struct FunctionProto {
3587    // message fields
3588    // @@protoc_insertion_point(field:onnx.FunctionProto.name)
3589    pub name: ::std::string::String,
3590    // @@protoc_insertion_point(field:onnx.FunctionProto.input)
3591    pub input: ::std::vec::Vec<::std::string::String>,
3592    // @@protoc_insertion_point(field:onnx.FunctionProto.output)
3593    pub output: ::std::vec::Vec<::std::string::String>,
3594    // @@protoc_insertion_point(field:onnx.FunctionProto.attribute)
3595    pub attribute: ::std::vec::Vec<::std::string::String>,
3596    // @@protoc_insertion_point(field:onnx.FunctionProto.attribute_proto)
3597    pub attribute_proto: ::std::vec::Vec<AttributeProto>,
3598    // @@protoc_insertion_point(field:onnx.FunctionProto.node)
3599    pub node: ::std::vec::Vec<NodeProto>,
3600    // @@protoc_insertion_point(field:onnx.FunctionProto.doc_string)
3601    pub doc_string: ::std::string::String,
3602    // @@protoc_insertion_point(field:onnx.FunctionProto.opset_import)
3603    pub opset_import: ::std::vec::Vec<OperatorSetIdProto>,
3604    // @@protoc_insertion_point(field:onnx.FunctionProto.domain)
3605    pub domain: ::std::string::String,
3606    // @@protoc_insertion_point(field:onnx.FunctionProto.overload)
3607    pub overload: ::std::string::String,
3608    // @@protoc_insertion_point(field:onnx.FunctionProto.value_info)
3609    pub value_info: ::std::vec::Vec<ValueInfoProto>,
3610    // @@protoc_insertion_point(field:onnx.FunctionProto.metadata_props)
3611    pub metadata_props: ::std::vec::Vec<StringStringEntryProto>,
3612    // special fields
3613    // @@protoc_insertion_point(special_field:onnx.FunctionProto.special_fields)
3614    pub special_fields: ::protobuf::SpecialFields,
3615}
3616
3617impl<'a> ::std::default::Default for &'a FunctionProto {
3618    fn default() -> &'a FunctionProto {
3619        <FunctionProto as ::protobuf::Message>::default_instance()
3620    }
3621}
3622
3623impl FunctionProto {
3624    pub fn new() -> FunctionProto {
3625        ::std::default::Default::default()
3626    }
3627}
3628
3629impl ::protobuf::Message for FunctionProto {
3630    const NAME: &'static str = "FunctionProto";
3631
3632    fn is_initialized(&self) -> bool {
3633        true
3634    }
3635
3636    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
3637        while let Some(tag) = is.read_raw_tag_or_eof()? {
3638            match tag {
3639                10 => {
3640                    self.name = is.read_string()?;
3641                },
3642                34 => {
3643                    self.input.push(is.read_string()?);
3644                },
3645                42 => {
3646                    self.output.push(is.read_string()?);
3647                },
3648                50 => {
3649                    self.attribute.push(is.read_string()?);
3650                },
3651                90 => {
3652                    self.attribute_proto.push(is.read_message()?);
3653                },
3654                58 => {
3655                    self.node.push(is.read_message()?);
3656                },
3657                66 => {
3658                    self.doc_string = is.read_string()?;
3659                },
3660                74 => {
3661                    self.opset_import.push(is.read_message()?);
3662                },
3663                82 => {
3664                    self.domain = is.read_string()?;
3665                },
3666                106 => {
3667                    self.overload = is.read_string()?;
3668                },
3669                98 => {
3670                    self.value_info.push(is.read_message()?);
3671                },
3672                114 => {
3673                    self.metadata_props.push(is.read_message()?);
3674                },
3675                tag => {
3676                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
3677                },
3678            };
3679        }
3680        ::std::result::Result::Ok(())
3681    }
3682
3683    // Compute sizes of nested messages
3684    #[allow(unused_variables)]
3685    fn compute_size(&self) -> u64 {
3686        let mut my_size = 0;
3687        if !self.name.is_empty() {
3688            my_size += ::protobuf::rt::string_size(1, &self.name);
3689        }
3690        for value in &self.input {
3691            my_size += ::protobuf::rt::string_size(4, &value);
3692        };
3693        for value in &self.output {
3694            my_size += ::protobuf::rt::string_size(5, &value);
3695        };
3696        for value in &self.attribute {
3697            my_size += ::protobuf::rt::string_size(6, &value);
3698        };
3699        for value in &self.attribute_proto {
3700            let len = value.compute_size();
3701            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3702        };
3703        for value in &self.node {
3704            let len = value.compute_size();
3705            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3706        };
3707        if !self.doc_string.is_empty() {
3708            my_size += ::protobuf::rt::string_size(8, &self.doc_string);
3709        }
3710        for value in &self.opset_import {
3711            let len = value.compute_size();
3712            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3713        };
3714        if !self.domain.is_empty() {
3715            my_size += ::protobuf::rt::string_size(10, &self.domain);
3716        }
3717        if !self.overload.is_empty() {
3718            my_size += ::protobuf::rt::string_size(13, &self.overload);
3719        }
3720        for value in &self.value_info {
3721            let len = value.compute_size();
3722            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3723        };
3724        for value in &self.metadata_props {
3725            let len = value.compute_size();
3726            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
3727        };
3728        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
3729        self.special_fields.cached_size().set(my_size as u32);
3730        my_size
3731    }
3732
3733    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
3734        if !self.name.is_empty() {
3735            os.write_string(1, &self.name)?;
3736        }
3737        for v in &self.input {
3738            os.write_string(4, &v)?;
3739        };
3740        for v in &self.output {
3741            os.write_string(5, &v)?;
3742        };
3743        for v in &self.attribute {
3744            os.write_string(6, &v)?;
3745        };
3746        for v in &self.attribute_proto {
3747            ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
3748        };
3749        for v in &self.node {
3750            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
3751        };
3752        if !self.doc_string.is_empty() {
3753            os.write_string(8, &self.doc_string)?;
3754        }
3755        for v in &self.opset_import {
3756            ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
3757        };
3758        if !self.domain.is_empty() {
3759            os.write_string(10, &self.domain)?;
3760        }
3761        if !self.overload.is_empty() {
3762            os.write_string(13, &self.overload)?;
3763        }
3764        for v in &self.value_info {
3765            ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
3766        };
3767        for v in &self.metadata_props {
3768            ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
3769        };
3770        os.write_unknown_fields(self.special_fields.unknown_fields())?;
3771        ::std::result::Result::Ok(())
3772    }
3773
3774    fn special_fields(&self) -> &::protobuf::SpecialFields {
3775        &self.special_fields
3776    }
3777
3778    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
3779        &mut self.special_fields
3780    }
3781
3782    fn new() -> FunctionProto {
3783        FunctionProto::new()
3784    }
3785
3786    fn clear(&mut self) {
3787        self.name.clear();
3788        self.input.clear();
3789        self.output.clear();
3790        self.attribute.clear();
3791        self.attribute_proto.clear();
3792        self.node.clear();
3793        self.doc_string.clear();
3794        self.opset_import.clear();
3795        self.domain.clear();
3796        self.overload.clear();
3797        self.value_info.clear();
3798        self.metadata_props.clear();
3799        self.special_fields.clear();
3800    }
3801
3802    fn default_instance() -> &'static FunctionProto {
3803        static instance: FunctionProto = FunctionProto {
3804            name: ::std::string::String::new(),
3805            input: ::std::vec::Vec::new(),
3806            output: ::std::vec::Vec::new(),
3807            attribute: ::std::vec::Vec::new(),
3808            attribute_proto: ::std::vec::Vec::new(),
3809            node: ::std::vec::Vec::new(),
3810            doc_string: ::std::string::String::new(),
3811            opset_import: ::std::vec::Vec::new(),
3812            domain: ::std::string::String::new(),
3813            overload: ::std::string::String::new(),
3814            value_info: ::std::vec::Vec::new(),
3815            metadata_props: ::std::vec::Vec::new(),
3816            special_fields: ::protobuf::SpecialFields::new(),
3817        };
3818        &instance
3819    }
3820}
3821
3822#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
3823// @@protoc_insertion_point(enum:onnx.Version)
3824pub enum Version {
3825    // @@protoc_insertion_point(enum_value:onnx.Version._START_VERSION)
3826    _START_VERSION = 0,
3827    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2017_10_10)
3828    IR_VERSION_2017_10_10 = 1,
3829    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2017_10_30)
3830    IR_VERSION_2017_10_30 = 2,
3831    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2017_11_3)
3832    IR_VERSION_2017_11_3 = 3,
3833    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2019_1_22)
3834    IR_VERSION_2019_1_22 = 4,
3835    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2019_3_18)
3836    IR_VERSION_2019_3_18 = 5,
3837    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2019_9_19)
3838    IR_VERSION_2019_9_19 = 6,
3839    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2020_5_8)
3840    IR_VERSION_2020_5_8 = 7,
3841    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2021_7_30)
3842    IR_VERSION_2021_7_30 = 8,
3843    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION_2023_5_5)
3844    IR_VERSION_2023_5_5 = 9,
3845    // @@protoc_insertion_point(enum_value:onnx.Version.IR_VERSION)
3846    IR_VERSION = 10,
3847}
3848
3849impl ::protobuf::Enum for Version {
3850    const NAME: &'static str = "Version";
3851
3852    fn value(&self) -> i32 {
3853        *self as i32
3854    }
3855
3856    fn from_i32(value: i32) -> ::std::option::Option<Version> {
3857        match value {
3858            0 => ::std::option::Option::Some(Version::_START_VERSION),
3859            1 => ::std::option::Option::Some(Version::IR_VERSION_2017_10_10),
3860            2 => ::std::option::Option::Some(Version::IR_VERSION_2017_10_30),
3861            3 => ::std::option::Option::Some(Version::IR_VERSION_2017_11_3),
3862            4 => ::std::option::Option::Some(Version::IR_VERSION_2019_1_22),
3863            5 => ::std::option::Option::Some(Version::IR_VERSION_2019_3_18),
3864            6 => ::std::option::Option::Some(Version::IR_VERSION_2019_9_19),
3865            7 => ::std::option::Option::Some(Version::IR_VERSION_2020_5_8),
3866            8 => ::std::option::Option::Some(Version::IR_VERSION_2021_7_30),
3867            9 => ::std::option::Option::Some(Version::IR_VERSION_2023_5_5),
3868            10 => ::std::option::Option::Some(Version::IR_VERSION),
3869            _ => ::std::option::Option::None
3870        }
3871    }
3872
3873    fn from_str(str: &str) -> ::std::option::Option<Version> {
3874        match str {
3875            "_START_VERSION" => ::std::option::Option::Some(Version::_START_VERSION),
3876            "IR_VERSION_2017_10_10" => ::std::option::Option::Some(Version::IR_VERSION_2017_10_10),
3877            "IR_VERSION_2017_10_30" => ::std::option::Option::Some(Version::IR_VERSION_2017_10_30),
3878            "IR_VERSION_2017_11_3" => ::std::option::Option::Some(Version::IR_VERSION_2017_11_3),
3879            "IR_VERSION_2019_1_22" => ::std::option::Option::Some(Version::IR_VERSION_2019_1_22),
3880            "IR_VERSION_2019_3_18" => ::std::option::Option::Some(Version::IR_VERSION_2019_3_18),
3881            "IR_VERSION_2019_9_19" => ::std::option::Option::Some(Version::IR_VERSION_2019_9_19),
3882            "IR_VERSION_2020_5_8" => ::std::option::Option::Some(Version::IR_VERSION_2020_5_8),
3883            "IR_VERSION_2021_7_30" => ::std::option::Option::Some(Version::IR_VERSION_2021_7_30),
3884            "IR_VERSION_2023_5_5" => ::std::option::Option::Some(Version::IR_VERSION_2023_5_5),
3885            "IR_VERSION" => ::std::option::Option::Some(Version::IR_VERSION),
3886            _ => ::std::option::Option::None
3887        }
3888    }
3889
3890    const VALUES: &'static [Version] = &[
3891        Version::_START_VERSION,
3892        Version::IR_VERSION_2017_10_10,
3893        Version::IR_VERSION_2017_10_30,
3894        Version::IR_VERSION_2017_11_3,
3895        Version::IR_VERSION_2019_1_22,
3896        Version::IR_VERSION_2019_3_18,
3897        Version::IR_VERSION_2019_9_19,
3898        Version::IR_VERSION_2020_5_8,
3899        Version::IR_VERSION_2021_7_30,
3900        Version::IR_VERSION_2023_5_5,
3901        Version::IR_VERSION,
3902    ];
3903}
3904
3905impl ::std::default::Default for Version {
3906    fn default() -> Self {
3907        Version::_START_VERSION
3908    }
3909}
3910
3911
3912#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
3913// @@protoc_insertion_point(enum:onnx.OperatorStatus)
3914pub enum OperatorStatus {
3915    // @@protoc_insertion_point(enum_value:onnx.OperatorStatus.EXPERIMENTAL)
3916    EXPERIMENTAL = 0,
3917    // @@protoc_insertion_point(enum_value:onnx.OperatorStatus.STABLE)
3918    STABLE = 1,
3919}
3920
3921impl ::protobuf::Enum for OperatorStatus {
3922    const NAME: &'static str = "OperatorStatus";
3923
3924    fn value(&self) -> i32 {
3925        *self as i32
3926    }
3927
3928    fn from_i32(value: i32) -> ::std::option::Option<OperatorStatus> {
3929        match value {
3930            0 => ::std::option::Option::Some(OperatorStatus::EXPERIMENTAL),
3931            1 => ::std::option::Option::Some(OperatorStatus::STABLE),
3932            _ => ::std::option::Option::None
3933        }
3934    }
3935
3936    fn from_str(str: &str) -> ::std::option::Option<OperatorStatus> {
3937        match str {
3938            "EXPERIMENTAL" => ::std::option::Option::Some(OperatorStatus::EXPERIMENTAL),
3939            "STABLE" => ::std::option::Option::Some(OperatorStatus::STABLE),
3940            _ => ::std::option::Option::None
3941        }
3942    }
3943
3944    const VALUES: &'static [OperatorStatus] = &[
3945        OperatorStatus::EXPERIMENTAL,
3946        OperatorStatus::STABLE,
3947    ];
3948}
3949
3950impl ::std::default::Default for OperatorStatus {
3951    fn default() -> Self {
3952        OperatorStatus::EXPERIMENTAL
3953    }
3954}
3955