1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
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_imports)]
19#![allow(unused_results)]
20#[derive(PartialEq,Clone,Default,Debug)]
27pub struct AttributeProto {
28 name: ::protobuf::SingularField<::std::string::String>,
30 ref_attr_name: ::protobuf::SingularField<::std::string::String>,
31 doc_string: ::protobuf::SingularField<::std::string::String>,
32 field_type: ::std::option::Option<AttributeProto_AttributeType>,
33 f: ::std::option::Option<f32>,
34 i: ::std::option::Option<i64>,
35 s: ::protobuf::SingularField<::std::vec::Vec<u8>>,
36 pub t: ::protobuf::SingularPtrField<TensorProto>,
37 pub g: ::protobuf::SingularPtrField<GraphProto>,
38 pub sparse_tensor: ::protobuf::SingularPtrField<SparseTensorProto>,
39 pub tp: ::protobuf::SingularPtrField<TypeProto>,
40 pub floats: ::std::vec::Vec<f32>,
41 pub ints: ::std::vec::Vec<i64>,
42 pub strings: ::protobuf::RepeatedField<::std::vec::Vec<u8>>,
43 pub tensors: ::protobuf::RepeatedField<TensorProto>,
44 pub graphs: ::protobuf::RepeatedField<GraphProto>,
45 pub sparse_tensors: ::protobuf::RepeatedField<SparseTensorProto>,
46 pub type_protos: ::protobuf::RepeatedField<TypeProto>,
47 pub unknown_fields: ::protobuf::UnknownFields,
49 pub cached_size: ::protobuf::CachedSize,
50}
51
52impl<'a> ::std::default::Default for &'a AttributeProto {
53 fn default() -> &'a AttributeProto {
54 <AttributeProto as ::protobuf::Message>::default_instance()
55 }
56}
57
58impl AttributeProto {
59 pub fn new() -> AttributeProto {
60 ::std::default::Default::default()
61 }
62
63 pub fn get_name(&self) -> &str {
67 match self.name.as_ref() {
68 Some(v) => &v,
69 None => "",
70 }
71 }
72 pub fn clear_name(&mut self) {
73 self.name.clear();
74 }
75
76 pub fn has_name(&self) -> bool {
77 self.name.is_some()
78 }
79
80 pub fn set_name(&mut self, v: ::std::string::String) {
82 self.name = ::protobuf::SingularField::some(v);
83 }
84
85 pub fn mut_name(&mut self) -> &mut ::std::string::String {
88 if self.name.is_none() {
89 self.name.set_default();
90 }
91 self.name.as_mut().unwrap()
92 }
93
94 pub fn take_name(&mut self) -> ::std::string::String {
96 self.name.take().unwrap_or_else(|| ::std::string::String::new())
97 }
98
99 pub fn get_ref_attr_name(&self) -> &str {
103 match self.ref_attr_name.as_ref() {
104 Some(v) => &v,
105 None => "",
106 }
107 }
108 pub fn clear_ref_attr_name(&mut self) {
109 self.ref_attr_name.clear();
110 }
111
112 pub fn has_ref_attr_name(&self) -> bool {
113 self.ref_attr_name.is_some()
114 }
115
116 pub fn set_ref_attr_name(&mut self, v: ::std::string::String) {
118 self.ref_attr_name = ::protobuf::SingularField::some(v);
119 }
120
121 pub fn mut_ref_attr_name(&mut self) -> &mut ::std::string::String {
124 if self.ref_attr_name.is_none() {
125 self.ref_attr_name.set_default();
126 }
127 self.ref_attr_name.as_mut().unwrap()
128 }
129
130 pub fn take_ref_attr_name(&mut self) -> ::std::string::String {
132 self.ref_attr_name.take().unwrap_or_else(|| ::std::string::String::new())
133 }
134
135 pub fn get_doc_string(&self) -> &str {
139 match self.doc_string.as_ref() {
140 Some(v) => &v,
141 None => "",
142 }
143 }
144 pub fn clear_doc_string(&mut self) {
145 self.doc_string.clear();
146 }
147
148 pub fn has_doc_string(&self) -> bool {
149 self.doc_string.is_some()
150 }
151
152 pub fn set_doc_string(&mut self, v: ::std::string::String) {
154 self.doc_string = ::protobuf::SingularField::some(v);
155 }
156
157 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
160 if self.doc_string.is_none() {
161 self.doc_string.set_default();
162 }
163 self.doc_string.as_mut().unwrap()
164 }
165
166 pub fn take_doc_string(&mut self) -> ::std::string::String {
168 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
169 }
170
171 pub fn get_field_type(&self) -> AttributeProto_AttributeType {
175 self.field_type.unwrap_or(AttributeProto_AttributeType::UNDEFINED)
176 }
177 pub fn clear_field_type(&mut self) {
178 self.field_type = ::std::option::Option::None;
179 }
180
181 pub fn has_field_type(&self) -> bool {
182 self.field_type.is_some()
183 }
184
185 pub fn set_field_type(&mut self, v: AttributeProto_AttributeType) {
187 self.field_type = ::std::option::Option::Some(v);
188 }
189
190 pub fn get_f(&self) -> f32 {
194 self.f.unwrap_or(0.)
195 }
196 pub fn clear_f(&mut self) {
197 self.f = ::std::option::Option::None;
198 }
199
200 pub fn has_f(&self) -> bool {
201 self.f.is_some()
202 }
203
204 pub fn set_f(&mut self, v: f32) {
206 self.f = ::std::option::Option::Some(v);
207 }
208
209 pub fn get_i(&self) -> i64 {
213 self.i.unwrap_or(0)
214 }
215 pub fn clear_i(&mut self) {
216 self.i = ::std::option::Option::None;
217 }
218
219 pub fn has_i(&self) -> bool {
220 self.i.is_some()
221 }
222
223 pub fn set_i(&mut self, v: i64) {
225 self.i = ::std::option::Option::Some(v);
226 }
227
228 pub fn get_s(&self) -> &[u8] {
232 match self.s.as_ref() {
233 Some(v) => &v,
234 None => &[],
235 }
236 }
237 pub fn clear_s(&mut self) {
238 self.s.clear();
239 }
240
241 pub fn has_s(&self) -> bool {
242 self.s.is_some()
243 }
244
245 pub fn set_s(&mut self, v: ::std::vec::Vec<u8>) {
247 self.s = ::protobuf::SingularField::some(v);
248 }
249
250 pub fn mut_s(&mut self) -> &mut ::std::vec::Vec<u8> {
253 if self.s.is_none() {
254 self.s.set_default();
255 }
256 self.s.as_mut().unwrap()
257 }
258
259 pub fn take_s(&mut self) -> ::std::vec::Vec<u8> {
261 self.s.take().unwrap_or_else(|| ::std::vec::Vec::new())
262 }
263
264 pub fn get_t(&self) -> &TensorProto {
268 self.t.as_ref().unwrap_or_else(|| <TensorProto as ::protobuf::Message>::default_instance())
269 }
270 pub fn clear_t(&mut self) {
271 self.t.clear();
272 }
273
274 pub fn has_t(&self) -> bool {
275 self.t.is_some()
276 }
277
278 pub fn set_t(&mut self, v: TensorProto) {
280 self.t = ::protobuf::SingularPtrField::some(v);
281 }
282
283 pub fn mut_t(&mut self) -> &mut TensorProto {
286 if self.t.is_none() {
287 self.t.set_default();
288 }
289 self.t.as_mut().unwrap()
290 }
291
292 pub fn take_t(&mut self) -> TensorProto {
294 self.t.take().unwrap_or_else(|| TensorProto::new())
295 }
296
297 pub fn get_g(&self) -> &GraphProto {
301 self.g.as_ref().unwrap_or_else(|| <GraphProto as ::protobuf::Message>::default_instance())
302 }
303 pub fn clear_g(&mut self) {
304 self.g.clear();
305 }
306
307 pub fn has_g(&self) -> bool {
308 self.g.is_some()
309 }
310
311 pub fn set_g(&mut self, v: GraphProto) {
313 self.g = ::protobuf::SingularPtrField::some(v);
314 }
315
316 pub fn mut_g(&mut self) -> &mut GraphProto {
319 if self.g.is_none() {
320 self.g.set_default();
321 }
322 self.g.as_mut().unwrap()
323 }
324
325 pub fn take_g(&mut self) -> GraphProto {
327 self.g.take().unwrap_or_else(|| GraphProto::new())
328 }
329
330 pub fn get_sparse_tensor(&self) -> &SparseTensorProto {
334 self.sparse_tensor.as_ref().unwrap_or_else(|| <SparseTensorProto as ::protobuf::Message>::default_instance())
335 }
336 pub fn clear_sparse_tensor(&mut self) {
337 self.sparse_tensor.clear();
338 }
339
340 pub fn has_sparse_tensor(&self) -> bool {
341 self.sparse_tensor.is_some()
342 }
343
344 pub fn set_sparse_tensor(&mut self, v: SparseTensorProto) {
346 self.sparse_tensor = ::protobuf::SingularPtrField::some(v);
347 }
348
349 pub fn mut_sparse_tensor(&mut self) -> &mut SparseTensorProto {
352 if self.sparse_tensor.is_none() {
353 self.sparse_tensor.set_default();
354 }
355 self.sparse_tensor.as_mut().unwrap()
356 }
357
358 pub fn take_sparse_tensor(&mut self) -> SparseTensorProto {
360 self.sparse_tensor.take().unwrap_or_else(|| SparseTensorProto::new())
361 }
362
363 pub fn get_tp(&self) -> &TypeProto {
367 self.tp.as_ref().unwrap_or_else(|| <TypeProto as ::protobuf::Message>::default_instance())
368 }
369 pub fn clear_tp(&mut self) {
370 self.tp.clear();
371 }
372
373 pub fn has_tp(&self) -> bool {
374 self.tp.is_some()
375 }
376
377 pub fn set_tp(&mut self, v: TypeProto) {
379 self.tp = ::protobuf::SingularPtrField::some(v);
380 }
381
382 pub fn mut_tp(&mut self) -> &mut TypeProto {
385 if self.tp.is_none() {
386 self.tp.set_default();
387 }
388 self.tp.as_mut().unwrap()
389 }
390
391 pub fn take_tp(&mut self) -> TypeProto {
393 self.tp.take().unwrap_or_else(|| TypeProto::new())
394 }
395
396 pub fn get_floats(&self) -> &[f32] {
400 &self.floats
401 }
402 pub fn clear_floats(&mut self) {
403 self.floats.clear();
404 }
405
406 pub fn set_floats(&mut self, v: ::std::vec::Vec<f32>) {
408 self.floats = v;
409 }
410
411 pub fn mut_floats(&mut self) -> &mut ::std::vec::Vec<f32> {
413 &mut self.floats
414 }
415
416 pub fn take_floats(&mut self) -> ::std::vec::Vec<f32> {
418 ::std::mem::replace(&mut self.floats, ::std::vec::Vec::new())
419 }
420
421 pub fn get_ints(&self) -> &[i64] {
425 &self.ints
426 }
427 pub fn clear_ints(&mut self) {
428 self.ints.clear();
429 }
430
431 pub fn set_ints(&mut self, v: ::std::vec::Vec<i64>) {
433 self.ints = v;
434 }
435
436 pub fn mut_ints(&mut self) -> &mut ::std::vec::Vec<i64> {
438 &mut self.ints
439 }
440
441 pub fn take_ints(&mut self) -> ::std::vec::Vec<i64> {
443 ::std::mem::replace(&mut self.ints, ::std::vec::Vec::new())
444 }
445
446 pub fn get_strings(&self) -> &[::std::vec::Vec<u8>] {
450 &self.strings
451 }
452 pub fn clear_strings(&mut self) {
453 self.strings.clear();
454 }
455
456 pub fn set_strings(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec<u8>>) {
458 self.strings = v;
459 }
460
461 pub fn mut_strings(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
463 &mut self.strings
464 }
465
466 pub fn take_strings(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
468 ::std::mem::replace(&mut self.strings, ::protobuf::RepeatedField::new())
469 }
470
471 pub fn get_tensors(&self) -> &[TensorProto] {
475 &self.tensors
476 }
477 pub fn clear_tensors(&mut self) {
478 self.tensors.clear();
479 }
480
481 pub fn set_tensors(&mut self, v: ::protobuf::RepeatedField<TensorProto>) {
483 self.tensors = v;
484 }
485
486 pub fn mut_tensors(&mut self) -> &mut ::protobuf::RepeatedField<TensorProto> {
488 &mut self.tensors
489 }
490
491 pub fn take_tensors(&mut self) -> ::protobuf::RepeatedField<TensorProto> {
493 ::std::mem::replace(&mut self.tensors, ::protobuf::RepeatedField::new())
494 }
495
496 pub fn get_graphs(&self) -> &[GraphProto] {
500 &self.graphs
501 }
502 pub fn clear_graphs(&mut self) {
503 self.graphs.clear();
504 }
505
506 pub fn set_graphs(&mut self, v: ::protobuf::RepeatedField<GraphProto>) {
508 self.graphs = v;
509 }
510
511 pub fn mut_graphs(&mut self) -> &mut ::protobuf::RepeatedField<GraphProto> {
513 &mut self.graphs
514 }
515
516 pub fn take_graphs(&mut self) -> ::protobuf::RepeatedField<GraphProto> {
518 ::std::mem::replace(&mut self.graphs, ::protobuf::RepeatedField::new())
519 }
520
521 pub fn get_sparse_tensors(&self) -> &[SparseTensorProto] {
525 &self.sparse_tensors
526 }
527 pub fn clear_sparse_tensors(&mut self) {
528 self.sparse_tensors.clear();
529 }
530
531 pub fn set_sparse_tensors(&mut self, v: ::protobuf::RepeatedField<SparseTensorProto>) {
533 self.sparse_tensors = v;
534 }
535
536 pub fn mut_sparse_tensors(&mut self) -> &mut ::protobuf::RepeatedField<SparseTensorProto> {
538 &mut self.sparse_tensors
539 }
540
541 pub fn take_sparse_tensors(&mut self) -> ::protobuf::RepeatedField<SparseTensorProto> {
543 ::std::mem::replace(&mut self.sparse_tensors, ::protobuf::RepeatedField::new())
544 }
545
546 pub fn get_type_protos(&self) -> &[TypeProto] {
550 &self.type_protos
551 }
552 pub fn clear_type_protos(&mut self) {
553 self.type_protos.clear();
554 }
555
556 pub fn set_type_protos(&mut self, v: ::protobuf::RepeatedField<TypeProto>) {
558 self.type_protos = v;
559 }
560
561 pub fn mut_type_protos(&mut self) -> &mut ::protobuf::RepeatedField<TypeProto> {
563 &mut self.type_protos
564 }
565
566 pub fn take_type_protos(&mut self) -> ::protobuf::RepeatedField<TypeProto> {
568 ::std::mem::replace(&mut self.type_protos, ::protobuf::RepeatedField::new())
569 }
570}
571
572impl ::protobuf::Message for AttributeProto {
573 fn is_initialized(&self) -> bool {
574 for v in &self.t {
575 if !v.is_initialized() {
576 return false;
577 }
578 };
579 for v in &self.g {
580 if !v.is_initialized() {
581 return false;
582 }
583 };
584 for v in &self.sparse_tensor {
585 if !v.is_initialized() {
586 return false;
587 }
588 };
589 for v in &self.tp {
590 if !v.is_initialized() {
591 return false;
592 }
593 };
594 for v in &self.tensors {
595 if !v.is_initialized() {
596 return false;
597 }
598 };
599 for v in &self.graphs {
600 if !v.is_initialized() {
601 return false;
602 }
603 };
604 for v in &self.sparse_tensors {
605 if !v.is_initialized() {
606 return false;
607 }
608 };
609 for v in &self.type_protos {
610 if !v.is_initialized() {
611 return false;
612 }
613 };
614 true
615 }
616
617 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
618 while !is.eof()? {
619 let (field_number, wire_type) = is.read_tag_unpack()?;
620 match field_number {
621 1 => {
622 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
623 },
624 21 => {
625 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.ref_attr_name)?;
626 },
627 13 => {
628 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
629 },
630 20 => {
631 ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 20, &mut self.unknown_fields)?
632 },
633 2 => {
634 if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
635 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
636 }
637 let tmp = is.read_float()?;
638 self.f = ::std::option::Option::Some(tmp);
639 },
640 3 => {
641 if wire_type != ::protobuf::wire_format::WireTypeVarint {
642 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
643 }
644 let tmp = is.read_int64()?;
645 self.i = ::std::option::Option::Some(tmp);
646 },
647 4 => {
648 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.s)?;
649 },
650 5 => {
651 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.t)?;
652 },
653 6 => {
654 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.g)?;
655 },
656 22 => {
657 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sparse_tensor)?;
658 },
659 14 => {
660 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.tp)?;
661 },
662 7 => {
663 ::protobuf::rt::read_repeated_float_into(wire_type, is, &mut self.floats)?;
664 },
665 8 => {
666 ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.ints)?;
667 },
668 9 => {
669 ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.strings)?;
670 },
671 10 => {
672 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tensors)?;
673 },
674 11 => {
675 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.graphs)?;
676 },
677 23 => {
678 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.sparse_tensors)?;
679 },
680 15 => {
681 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.type_protos)?;
682 },
683 _ => {
684 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
685 },
686 };
687 }
688 ::std::result::Result::Ok(())
689 }
690
691 #[allow(unused_variables)]
693 fn compute_size(&self) -> u32 {
694 let mut my_size = 0;
695 if let Some(ref v) = self.name.as_ref() {
696 my_size += ::protobuf::rt::string_size(1, &v);
697 }
698 if let Some(ref v) = self.ref_attr_name.as_ref() {
699 my_size += ::protobuf::rt::string_size(21, &v);
700 }
701 if let Some(ref v) = self.doc_string.as_ref() {
702 my_size += ::protobuf::rt::string_size(13, &v);
703 }
704 if let Some(v) = self.field_type {
705 my_size += ::protobuf::rt::enum_size(20, v);
706 }
707 if let Some(v) = self.f {
708 my_size += 5;
709 }
710 if let Some(v) = self.i {
711 my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
712 }
713 if let Some(ref v) = self.s.as_ref() {
714 my_size += ::protobuf::rt::bytes_size(4, &v);
715 }
716 if let Some(ref v) = self.t.as_ref() {
717 let len = v.compute_size();
718 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
719 }
720 if let Some(ref v) = self.g.as_ref() {
721 let len = v.compute_size();
722 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
723 }
724 if let Some(ref v) = self.sparse_tensor.as_ref() {
725 let len = v.compute_size();
726 my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
727 }
728 if let Some(ref v) = self.tp.as_ref() {
729 let len = v.compute_size();
730 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
731 }
732 my_size += 5 * self.floats.len() as u32;
733 for value in &self.ints {
734 my_size += ::protobuf::rt::value_size(8, *value, ::protobuf::wire_format::WireTypeVarint);
735 };
736 for value in &self.strings {
737 my_size += ::protobuf::rt::bytes_size(9, &value);
738 };
739 for value in &self.tensors {
740 let len = value.compute_size();
741 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
742 };
743 for value in &self.graphs {
744 let len = value.compute_size();
745 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
746 };
747 for value in &self.sparse_tensors {
748 let len = value.compute_size();
749 my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
750 };
751 for value in &self.type_protos {
752 let len = value.compute_size();
753 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
754 };
755 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
756 self.cached_size.set(my_size);
757 my_size
758 }
759
760 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
761 if let Some(ref v) = self.name.as_ref() {
762 os.write_string(1, &v)?;
763 }
764 if let Some(ref v) = self.ref_attr_name.as_ref() {
765 os.write_string(21, &v)?;
766 }
767 if let Some(ref v) = self.doc_string.as_ref() {
768 os.write_string(13, &v)?;
769 }
770 if let Some(v) = self.field_type {
771 os.write_enum(20, ::protobuf::ProtobufEnum::value(&v))?;
772 }
773 if let Some(v) = self.f {
774 os.write_float(2, v)?;
775 }
776 if let Some(v) = self.i {
777 os.write_int64(3, v)?;
778 }
779 if let Some(ref v) = self.s.as_ref() {
780 os.write_bytes(4, &v)?;
781 }
782 if let Some(ref v) = self.t.as_ref() {
783 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
784 os.write_raw_varint32(v.get_cached_size())?;
785 v.write_to_with_cached_sizes(os)?;
786 }
787 if let Some(ref v) = self.g.as_ref() {
788 os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
789 os.write_raw_varint32(v.get_cached_size())?;
790 v.write_to_with_cached_sizes(os)?;
791 }
792 if let Some(ref v) = self.sparse_tensor.as_ref() {
793 os.write_tag(22, ::protobuf::wire_format::WireTypeLengthDelimited)?;
794 os.write_raw_varint32(v.get_cached_size())?;
795 v.write_to_with_cached_sizes(os)?;
796 }
797 if let Some(ref v) = self.tp.as_ref() {
798 os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
799 os.write_raw_varint32(v.get_cached_size())?;
800 v.write_to_with_cached_sizes(os)?;
801 }
802 for v in &self.floats {
803 os.write_float(7, *v)?;
804 };
805 for v in &self.ints {
806 os.write_int64(8, *v)?;
807 };
808 for v in &self.strings {
809 os.write_bytes(9, &v)?;
810 };
811 for v in &self.tensors {
812 os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
813 os.write_raw_varint32(v.get_cached_size())?;
814 v.write_to_with_cached_sizes(os)?;
815 };
816 for v in &self.graphs {
817 os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
818 os.write_raw_varint32(v.get_cached_size())?;
819 v.write_to_with_cached_sizes(os)?;
820 };
821 for v in &self.sparse_tensors {
822 os.write_tag(23, ::protobuf::wire_format::WireTypeLengthDelimited)?;
823 os.write_raw_varint32(v.get_cached_size())?;
824 v.write_to_with_cached_sizes(os)?;
825 };
826 for v in &self.type_protos {
827 os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?;
828 os.write_raw_varint32(v.get_cached_size())?;
829 v.write_to_with_cached_sizes(os)?;
830 };
831 os.write_unknown_fields(self.get_unknown_fields())?;
832 ::std::result::Result::Ok(())
833 }
834
835 fn get_cached_size(&self) -> u32 {
836 self.cached_size.get()
837 }
838
839 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
840 &self.unknown_fields
841 }
842
843 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
844 &mut self.unknown_fields
845 }
846
847 fn as_any(&self) -> &dyn (::std::any::Any) {
848 self as &dyn (::std::any::Any)
849 }
850 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
851 self as &mut dyn (::std::any::Any)
852 }
853 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
854 self
855 }
856
857 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
858 Self::descriptor_static()
859 }
860
861 fn new() -> AttributeProto {
862 AttributeProto::new()
863 }
864
865 fn default_instance() -> &'static AttributeProto {
866 static instance: ::protobuf::rt::LazyV2<AttributeProto> = ::protobuf::rt::LazyV2::INIT;
867 instance.get(AttributeProto::new)
868 }
869}
870
871impl ::protobuf::Clear for AttributeProto {
872 fn clear(&mut self) {
873 self.name.clear();
874 self.ref_attr_name.clear();
875 self.doc_string.clear();
876 self.field_type = ::std::option::Option::None;
877 self.f = ::std::option::Option::None;
878 self.i = ::std::option::Option::None;
879 self.s.clear();
880 self.t.clear();
881 self.g.clear();
882 self.sparse_tensor.clear();
883 self.tp.clear();
884 self.floats.clear();
885 self.ints.clear();
886 self.strings.clear();
887 self.tensors.clear();
888 self.graphs.clear();
889 self.sparse_tensors.clear();
890 self.type_protos.clear();
891 self.unknown_fields.clear();
892 }
893}
894
895impl ::protobuf::reflect::ProtobufValue for AttributeProto {
896 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
897 ::protobuf::reflect::ReflectValueRef::Message(self)
898 }
899}
900
901#[derive(Clone,PartialEq,Eq,Debug,Hash)]
902pub enum AttributeProto_AttributeType {
903 UNDEFINED = 0,
904 FLOAT = 1,
905 INT = 2,
906 STRING = 3,
907 TENSOR = 4,
908 GRAPH = 5,
909 SPARSE_TENSOR = 11,
910 TYPE_PROTO = 13,
911 FLOATS = 6,
912 INTS = 7,
913 STRINGS = 8,
914 TENSORS = 9,
915 GRAPHS = 10,
916 SPARSE_TENSORS = 12,
917 TYPE_PROTOS = 14,
918}
919
920impl ::protobuf::ProtobufEnum for AttributeProto_AttributeType {
921 fn value(&self) -> i32 {
922 *self as i32
923 }
924
925 fn from_i32(value: i32) -> ::std::option::Option<AttributeProto_AttributeType> {
926 match value {
927 0 => ::std::option::Option::Some(AttributeProto_AttributeType::UNDEFINED),
928 1 => ::std::option::Option::Some(AttributeProto_AttributeType::FLOAT),
929 2 => ::std::option::Option::Some(AttributeProto_AttributeType::INT),
930 3 => ::std::option::Option::Some(AttributeProto_AttributeType::STRING),
931 4 => ::std::option::Option::Some(AttributeProto_AttributeType::TENSOR),
932 5 => ::std::option::Option::Some(AttributeProto_AttributeType::GRAPH),
933 11 => ::std::option::Option::Some(AttributeProto_AttributeType::SPARSE_TENSOR),
934 13 => ::std::option::Option::Some(AttributeProto_AttributeType::TYPE_PROTO),
935 6 => ::std::option::Option::Some(AttributeProto_AttributeType::FLOATS),
936 7 => ::std::option::Option::Some(AttributeProto_AttributeType::INTS),
937 8 => ::std::option::Option::Some(AttributeProto_AttributeType::STRINGS),
938 9 => ::std::option::Option::Some(AttributeProto_AttributeType::TENSORS),
939 10 => ::std::option::Option::Some(AttributeProto_AttributeType::GRAPHS),
940 12 => ::std::option::Option::Some(AttributeProto_AttributeType::SPARSE_TENSORS),
941 14 => ::std::option::Option::Some(AttributeProto_AttributeType::TYPE_PROTOS),
942 _ => ::std::option::Option::None
943 }
944 }
945
946 fn values() -> &'static [Self] {
947 static values: &'static [AttributeProto_AttributeType] = &[
948 AttributeProto_AttributeType::UNDEFINED,
949 AttributeProto_AttributeType::FLOAT,
950 AttributeProto_AttributeType::INT,
951 AttributeProto_AttributeType::STRING,
952 AttributeProto_AttributeType::TENSOR,
953 AttributeProto_AttributeType::GRAPH,
954 AttributeProto_AttributeType::SPARSE_TENSOR,
955 AttributeProto_AttributeType::TYPE_PROTO,
956 AttributeProto_AttributeType::FLOATS,
957 AttributeProto_AttributeType::INTS,
958 AttributeProto_AttributeType::STRINGS,
959 AttributeProto_AttributeType::TENSORS,
960 AttributeProto_AttributeType::GRAPHS,
961 AttributeProto_AttributeType::SPARSE_TENSORS,
962 AttributeProto_AttributeType::TYPE_PROTOS,
963 ];
964 values
965 }
966}
967
968impl ::std::marker::Copy for AttributeProto_AttributeType {
969}
970
971impl ::std::default::Default for AttributeProto_AttributeType {
972 fn default() -> Self {
973 AttributeProto_AttributeType::UNDEFINED
974 }
975}
976
977impl ::protobuf::reflect::ProtobufValue for AttributeProto_AttributeType {
978 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
979 ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
980 }
981}
982
983#[derive(PartialEq,Clone,Default,Debug)]
984pub struct ValueInfoProto {
985 name: ::protobuf::SingularField<::std::string::String>,
987 pub field_type: ::protobuf::SingularPtrField<TypeProto>,
988 doc_string: ::protobuf::SingularField<::std::string::String>,
989 pub unknown_fields: ::protobuf::UnknownFields,
991 pub cached_size: ::protobuf::CachedSize,
992}
993
994impl<'a> ::std::default::Default for &'a ValueInfoProto {
995 fn default() -> &'a ValueInfoProto {
996 <ValueInfoProto as ::protobuf::Message>::default_instance()
997 }
998}
999
1000impl ValueInfoProto {
1001 pub fn new() -> ValueInfoProto {
1002 ::std::default::Default::default()
1003 }
1004
1005 pub fn get_name(&self) -> &str {
1009 match self.name.as_ref() {
1010 Some(v) => &v,
1011 None => "",
1012 }
1013 }
1014 pub fn clear_name(&mut self) {
1015 self.name.clear();
1016 }
1017
1018 pub fn has_name(&self) -> bool {
1019 self.name.is_some()
1020 }
1021
1022 pub fn set_name(&mut self, v: ::std::string::String) {
1024 self.name = ::protobuf::SingularField::some(v);
1025 }
1026
1027 pub fn mut_name(&mut self) -> &mut ::std::string::String {
1030 if self.name.is_none() {
1031 self.name.set_default();
1032 }
1033 self.name.as_mut().unwrap()
1034 }
1035
1036 pub fn take_name(&mut self) -> ::std::string::String {
1038 self.name.take().unwrap_or_else(|| ::std::string::String::new())
1039 }
1040
1041 pub fn get_field_type(&self) -> &TypeProto {
1045 self.field_type.as_ref().unwrap_or_else(|| <TypeProto as ::protobuf::Message>::default_instance())
1046 }
1047 pub fn clear_field_type(&mut self) {
1048 self.field_type.clear();
1049 }
1050
1051 pub fn has_field_type(&self) -> bool {
1052 self.field_type.is_some()
1053 }
1054
1055 pub fn set_field_type(&mut self, v: TypeProto) {
1057 self.field_type = ::protobuf::SingularPtrField::some(v);
1058 }
1059
1060 pub fn mut_field_type(&mut self) -> &mut TypeProto {
1063 if self.field_type.is_none() {
1064 self.field_type.set_default();
1065 }
1066 self.field_type.as_mut().unwrap()
1067 }
1068
1069 pub fn take_field_type(&mut self) -> TypeProto {
1071 self.field_type.take().unwrap_or_else(|| TypeProto::new())
1072 }
1073
1074 pub fn get_doc_string(&self) -> &str {
1078 match self.doc_string.as_ref() {
1079 Some(v) => &v,
1080 None => "",
1081 }
1082 }
1083 pub fn clear_doc_string(&mut self) {
1084 self.doc_string.clear();
1085 }
1086
1087 pub fn has_doc_string(&self) -> bool {
1088 self.doc_string.is_some()
1089 }
1090
1091 pub fn set_doc_string(&mut self, v: ::std::string::String) {
1093 self.doc_string = ::protobuf::SingularField::some(v);
1094 }
1095
1096 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
1099 if self.doc_string.is_none() {
1100 self.doc_string.set_default();
1101 }
1102 self.doc_string.as_mut().unwrap()
1103 }
1104
1105 pub fn take_doc_string(&mut self) -> ::std::string::String {
1107 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
1108 }
1109}
1110
1111impl ::protobuf::Message for ValueInfoProto {
1112 fn is_initialized(&self) -> bool {
1113 for v in &self.field_type {
1114 if !v.is_initialized() {
1115 return false;
1116 }
1117 };
1118 true
1119 }
1120
1121 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1122 while !is.eof()? {
1123 let (field_number, wire_type) = is.read_tag_unpack()?;
1124 match field_number {
1125 1 => {
1126 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
1127 },
1128 2 => {
1129 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_type)?;
1130 },
1131 3 => {
1132 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
1133 },
1134 _ => {
1135 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1136 },
1137 };
1138 }
1139 ::std::result::Result::Ok(())
1140 }
1141
1142 #[allow(unused_variables)]
1144 fn compute_size(&self) -> u32 {
1145 let mut my_size = 0;
1146 if let Some(ref v) = self.name.as_ref() {
1147 my_size += ::protobuf::rt::string_size(1, &v);
1148 }
1149 if let Some(ref v) = self.field_type.as_ref() {
1150 let len = v.compute_size();
1151 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1152 }
1153 if let Some(ref v) = self.doc_string.as_ref() {
1154 my_size += ::protobuf::rt::string_size(3, &v);
1155 }
1156 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1157 self.cached_size.set(my_size);
1158 my_size
1159 }
1160
1161 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1162 if let Some(ref v) = self.name.as_ref() {
1163 os.write_string(1, &v)?;
1164 }
1165 if let Some(ref v) = self.field_type.as_ref() {
1166 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1167 os.write_raw_varint32(v.get_cached_size())?;
1168 v.write_to_with_cached_sizes(os)?;
1169 }
1170 if let Some(ref v) = self.doc_string.as_ref() {
1171 os.write_string(3, &v)?;
1172 }
1173 os.write_unknown_fields(self.get_unknown_fields())?;
1174 ::std::result::Result::Ok(())
1175 }
1176
1177 fn get_cached_size(&self) -> u32 {
1178 self.cached_size.get()
1179 }
1180
1181 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1182 &self.unknown_fields
1183 }
1184
1185 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1186 &mut self.unknown_fields
1187 }
1188
1189 fn as_any(&self) -> &dyn (::std::any::Any) {
1190 self as &dyn (::std::any::Any)
1191 }
1192 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1193 self as &mut dyn (::std::any::Any)
1194 }
1195 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1196 self
1197 }
1198
1199 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1200 Self::descriptor_static()
1201 }
1202
1203 fn new() -> ValueInfoProto {
1204 ValueInfoProto::new()
1205 }
1206
1207 fn default_instance() -> &'static ValueInfoProto {
1208 static instance: ::protobuf::rt::LazyV2<ValueInfoProto> = ::protobuf::rt::LazyV2::INIT;
1209 instance.get(ValueInfoProto::new)
1210 }
1211}
1212
1213impl ::protobuf::Clear for ValueInfoProto {
1214 fn clear(&mut self) {
1215 self.name.clear();
1216 self.field_type.clear();
1217 self.doc_string.clear();
1218 self.unknown_fields.clear();
1219 }
1220}
1221
1222impl ::protobuf::reflect::ProtobufValue for ValueInfoProto {
1223 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1224 ::protobuf::reflect::ReflectValueRef::Message(self)
1225 }
1226}
1227
1228#[derive(PartialEq,Clone,Default,Debug)]
1229pub struct NodeProto {
1230 pub input: ::protobuf::RepeatedField<::std::string::String>,
1232 pub output: ::protobuf::RepeatedField<::std::string::String>,
1233 name: ::protobuf::SingularField<::std::string::String>,
1234 op_type: ::protobuf::SingularField<::std::string::String>,
1235 domain: ::protobuf::SingularField<::std::string::String>,
1236 pub attribute: ::protobuf::RepeatedField<AttributeProto>,
1237 doc_string: ::protobuf::SingularField<::std::string::String>,
1238 pub unknown_fields: ::protobuf::UnknownFields,
1240 pub cached_size: ::protobuf::CachedSize,
1241}
1242
1243impl<'a> ::std::default::Default for &'a NodeProto {
1244 fn default() -> &'a NodeProto {
1245 <NodeProto as ::protobuf::Message>::default_instance()
1246 }
1247}
1248
1249impl NodeProto {
1250 pub fn new() -> NodeProto {
1251 ::std::default::Default::default()
1252 }
1253
1254 pub fn get_input(&self) -> &[::std::string::String] {
1258 &self.input
1259 }
1260 pub fn clear_input(&mut self) {
1261 self.input.clear();
1262 }
1263
1264 pub fn set_input(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
1266 self.input = v;
1267 }
1268
1269 pub fn mut_input(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
1271 &mut self.input
1272 }
1273
1274 pub fn take_input(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
1276 ::std::mem::replace(&mut self.input, ::protobuf::RepeatedField::new())
1277 }
1278
1279 pub fn get_output(&self) -> &[::std::string::String] {
1283 &self.output
1284 }
1285 pub fn clear_output(&mut self) {
1286 self.output.clear();
1287 }
1288
1289 pub fn set_output(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
1291 self.output = v;
1292 }
1293
1294 pub fn mut_output(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
1296 &mut self.output
1297 }
1298
1299 pub fn take_output(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
1301 ::std::mem::replace(&mut self.output, ::protobuf::RepeatedField::new())
1302 }
1303
1304 pub fn get_name(&self) -> &str {
1308 match self.name.as_ref() {
1309 Some(v) => &v,
1310 None => "",
1311 }
1312 }
1313 pub fn clear_name(&mut self) {
1314 self.name.clear();
1315 }
1316
1317 pub fn has_name(&self) -> bool {
1318 self.name.is_some()
1319 }
1320
1321 pub fn set_name(&mut self, v: ::std::string::String) {
1323 self.name = ::protobuf::SingularField::some(v);
1324 }
1325
1326 pub fn mut_name(&mut self) -> &mut ::std::string::String {
1329 if self.name.is_none() {
1330 self.name.set_default();
1331 }
1332 self.name.as_mut().unwrap()
1333 }
1334
1335 pub fn take_name(&mut self) -> ::std::string::String {
1337 self.name.take().unwrap_or_else(|| ::std::string::String::new())
1338 }
1339
1340 pub fn get_op_type(&self) -> &str {
1344 match self.op_type.as_ref() {
1345 Some(v) => &v,
1346 None => "",
1347 }
1348 }
1349 pub fn clear_op_type(&mut self) {
1350 self.op_type.clear();
1351 }
1352
1353 pub fn has_op_type(&self) -> bool {
1354 self.op_type.is_some()
1355 }
1356
1357 pub fn set_op_type(&mut self, v: ::std::string::String) {
1359 self.op_type = ::protobuf::SingularField::some(v);
1360 }
1361
1362 pub fn mut_op_type(&mut self) -> &mut ::std::string::String {
1365 if self.op_type.is_none() {
1366 self.op_type.set_default();
1367 }
1368 self.op_type.as_mut().unwrap()
1369 }
1370
1371 pub fn take_op_type(&mut self) -> ::std::string::String {
1373 self.op_type.take().unwrap_or_else(|| ::std::string::String::new())
1374 }
1375
1376 pub fn get_domain(&self) -> &str {
1380 match self.domain.as_ref() {
1381 Some(v) => &v,
1382 None => "",
1383 }
1384 }
1385 pub fn clear_domain(&mut self) {
1386 self.domain.clear();
1387 }
1388
1389 pub fn has_domain(&self) -> bool {
1390 self.domain.is_some()
1391 }
1392
1393 pub fn set_domain(&mut self, v: ::std::string::String) {
1395 self.domain = ::protobuf::SingularField::some(v);
1396 }
1397
1398 pub fn mut_domain(&mut self) -> &mut ::std::string::String {
1401 if self.domain.is_none() {
1402 self.domain.set_default();
1403 }
1404 self.domain.as_mut().unwrap()
1405 }
1406
1407 pub fn take_domain(&mut self) -> ::std::string::String {
1409 self.domain.take().unwrap_or_else(|| ::std::string::String::new())
1410 }
1411
1412 pub fn get_attribute(&self) -> &[AttributeProto] {
1416 &self.attribute
1417 }
1418 pub fn clear_attribute(&mut self) {
1419 self.attribute.clear();
1420 }
1421
1422 pub fn set_attribute(&mut self, v: ::protobuf::RepeatedField<AttributeProto>) {
1424 self.attribute = v;
1425 }
1426
1427 pub fn mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField<AttributeProto> {
1429 &mut self.attribute
1430 }
1431
1432 pub fn take_attribute(&mut self) -> ::protobuf::RepeatedField<AttributeProto> {
1434 ::std::mem::replace(&mut self.attribute, ::protobuf::RepeatedField::new())
1435 }
1436
1437 pub fn get_doc_string(&self) -> &str {
1441 match self.doc_string.as_ref() {
1442 Some(v) => &v,
1443 None => "",
1444 }
1445 }
1446 pub fn clear_doc_string(&mut self) {
1447 self.doc_string.clear();
1448 }
1449
1450 pub fn has_doc_string(&self) -> bool {
1451 self.doc_string.is_some()
1452 }
1453
1454 pub fn set_doc_string(&mut self, v: ::std::string::String) {
1456 self.doc_string = ::protobuf::SingularField::some(v);
1457 }
1458
1459 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
1462 if self.doc_string.is_none() {
1463 self.doc_string.set_default();
1464 }
1465 self.doc_string.as_mut().unwrap()
1466 }
1467
1468 pub fn take_doc_string(&mut self) -> ::std::string::String {
1470 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
1471 }
1472}
1473
1474impl ::protobuf::Message for NodeProto {
1475 fn is_initialized(&self) -> bool {
1476 for v in &self.attribute {
1477 if !v.is_initialized() {
1478 return false;
1479 }
1480 };
1481 true
1482 }
1483
1484 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1485 while !is.eof()? {
1486 let (field_number, wire_type) = is.read_tag_unpack()?;
1487 match field_number {
1488 1 => {
1489 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.input)?;
1490 },
1491 2 => {
1492 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.output)?;
1493 },
1494 3 => {
1495 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
1496 },
1497 4 => {
1498 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.op_type)?;
1499 },
1500 7 => {
1501 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.domain)?;
1502 },
1503 5 => {
1504 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attribute)?;
1505 },
1506 6 => {
1507 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
1508 },
1509 _ => {
1510 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1511 },
1512 };
1513 }
1514 ::std::result::Result::Ok(())
1515 }
1516
1517 #[allow(unused_variables)]
1519 fn compute_size(&self) -> u32 {
1520 let mut my_size = 0;
1521 for value in &self.input {
1522 my_size += ::protobuf::rt::string_size(1, &value);
1523 };
1524 for value in &self.output {
1525 my_size += ::protobuf::rt::string_size(2, &value);
1526 };
1527 if let Some(ref v) = self.name.as_ref() {
1528 my_size += ::protobuf::rt::string_size(3, &v);
1529 }
1530 if let Some(ref v) = self.op_type.as_ref() {
1531 my_size += ::protobuf::rt::string_size(4, &v);
1532 }
1533 if let Some(ref v) = self.domain.as_ref() {
1534 my_size += ::protobuf::rt::string_size(7, &v);
1535 }
1536 for value in &self.attribute {
1537 let len = value.compute_size();
1538 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1539 };
1540 if let Some(ref v) = self.doc_string.as_ref() {
1541 my_size += ::protobuf::rt::string_size(6, &v);
1542 }
1543 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1544 self.cached_size.set(my_size);
1545 my_size
1546 }
1547
1548 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1549 for v in &self.input {
1550 os.write_string(1, &v)?;
1551 };
1552 for v in &self.output {
1553 os.write_string(2, &v)?;
1554 };
1555 if let Some(ref v) = self.name.as_ref() {
1556 os.write_string(3, &v)?;
1557 }
1558 if let Some(ref v) = self.op_type.as_ref() {
1559 os.write_string(4, &v)?;
1560 }
1561 if let Some(ref v) = self.domain.as_ref() {
1562 os.write_string(7, &v)?;
1563 }
1564 for v in &self.attribute {
1565 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1566 os.write_raw_varint32(v.get_cached_size())?;
1567 v.write_to_with_cached_sizes(os)?;
1568 };
1569 if let Some(ref v) = self.doc_string.as_ref() {
1570 os.write_string(6, &v)?;
1571 }
1572 os.write_unknown_fields(self.get_unknown_fields())?;
1573 ::std::result::Result::Ok(())
1574 }
1575
1576 fn get_cached_size(&self) -> u32 {
1577 self.cached_size.get()
1578 }
1579
1580 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1581 &self.unknown_fields
1582 }
1583
1584 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1585 &mut self.unknown_fields
1586 }
1587
1588 fn as_any(&self) -> &dyn (::std::any::Any) {
1589 self as &dyn (::std::any::Any)
1590 }
1591 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1592 self as &mut dyn (::std::any::Any)
1593 }
1594 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1595 self
1596 }
1597
1598 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1599 Self::descriptor_static()
1600 }
1601
1602 fn new() -> NodeProto {
1603 NodeProto::new()
1604 }
1605
1606 fn default_instance() -> &'static NodeProto {
1607 static instance: ::protobuf::rt::LazyV2<NodeProto> = ::protobuf::rt::LazyV2::INIT;
1608 instance.get(NodeProto::new)
1609 }
1610}
1611
1612impl ::protobuf::Clear for NodeProto {
1613 fn clear(&mut self) {
1614 self.input.clear();
1615 self.output.clear();
1616 self.name.clear();
1617 self.op_type.clear();
1618 self.domain.clear();
1619 self.attribute.clear();
1620 self.doc_string.clear();
1621 self.unknown_fields.clear();
1622 }
1623}
1624
1625impl ::protobuf::reflect::ProtobufValue for NodeProto {
1626 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1627 ::protobuf::reflect::ReflectValueRef::Message(self)
1628 }
1629}
1630
1631#[derive(PartialEq,Clone,Default,Debug)]
1632pub struct TrainingInfoProto {
1633 pub initialization: ::protobuf::SingularPtrField<GraphProto>,
1635 pub algorithm: ::protobuf::SingularPtrField<GraphProto>,
1636 pub initialization_binding: ::protobuf::RepeatedField<StringStringEntryProto>,
1637 pub update_binding: ::protobuf::RepeatedField<StringStringEntryProto>,
1638 pub unknown_fields: ::protobuf::UnknownFields,
1640 pub cached_size: ::protobuf::CachedSize,
1641}
1642
1643impl<'a> ::std::default::Default for &'a TrainingInfoProto {
1644 fn default() -> &'a TrainingInfoProto {
1645 <TrainingInfoProto as ::protobuf::Message>::default_instance()
1646 }
1647}
1648
1649impl TrainingInfoProto {
1650 pub fn new() -> TrainingInfoProto {
1651 ::std::default::Default::default()
1652 }
1653
1654 pub fn get_initialization(&self) -> &GraphProto {
1658 self.initialization.as_ref().unwrap_or_else(|| <GraphProto as ::protobuf::Message>::default_instance())
1659 }
1660 pub fn clear_initialization(&mut self) {
1661 self.initialization.clear();
1662 }
1663
1664 pub fn has_initialization(&self) -> bool {
1665 self.initialization.is_some()
1666 }
1667
1668 pub fn set_initialization(&mut self, v: GraphProto) {
1670 self.initialization = ::protobuf::SingularPtrField::some(v);
1671 }
1672
1673 pub fn mut_initialization(&mut self) -> &mut GraphProto {
1676 if self.initialization.is_none() {
1677 self.initialization.set_default();
1678 }
1679 self.initialization.as_mut().unwrap()
1680 }
1681
1682 pub fn take_initialization(&mut self) -> GraphProto {
1684 self.initialization.take().unwrap_or_else(|| GraphProto::new())
1685 }
1686
1687 pub fn get_algorithm(&self) -> &GraphProto {
1691 self.algorithm.as_ref().unwrap_or_else(|| <GraphProto as ::protobuf::Message>::default_instance())
1692 }
1693 pub fn clear_algorithm(&mut self) {
1694 self.algorithm.clear();
1695 }
1696
1697 pub fn has_algorithm(&self) -> bool {
1698 self.algorithm.is_some()
1699 }
1700
1701 pub fn set_algorithm(&mut self, v: GraphProto) {
1703 self.algorithm = ::protobuf::SingularPtrField::some(v);
1704 }
1705
1706 pub fn mut_algorithm(&mut self) -> &mut GraphProto {
1709 if self.algorithm.is_none() {
1710 self.algorithm.set_default();
1711 }
1712 self.algorithm.as_mut().unwrap()
1713 }
1714
1715 pub fn take_algorithm(&mut self) -> GraphProto {
1717 self.algorithm.take().unwrap_or_else(|| GraphProto::new())
1718 }
1719
1720 pub fn get_initialization_binding(&self) -> &[StringStringEntryProto] {
1724 &self.initialization_binding
1725 }
1726 pub fn clear_initialization_binding(&mut self) {
1727 self.initialization_binding.clear();
1728 }
1729
1730 pub fn set_initialization_binding(&mut self, v: ::protobuf::RepeatedField<StringStringEntryProto>) {
1732 self.initialization_binding = v;
1733 }
1734
1735 pub fn mut_initialization_binding(&mut self) -> &mut ::protobuf::RepeatedField<StringStringEntryProto> {
1737 &mut self.initialization_binding
1738 }
1739
1740 pub fn take_initialization_binding(&mut self) -> ::protobuf::RepeatedField<StringStringEntryProto> {
1742 ::std::mem::replace(&mut self.initialization_binding, ::protobuf::RepeatedField::new())
1743 }
1744
1745 pub fn get_update_binding(&self) -> &[StringStringEntryProto] {
1749 &self.update_binding
1750 }
1751 pub fn clear_update_binding(&mut self) {
1752 self.update_binding.clear();
1753 }
1754
1755 pub fn set_update_binding(&mut self, v: ::protobuf::RepeatedField<StringStringEntryProto>) {
1757 self.update_binding = v;
1758 }
1759
1760 pub fn mut_update_binding(&mut self) -> &mut ::protobuf::RepeatedField<StringStringEntryProto> {
1762 &mut self.update_binding
1763 }
1764
1765 pub fn take_update_binding(&mut self) -> ::protobuf::RepeatedField<StringStringEntryProto> {
1767 ::std::mem::replace(&mut self.update_binding, ::protobuf::RepeatedField::new())
1768 }
1769}
1770
1771impl ::protobuf::Message for TrainingInfoProto {
1772 fn is_initialized(&self) -> bool {
1773 for v in &self.initialization {
1774 if !v.is_initialized() {
1775 return false;
1776 }
1777 };
1778 for v in &self.algorithm {
1779 if !v.is_initialized() {
1780 return false;
1781 }
1782 };
1783 for v in &self.initialization_binding {
1784 if !v.is_initialized() {
1785 return false;
1786 }
1787 };
1788 for v in &self.update_binding {
1789 if !v.is_initialized() {
1790 return false;
1791 }
1792 };
1793 true
1794 }
1795
1796 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1797 while !is.eof()? {
1798 let (field_number, wire_type) = is.read_tag_unpack()?;
1799 match field_number {
1800 1 => {
1801 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.initialization)?;
1802 },
1803 2 => {
1804 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.algorithm)?;
1805 },
1806 3 => {
1807 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.initialization_binding)?;
1808 },
1809 4 => {
1810 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.update_binding)?;
1811 },
1812 _ => {
1813 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1814 },
1815 };
1816 }
1817 ::std::result::Result::Ok(())
1818 }
1819
1820 #[allow(unused_variables)]
1822 fn compute_size(&self) -> u32 {
1823 let mut my_size = 0;
1824 if let Some(ref v) = self.initialization.as_ref() {
1825 let len = v.compute_size();
1826 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1827 }
1828 if let Some(ref v) = self.algorithm.as_ref() {
1829 let len = v.compute_size();
1830 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1831 }
1832 for value in &self.initialization_binding {
1833 let len = value.compute_size();
1834 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1835 };
1836 for value in &self.update_binding {
1837 let len = value.compute_size();
1838 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1839 };
1840 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1841 self.cached_size.set(my_size);
1842 my_size
1843 }
1844
1845 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1846 if let Some(ref v) = self.initialization.as_ref() {
1847 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1848 os.write_raw_varint32(v.get_cached_size())?;
1849 v.write_to_with_cached_sizes(os)?;
1850 }
1851 if let Some(ref v) = self.algorithm.as_ref() {
1852 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1853 os.write_raw_varint32(v.get_cached_size())?;
1854 v.write_to_with_cached_sizes(os)?;
1855 }
1856 for v in &self.initialization_binding {
1857 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1858 os.write_raw_varint32(v.get_cached_size())?;
1859 v.write_to_with_cached_sizes(os)?;
1860 };
1861 for v in &self.update_binding {
1862 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1863 os.write_raw_varint32(v.get_cached_size())?;
1864 v.write_to_with_cached_sizes(os)?;
1865 };
1866 os.write_unknown_fields(self.get_unknown_fields())?;
1867 ::std::result::Result::Ok(())
1868 }
1869
1870 fn get_cached_size(&self) -> u32 {
1871 self.cached_size.get()
1872 }
1873
1874 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1875 &self.unknown_fields
1876 }
1877
1878 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1879 &mut self.unknown_fields
1880 }
1881
1882 fn as_any(&self) -> &dyn (::std::any::Any) {
1883 self as &dyn (::std::any::Any)
1884 }
1885 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1886 self as &mut dyn (::std::any::Any)
1887 }
1888 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1889 self
1890 }
1891
1892 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1893 Self::descriptor_static()
1894 }
1895
1896 fn new() -> TrainingInfoProto {
1897 TrainingInfoProto::new()
1898 }
1899
1900 fn default_instance() -> &'static TrainingInfoProto {
1901 static instance: ::protobuf::rt::LazyV2<TrainingInfoProto> = ::protobuf::rt::LazyV2::INIT;
1902 instance.get(TrainingInfoProto::new)
1903 }
1904}
1905
1906impl ::protobuf::Clear for TrainingInfoProto {
1907 fn clear(&mut self) {
1908 self.initialization.clear();
1909 self.algorithm.clear();
1910 self.initialization_binding.clear();
1911 self.update_binding.clear();
1912 self.unknown_fields.clear();
1913 }
1914}
1915
1916impl ::protobuf::reflect::ProtobufValue for TrainingInfoProto {
1917 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1918 ::protobuf::reflect::ReflectValueRef::Message(self)
1919 }
1920}
1921
1922#[derive(PartialEq,Clone,Default,Debug)]
1923pub struct ModelProto {
1924 ir_version: ::std::option::Option<i64>,
1926 pub opset_import: ::protobuf::RepeatedField<OperatorSetIdProto>,
1927 producer_name: ::protobuf::SingularField<::std::string::String>,
1928 producer_version: ::protobuf::SingularField<::std::string::String>,
1929 domain: ::protobuf::SingularField<::std::string::String>,
1930 model_version: ::std::option::Option<i64>,
1931 doc_string: ::protobuf::SingularField<::std::string::String>,
1932 pub graph: ::protobuf::SingularPtrField<GraphProto>,
1933 pub metadata_props: ::protobuf::RepeatedField<StringStringEntryProto>,
1934 pub training_info: ::protobuf::RepeatedField<TrainingInfoProto>,
1935 pub functions: ::protobuf::RepeatedField<FunctionProto>,
1936 pub unknown_fields: ::protobuf::UnknownFields,
1938 pub cached_size: ::protobuf::CachedSize,
1939}
1940
1941impl<'a> ::std::default::Default for &'a ModelProto {
1942 fn default() -> &'a ModelProto {
1943 <ModelProto as ::protobuf::Message>::default_instance()
1944 }
1945}
1946
1947impl ModelProto {
1948 pub fn new() -> ModelProto {
1949 ::std::default::Default::default()
1950 }
1951
1952 pub fn get_ir_version(&self) -> i64 {
1956 self.ir_version.unwrap_or(0)
1957 }
1958 pub fn clear_ir_version(&mut self) {
1959 self.ir_version = ::std::option::Option::None;
1960 }
1961
1962 pub fn has_ir_version(&self) -> bool {
1963 self.ir_version.is_some()
1964 }
1965
1966 pub fn set_ir_version(&mut self, v: i64) {
1968 self.ir_version = ::std::option::Option::Some(v);
1969 }
1970
1971 pub fn get_opset_import(&self) -> &[OperatorSetIdProto] {
1975 &self.opset_import
1976 }
1977 pub fn clear_opset_import(&mut self) {
1978 self.opset_import.clear();
1979 }
1980
1981 pub fn set_opset_import(&mut self, v: ::protobuf::RepeatedField<OperatorSetIdProto>) {
1983 self.opset_import = v;
1984 }
1985
1986 pub fn mut_opset_import(&mut self) -> &mut ::protobuf::RepeatedField<OperatorSetIdProto> {
1988 &mut self.opset_import
1989 }
1990
1991 pub fn take_opset_import(&mut self) -> ::protobuf::RepeatedField<OperatorSetIdProto> {
1993 ::std::mem::replace(&mut self.opset_import, ::protobuf::RepeatedField::new())
1994 }
1995
1996 pub fn get_producer_name(&self) -> &str {
2000 match self.producer_name.as_ref() {
2001 Some(v) => &v,
2002 None => "",
2003 }
2004 }
2005 pub fn clear_producer_name(&mut self) {
2006 self.producer_name.clear();
2007 }
2008
2009 pub fn has_producer_name(&self) -> bool {
2010 self.producer_name.is_some()
2011 }
2012
2013 pub fn set_producer_name(&mut self, v: ::std::string::String) {
2015 self.producer_name = ::protobuf::SingularField::some(v);
2016 }
2017
2018 pub fn mut_producer_name(&mut self) -> &mut ::std::string::String {
2021 if self.producer_name.is_none() {
2022 self.producer_name.set_default();
2023 }
2024 self.producer_name.as_mut().unwrap()
2025 }
2026
2027 pub fn take_producer_name(&mut self) -> ::std::string::String {
2029 self.producer_name.take().unwrap_or_else(|| ::std::string::String::new())
2030 }
2031
2032 pub fn get_producer_version(&self) -> &str {
2036 match self.producer_version.as_ref() {
2037 Some(v) => &v,
2038 None => "",
2039 }
2040 }
2041 pub fn clear_producer_version(&mut self) {
2042 self.producer_version.clear();
2043 }
2044
2045 pub fn has_producer_version(&self) -> bool {
2046 self.producer_version.is_some()
2047 }
2048
2049 pub fn set_producer_version(&mut self, v: ::std::string::String) {
2051 self.producer_version = ::protobuf::SingularField::some(v);
2052 }
2053
2054 pub fn mut_producer_version(&mut self) -> &mut ::std::string::String {
2057 if self.producer_version.is_none() {
2058 self.producer_version.set_default();
2059 }
2060 self.producer_version.as_mut().unwrap()
2061 }
2062
2063 pub fn take_producer_version(&mut self) -> ::std::string::String {
2065 self.producer_version.take().unwrap_or_else(|| ::std::string::String::new())
2066 }
2067
2068 pub fn get_domain(&self) -> &str {
2072 match self.domain.as_ref() {
2073 Some(v) => &v,
2074 None => "",
2075 }
2076 }
2077 pub fn clear_domain(&mut self) {
2078 self.domain.clear();
2079 }
2080
2081 pub fn has_domain(&self) -> bool {
2082 self.domain.is_some()
2083 }
2084
2085 pub fn set_domain(&mut self, v: ::std::string::String) {
2087 self.domain = ::protobuf::SingularField::some(v);
2088 }
2089
2090 pub fn mut_domain(&mut self) -> &mut ::std::string::String {
2093 if self.domain.is_none() {
2094 self.domain.set_default();
2095 }
2096 self.domain.as_mut().unwrap()
2097 }
2098
2099 pub fn take_domain(&mut self) -> ::std::string::String {
2101 self.domain.take().unwrap_or_else(|| ::std::string::String::new())
2102 }
2103
2104 pub fn get_model_version(&self) -> i64 {
2108 self.model_version.unwrap_or(0)
2109 }
2110 pub fn clear_model_version(&mut self) {
2111 self.model_version = ::std::option::Option::None;
2112 }
2113
2114 pub fn has_model_version(&self) -> bool {
2115 self.model_version.is_some()
2116 }
2117
2118 pub fn set_model_version(&mut self, v: i64) {
2120 self.model_version = ::std::option::Option::Some(v);
2121 }
2122
2123 pub fn get_doc_string(&self) -> &str {
2127 match self.doc_string.as_ref() {
2128 Some(v) => &v,
2129 None => "",
2130 }
2131 }
2132 pub fn clear_doc_string(&mut self) {
2133 self.doc_string.clear();
2134 }
2135
2136 pub fn has_doc_string(&self) -> bool {
2137 self.doc_string.is_some()
2138 }
2139
2140 pub fn set_doc_string(&mut self, v: ::std::string::String) {
2142 self.doc_string = ::protobuf::SingularField::some(v);
2143 }
2144
2145 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
2148 if self.doc_string.is_none() {
2149 self.doc_string.set_default();
2150 }
2151 self.doc_string.as_mut().unwrap()
2152 }
2153
2154 pub fn take_doc_string(&mut self) -> ::std::string::String {
2156 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
2157 }
2158
2159 pub fn get_graph(&self) -> &GraphProto {
2163 self.graph.as_ref().unwrap_or_else(|| <GraphProto as ::protobuf::Message>::default_instance())
2164 }
2165 pub fn clear_graph(&mut self) {
2166 self.graph.clear();
2167 }
2168
2169 pub fn has_graph(&self) -> bool {
2170 self.graph.is_some()
2171 }
2172
2173 pub fn set_graph(&mut self, v: GraphProto) {
2175 self.graph = ::protobuf::SingularPtrField::some(v);
2176 }
2177
2178 pub fn mut_graph(&mut self) -> &mut GraphProto {
2181 if self.graph.is_none() {
2182 self.graph.set_default();
2183 }
2184 self.graph.as_mut().unwrap()
2185 }
2186
2187 pub fn take_graph(&mut self) -> GraphProto {
2189 self.graph.take().unwrap_or_else(|| GraphProto::new())
2190 }
2191
2192 pub fn get_metadata_props(&self) -> &[StringStringEntryProto] {
2196 &self.metadata_props
2197 }
2198 pub fn clear_metadata_props(&mut self) {
2199 self.metadata_props.clear();
2200 }
2201
2202 pub fn set_metadata_props(&mut self, v: ::protobuf::RepeatedField<StringStringEntryProto>) {
2204 self.metadata_props = v;
2205 }
2206
2207 pub fn mut_metadata_props(&mut self) -> &mut ::protobuf::RepeatedField<StringStringEntryProto> {
2209 &mut self.metadata_props
2210 }
2211
2212 pub fn take_metadata_props(&mut self) -> ::protobuf::RepeatedField<StringStringEntryProto> {
2214 ::std::mem::replace(&mut self.metadata_props, ::protobuf::RepeatedField::new())
2215 }
2216
2217 pub fn get_training_info(&self) -> &[TrainingInfoProto] {
2221 &self.training_info
2222 }
2223 pub fn clear_training_info(&mut self) {
2224 self.training_info.clear();
2225 }
2226
2227 pub fn set_training_info(&mut self, v: ::protobuf::RepeatedField<TrainingInfoProto>) {
2229 self.training_info = v;
2230 }
2231
2232 pub fn mut_training_info(&mut self) -> &mut ::protobuf::RepeatedField<TrainingInfoProto> {
2234 &mut self.training_info
2235 }
2236
2237 pub fn take_training_info(&mut self) -> ::protobuf::RepeatedField<TrainingInfoProto> {
2239 ::std::mem::replace(&mut self.training_info, ::protobuf::RepeatedField::new())
2240 }
2241
2242 pub fn get_functions(&self) -> &[FunctionProto] {
2246 &self.functions
2247 }
2248 pub fn clear_functions(&mut self) {
2249 self.functions.clear();
2250 }
2251
2252 pub fn set_functions(&mut self, v: ::protobuf::RepeatedField<FunctionProto>) {
2254 self.functions = v;
2255 }
2256
2257 pub fn mut_functions(&mut self) -> &mut ::protobuf::RepeatedField<FunctionProto> {
2259 &mut self.functions
2260 }
2261
2262 pub fn take_functions(&mut self) -> ::protobuf::RepeatedField<FunctionProto> {
2264 ::std::mem::replace(&mut self.functions, ::protobuf::RepeatedField::new())
2265 }
2266}
2267
2268impl ::protobuf::Message for ModelProto {
2269 fn is_initialized(&self) -> bool {
2270 for v in &self.opset_import {
2271 if !v.is_initialized() {
2272 return false;
2273 }
2274 };
2275 for v in &self.graph {
2276 if !v.is_initialized() {
2277 return false;
2278 }
2279 };
2280 for v in &self.metadata_props {
2281 if !v.is_initialized() {
2282 return false;
2283 }
2284 };
2285 for v in &self.training_info {
2286 if !v.is_initialized() {
2287 return false;
2288 }
2289 };
2290 for v in &self.functions {
2291 if !v.is_initialized() {
2292 return false;
2293 }
2294 };
2295 true
2296 }
2297
2298 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2299 while !is.eof()? {
2300 let (field_number, wire_type) = is.read_tag_unpack()?;
2301 match field_number {
2302 1 => {
2303 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2304 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2305 }
2306 let tmp = is.read_int64()?;
2307 self.ir_version = ::std::option::Option::Some(tmp);
2308 },
2309 8 => {
2310 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.opset_import)?;
2311 },
2312 2 => {
2313 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.producer_name)?;
2314 },
2315 3 => {
2316 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.producer_version)?;
2317 },
2318 4 => {
2319 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.domain)?;
2320 },
2321 5 => {
2322 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2323 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2324 }
2325 let tmp = is.read_int64()?;
2326 self.model_version = ::std::option::Option::Some(tmp);
2327 },
2328 6 => {
2329 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
2330 },
2331 7 => {
2332 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.graph)?;
2333 },
2334 14 => {
2335 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata_props)?;
2336 },
2337 20 => {
2338 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.training_info)?;
2339 },
2340 25 => {
2341 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.functions)?;
2342 },
2343 _ => {
2344 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2345 },
2346 };
2347 }
2348 ::std::result::Result::Ok(())
2349 }
2350
2351 #[allow(unused_variables)]
2353 fn compute_size(&self) -> u32 {
2354 let mut my_size = 0;
2355 if let Some(v) = self.ir_version {
2356 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
2357 }
2358 for value in &self.opset_import {
2359 let len = value.compute_size();
2360 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2361 };
2362 if let Some(ref v) = self.producer_name.as_ref() {
2363 my_size += ::protobuf::rt::string_size(2, &v);
2364 }
2365 if let Some(ref v) = self.producer_version.as_ref() {
2366 my_size += ::protobuf::rt::string_size(3, &v);
2367 }
2368 if let Some(ref v) = self.domain.as_ref() {
2369 my_size += ::protobuf::rt::string_size(4, &v);
2370 }
2371 if let Some(v) = self.model_version {
2372 my_size += ::protobuf::rt::value_size(5, v, ::protobuf::wire_format::WireTypeVarint);
2373 }
2374 if let Some(ref v) = self.doc_string.as_ref() {
2375 my_size += ::protobuf::rt::string_size(6, &v);
2376 }
2377 if let Some(ref v) = self.graph.as_ref() {
2378 let len = v.compute_size();
2379 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2380 }
2381 for value in &self.metadata_props {
2382 let len = value.compute_size();
2383 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2384 };
2385 for value in &self.training_info {
2386 let len = value.compute_size();
2387 my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2388 };
2389 for value in &self.functions {
2390 let len = value.compute_size();
2391 my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2392 };
2393 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2394 self.cached_size.set(my_size);
2395 my_size
2396 }
2397
2398 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2399 if let Some(v) = self.ir_version {
2400 os.write_int64(1, v)?;
2401 }
2402 for v in &self.opset_import {
2403 os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2404 os.write_raw_varint32(v.get_cached_size())?;
2405 v.write_to_with_cached_sizes(os)?;
2406 };
2407 if let Some(ref v) = self.producer_name.as_ref() {
2408 os.write_string(2, &v)?;
2409 }
2410 if let Some(ref v) = self.producer_version.as_ref() {
2411 os.write_string(3, &v)?;
2412 }
2413 if let Some(ref v) = self.domain.as_ref() {
2414 os.write_string(4, &v)?;
2415 }
2416 if let Some(v) = self.model_version {
2417 os.write_int64(5, v)?;
2418 }
2419 if let Some(ref v) = self.doc_string.as_ref() {
2420 os.write_string(6, &v)?;
2421 }
2422 if let Some(ref v) = self.graph.as_ref() {
2423 os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2424 os.write_raw_varint32(v.get_cached_size())?;
2425 v.write_to_with_cached_sizes(os)?;
2426 }
2427 for v in &self.metadata_props {
2428 os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2429 os.write_raw_varint32(v.get_cached_size())?;
2430 v.write_to_with_cached_sizes(os)?;
2431 };
2432 for v in &self.training_info {
2433 os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2434 os.write_raw_varint32(v.get_cached_size())?;
2435 v.write_to_with_cached_sizes(os)?;
2436 };
2437 for v in &self.functions {
2438 os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2439 os.write_raw_varint32(v.get_cached_size())?;
2440 v.write_to_with_cached_sizes(os)?;
2441 };
2442 os.write_unknown_fields(self.get_unknown_fields())?;
2443 ::std::result::Result::Ok(())
2444 }
2445
2446 fn get_cached_size(&self) -> u32 {
2447 self.cached_size.get()
2448 }
2449
2450 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2451 &self.unknown_fields
2452 }
2453
2454 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2455 &mut self.unknown_fields
2456 }
2457
2458 fn as_any(&self) -> &dyn (::std::any::Any) {
2459 self as &dyn (::std::any::Any)
2460 }
2461 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2462 self as &mut dyn (::std::any::Any)
2463 }
2464 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2465 self
2466 }
2467
2468 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2469 Self::descriptor_static()
2470 }
2471
2472 fn new() -> ModelProto {
2473 ModelProto::new()
2474 }
2475
2476 fn default_instance() -> &'static ModelProto {
2477 static instance: ::protobuf::rt::LazyV2<ModelProto> = ::protobuf::rt::LazyV2::INIT;
2478 instance.get(ModelProto::new)
2479 }
2480}
2481
2482impl ::protobuf::Clear for ModelProto {
2483 fn clear(&mut self) {
2484 self.ir_version = ::std::option::Option::None;
2485 self.opset_import.clear();
2486 self.producer_name.clear();
2487 self.producer_version.clear();
2488 self.domain.clear();
2489 self.model_version = ::std::option::Option::None;
2490 self.doc_string.clear();
2491 self.graph.clear();
2492 self.metadata_props.clear();
2493 self.training_info.clear();
2494 self.functions.clear();
2495 self.unknown_fields.clear();
2496 }
2497}
2498
2499impl ::protobuf::reflect::ProtobufValue for ModelProto {
2500 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2501 ::protobuf::reflect::ReflectValueRef::Message(self)
2502 }
2503}
2504
2505#[derive(PartialEq,Clone,Default,Debug)]
2506pub struct StringStringEntryProto {
2507 key: ::protobuf::SingularField<::std::string::String>,
2509 value: ::protobuf::SingularField<::std::string::String>,
2510 pub unknown_fields: ::protobuf::UnknownFields,
2512 pub cached_size: ::protobuf::CachedSize,
2513}
2514
2515impl<'a> ::std::default::Default for &'a StringStringEntryProto {
2516 fn default() -> &'a StringStringEntryProto {
2517 <StringStringEntryProto as ::protobuf::Message>::default_instance()
2518 }
2519}
2520
2521impl StringStringEntryProto {
2522 pub fn new() -> StringStringEntryProto {
2523 ::std::default::Default::default()
2524 }
2525
2526 pub fn get_key(&self) -> &str {
2530 match self.key.as_ref() {
2531 Some(v) => &v,
2532 None => "",
2533 }
2534 }
2535 pub fn clear_key(&mut self) {
2536 self.key.clear();
2537 }
2538
2539 pub fn has_key(&self) -> bool {
2540 self.key.is_some()
2541 }
2542
2543 pub fn set_key(&mut self, v: ::std::string::String) {
2545 self.key = ::protobuf::SingularField::some(v);
2546 }
2547
2548 pub fn mut_key(&mut self) -> &mut ::std::string::String {
2551 if self.key.is_none() {
2552 self.key.set_default();
2553 }
2554 self.key.as_mut().unwrap()
2555 }
2556
2557 pub fn take_key(&mut self) -> ::std::string::String {
2559 self.key.take().unwrap_or_else(|| ::std::string::String::new())
2560 }
2561
2562 pub fn get_value(&self) -> &str {
2566 match self.value.as_ref() {
2567 Some(v) => &v,
2568 None => "",
2569 }
2570 }
2571 pub fn clear_value(&mut self) {
2572 self.value.clear();
2573 }
2574
2575 pub fn has_value(&self) -> bool {
2576 self.value.is_some()
2577 }
2578
2579 pub fn set_value(&mut self, v: ::std::string::String) {
2581 self.value = ::protobuf::SingularField::some(v);
2582 }
2583
2584 pub fn mut_value(&mut self) -> &mut ::std::string::String {
2587 if self.value.is_none() {
2588 self.value.set_default();
2589 }
2590 self.value.as_mut().unwrap()
2591 }
2592
2593 pub fn take_value(&mut self) -> ::std::string::String {
2595 self.value.take().unwrap_or_else(|| ::std::string::String::new())
2596 }
2597}
2598
2599impl ::protobuf::Message for StringStringEntryProto {
2600 fn is_initialized(&self) -> bool {
2601 true
2602 }
2603
2604 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2605 while !is.eof()? {
2606 let (field_number, wire_type) = is.read_tag_unpack()?;
2607 match field_number {
2608 1 => {
2609 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?;
2610 },
2611 2 => {
2612 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?;
2613 },
2614 _ => {
2615 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2616 },
2617 };
2618 }
2619 ::std::result::Result::Ok(())
2620 }
2621
2622 #[allow(unused_variables)]
2624 fn compute_size(&self) -> u32 {
2625 let mut my_size = 0;
2626 if let Some(ref v) = self.key.as_ref() {
2627 my_size += ::protobuf::rt::string_size(1, &v);
2628 }
2629 if let Some(ref v) = self.value.as_ref() {
2630 my_size += ::protobuf::rt::string_size(2, &v);
2631 }
2632 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2633 self.cached_size.set(my_size);
2634 my_size
2635 }
2636
2637 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2638 if let Some(ref v) = self.key.as_ref() {
2639 os.write_string(1, &v)?;
2640 }
2641 if let Some(ref v) = self.value.as_ref() {
2642 os.write_string(2, &v)?;
2643 }
2644 os.write_unknown_fields(self.get_unknown_fields())?;
2645 ::std::result::Result::Ok(())
2646 }
2647
2648 fn get_cached_size(&self) -> u32 {
2649 self.cached_size.get()
2650 }
2651
2652 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2653 &self.unknown_fields
2654 }
2655
2656 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2657 &mut self.unknown_fields
2658 }
2659
2660 fn as_any(&self) -> &dyn (::std::any::Any) {
2661 self as &dyn (::std::any::Any)
2662 }
2663 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2664 self as &mut dyn (::std::any::Any)
2665 }
2666 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2667 self
2668 }
2669
2670 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2671 Self::descriptor_static()
2672 }
2673
2674 fn new() -> StringStringEntryProto {
2675 StringStringEntryProto::new()
2676 }
2677
2678 fn default_instance() -> &'static StringStringEntryProto {
2679 static instance: ::protobuf::rt::LazyV2<StringStringEntryProto> = ::protobuf::rt::LazyV2::INIT;
2680 instance.get(StringStringEntryProto::new)
2681 }
2682}
2683
2684impl ::protobuf::Clear for StringStringEntryProto {
2685 fn clear(&mut self) {
2686 self.key.clear();
2687 self.value.clear();
2688 self.unknown_fields.clear();
2689 }
2690}
2691
2692impl ::protobuf::reflect::ProtobufValue for StringStringEntryProto {
2693 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2694 ::protobuf::reflect::ReflectValueRef::Message(self)
2695 }
2696}
2697
2698#[derive(PartialEq,Clone,Default,Debug)]
2699pub struct TensorAnnotation {
2700 tensor_name: ::protobuf::SingularField<::std::string::String>,
2702 pub quant_parameter_tensor_names: ::protobuf::RepeatedField<StringStringEntryProto>,
2703 pub unknown_fields: ::protobuf::UnknownFields,
2705 pub cached_size: ::protobuf::CachedSize,
2706}
2707
2708impl<'a> ::std::default::Default for &'a TensorAnnotation {
2709 fn default() -> &'a TensorAnnotation {
2710 <TensorAnnotation as ::protobuf::Message>::default_instance()
2711 }
2712}
2713
2714impl TensorAnnotation {
2715 pub fn new() -> TensorAnnotation {
2716 ::std::default::Default::default()
2717 }
2718
2719 pub fn get_tensor_name(&self) -> &str {
2723 match self.tensor_name.as_ref() {
2724 Some(v) => &v,
2725 None => "",
2726 }
2727 }
2728 pub fn clear_tensor_name(&mut self) {
2729 self.tensor_name.clear();
2730 }
2731
2732 pub fn has_tensor_name(&self) -> bool {
2733 self.tensor_name.is_some()
2734 }
2735
2736 pub fn set_tensor_name(&mut self, v: ::std::string::String) {
2738 self.tensor_name = ::protobuf::SingularField::some(v);
2739 }
2740
2741 pub fn mut_tensor_name(&mut self) -> &mut ::std::string::String {
2744 if self.tensor_name.is_none() {
2745 self.tensor_name.set_default();
2746 }
2747 self.tensor_name.as_mut().unwrap()
2748 }
2749
2750 pub fn take_tensor_name(&mut self) -> ::std::string::String {
2752 self.tensor_name.take().unwrap_or_else(|| ::std::string::String::new())
2753 }
2754
2755 pub fn get_quant_parameter_tensor_names(&self) -> &[StringStringEntryProto] {
2759 &self.quant_parameter_tensor_names
2760 }
2761 pub fn clear_quant_parameter_tensor_names(&mut self) {
2762 self.quant_parameter_tensor_names.clear();
2763 }
2764
2765 pub fn set_quant_parameter_tensor_names(&mut self, v: ::protobuf::RepeatedField<StringStringEntryProto>) {
2767 self.quant_parameter_tensor_names = v;
2768 }
2769
2770 pub fn mut_quant_parameter_tensor_names(&mut self) -> &mut ::protobuf::RepeatedField<StringStringEntryProto> {
2772 &mut self.quant_parameter_tensor_names
2773 }
2774
2775 pub fn take_quant_parameter_tensor_names(&mut self) -> ::protobuf::RepeatedField<StringStringEntryProto> {
2777 ::std::mem::replace(&mut self.quant_parameter_tensor_names, ::protobuf::RepeatedField::new())
2778 }
2779}
2780
2781impl ::protobuf::Message for TensorAnnotation {
2782 fn is_initialized(&self) -> bool {
2783 for v in &self.quant_parameter_tensor_names {
2784 if !v.is_initialized() {
2785 return false;
2786 }
2787 };
2788 true
2789 }
2790
2791 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2792 while !is.eof()? {
2793 let (field_number, wire_type) = is.read_tag_unpack()?;
2794 match field_number {
2795 1 => {
2796 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.tensor_name)?;
2797 },
2798 2 => {
2799 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.quant_parameter_tensor_names)?;
2800 },
2801 _ => {
2802 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2803 },
2804 };
2805 }
2806 ::std::result::Result::Ok(())
2807 }
2808
2809 #[allow(unused_variables)]
2811 fn compute_size(&self) -> u32 {
2812 let mut my_size = 0;
2813 if let Some(ref v) = self.tensor_name.as_ref() {
2814 my_size += ::protobuf::rt::string_size(1, &v);
2815 }
2816 for value in &self.quant_parameter_tensor_names {
2817 let len = value.compute_size();
2818 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2819 };
2820 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2821 self.cached_size.set(my_size);
2822 my_size
2823 }
2824
2825 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2826 if let Some(ref v) = self.tensor_name.as_ref() {
2827 os.write_string(1, &v)?;
2828 }
2829 for v in &self.quant_parameter_tensor_names {
2830 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2831 os.write_raw_varint32(v.get_cached_size())?;
2832 v.write_to_with_cached_sizes(os)?;
2833 };
2834 os.write_unknown_fields(self.get_unknown_fields())?;
2835 ::std::result::Result::Ok(())
2836 }
2837
2838 fn get_cached_size(&self) -> u32 {
2839 self.cached_size.get()
2840 }
2841
2842 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2843 &self.unknown_fields
2844 }
2845
2846 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2847 &mut self.unknown_fields
2848 }
2849
2850 fn as_any(&self) -> &dyn (::std::any::Any) {
2851 self as &dyn (::std::any::Any)
2852 }
2853 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2854 self as &mut dyn (::std::any::Any)
2855 }
2856 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2857 self
2858 }
2859
2860 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2861 Self::descriptor_static()
2862 }
2863
2864 fn new() -> TensorAnnotation {
2865 TensorAnnotation::new()
2866 }
2867
2868 fn default_instance() -> &'static TensorAnnotation {
2869 static instance: ::protobuf::rt::LazyV2<TensorAnnotation> = ::protobuf::rt::LazyV2::INIT;
2870 instance.get(TensorAnnotation::new)
2871 }
2872}
2873
2874impl ::protobuf::Clear for TensorAnnotation {
2875 fn clear(&mut self) {
2876 self.tensor_name.clear();
2877 self.quant_parameter_tensor_names.clear();
2878 self.unknown_fields.clear();
2879 }
2880}
2881
2882impl ::protobuf::reflect::ProtobufValue for TensorAnnotation {
2883 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2884 ::protobuf::reflect::ReflectValueRef::Message(self)
2885 }
2886}
2887
2888#[derive(PartialEq,Clone,Default,Debug)]
2889pub struct GraphProto {
2890 pub node: ::protobuf::RepeatedField<NodeProto>,
2892 name: ::protobuf::SingularField<::std::string::String>,
2893 pub initializer: ::protobuf::RepeatedField<TensorProto>,
2894 pub sparse_initializer: ::protobuf::RepeatedField<SparseTensorProto>,
2895 doc_string: ::protobuf::SingularField<::std::string::String>,
2896 pub input: ::protobuf::RepeatedField<ValueInfoProto>,
2897 pub output: ::protobuf::RepeatedField<ValueInfoProto>,
2898 pub value_info: ::protobuf::RepeatedField<ValueInfoProto>,
2899 pub quantization_annotation: ::protobuf::RepeatedField<TensorAnnotation>,
2900 pub unknown_fields: ::protobuf::UnknownFields,
2902 pub cached_size: ::protobuf::CachedSize,
2903}
2904
2905impl<'a> ::std::default::Default for &'a GraphProto {
2906 fn default() -> &'a GraphProto {
2907 <GraphProto as ::protobuf::Message>::default_instance()
2908 }
2909}
2910
2911impl GraphProto {
2912 pub fn new() -> GraphProto {
2913 ::std::default::Default::default()
2914 }
2915
2916 pub fn get_node(&self) -> &[NodeProto] {
2920 &self.node
2921 }
2922 pub fn clear_node(&mut self) {
2923 self.node.clear();
2924 }
2925
2926 pub fn set_node(&mut self, v: ::protobuf::RepeatedField<NodeProto>) {
2928 self.node = v;
2929 }
2930
2931 pub fn mut_node(&mut self) -> &mut ::protobuf::RepeatedField<NodeProto> {
2933 &mut self.node
2934 }
2935
2936 pub fn take_node(&mut self) -> ::protobuf::RepeatedField<NodeProto> {
2938 ::std::mem::replace(&mut self.node, ::protobuf::RepeatedField::new())
2939 }
2940
2941 pub fn get_name(&self) -> &str {
2945 match self.name.as_ref() {
2946 Some(v) => &v,
2947 None => "",
2948 }
2949 }
2950 pub fn clear_name(&mut self) {
2951 self.name.clear();
2952 }
2953
2954 pub fn has_name(&self) -> bool {
2955 self.name.is_some()
2956 }
2957
2958 pub fn set_name(&mut self, v: ::std::string::String) {
2960 self.name = ::protobuf::SingularField::some(v);
2961 }
2962
2963 pub fn mut_name(&mut self) -> &mut ::std::string::String {
2966 if self.name.is_none() {
2967 self.name.set_default();
2968 }
2969 self.name.as_mut().unwrap()
2970 }
2971
2972 pub fn take_name(&mut self) -> ::std::string::String {
2974 self.name.take().unwrap_or_else(|| ::std::string::String::new())
2975 }
2976
2977 pub fn get_initializer(&self) -> &[TensorProto] {
2981 &self.initializer
2982 }
2983 pub fn clear_initializer(&mut self) {
2984 self.initializer.clear();
2985 }
2986
2987 pub fn set_initializer(&mut self, v: ::protobuf::RepeatedField<TensorProto>) {
2989 self.initializer = v;
2990 }
2991
2992 pub fn mut_initializer(&mut self) -> &mut ::protobuf::RepeatedField<TensorProto> {
2994 &mut self.initializer
2995 }
2996
2997 pub fn take_initializer(&mut self) -> ::protobuf::RepeatedField<TensorProto> {
2999 ::std::mem::replace(&mut self.initializer, ::protobuf::RepeatedField::new())
3000 }
3001
3002 pub fn get_sparse_initializer(&self) -> &[SparseTensorProto] {
3006 &self.sparse_initializer
3007 }
3008 pub fn clear_sparse_initializer(&mut self) {
3009 self.sparse_initializer.clear();
3010 }
3011
3012 pub fn set_sparse_initializer(&mut self, v: ::protobuf::RepeatedField<SparseTensorProto>) {
3014 self.sparse_initializer = v;
3015 }
3016
3017 pub fn mut_sparse_initializer(&mut self) -> &mut ::protobuf::RepeatedField<SparseTensorProto> {
3019 &mut self.sparse_initializer
3020 }
3021
3022 pub fn take_sparse_initializer(&mut self) -> ::protobuf::RepeatedField<SparseTensorProto> {
3024 ::std::mem::replace(&mut self.sparse_initializer, ::protobuf::RepeatedField::new())
3025 }
3026
3027 pub fn get_doc_string(&self) -> &str {
3031 match self.doc_string.as_ref() {
3032 Some(v) => &v,
3033 None => "",
3034 }
3035 }
3036 pub fn clear_doc_string(&mut self) {
3037 self.doc_string.clear();
3038 }
3039
3040 pub fn has_doc_string(&self) -> bool {
3041 self.doc_string.is_some()
3042 }
3043
3044 pub fn set_doc_string(&mut self, v: ::std::string::String) {
3046 self.doc_string = ::protobuf::SingularField::some(v);
3047 }
3048
3049 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
3052 if self.doc_string.is_none() {
3053 self.doc_string.set_default();
3054 }
3055 self.doc_string.as_mut().unwrap()
3056 }
3057
3058 pub fn take_doc_string(&mut self) -> ::std::string::String {
3060 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
3061 }
3062
3063 pub fn get_input(&self) -> &[ValueInfoProto] {
3067 &self.input
3068 }
3069 pub fn clear_input(&mut self) {
3070 self.input.clear();
3071 }
3072
3073 pub fn set_input(&mut self, v: ::protobuf::RepeatedField<ValueInfoProto>) {
3075 self.input = v;
3076 }
3077
3078 pub fn mut_input(&mut self) -> &mut ::protobuf::RepeatedField<ValueInfoProto> {
3080 &mut self.input
3081 }
3082
3083 pub fn take_input(&mut self) -> ::protobuf::RepeatedField<ValueInfoProto> {
3085 ::std::mem::replace(&mut self.input, ::protobuf::RepeatedField::new())
3086 }
3087
3088 pub fn get_output(&self) -> &[ValueInfoProto] {
3092 &self.output
3093 }
3094 pub fn clear_output(&mut self) {
3095 self.output.clear();
3096 }
3097
3098 pub fn set_output(&mut self, v: ::protobuf::RepeatedField<ValueInfoProto>) {
3100 self.output = v;
3101 }
3102
3103 pub fn mut_output(&mut self) -> &mut ::protobuf::RepeatedField<ValueInfoProto> {
3105 &mut self.output
3106 }
3107
3108 pub fn take_output(&mut self) -> ::protobuf::RepeatedField<ValueInfoProto> {
3110 ::std::mem::replace(&mut self.output, ::protobuf::RepeatedField::new())
3111 }
3112
3113 pub fn get_value_info(&self) -> &[ValueInfoProto] {
3117 &self.value_info
3118 }
3119 pub fn clear_value_info(&mut self) {
3120 self.value_info.clear();
3121 }
3122
3123 pub fn set_value_info(&mut self, v: ::protobuf::RepeatedField<ValueInfoProto>) {
3125 self.value_info = v;
3126 }
3127
3128 pub fn mut_value_info(&mut self) -> &mut ::protobuf::RepeatedField<ValueInfoProto> {
3130 &mut self.value_info
3131 }
3132
3133 pub fn take_value_info(&mut self) -> ::protobuf::RepeatedField<ValueInfoProto> {
3135 ::std::mem::replace(&mut self.value_info, ::protobuf::RepeatedField::new())
3136 }
3137
3138 pub fn get_quantization_annotation(&self) -> &[TensorAnnotation] {
3142 &self.quantization_annotation
3143 }
3144 pub fn clear_quantization_annotation(&mut self) {
3145 self.quantization_annotation.clear();
3146 }
3147
3148 pub fn set_quantization_annotation(&mut self, v: ::protobuf::RepeatedField<TensorAnnotation>) {
3150 self.quantization_annotation = v;
3151 }
3152
3153 pub fn mut_quantization_annotation(&mut self) -> &mut ::protobuf::RepeatedField<TensorAnnotation> {
3155 &mut self.quantization_annotation
3156 }
3157
3158 pub fn take_quantization_annotation(&mut self) -> ::protobuf::RepeatedField<TensorAnnotation> {
3160 ::std::mem::replace(&mut self.quantization_annotation, ::protobuf::RepeatedField::new())
3161 }
3162}
3163
3164impl ::protobuf::Message for GraphProto {
3165 fn is_initialized(&self) -> bool {
3166 for v in &self.node {
3167 if !v.is_initialized() {
3168 return false;
3169 }
3170 };
3171 for v in &self.initializer {
3172 if !v.is_initialized() {
3173 return false;
3174 }
3175 };
3176 for v in &self.sparse_initializer {
3177 if !v.is_initialized() {
3178 return false;
3179 }
3180 };
3181 for v in &self.input {
3182 if !v.is_initialized() {
3183 return false;
3184 }
3185 };
3186 for v in &self.output {
3187 if !v.is_initialized() {
3188 return false;
3189 }
3190 };
3191 for v in &self.value_info {
3192 if !v.is_initialized() {
3193 return false;
3194 }
3195 };
3196 for v in &self.quantization_annotation {
3197 if !v.is_initialized() {
3198 return false;
3199 }
3200 };
3201 true
3202 }
3203
3204 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
3205 while !is.eof()? {
3206 let (field_number, wire_type) = is.read_tag_unpack()?;
3207 match field_number {
3208 1 => {
3209 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.node)?;
3210 },
3211 2 => {
3212 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
3213 },
3214 5 => {
3215 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.initializer)?;
3216 },
3217 15 => {
3218 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.sparse_initializer)?;
3219 },
3220 10 => {
3221 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
3222 },
3223 11 => {
3224 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.input)?;
3225 },
3226 12 => {
3227 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.output)?;
3228 },
3229 13 => {
3230 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.value_info)?;
3231 },
3232 14 => {
3233 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.quantization_annotation)?;
3234 },
3235 _ => {
3236 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
3237 },
3238 };
3239 }
3240 ::std::result::Result::Ok(())
3241 }
3242
3243 #[allow(unused_variables)]
3245 fn compute_size(&self) -> u32 {
3246 let mut my_size = 0;
3247 for value in &self.node {
3248 let len = value.compute_size();
3249 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3250 };
3251 if let Some(ref v) = self.name.as_ref() {
3252 my_size += ::protobuf::rt::string_size(2, &v);
3253 }
3254 for value in &self.initializer {
3255 let len = value.compute_size();
3256 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3257 };
3258 for value in &self.sparse_initializer {
3259 let len = value.compute_size();
3260 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3261 };
3262 if let Some(ref v) = self.doc_string.as_ref() {
3263 my_size += ::protobuf::rt::string_size(10, &v);
3264 }
3265 for value in &self.input {
3266 let len = value.compute_size();
3267 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3268 };
3269 for value in &self.output {
3270 let len = value.compute_size();
3271 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3272 };
3273 for value in &self.value_info {
3274 let len = value.compute_size();
3275 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3276 };
3277 for value in &self.quantization_annotation {
3278 let len = value.compute_size();
3279 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3280 };
3281 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
3282 self.cached_size.set(my_size);
3283 my_size
3284 }
3285
3286 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
3287 for v in &self.node {
3288 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3289 os.write_raw_varint32(v.get_cached_size())?;
3290 v.write_to_with_cached_sizes(os)?;
3291 };
3292 if let Some(ref v) = self.name.as_ref() {
3293 os.write_string(2, &v)?;
3294 }
3295 for v in &self.initializer {
3296 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3297 os.write_raw_varint32(v.get_cached_size())?;
3298 v.write_to_with_cached_sizes(os)?;
3299 };
3300 for v in &self.sparse_initializer {
3301 os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3302 os.write_raw_varint32(v.get_cached_size())?;
3303 v.write_to_with_cached_sizes(os)?;
3304 };
3305 if let Some(ref v) = self.doc_string.as_ref() {
3306 os.write_string(10, &v)?;
3307 }
3308 for v in &self.input {
3309 os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3310 os.write_raw_varint32(v.get_cached_size())?;
3311 v.write_to_with_cached_sizes(os)?;
3312 };
3313 for v in &self.output {
3314 os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3315 os.write_raw_varint32(v.get_cached_size())?;
3316 v.write_to_with_cached_sizes(os)?;
3317 };
3318 for v in &self.value_info {
3319 os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3320 os.write_raw_varint32(v.get_cached_size())?;
3321 v.write_to_with_cached_sizes(os)?;
3322 };
3323 for v in &self.quantization_annotation {
3324 os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3325 os.write_raw_varint32(v.get_cached_size())?;
3326 v.write_to_with_cached_sizes(os)?;
3327 };
3328 os.write_unknown_fields(self.get_unknown_fields())?;
3329 ::std::result::Result::Ok(())
3330 }
3331
3332 fn get_cached_size(&self) -> u32 {
3333 self.cached_size.get()
3334 }
3335
3336 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
3337 &self.unknown_fields
3338 }
3339
3340 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
3341 &mut self.unknown_fields
3342 }
3343
3344 fn as_any(&self) -> &dyn (::std::any::Any) {
3345 self as &dyn (::std::any::Any)
3346 }
3347 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3348 self as &mut dyn (::std::any::Any)
3349 }
3350 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
3351 self
3352 }
3353
3354 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
3355 Self::descriptor_static()
3356 }
3357
3358 fn new() -> GraphProto {
3359 GraphProto::new()
3360 }
3361
3362 fn default_instance() -> &'static GraphProto {
3363 static instance: ::protobuf::rt::LazyV2<GraphProto> = ::protobuf::rt::LazyV2::INIT;
3364 instance.get(GraphProto::new)
3365 }
3366}
3367
3368impl ::protobuf::Clear for GraphProto {
3369 fn clear(&mut self) {
3370 self.node.clear();
3371 self.name.clear();
3372 self.initializer.clear();
3373 self.sparse_initializer.clear();
3374 self.doc_string.clear();
3375 self.input.clear();
3376 self.output.clear();
3377 self.value_info.clear();
3378 self.quantization_annotation.clear();
3379 self.unknown_fields.clear();
3380 }
3381}
3382
3383impl ::protobuf::reflect::ProtobufValue for GraphProto {
3384 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
3385 ::protobuf::reflect::ReflectValueRef::Message(self)
3386 }
3387}
3388
3389#[derive(PartialEq,Clone,Default,Debug)]
3390pub struct TensorProto {
3391 pub dims: ::std::vec::Vec<i64>,
3393 data_type: ::std::option::Option<i32>,
3394 pub segment: ::protobuf::SingularPtrField<TensorProto_Segment>,
3395 pub float_data: ::std::vec::Vec<f32>,
3396 pub int32_data: ::std::vec::Vec<i32>,
3397 pub string_data: ::protobuf::RepeatedField<::std::vec::Vec<u8>>,
3398 pub int64_data: ::std::vec::Vec<i64>,
3399 name: ::protobuf::SingularField<::std::string::String>,
3400 doc_string: ::protobuf::SingularField<::std::string::String>,
3401 raw_data: ::protobuf::SingularField<::std::vec::Vec<u8>>,
3402 pub external_data: ::protobuf::RepeatedField<StringStringEntryProto>,
3403 data_location: ::std::option::Option<TensorProto_DataLocation>,
3404 pub double_data: ::std::vec::Vec<f64>,
3405 pub uint64_data: ::std::vec::Vec<u64>,
3406 pub unknown_fields: ::protobuf::UnknownFields,
3408 pub cached_size: ::protobuf::CachedSize,
3409}
3410
3411impl<'a> ::std::default::Default for &'a TensorProto {
3412 fn default() -> &'a TensorProto {
3413 <TensorProto as ::protobuf::Message>::default_instance()
3414 }
3415}
3416
3417impl TensorProto {
3418 pub fn new() -> TensorProto {
3419 ::std::default::Default::default()
3420 }
3421
3422 pub fn get_dims(&self) -> &[i64] {
3426 &self.dims
3427 }
3428 pub fn clear_dims(&mut self) {
3429 self.dims.clear();
3430 }
3431
3432 pub fn set_dims(&mut self, v: ::std::vec::Vec<i64>) {
3434 self.dims = v;
3435 }
3436
3437 pub fn mut_dims(&mut self) -> &mut ::std::vec::Vec<i64> {
3439 &mut self.dims
3440 }
3441
3442 pub fn take_dims(&mut self) -> ::std::vec::Vec<i64> {
3444 ::std::mem::replace(&mut self.dims, ::std::vec::Vec::new())
3445 }
3446
3447 pub fn get_data_type(&self) -> i32 {
3451 self.data_type.unwrap_or(0)
3452 }
3453 pub fn clear_data_type(&mut self) {
3454 self.data_type = ::std::option::Option::None;
3455 }
3456
3457 pub fn has_data_type(&self) -> bool {
3458 self.data_type.is_some()
3459 }
3460
3461 pub fn set_data_type(&mut self, v: i32) {
3463 self.data_type = ::std::option::Option::Some(v);
3464 }
3465
3466 pub fn get_segment(&self) -> &TensorProto_Segment {
3470 self.segment.as_ref().unwrap_or_else(|| <TensorProto_Segment as ::protobuf::Message>::default_instance())
3471 }
3472 pub fn clear_segment(&mut self) {
3473 self.segment.clear();
3474 }
3475
3476 pub fn has_segment(&self) -> bool {
3477 self.segment.is_some()
3478 }
3479
3480 pub fn set_segment(&mut self, v: TensorProto_Segment) {
3482 self.segment = ::protobuf::SingularPtrField::some(v);
3483 }
3484
3485 pub fn mut_segment(&mut self) -> &mut TensorProto_Segment {
3488 if self.segment.is_none() {
3489 self.segment.set_default();
3490 }
3491 self.segment.as_mut().unwrap()
3492 }
3493
3494 pub fn take_segment(&mut self) -> TensorProto_Segment {
3496 self.segment.take().unwrap_or_else(|| TensorProto_Segment::new())
3497 }
3498
3499 pub fn get_float_data(&self) -> &[f32] {
3503 &self.float_data
3504 }
3505 pub fn clear_float_data(&mut self) {
3506 self.float_data.clear();
3507 }
3508
3509 pub fn set_float_data(&mut self, v: ::std::vec::Vec<f32>) {
3511 self.float_data = v;
3512 }
3513
3514 pub fn mut_float_data(&mut self) -> &mut ::std::vec::Vec<f32> {
3516 &mut self.float_data
3517 }
3518
3519 pub fn take_float_data(&mut self) -> ::std::vec::Vec<f32> {
3521 ::std::mem::replace(&mut self.float_data, ::std::vec::Vec::new())
3522 }
3523
3524 pub fn get_int32_data(&self) -> &[i32] {
3528 &self.int32_data
3529 }
3530 pub fn clear_int32_data(&mut self) {
3531 self.int32_data.clear();
3532 }
3533
3534 pub fn set_int32_data(&mut self, v: ::std::vec::Vec<i32>) {
3536 self.int32_data = v;
3537 }
3538
3539 pub fn mut_int32_data(&mut self) -> &mut ::std::vec::Vec<i32> {
3541 &mut self.int32_data
3542 }
3543
3544 pub fn take_int32_data(&mut self) -> ::std::vec::Vec<i32> {
3546 ::std::mem::replace(&mut self.int32_data, ::std::vec::Vec::new())
3547 }
3548
3549 pub fn get_string_data(&self) -> &[::std::vec::Vec<u8>] {
3553 &self.string_data
3554 }
3555 pub fn clear_string_data(&mut self) {
3556 self.string_data.clear();
3557 }
3558
3559 pub fn set_string_data(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec<u8>>) {
3561 self.string_data = v;
3562 }
3563
3564 pub fn mut_string_data(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
3566 &mut self.string_data
3567 }
3568
3569 pub fn take_string_data(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
3571 ::std::mem::replace(&mut self.string_data, ::protobuf::RepeatedField::new())
3572 }
3573
3574 pub fn get_int64_data(&self) -> &[i64] {
3578 &self.int64_data
3579 }
3580 pub fn clear_int64_data(&mut self) {
3581 self.int64_data.clear();
3582 }
3583
3584 pub fn set_int64_data(&mut self, v: ::std::vec::Vec<i64>) {
3586 self.int64_data = v;
3587 }
3588
3589 pub fn mut_int64_data(&mut self) -> &mut ::std::vec::Vec<i64> {
3591 &mut self.int64_data
3592 }
3593
3594 pub fn take_int64_data(&mut self) -> ::std::vec::Vec<i64> {
3596 ::std::mem::replace(&mut self.int64_data, ::std::vec::Vec::new())
3597 }
3598
3599 pub fn get_name(&self) -> &str {
3603 match self.name.as_ref() {
3604 Some(v) => &v,
3605 None => "",
3606 }
3607 }
3608 pub fn clear_name(&mut self) {
3609 self.name.clear();
3610 }
3611
3612 pub fn has_name(&self) -> bool {
3613 self.name.is_some()
3614 }
3615
3616 pub fn set_name(&mut self, v: ::std::string::String) {
3618 self.name = ::protobuf::SingularField::some(v);
3619 }
3620
3621 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3624 if self.name.is_none() {
3625 self.name.set_default();
3626 }
3627 self.name.as_mut().unwrap()
3628 }
3629
3630 pub fn take_name(&mut self) -> ::std::string::String {
3632 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3633 }
3634
3635 pub fn get_doc_string(&self) -> &str {
3639 match self.doc_string.as_ref() {
3640 Some(v) => &v,
3641 None => "",
3642 }
3643 }
3644 pub fn clear_doc_string(&mut self) {
3645 self.doc_string.clear();
3646 }
3647
3648 pub fn has_doc_string(&self) -> bool {
3649 self.doc_string.is_some()
3650 }
3651
3652 pub fn set_doc_string(&mut self, v: ::std::string::String) {
3654 self.doc_string = ::protobuf::SingularField::some(v);
3655 }
3656
3657 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
3660 if self.doc_string.is_none() {
3661 self.doc_string.set_default();
3662 }
3663 self.doc_string.as_mut().unwrap()
3664 }
3665
3666 pub fn take_doc_string(&mut self) -> ::std::string::String {
3668 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
3669 }
3670
3671 pub fn get_raw_data(&self) -> &[u8] {
3675 match self.raw_data.as_ref() {
3676 Some(v) => &v,
3677 None => &[],
3678 }
3679 }
3680 pub fn clear_raw_data(&mut self) {
3681 self.raw_data.clear();
3682 }
3683
3684 pub fn has_raw_data(&self) -> bool {
3685 self.raw_data.is_some()
3686 }
3687
3688 pub fn set_raw_data(&mut self, v: ::std::vec::Vec<u8>) {
3690 self.raw_data = ::protobuf::SingularField::some(v);
3691 }
3692
3693 pub fn mut_raw_data(&mut self) -> &mut ::std::vec::Vec<u8> {
3696 if self.raw_data.is_none() {
3697 self.raw_data.set_default();
3698 }
3699 self.raw_data.as_mut().unwrap()
3700 }
3701
3702 pub fn take_raw_data(&mut self) -> ::std::vec::Vec<u8> {
3704 self.raw_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
3705 }
3706
3707 pub fn get_external_data(&self) -> &[StringStringEntryProto] {
3711 &self.external_data
3712 }
3713 pub fn clear_external_data(&mut self) {
3714 self.external_data.clear();
3715 }
3716
3717 pub fn set_external_data(&mut self, v: ::protobuf::RepeatedField<StringStringEntryProto>) {
3719 self.external_data = v;
3720 }
3721
3722 pub fn mut_external_data(&mut self) -> &mut ::protobuf::RepeatedField<StringStringEntryProto> {
3724 &mut self.external_data
3725 }
3726
3727 pub fn take_external_data(&mut self) -> ::protobuf::RepeatedField<StringStringEntryProto> {
3729 ::std::mem::replace(&mut self.external_data, ::protobuf::RepeatedField::new())
3730 }
3731
3732 pub fn get_data_location(&self) -> TensorProto_DataLocation {
3736 self.data_location.unwrap_or(TensorProto_DataLocation::DEFAULT)
3737 }
3738 pub fn clear_data_location(&mut self) {
3739 self.data_location = ::std::option::Option::None;
3740 }
3741
3742 pub fn has_data_location(&self) -> bool {
3743 self.data_location.is_some()
3744 }
3745
3746 pub fn set_data_location(&mut self, v: TensorProto_DataLocation) {
3748 self.data_location = ::std::option::Option::Some(v);
3749 }
3750
3751 pub fn get_double_data(&self) -> &[f64] {
3755 &self.double_data
3756 }
3757 pub fn clear_double_data(&mut self) {
3758 self.double_data.clear();
3759 }
3760
3761 pub fn set_double_data(&mut self, v: ::std::vec::Vec<f64>) {
3763 self.double_data = v;
3764 }
3765
3766 pub fn mut_double_data(&mut self) -> &mut ::std::vec::Vec<f64> {
3768 &mut self.double_data
3769 }
3770
3771 pub fn take_double_data(&mut self) -> ::std::vec::Vec<f64> {
3773 ::std::mem::replace(&mut self.double_data, ::std::vec::Vec::new())
3774 }
3775
3776 pub fn get_uint64_data(&self) -> &[u64] {
3780 &self.uint64_data
3781 }
3782 pub fn clear_uint64_data(&mut self) {
3783 self.uint64_data.clear();
3784 }
3785
3786 pub fn set_uint64_data(&mut self, v: ::std::vec::Vec<u64>) {
3788 self.uint64_data = v;
3789 }
3790
3791 pub fn mut_uint64_data(&mut self) -> &mut ::std::vec::Vec<u64> {
3793 &mut self.uint64_data
3794 }
3795
3796 pub fn take_uint64_data(&mut self) -> ::std::vec::Vec<u64> {
3798 ::std::mem::replace(&mut self.uint64_data, ::std::vec::Vec::new())
3799 }
3800}
3801
3802impl ::protobuf::Message for TensorProto {
3803 fn is_initialized(&self) -> bool {
3804 for v in &self.segment {
3805 if !v.is_initialized() {
3806 return false;
3807 }
3808 };
3809 for v in &self.external_data {
3810 if !v.is_initialized() {
3811 return false;
3812 }
3813 };
3814 true
3815 }
3816
3817 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
3818 while !is.eof()? {
3819 let (field_number, wire_type) = is.read_tag_unpack()?;
3820 match field_number {
3821 1 => {
3822 ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.dims)?;
3823 },
3824 2 => {
3825 if wire_type != ::protobuf::wire_format::WireTypeVarint {
3826 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
3827 }
3828 let tmp = is.read_int32()?;
3829 self.data_type = ::std::option::Option::Some(tmp);
3830 },
3831 3 => {
3832 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.segment)?;
3833 },
3834 4 => {
3835 ::protobuf::rt::read_repeated_float_into(wire_type, is, &mut self.float_data)?;
3836 },
3837 5 => {
3838 ::protobuf::rt::read_repeated_int32_into(wire_type, is, &mut self.int32_data)?;
3839 },
3840 6 => {
3841 ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.string_data)?;
3842 },
3843 7 => {
3844 ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.int64_data)?;
3845 },
3846 8 => {
3847 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
3848 },
3849 12 => {
3850 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
3851 },
3852 9 => {
3853 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.raw_data)?;
3854 },
3855 13 => {
3856 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.external_data)?;
3857 },
3858 14 => {
3859 ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.data_location, 14, &mut self.unknown_fields)?
3860 },
3861 10 => {
3862 ::protobuf::rt::read_repeated_double_into(wire_type, is, &mut self.double_data)?;
3863 },
3864 11 => {
3865 ::protobuf::rt::read_repeated_uint64_into(wire_type, is, &mut self.uint64_data)?;
3866 },
3867 _ => {
3868 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
3869 },
3870 };
3871 }
3872 ::std::result::Result::Ok(())
3873 }
3874
3875 #[allow(unused_variables)]
3877 fn compute_size(&self) -> u32 {
3878 let mut my_size = 0;
3879 for value in &self.dims {
3880 my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint);
3881 };
3882 if let Some(v) = self.data_type {
3883 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
3884 }
3885 if let Some(ref v) = self.segment.as_ref() {
3886 let len = v.compute_size();
3887 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3888 }
3889 if !self.float_data.is_empty() {
3890 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size((self.float_data.len() * 4) as u32) + (self.float_data.len() * 4) as u32;
3891 }
3892 if !self.int32_data.is_empty() {
3893 my_size += ::protobuf::rt::vec_packed_varint_size(5, &self.int32_data);
3894 }
3895 for value in &self.string_data {
3896 my_size += ::protobuf::rt::bytes_size(6, &value);
3897 };
3898 if !self.int64_data.is_empty() {
3899 my_size += ::protobuf::rt::vec_packed_varint_size(7, &self.int64_data);
3900 }
3901 if let Some(ref v) = self.name.as_ref() {
3902 my_size += ::protobuf::rt::string_size(8, &v);
3903 }
3904 if let Some(ref v) = self.doc_string.as_ref() {
3905 my_size += ::protobuf::rt::string_size(12, &v);
3906 }
3907 if let Some(ref v) = self.raw_data.as_ref() {
3908 my_size += ::protobuf::rt::bytes_size(9, &v);
3909 }
3910 for value in &self.external_data {
3911 let len = value.compute_size();
3912 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
3913 };
3914 if let Some(v) = self.data_location {
3915 my_size += ::protobuf::rt::enum_size(14, v);
3916 }
3917 if !self.double_data.is_empty() {
3918 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size((self.double_data.len() * 8) as u32) + (self.double_data.len() * 8) as u32;
3919 }
3920 if !self.uint64_data.is_empty() {
3921 my_size += ::protobuf::rt::vec_packed_varint_size(11, &self.uint64_data);
3922 }
3923 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
3924 self.cached_size.set(my_size);
3925 my_size
3926 }
3927
3928 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
3929 for v in &self.dims {
3930 os.write_int64(1, *v)?;
3931 };
3932 if let Some(v) = self.data_type {
3933 os.write_int32(2, v)?;
3934 }
3935 if let Some(ref v) = self.segment.as_ref() {
3936 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3937 os.write_raw_varint32(v.get_cached_size())?;
3938 v.write_to_with_cached_sizes(os)?;
3939 }
3940 if !self.float_data.is_empty() {
3941 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3942 os.write_raw_varint32((self.float_data.len() * 4) as u32)?;
3944 for v in &self.float_data {
3945 os.write_float_no_tag(*v)?;
3946 };
3947 }
3948 if !self.int32_data.is_empty() {
3949 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3950 os.write_raw_varint32(::protobuf::rt::vec_packed_varint_data_size(&self.int32_data))?;
3952 for v in &self.int32_data {
3953 os.write_int32_no_tag(*v)?;
3954 };
3955 }
3956 for v in &self.string_data {
3957 os.write_bytes(6, &v)?;
3958 };
3959 if !self.int64_data.is_empty() {
3960 os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3961 os.write_raw_varint32(::protobuf::rt::vec_packed_varint_data_size(&self.int64_data))?;
3963 for v in &self.int64_data {
3964 os.write_int64_no_tag(*v)?;
3965 };
3966 }
3967 if let Some(ref v) = self.name.as_ref() {
3968 os.write_string(8, &v)?;
3969 }
3970 if let Some(ref v) = self.doc_string.as_ref() {
3971 os.write_string(12, &v)?;
3972 }
3973 if let Some(ref v) = self.raw_data.as_ref() {
3974 os.write_bytes(9, &v)?;
3975 }
3976 for v in &self.external_data {
3977 os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3978 os.write_raw_varint32(v.get_cached_size())?;
3979 v.write_to_with_cached_sizes(os)?;
3980 };
3981 if let Some(v) = self.data_location {
3982 os.write_enum(14, ::protobuf::ProtobufEnum::value(&v))?;
3983 }
3984 if !self.double_data.is_empty() {
3985 os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3986 os.write_raw_varint32((self.double_data.len() * 8) as u32)?;
3988 for v in &self.double_data {
3989 os.write_double_no_tag(*v)?;
3990 };
3991 }
3992 if !self.uint64_data.is_empty() {
3993 os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
3994 os.write_raw_varint32(::protobuf::rt::vec_packed_varint_data_size(&self.uint64_data))?;
3996 for v in &self.uint64_data {
3997 os.write_uint64_no_tag(*v)?;
3998 };
3999 }
4000 os.write_unknown_fields(self.get_unknown_fields())?;
4001 ::std::result::Result::Ok(())
4002 }
4003
4004 fn get_cached_size(&self) -> u32 {
4005 self.cached_size.get()
4006 }
4007
4008 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
4009 &self.unknown_fields
4010 }
4011
4012 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
4013 &mut self.unknown_fields
4014 }
4015
4016 fn as_any(&self) -> &dyn (::std::any::Any) {
4017 self as &dyn (::std::any::Any)
4018 }
4019 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4020 self as &mut dyn (::std::any::Any)
4021 }
4022 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
4023 self
4024 }
4025
4026 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
4027 Self::descriptor_static()
4028 }
4029
4030 fn new() -> TensorProto {
4031 TensorProto::new()
4032 }
4033
4034 fn default_instance() -> &'static TensorProto {
4035 static instance: ::protobuf::rt::LazyV2<TensorProto> = ::protobuf::rt::LazyV2::INIT;
4036 instance.get(TensorProto::new)
4037 }
4038}
4039
4040impl ::protobuf::Clear for TensorProto {
4041 fn clear(&mut self) {
4042 self.dims.clear();
4043 self.data_type = ::std::option::Option::None;
4044 self.segment.clear();
4045 self.float_data.clear();
4046 self.int32_data.clear();
4047 self.string_data.clear();
4048 self.int64_data.clear();
4049 self.name.clear();
4050 self.doc_string.clear();
4051 self.raw_data.clear();
4052 self.external_data.clear();
4053 self.data_location = ::std::option::Option::None;
4054 self.double_data.clear();
4055 self.uint64_data.clear();
4056 self.unknown_fields.clear();
4057 }
4058}
4059
4060impl ::protobuf::reflect::ProtobufValue for TensorProto {
4061 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4062 ::protobuf::reflect::ReflectValueRef::Message(self)
4063 }
4064}
4065
4066#[derive(PartialEq,Clone,Default,Debug)]
4067pub struct TensorProto_Segment {
4068 begin: ::std::option::Option<i64>,
4070 end: ::std::option::Option<i64>,
4071 pub unknown_fields: ::protobuf::UnknownFields,
4073 pub cached_size: ::protobuf::CachedSize,
4074}
4075
4076impl<'a> ::std::default::Default for &'a TensorProto_Segment {
4077 fn default() -> &'a TensorProto_Segment {
4078 <TensorProto_Segment as ::protobuf::Message>::default_instance()
4079 }
4080}
4081
4082impl TensorProto_Segment {
4083 pub fn new() -> TensorProto_Segment {
4084 ::std::default::Default::default()
4085 }
4086
4087 pub fn get_begin(&self) -> i64 {
4091 self.begin.unwrap_or(0)
4092 }
4093 pub fn clear_begin(&mut self) {
4094 self.begin = ::std::option::Option::None;
4095 }
4096
4097 pub fn has_begin(&self) -> bool {
4098 self.begin.is_some()
4099 }
4100
4101 pub fn set_begin(&mut self, v: i64) {
4103 self.begin = ::std::option::Option::Some(v);
4104 }
4105
4106 pub fn get_end(&self) -> i64 {
4110 self.end.unwrap_or(0)
4111 }
4112 pub fn clear_end(&mut self) {
4113 self.end = ::std::option::Option::None;
4114 }
4115
4116 pub fn has_end(&self) -> bool {
4117 self.end.is_some()
4118 }
4119
4120 pub fn set_end(&mut self, v: i64) {
4122 self.end = ::std::option::Option::Some(v);
4123 }
4124}
4125
4126impl ::protobuf::Message for TensorProto_Segment {
4127 fn is_initialized(&self) -> bool {
4128 true
4129 }
4130
4131 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4132 while !is.eof()? {
4133 let (field_number, wire_type) = is.read_tag_unpack()?;
4134 match field_number {
4135 1 => {
4136 if wire_type != ::protobuf::wire_format::WireTypeVarint {
4137 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
4138 }
4139 let tmp = is.read_int64()?;
4140 self.begin = ::std::option::Option::Some(tmp);
4141 },
4142 2 => {
4143 if wire_type != ::protobuf::wire_format::WireTypeVarint {
4144 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
4145 }
4146 let tmp = is.read_int64()?;
4147 self.end = ::std::option::Option::Some(tmp);
4148 },
4149 _ => {
4150 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
4151 },
4152 };
4153 }
4154 ::std::result::Result::Ok(())
4155 }
4156
4157 #[allow(unused_variables)]
4159 fn compute_size(&self) -> u32 {
4160 let mut my_size = 0;
4161 if let Some(v) = self.begin {
4162 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
4163 }
4164 if let Some(v) = self.end {
4165 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
4166 }
4167 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
4168 self.cached_size.set(my_size);
4169 my_size
4170 }
4171
4172 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4173 if let Some(v) = self.begin {
4174 os.write_int64(1, v)?;
4175 }
4176 if let Some(v) = self.end {
4177 os.write_int64(2, v)?;
4178 }
4179 os.write_unknown_fields(self.get_unknown_fields())?;
4180 ::std::result::Result::Ok(())
4181 }
4182
4183 fn get_cached_size(&self) -> u32 {
4184 self.cached_size.get()
4185 }
4186
4187 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
4188 &self.unknown_fields
4189 }
4190
4191 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
4192 &mut self.unknown_fields
4193 }
4194
4195 fn as_any(&self) -> &dyn (::std::any::Any) {
4196 self as &dyn (::std::any::Any)
4197 }
4198 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4199 self as &mut dyn (::std::any::Any)
4200 }
4201 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
4202 self
4203 }
4204
4205 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
4206 Self::descriptor_static()
4207 }
4208
4209 fn new() -> TensorProto_Segment {
4210 TensorProto_Segment::new()
4211 }
4212
4213 fn default_instance() -> &'static TensorProto_Segment {
4214 static instance: ::protobuf::rt::LazyV2<TensorProto_Segment> = ::protobuf::rt::LazyV2::INIT;
4215 instance.get(TensorProto_Segment::new)
4216 }
4217}
4218
4219impl ::protobuf::Clear for TensorProto_Segment {
4220 fn clear(&mut self) {
4221 self.begin = ::std::option::Option::None;
4222 self.end = ::std::option::Option::None;
4223 self.unknown_fields.clear();
4224 }
4225}
4226
4227impl ::protobuf::reflect::ProtobufValue for TensorProto_Segment {
4228 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4229 ::protobuf::reflect::ReflectValueRef::Message(self)
4230 }
4231}
4232
4233#[derive(Clone,PartialEq,Eq,Debug,Hash)]
4234pub enum TensorProto_DataType {
4235 UNDEFINED = 0,
4236 FLOAT = 1,
4237 UINT8 = 2,
4238 INT8 = 3,
4239 UINT16 = 4,
4240 INT16 = 5,
4241 INT32 = 6,
4242 INT64 = 7,
4243 STRING = 8,
4244 BOOL = 9,
4245 FLOAT16 = 10,
4246 DOUBLE = 11,
4247 UINT32 = 12,
4248 UINT64 = 13,
4249 COMPLEX64 = 14,
4250 COMPLEX128 = 15,
4251 BFLOAT16 = 16,
4252}
4253
4254impl ::protobuf::ProtobufEnum for TensorProto_DataType {
4255 fn value(&self) -> i32 {
4256 *self as i32
4257 }
4258
4259 fn from_i32(value: i32) -> ::std::option::Option<TensorProto_DataType> {
4260 match value {
4261 0 => ::std::option::Option::Some(TensorProto_DataType::UNDEFINED),
4262 1 => ::std::option::Option::Some(TensorProto_DataType::FLOAT),
4263 2 => ::std::option::Option::Some(TensorProto_DataType::UINT8),
4264 3 => ::std::option::Option::Some(TensorProto_DataType::INT8),
4265 4 => ::std::option::Option::Some(TensorProto_DataType::UINT16),
4266 5 => ::std::option::Option::Some(TensorProto_DataType::INT16),
4267 6 => ::std::option::Option::Some(TensorProto_DataType::INT32),
4268 7 => ::std::option::Option::Some(TensorProto_DataType::INT64),
4269 8 => ::std::option::Option::Some(TensorProto_DataType::STRING),
4270 9 => ::std::option::Option::Some(TensorProto_DataType::BOOL),
4271 10 => ::std::option::Option::Some(TensorProto_DataType::FLOAT16),
4272 11 => ::std::option::Option::Some(TensorProto_DataType::DOUBLE),
4273 12 => ::std::option::Option::Some(TensorProto_DataType::UINT32),
4274 13 => ::std::option::Option::Some(TensorProto_DataType::UINT64),
4275 14 => ::std::option::Option::Some(TensorProto_DataType::COMPLEX64),
4276 15 => ::std::option::Option::Some(TensorProto_DataType::COMPLEX128),
4277 16 => ::std::option::Option::Some(TensorProto_DataType::BFLOAT16),
4278 _ => ::std::option::Option::None
4279 }
4280 }
4281
4282 fn values() -> &'static [Self] {
4283 static values: &'static [TensorProto_DataType] = &[
4284 TensorProto_DataType::UNDEFINED,
4285 TensorProto_DataType::FLOAT,
4286 TensorProto_DataType::UINT8,
4287 TensorProto_DataType::INT8,
4288 TensorProto_DataType::UINT16,
4289 TensorProto_DataType::INT16,
4290 TensorProto_DataType::INT32,
4291 TensorProto_DataType::INT64,
4292 TensorProto_DataType::STRING,
4293 TensorProto_DataType::BOOL,
4294 TensorProto_DataType::FLOAT16,
4295 TensorProto_DataType::DOUBLE,
4296 TensorProto_DataType::UINT32,
4297 TensorProto_DataType::UINT64,
4298 TensorProto_DataType::COMPLEX64,
4299 TensorProto_DataType::COMPLEX128,
4300 TensorProto_DataType::BFLOAT16,
4301 ];
4302 values
4303 }
4304}
4305
4306impl ::std::marker::Copy for TensorProto_DataType {
4307}
4308
4309impl ::std::default::Default for TensorProto_DataType {
4310 fn default() -> Self {
4311 TensorProto_DataType::UNDEFINED
4312 }
4313}
4314
4315impl ::protobuf::reflect::ProtobufValue for TensorProto_DataType {
4316 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4317 ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
4318 }
4319}
4320
4321#[derive(Clone,PartialEq,Eq,Debug,Hash)]
4322pub enum TensorProto_DataLocation {
4323 DEFAULT = 0,
4324 EXTERNAL = 1,
4325}
4326
4327impl ::protobuf::ProtobufEnum for TensorProto_DataLocation {
4328 fn value(&self) -> i32 {
4329 *self as i32
4330 }
4331
4332 fn from_i32(value: i32) -> ::std::option::Option<TensorProto_DataLocation> {
4333 match value {
4334 0 => ::std::option::Option::Some(TensorProto_DataLocation::DEFAULT),
4335 1 => ::std::option::Option::Some(TensorProto_DataLocation::EXTERNAL),
4336 _ => ::std::option::Option::None
4337 }
4338 }
4339
4340 fn values() -> &'static [Self] {
4341 static values: &'static [TensorProto_DataLocation] = &[
4342 TensorProto_DataLocation::DEFAULT,
4343 TensorProto_DataLocation::EXTERNAL,
4344 ];
4345 values
4346 }
4347}
4348
4349impl ::std::marker::Copy for TensorProto_DataLocation {
4350}
4351
4352impl ::std::default::Default for TensorProto_DataLocation {
4353 fn default() -> Self {
4354 TensorProto_DataLocation::DEFAULT
4355 }
4356}
4357
4358impl ::protobuf::reflect::ProtobufValue for TensorProto_DataLocation {
4359 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4360 ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
4361 }
4362}
4363
4364#[derive(PartialEq,Clone,Default,Debug)]
4365pub struct SparseTensorProto {
4366 pub values: ::protobuf::SingularPtrField<TensorProto>,
4368 pub indices: ::protobuf::SingularPtrField<TensorProto>,
4369 pub dims: ::std::vec::Vec<i64>,
4370 pub unknown_fields: ::protobuf::UnknownFields,
4372 pub cached_size: ::protobuf::CachedSize,
4373}
4374
4375impl<'a> ::std::default::Default for &'a SparseTensorProto {
4376 fn default() -> &'a SparseTensorProto {
4377 <SparseTensorProto as ::protobuf::Message>::default_instance()
4378 }
4379}
4380
4381impl SparseTensorProto {
4382 pub fn new() -> SparseTensorProto {
4383 ::std::default::Default::default()
4384 }
4385
4386 pub fn get_values(&self) -> &TensorProto {
4390 self.values.as_ref().unwrap_or_else(|| <TensorProto as ::protobuf::Message>::default_instance())
4391 }
4392 pub fn clear_values(&mut self) {
4393 self.values.clear();
4394 }
4395
4396 pub fn has_values(&self) -> bool {
4397 self.values.is_some()
4398 }
4399
4400 pub fn set_values(&mut self, v: TensorProto) {
4402 self.values = ::protobuf::SingularPtrField::some(v);
4403 }
4404
4405 pub fn mut_values(&mut self) -> &mut TensorProto {
4408 if self.values.is_none() {
4409 self.values.set_default();
4410 }
4411 self.values.as_mut().unwrap()
4412 }
4413
4414 pub fn take_values(&mut self) -> TensorProto {
4416 self.values.take().unwrap_or_else(|| TensorProto::new())
4417 }
4418
4419 pub fn get_indices(&self) -> &TensorProto {
4423 self.indices.as_ref().unwrap_or_else(|| <TensorProto as ::protobuf::Message>::default_instance())
4424 }
4425 pub fn clear_indices(&mut self) {
4426 self.indices.clear();
4427 }
4428
4429 pub fn has_indices(&self) -> bool {
4430 self.indices.is_some()
4431 }
4432
4433 pub fn set_indices(&mut self, v: TensorProto) {
4435 self.indices = ::protobuf::SingularPtrField::some(v);
4436 }
4437
4438 pub fn mut_indices(&mut self) -> &mut TensorProto {
4441 if self.indices.is_none() {
4442 self.indices.set_default();
4443 }
4444 self.indices.as_mut().unwrap()
4445 }
4446
4447 pub fn take_indices(&mut self) -> TensorProto {
4449 self.indices.take().unwrap_or_else(|| TensorProto::new())
4450 }
4451
4452 pub fn get_dims(&self) -> &[i64] {
4456 &self.dims
4457 }
4458 pub fn clear_dims(&mut self) {
4459 self.dims.clear();
4460 }
4461
4462 pub fn set_dims(&mut self, v: ::std::vec::Vec<i64>) {
4464 self.dims = v;
4465 }
4466
4467 pub fn mut_dims(&mut self) -> &mut ::std::vec::Vec<i64> {
4469 &mut self.dims
4470 }
4471
4472 pub fn take_dims(&mut self) -> ::std::vec::Vec<i64> {
4474 ::std::mem::replace(&mut self.dims, ::std::vec::Vec::new())
4475 }
4476}
4477
4478impl ::protobuf::Message for SparseTensorProto {
4479 fn is_initialized(&self) -> bool {
4480 for v in &self.values {
4481 if !v.is_initialized() {
4482 return false;
4483 }
4484 };
4485 for v in &self.indices {
4486 if !v.is_initialized() {
4487 return false;
4488 }
4489 };
4490 true
4491 }
4492
4493 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4494 while !is.eof()? {
4495 let (field_number, wire_type) = is.read_tag_unpack()?;
4496 match field_number {
4497 1 => {
4498 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.values)?;
4499 },
4500 2 => {
4501 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.indices)?;
4502 },
4503 3 => {
4504 ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.dims)?;
4505 },
4506 _ => {
4507 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
4508 },
4509 };
4510 }
4511 ::std::result::Result::Ok(())
4512 }
4513
4514 #[allow(unused_variables)]
4516 fn compute_size(&self) -> u32 {
4517 let mut my_size = 0;
4518 if let Some(ref v) = self.values.as_ref() {
4519 let len = v.compute_size();
4520 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
4521 }
4522 if let Some(ref v) = self.indices.as_ref() {
4523 let len = v.compute_size();
4524 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
4525 }
4526 for value in &self.dims {
4527 my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint);
4528 };
4529 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
4530 self.cached_size.set(my_size);
4531 my_size
4532 }
4533
4534 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4535 if let Some(ref v) = self.values.as_ref() {
4536 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
4537 os.write_raw_varint32(v.get_cached_size())?;
4538 v.write_to_with_cached_sizes(os)?;
4539 }
4540 if let Some(ref v) = self.indices.as_ref() {
4541 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
4542 os.write_raw_varint32(v.get_cached_size())?;
4543 v.write_to_with_cached_sizes(os)?;
4544 }
4545 for v in &self.dims {
4546 os.write_int64(3, *v)?;
4547 };
4548 os.write_unknown_fields(self.get_unknown_fields())?;
4549 ::std::result::Result::Ok(())
4550 }
4551
4552 fn get_cached_size(&self) -> u32 {
4553 self.cached_size.get()
4554 }
4555
4556 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
4557 &self.unknown_fields
4558 }
4559
4560 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
4561 &mut self.unknown_fields
4562 }
4563
4564 fn as_any(&self) -> &dyn (::std::any::Any) {
4565 self as &dyn (::std::any::Any)
4566 }
4567 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4568 self as &mut dyn (::std::any::Any)
4569 }
4570 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
4571 self
4572 }
4573
4574 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
4575 Self::descriptor_static()
4576 }
4577
4578 fn new() -> SparseTensorProto {
4579 SparseTensorProto::new()
4580 }
4581
4582 fn default_instance() -> &'static SparseTensorProto {
4583 static instance: ::protobuf::rt::LazyV2<SparseTensorProto> = ::protobuf::rt::LazyV2::INIT;
4584 instance.get(SparseTensorProto::new)
4585 }
4586}
4587
4588impl ::protobuf::Clear for SparseTensorProto {
4589 fn clear(&mut self) {
4590 self.values.clear();
4591 self.indices.clear();
4592 self.dims.clear();
4593 self.unknown_fields.clear();
4594 }
4595}
4596
4597impl ::protobuf::reflect::ProtobufValue for SparseTensorProto {
4598 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4599 ::protobuf::reflect::ReflectValueRef::Message(self)
4600 }
4601}
4602
4603#[derive(PartialEq,Clone,Default,Debug)]
4604pub struct TensorShapeProto {
4605 pub dim: ::protobuf::RepeatedField<TensorShapeProto_Dimension>,
4607 pub unknown_fields: ::protobuf::UnknownFields,
4609 pub cached_size: ::protobuf::CachedSize,
4610}
4611
4612impl<'a> ::std::default::Default for &'a TensorShapeProto {
4613 fn default() -> &'a TensorShapeProto {
4614 <TensorShapeProto as ::protobuf::Message>::default_instance()
4615 }
4616}
4617
4618impl TensorShapeProto {
4619 pub fn new() -> TensorShapeProto {
4620 ::std::default::Default::default()
4621 }
4622
4623 pub fn get_dim(&self) -> &[TensorShapeProto_Dimension] {
4627 &self.dim
4628 }
4629 pub fn clear_dim(&mut self) {
4630 self.dim.clear();
4631 }
4632
4633 pub fn set_dim(&mut self, v: ::protobuf::RepeatedField<TensorShapeProto_Dimension>) {
4635 self.dim = v;
4636 }
4637
4638 pub fn mut_dim(&mut self) -> &mut ::protobuf::RepeatedField<TensorShapeProto_Dimension> {
4640 &mut self.dim
4641 }
4642
4643 pub fn take_dim(&mut self) -> ::protobuf::RepeatedField<TensorShapeProto_Dimension> {
4645 ::std::mem::replace(&mut self.dim, ::protobuf::RepeatedField::new())
4646 }
4647}
4648
4649impl ::protobuf::Message for TensorShapeProto {
4650 fn is_initialized(&self) -> bool {
4651 for v in &self.dim {
4652 if !v.is_initialized() {
4653 return false;
4654 }
4655 };
4656 true
4657 }
4658
4659 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4660 while !is.eof()? {
4661 let (field_number, wire_type) = is.read_tag_unpack()?;
4662 match field_number {
4663 1 => {
4664 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.dim)?;
4665 },
4666 _ => {
4667 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
4668 },
4669 };
4670 }
4671 ::std::result::Result::Ok(())
4672 }
4673
4674 #[allow(unused_variables)]
4676 fn compute_size(&self) -> u32 {
4677 let mut my_size = 0;
4678 for value in &self.dim {
4679 let len = value.compute_size();
4680 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
4681 };
4682 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
4683 self.cached_size.set(my_size);
4684 my_size
4685 }
4686
4687 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4688 for v in &self.dim {
4689 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
4690 os.write_raw_varint32(v.get_cached_size())?;
4691 v.write_to_with_cached_sizes(os)?;
4692 };
4693 os.write_unknown_fields(self.get_unknown_fields())?;
4694 ::std::result::Result::Ok(())
4695 }
4696
4697 fn get_cached_size(&self) -> u32 {
4698 self.cached_size.get()
4699 }
4700
4701 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
4702 &self.unknown_fields
4703 }
4704
4705 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
4706 &mut self.unknown_fields
4707 }
4708
4709 fn as_any(&self) -> &dyn (::std::any::Any) {
4710 self as &dyn (::std::any::Any)
4711 }
4712 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4713 self as &mut dyn (::std::any::Any)
4714 }
4715 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
4716 self
4717 }
4718
4719 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
4720 Self::descriptor_static()
4721 }
4722
4723 fn new() -> TensorShapeProto {
4724 TensorShapeProto::new()
4725 }
4726
4727 fn default_instance() -> &'static TensorShapeProto {
4728 static instance: ::protobuf::rt::LazyV2<TensorShapeProto> = ::protobuf::rt::LazyV2::INIT;
4729 instance.get(TensorShapeProto::new)
4730 }
4731}
4732
4733impl ::protobuf::Clear for TensorShapeProto {
4734 fn clear(&mut self) {
4735 self.dim.clear();
4736 self.unknown_fields.clear();
4737 }
4738}
4739
4740impl ::protobuf::reflect::ProtobufValue for TensorShapeProto {
4741 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
4742 ::protobuf::reflect::ReflectValueRef::Message(self)
4743 }
4744}
4745
4746#[derive(PartialEq,Clone,Default,Debug)]
4747pub struct TensorShapeProto_Dimension {
4748 denotation: ::protobuf::SingularField<::std::string::String>,
4750 pub value: ::std::option::Option<TensorShapeProto_Dimension_oneof_value>,
4752 pub unknown_fields: ::protobuf::UnknownFields,
4754 pub cached_size: ::protobuf::CachedSize,
4755}
4756
4757impl<'a> ::std::default::Default for &'a TensorShapeProto_Dimension {
4758 fn default() -> &'a TensorShapeProto_Dimension {
4759 <TensorShapeProto_Dimension as ::protobuf::Message>::default_instance()
4760 }
4761}
4762
4763#[derive(Clone,PartialEq,Debug)]
4764pub enum TensorShapeProto_Dimension_oneof_value {
4765 dim_value(i64),
4766 dim_param(::std::string::String),
4767}
4768
4769impl TensorShapeProto_Dimension {
4770 pub fn new() -> TensorShapeProto_Dimension {
4771 ::std::default::Default::default()
4772 }
4773
4774 pub fn get_dim_value(&self) -> i64 {
4778 match self.value {
4779 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_value(v)) => v,
4780 _ => 0,
4781 }
4782 }
4783 pub fn clear_dim_value(&mut self) {
4784 self.value = ::std::option::Option::None;
4785 }
4786
4787 pub fn has_dim_value(&self) -> bool {
4788 match self.value {
4789 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_value(..)) => true,
4790 _ => false,
4791 }
4792 }
4793
4794 pub fn set_dim_value(&mut self, v: i64) {
4796 self.value = ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_value(v))
4797 }
4798
4799 pub fn get_dim_param(&self) -> &str {
4803 match self.value {
4804 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(ref v)) => v,
4805 _ => "",
4806 }
4807 }
4808 pub fn clear_dim_param(&mut self) {
4809 self.value = ::std::option::Option::None;
4810 }
4811
4812 pub fn has_dim_param(&self) -> bool {
4813 match self.value {
4814 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(..)) => true,
4815 _ => false,
4816 }
4817 }
4818
4819 pub fn set_dim_param(&mut self, v: ::std::string::String) {
4821 self.value = ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(v))
4822 }
4823
4824 pub fn mut_dim_param(&mut self) -> &mut ::std::string::String {
4826 if let ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(_)) = self.value {
4827 } else {
4828 self.value = ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(::std::string::String::new()));
4829 }
4830 match self.value {
4831 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(ref mut v)) => v,
4832 _ => panic!(),
4833 }
4834 }
4835
4836 pub fn take_dim_param(&mut self) -> ::std::string::String {
4838 if self.has_dim_param() {
4839 match self.value.take() {
4840 ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(v)) => v,
4841 _ => panic!(),
4842 }
4843 } else {
4844 ::std::string::String::new()
4845 }
4846 }
4847
4848 pub fn get_denotation(&self) -> &str {
4852 match self.denotation.as_ref() {
4853 Some(v) => &v,
4854 None => "",
4855 }
4856 }
4857 pub fn clear_denotation(&mut self) {
4858 self.denotation.clear();
4859 }
4860
4861 pub fn has_denotation(&self) -> bool {
4862 self.denotation.is_some()
4863 }
4864
4865 pub fn set_denotation(&mut self, v: ::std::string::String) {
4867 self.denotation = ::protobuf::SingularField::some(v);
4868 }
4869
4870 pub fn mut_denotation(&mut self) -> &mut ::std::string::String {
4873 if self.denotation.is_none() {
4874 self.denotation.set_default();
4875 }
4876 self.denotation.as_mut().unwrap()
4877 }
4878
4879 pub fn take_denotation(&mut self) -> ::std::string::String {
4881 self.denotation.take().unwrap_or_else(|| ::std::string::String::new())
4882 }
4883}
4884
4885impl ::protobuf::Message for TensorShapeProto_Dimension {
4886 fn is_initialized(&self) -> bool {
4887 true
4888 }
4889
4890 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4891 while !is.eof()? {
4892 let (field_number, wire_type) = is.read_tag_unpack()?;
4893 match field_number {
4894 1 => {
4895 if wire_type != ::protobuf::wire_format::WireTypeVarint {
4896 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
4897 }
4898 self.value = ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_value(is.read_int64()?));
4899 },
4900 2 => {
4901 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
4902 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
4903 }
4904 self.value = ::std::option::Option::Some(TensorShapeProto_Dimension_oneof_value::dim_param(is.read_string()?));
4905 },
4906 3 => {
4907 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.denotation)?;
4908 },
4909 _ => {
4910 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
4911 },
4912 };
4913 }
4914 ::std::result::Result::Ok(())
4915 }
4916
4917 #[allow(unused_variables)]
4919 fn compute_size(&self) -> u32 {
4920 let mut my_size = 0;
4921 if let Some(ref v) = self.denotation.as_ref() {
4922 my_size += ::protobuf::rt::string_size(3, &v);
4923 }
4924 if let ::std::option::Option::Some(ref v) = self.value {
4925 match v {
4926 &TensorShapeProto_Dimension_oneof_value::dim_value(v) => {
4927 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
4928 },
4929 &TensorShapeProto_Dimension_oneof_value::dim_param(ref v) => {
4930 my_size += ::protobuf::rt::string_size(2, &v);
4931 },
4932 };
4933 }
4934 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
4935 self.cached_size.set(my_size);
4936 my_size
4937 }
4938
4939 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
4940 if let Some(ref v) = self.denotation.as_ref() {
4941 os.write_string(3, &v)?;
4942 }
4943 if let ::std::option::Option::Some(ref v) = self.value {
4944 match v {
4945 &TensorShapeProto_Dimension_oneof_value::dim_value(v) => {
4946 os.write_int64(1, v)?;
4947 },
4948 &TensorShapeProto_Dimension_oneof_value::dim_param(ref v) => {
4949 os.write_string(2, v)?;
4950 },
4951 };
4952 }
4953 os.write_unknown_fields(self.get_unknown_fields())?;
4954 ::std::result::Result::Ok(())
4955 }
4956
4957 fn get_cached_size(&self) -> u32 {
4958 self.cached_size.get()
4959 }
4960
4961 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
4962 &self.unknown_fields
4963 }
4964
4965 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
4966 &mut self.unknown_fields
4967 }
4968
4969 fn as_any(&self) -> &dyn (::std::any::Any) {
4970 self as &dyn (::std::any::Any)
4971 }
4972 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4973 self as &mut dyn (::std::any::Any)
4974 }
4975 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
4976 self
4977 }
4978
4979 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
4980 Self::descriptor_static()
4981 }
4982
4983 fn new() -> TensorShapeProto_Dimension {
4984 TensorShapeProto_Dimension::new()
4985 }
4986
4987 fn default_instance() -> &'static TensorShapeProto_Dimension {
4988 static instance: ::protobuf::rt::LazyV2<TensorShapeProto_Dimension> = ::protobuf::rt::LazyV2::INIT;
4989 instance.get(TensorShapeProto_Dimension::new)
4990 }
4991}
4992
4993impl ::protobuf::Clear for TensorShapeProto_Dimension {
4994 fn clear(&mut self) {
4995 self.value = ::std::option::Option::None;
4996 self.value = ::std::option::Option::None;
4997 self.denotation.clear();
4998 self.unknown_fields.clear();
4999 }
5000}
5001
5002impl ::protobuf::reflect::ProtobufValue for TensorShapeProto_Dimension {
5003 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
5004 ::protobuf::reflect::ReflectValueRef::Message(self)
5005 }
5006}
5007
5008#[derive(PartialEq,Clone,Default,Debug)]
5009pub struct TypeProto {
5010 denotation: ::protobuf::SingularField<::std::string::String>,
5012 pub value: ::std::option::Option<TypeProto_oneof_value>,
5014 pub unknown_fields: ::protobuf::UnknownFields,
5016 pub cached_size: ::protobuf::CachedSize,
5017}
5018
5019impl<'a> ::std::default::Default for &'a TypeProto {
5020 fn default() -> &'a TypeProto {
5021 <TypeProto as ::protobuf::Message>::default_instance()
5022 }
5023}
5024
5025#[derive(Clone,PartialEq,Debug)]
5026pub enum TypeProto_oneof_value {
5027 tensor_type(TypeProto_Tensor),
5028 sequence_type(TypeProto_Sequence),
5029 map_type(TypeProto_Map),
5030 optional_type(TypeProto_Optional),
5031 sparse_tensor_type(TypeProto_SparseTensor),
5032}
5033
5034impl TypeProto {
5035 pub fn new() -> TypeProto {
5036 ::std::default::Default::default()
5037 }
5038
5039 pub fn get_tensor_type(&self) -> &TypeProto_Tensor {
5043 match self.value {
5044 ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(ref v)) => v,
5045 _ => <TypeProto_Tensor as ::protobuf::Message>::default_instance(),
5046 }
5047 }
5048 pub fn clear_tensor_type(&mut self) {
5049 self.value = ::std::option::Option::None;
5050 }
5051
5052 pub fn has_tensor_type(&self) -> bool {
5053 match self.value {
5054 ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(..)) => true,
5055 _ => false,
5056 }
5057 }
5058
5059 pub fn set_tensor_type(&mut self, v: TypeProto_Tensor) {
5061 self.value = ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(v))
5062 }
5063
5064 pub fn mut_tensor_type(&mut self) -> &mut TypeProto_Tensor {
5066 if let ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(_)) = self.value {
5067 } else {
5068 self.value = ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(TypeProto_Tensor::new()));
5069 }
5070 match self.value {
5071 ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(ref mut v)) => v,
5072 _ => panic!(),
5073 }
5074 }
5075
5076 pub fn take_tensor_type(&mut self) -> TypeProto_Tensor {
5078 if self.has_tensor_type() {
5079 match self.value.take() {
5080 ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(v)) => v,
5081 _ => panic!(),
5082 }
5083 } else {
5084 TypeProto_Tensor::new()
5085 }
5086 }
5087
5088 pub fn get_sequence_type(&self) -> &TypeProto_Sequence {
5092 match self.value {
5093 ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(ref v)) => v,
5094 _ => <TypeProto_Sequence as ::protobuf::Message>::default_instance(),
5095 }
5096 }
5097 pub fn clear_sequence_type(&mut self) {
5098 self.value = ::std::option::Option::None;
5099 }
5100
5101 pub fn has_sequence_type(&self) -> bool {
5102 match self.value {
5103 ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(..)) => true,
5104 _ => false,
5105 }
5106 }
5107
5108 pub fn set_sequence_type(&mut self, v: TypeProto_Sequence) {
5110 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(v))
5111 }
5112
5113 pub fn mut_sequence_type(&mut self) -> &mut TypeProto_Sequence {
5115 if let ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(_)) = self.value {
5116 } else {
5117 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(TypeProto_Sequence::new()));
5118 }
5119 match self.value {
5120 ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(ref mut v)) => v,
5121 _ => panic!(),
5122 }
5123 }
5124
5125 pub fn take_sequence_type(&mut self) -> TypeProto_Sequence {
5127 if self.has_sequence_type() {
5128 match self.value.take() {
5129 ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(v)) => v,
5130 _ => panic!(),
5131 }
5132 } else {
5133 TypeProto_Sequence::new()
5134 }
5135 }
5136
5137 pub fn get_map_type(&self) -> &TypeProto_Map {
5141 match self.value {
5142 ::std::option::Option::Some(TypeProto_oneof_value::map_type(ref v)) => v,
5143 _ => <TypeProto_Map as ::protobuf::Message>::default_instance(),
5144 }
5145 }
5146 pub fn clear_map_type(&mut self) {
5147 self.value = ::std::option::Option::None;
5148 }
5149
5150 pub fn has_map_type(&self) -> bool {
5151 match self.value {
5152 ::std::option::Option::Some(TypeProto_oneof_value::map_type(..)) => true,
5153 _ => false,
5154 }
5155 }
5156
5157 pub fn set_map_type(&mut self, v: TypeProto_Map) {
5159 self.value = ::std::option::Option::Some(TypeProto_oneof_value::map_type(v))
5160 }
5161
5162 pub fn mut_map_type(&mut self) -> &mut TypeProto_Map {
5164 if let ::std::option::Option::Some(TypeProto_oneof_value::map_type(_)) = self.value {
5165 } else {
5166 self.value = ::std::option::Option::Some(TypeProto_oneof_value::map_type(TypeProto_Map::new()));
5167 }
5168 match self.value {
5169 ::std::option::Option::Some(TypeProto_oneof_value::map_type(ref mut v)) => v,
5170 _ => panic!(),
5171 }
5172 }
5173
5174 pub fn take_map_type(&mut self) -> TypeProto_Map {
5176 if self.has_map_type() {
5177 match self.value.take() {
5178 ::std::option::Option::Some(TypeProto_oneof_value::map_type(v)) => v,
5179 _ => panic!(),
5180 }
5181 } else {
5182 TypeProto_Map::new()
5183 }
5184 }
5185
5186 pub fn get_optional_type(&self) -> &TypeProto_Optional {
5190 match self.value {
5191 ::std::option::Option::Some(TypeProto_oneof_value::optional_type(ref v)) => v,
5192 _ => <TypeProto_Optional as ::protobuf::Message>::default_instance(),
5193 }
5194 }
5195 pub fn clear_optional_type(&mut self) {
5196 self.value = ::std::option::Option::None;
5197 }
5198
5199 pub fn has_optional_type(&self) -> bool {
5200 match self.value {
5201 ::std::option::Option::Some(TypeProto_oneof_value::optional_type(..)) => true,
5202 _ => false,
5203 }
5204 }
5205
5206 pub fn set_optional_type(&mut self, v: TypeProto_Optional) {
5208 self.value = ::std::option::Option::Some(TypeProto_oneof_value::optional_type(v))
5209 }
5210
5211 pub fn mut_optional_type(&mut self) -> &mut TypeProto_Optional {
5213 if let ::std::option::Option::Some(TypeProto_oneof_value::optional_type(_)) = self.value {
5214 } else {
5215 self.value = ::std::option::Option::Some(TypeProto_oneof_value::optional_type(TypeProto_Optional::new()));
5216 }
5217 match self.value {
5218 ::std::option::Option::Some(TypeProto_oneof_value::optional_type(ref mut v)) => v,
5219 _ => panic!(),
5220 }
5221 }
5222
5223 pub fn take_optional_type(&mut self) -> TypeProto_Optional {
5225 if self.has_optional_type() {
5226 match self.value.take() {
5227 ::std::option::Option::Some(TypeProto_oneof_value::optional_type(v)) => v,
5228 _ => panic!(),
5229 }
5230 } else {
5231 TypeProto_Optional::new()
5232 }
5233 }
5234
5235 pub fn get_sparse_tensor_type(&self) -> &TypeProto_SparseTensor {
5239 match self.value {
5240 ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(ref v)) => v,
5241 _ => <TypeProto_SparseTensor as ::protobuf::Message>::default_instance(),
5242 }
5243 }
5244 pub fn clear_sparse_tensor_type(&mut self) {
5245 self.value = ::std::option::Option::None;
5246 }
5247
5248 pub fn has_sparse_tensor_type(&self) -> bool {
5249 match self.value {
5250 ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(..)) => true,
5251 _ => false,
5252 }
5253 }
5254
5255 pub fn set_sparse_tensor_type(&mut self, v: TypeProto_SparseTensor) {
5257 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(v))
5258 }
5259
5260 pub fn mut_sparse_tensor_type(&mut self) -> &mut TypeProto_SparseTensor {
5262 if let ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(_)) = self.value {
5263 } else {
5264 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(TypeProto_SparseTensor::new()));
5265 }
5266 match self.value {
5267 ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(ref mut v)) => v,
5268 _ => panic!(),
5269 }
5270 }
5271
5272 pub fn take_sparse_tensor_type(&mut self) -> TypeProto_SparseTensor {
5274 if self.has_sparse_tensor_type() {
5275 match self.value.take() {
5276 ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(v)) => v,
5277 _ => panic!(),
5278 }
5279 } else {
5280 TypeProto_SparseTensor::new()
5281 }
5282 }
5283
5284 pub fn get_denotation(&self) -> &str {
5288 match self.denotation.as_ref() {
5289 Some(v) => &v,
5290 None => "",
5291 }
5292 }
5293 pub fn clear_denotation(&mut self) {
5294 self.denotation.clear();
5295 }
5296
5297 pub fn has_denotation(&self) -> bool {
5298 self.denotation.is_some()
5299 }
5300
5301 pub fn set_denotation(&mut self, v: ::std::string::String) {
5303 self.denotation = ::protobuf::SingularField::some(v);
5304 }
5305
5306 pub fn mut_denotation(&mut self) -> &mut ::std::string::String {
5309 if self.denotation.is_none() {
5310 self.denotation.set_default();
5311 }
5312 self.denotation.as_mut().unwrap()
5313 }
5314
5315 pub fn take_denotation(&mut self) -> ::std::string::String {
5317 self.denotation.take().unwrap_or_else(|| ::std::string::String::new())
5318 }
5319}
5320
5321impl ::protobuf::Message for TypeProto {
5322 fn is_initialized(&self) -> bool {
5323 if let Some(TypeProto_oneof_value::tensor_type(ref v)) = self.value {
5324 if !v.is_initialized() {
5325 return false;
5326 }
5327 }
5328 if let Some(TypeProto_oneof_value::sequence_type(ref v)) = self.value {
5329 if !v.is_initialized() {
5330 return false;
5331 }
5332 }
5333 if let Some(TypeProto_oneof_value::map_type(ref v)) = self.value {
5334 if !v.is_initialized() {
5335 return false;
5336 }
5337 }
5338 if let Some(TypeProto_oneof_value::optional_type(ref v)) = self.value {
5339 if !v.is_initialized() {
5340 return false;
5341 }
5342 }
5343 if let Some(TypeProto_oneof_value::sparse_tensor_type(ref v)) = self.value {
5344 if !v.is_initialized() {
5345 return false;
5346 }
5347 }
5348 true
5349 }
5350
5351 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5352 while !is.eof()? {
5353 let (field_number, wire_type) = is.read_tag_unpack()?;
5354 match field_number {
5355 1 => {
5356 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
5357 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5358 }
5359 self.value = ::std::option::Option::Some(TypeProto_oneof_value::tensor_type(is.read_message()?));
5360 },
5361 4 => {
5362 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
5363 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5364 }
5365 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sequence_type(is.read_message()?));
5366 },
5367 5 => {
5368 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
5369 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5370 }
5371 self.value = ::std::option::Option::Some(TypeProto_oneof_value::map_type(is.read_message()?));
5372 },
5373 9 => {
5374 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
5375 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5376 }
5377 self.value = ::std::option::Option::Some(TypeProto_oneof_value::optional_type(is.read_message()?));
5378 },
5379 8 => {
5380 if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
5381 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5382 }
5383 self.value = ::std::option::Option::Some(TypeProto_oneof_value::sparse_tensor_type(is.read_message()?));
5384 },
5385 6 => {
5386 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.denotation)?;
5387 },
5388 _ => {
5389 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
5390 },
5391 };
5392 }
5393 ::std::result::Result::Ok(())
5394 }
5395
5396 #[allow(unused_variables)]
5398 fn compute_size(&self) -> u32 {
5399 let mut my_size = 0;
5400 if let Some(ref v) = self.denotation.as_ref() {
5401 my_size += ::protobuf::rt::string_size(6, &v);
5402 }
5403 if let ::std::option::Option::Some(ref v) = self.value {
5404 match v {
5405 &TypeProto_oneof_value::tensor_type(ref v) => {
5406 let len = v.compute_size();
5407 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5408 },
5409 &TypeProto_oneof_value::sequence_type(ref v) => {
5410 let len = v.compute_size();
5411 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5412 },
5413 &TypeProto_oneof_value::map_type(ref v) => {
5414 let len = v.compute_size();
5415 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5416 },
5417 &TypeProto_oneof_value::optional_type(ref v) => {
5418 let len = v.compute_size();
5419 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5420 },
5421 &TypeProto_oneof_value::sparse_tensor_type(ref v) => {
5422 let len = v.compute_size();
5423 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5424 },
5425 };
5426 }
5427 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
5428 self.cached_size.set(my_size);
5429 my_size
5430 }
5431
5432 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5433 if let Some(ref v) = self.denotation.as_ref() {
5434 os.write_string(6, &v)?;
5435 }
5436 if let ::std::option::Option::Some(ref v) = self.value {
5437 match v {
5438 &TypeProto_oneof_value::tensor_type(ref v) => {
5439 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5440 os.write_raw_varint32(v.get_cached_size())?;
5441 v.write_to_with_cached_sizes(os)?;
5442 },
5443 &TypeProto_oneof_value::sequence_type(ref v) => {
5444 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5445 os.write_raw_varint32(v.get_cached_size())?;
5446 v.write_to_with_cached_sizes(os)?;
5447 },
5448 &TypeProto_oneof_value::map_type(ref v) => {
5449 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5450 os.write_raw_varint32(v.get_cached_size())?;
5451 v.write_to_with_cached_sizes(os)?;
5452 },
5453 &TypeProto_oneof_value::optional_type(ref v) => {
5454 os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5455 os.write_raw_varint32(v.get_cached_size())?;
5456 v.write_to_with_cached_sizes(os)?;
5457 },
5458 &TypeProto_oneof_value::sparse_tensor_type(ref v) => {
5459 os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5460 os.write_raw_varint32(v.get_cached_size())?;
5461 v.write_to_with_cached_sizes(os)?;
5462 },
5463 };
5464 }
5465 os.write_unknown_fields(self.get_unknown_fields())?;
5466 ::std::result::Result::Ok(())
5467 }
5468
5469 fn get_cached_size(&self) -> u32 {
5470 self.cached_size.get()
5471 }
5472
5473 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
5474 &self.unknown_fields
5475 }
5476
5477 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
5478 &mut self.unknown_fields
5479 }
5480
5481 fn as_any(&self) -> &dyn (::std::any::Any) {
5482 self as &dyn (::std::any::Any)
5483 }
5484 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5485 self as &mut dyn (::std::any::Any)
5486 }
5487 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
5488 self
5489 }
5490
5491 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
5492 Self::descriptor_static()
5493 }
5494
5495 fn new() -> TypeProto {
5496 TypeProto::new()
5497 }
5498
5499 fn default_instance() -> &'static TypeProto {
5500 static instance: ::protobuf::rt::LazyV2<TypeProto> = ::protobuf::rt::LazyV2::INIT;
5501 instance.get(TypeProto::new)
5502 }
5503}
5504
5505impl ::protobuf::Clear for TypeProto {
5506 fn clear(&mut self) {
5507 self.value = ::std::option::Option::None;
5508 self.value = ::std::option::Option::None;
5509 self.value = ::std::option::Option::None;
5510 self.value = ::std::option::Option::None;
5511 self.value = ::std::option::Option::None;
5512 self.denotation.clear();
5513 self.unknown_fields.clear();
5514 }
5515}
5516
5517impl ::protobuf::reflect::ProtobufValue for TypeProto {
5518 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
5519 ::protobuf::reflect::ReflectValueRef::Message(self)
5520 }
5521}
5522
5523#[derive(PartialEq,Clone,Default,Debug)]
5524pub struct TypeProto_Tensor {
5525 elem_type: ::std::option::Option<i32>,
5527 pub shape: ::protobuf::SingularPtrField<TensorShapeProto>,
5528 pub unknown_fields: ::protobuf::UnknownFields,
5530 pub cached_size: ::protobuf::CachedSize,
5531}
5532
5533impl<'a> ::std::default::Default for &'a TypeProto_Tensor {
5534 fn default() -> &'a TypeProto_Tensor {
5535 <TypeProto_Tensor as ::protobuf::Message>::default_instance()
5536 }
5537}
5538
5539impl TypeProto_Tensor {
5540 pub fn new() -> TypeProto_Tensor {
5541 ::std::default::Default::default()
5542 }
5543
5544 pub fn get_elem_type(&self) -> i32 {
5548 self.elem_type.unwrap_or(0)
5549 }
5550 pub fn clear_elem_type(&mut self) {
5551 self.elem_type = ::std::option::Option::None;
5552 }
5553
5554 pub fn has_elem_type(&self) -> bool {
5555 self.elem_type.is_some()
5556 }
5557
5558 pub fn set_elem_type(&mut self, v: i32) {
5560 self.elem_type = ::std::option::Option::Some(v);
5561 }
5562
5563 pub fn get_shape(&self) -> &TensorShapeProto {
5567 self.shape.as_ref().unwrap_or_else(|| <TensorShapeProto as ::protobuf::Message>::default_instance())
5568 }
5569 pub fn clear_shape(&mut self) {
5570 self.shape.clear();
5571 }
5572
5573 pub fn has_shape(&self) -> bool {
5574 self.shape.is_some()
5575 }
5576
5577 pub fn set_shape(&mut self, v: TensorShapeProto) {
5579 self.shape = ::protobuf::SingularPtrField::some(v);
5580 }
5581
5582 pub fn mut_shape(&mut self) -> &mut TensorShapeProto {
5585 if self.shape.is_none() {
5586 self.shape.set_default();
5587 }
5588 self.shape.as_mut().unwrap()
5589 }
5590
5591 pub fn take_shape(&mut self) -> TensorShapeProto {
5593 self.shape.take().unwrap_or_else(|| TensorShapeProto::new())
5594 }
5595}
5596
5597impl ::protobuf::Message for TypeProto_Tensor {
5598 fn is_initialized(&self) -> bool {
5599 for v in &self.shape {
5600 if !v.is_initialized() {
5601 return false;
5602 }
5603 };
5604 true
5605 }
5606
5607 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5608 while !is.eof()? {
5609 let (field_number, wire_type) = is.read_tag_unpack()?;
5610 match field_number {
5611 1 => {
5612 if wire_type != ::protobuf::wire_format::WireTypeVarint {
5613 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5614 }
5615 let tmp = is.read_int32()?;
5616 self.elem_type = ::std::option::Option::Some(tmp);
5617 },
5618 2 => {
5619 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shape)?;
5620 },
5621 _ => {
5622 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
5623 },
5624 };
5625 }
5626 ::std::result::Result::Ok(())
5627 }
5628
5629 #[allow(unused_variables)]
5631 fn compute_size(&self) -> u32 {
5632 let mut my_size = 0;
5633 if let Some(v) = self.elem_type {
5634 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
5635 }
5636 if let Some(ref v) = self.shape.as_ref() {
5637 let len = v.compute_size();
5638 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5639 }
5640 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
5641 self.cached_size.set(my_size);
5642 my_size
5643 }
5644
5645 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5646 if let Some(v) = self.elem_type {
5647 os.write_int32(1, v)?;
5648 }
5649 if let Some(ref v) = self.shape.as_ref() {
5650 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5651 os.write_raw_varint32(v.get_cached_size())?;
5652 v.write_to_with_cached_sizes(os)?;
5653 }
5654 os.write_unknown_fields(self.get_unknown_fields())?;
5655 ::std::result::Result::Ok(())
5656 }
5657
5658 fn get_cached_size(&self) -> u32 {
5659 self.cached_size.get()
5660 }
5661
5662 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
5663 &self.unknown_fields
5664 }
5665
5666 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
5667 &mut self.unknown_fields
5668 }
5669
5670 fn as_any(&self) -> &dyn (::std::any::Any) {
5671 self as &dyn (::std::any::Any)
5672 }
5673 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5674 self as &mut dyn (::std::any::Any)
5675 }
5676 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
5677 self
5678 }
5679
5680 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
5681 Self::descriptor_static()
5682 }
5683
5684 fn new() -> TypeProto_Tensor {
5685 TypeProto_Tensor::new()
5686 }
5687
5688 fn default_instance() -> &'static TypeProto_Tensor {
5689 static instance: ::protobuf::rt::LazyV2<TypeProto_Tensor> = ::protobuf::rt::LazyV2::INIT;
5690 instance.get(TypeProto_Tensor::new)
5691 }
5692}
5693
5694impl ::protobuf::Clear for TypeProto_Tensor {
5695 fn clear(&mut self) {
5696 self.elem_type = ::std::option::Option::None;
5697 self.shape.clear();
5698 self.unknown_fields.clear();
5699 }
5700}
5701
5702impl ::protobuf::reflect::ProtobufValue for TypeProto_Tensor {
5703 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
5704 ::protobuf::reflect::ReflectValueRef::Message(self)
5705 }
5706}
5707
5708#[derive(PartialEq,Clone,Default,Debug)]
5709pub struct TypeProto_Sequence {
5710 pub elem_type: ::protobuf::SingularPtrField<TypeProto>,
5712 pub unknown_fields: ::protobuf::UnknownFields,
5714 pub cached_size: ::protobuf::CachedSize,
5715}
5716
5717impl<'a> ::std::default::Default for &'a TypeProto_Sequence {
5718 fn default() -> &'a TypeProto_Sequence {
5719 <TypeProto_Sequence as ::protobuf::Message>::default_instance()
5720 }
5721}
5722
5723impl TypeProto_Sequence {
5724 pub fn new() -> TypeProto_Sequence {
5725 ::std::default::Default::default()
5726 }
5727
5728 pub fn get_elem_type(&self) -> &TypeProto {
5732 self.elem_type.as_ref().unwrap_or_else(|| <TypeProto as ::protobuf::Message>::default_instance())
5733 }
5734 pub fn clear_elem_type(&mut self) {
5735 self.elem_type.clear();
5736 }
5737
5738 pub fn has_elem_type(&self) -> bool {
5739 self.elem_type.is_some()
5740 }
5741
5742 pub fn set_elem_type(&mut self, v: TypeProto) {
5744 self.elem_type = ::protobuf::SingularPtrField::some(v);
5745 }
5746
5747 pub fn mut_elem_type(&mut self) -> &mut TypeProto {
5750 if self.elem_type.is_none() {
5751 self.elem_type.set_default();
5752 }
5753 self.elem_type.as_mut().unwrap()
5754 }
5755
5756 pub fn take_elem_type(&mut self) -> TypeProto {
5758 self.elem_type.take().unwrap_or_else(|| TypeProto::new())
5759 }
5760}
5761
5762impl ::protobuf::Message for TypeProto_Sequence {
5763 fn is_initialized(&self) -> bool {
5764 for v in &self.elem_type {
5765 if !v.is_initialized() {
5766 return false;
5767 }
5768 };
5769 true
5770 }
5771
5772 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5773 while !is.eof()? {
5774 let (field_number, wire_type) = is.read_tag_unpack()?;
5775 match field_number {
5776 1 => {
5777 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.elem_type)?;
5778 },
5779 _ => {
5780 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
5781 },
5782 };
5783 }
5784 ::std::result::Result::Ok(())
5785 }
5786
5787 #[allow(unused_variables)]
5789 fn compute_size(&self) -> u32 {
5790 let mut my_size = 0;
5791 if let Some(ref v) = self.elem_type.as_ref() {
5792 let len = v.compute_size();
5793 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5794 }
5795 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
5796 self.cached_size.set(my_size);
5797 my_size
5798 }
5799
5800 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5801 if let Some(ref v) = self.elem_type.as_ref() {
5802 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5803 os.write_raw_varint32(v.get_cached_size())?;
5804 v.write_to_with_cached_sizes(os)?;
5805 }
5806 os.write_unknown_fields(self.get_unknown_fields())?;
5807 ::std::result::Result::Ok(())
5808 }
5809
5810 fn get_cached_size(&self) -> u32 {
5811 self.cached_size.get()
5812 }
5813
5814 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
5815 &self.unknown_fields
5816 }
5817
5818 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
5819 &mut self.unknown_fields
5820 }
5821
5822 fn as_any(&self) -> &dyn (::std::any::Any) {
5823 self as &dyn (::std::any::Any)
5824 }
5825 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5826 self as &mut dyn (::std::any::Any)
5827 }
5828 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
5829 self
5830 }
5831
5832 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
5833 Self::descriptor_static()
5834 }
5835
5836 fn new() -> TypeProto_Sequence {
5837 TypeProto_Sequence::new()
5838 }
5839
5840 fn default_instance() -> &'static TypeProto_Sequence {
5841 static instance: ::protobuf::rt::LazyV2<TypeProto_Sequence> = ::protobuf::rt::LazyV2::INIT;
5842 instance.get(TypeProto_Sequence::new)
5843 }
5844}
5845
5846impl ::protobuf::Clear for TypeProto_Sequence {
5847 fn clear(&mut self) {
5848 self.elem_type.clear();
5849 self.unknown_fields.clear();
5850 }
5851}
5852
5853impl ::protobuf::reflect::ProtobufValue for TypeProto_Sequence {
5854 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
5855 ::protobuf::reflect::ReflectValueRef::Message(self)
5856 }
5857}
5858
5859#[derive(PartialEq,Clone,Default,Debug)]
5860pub struct TypeProto_Map {
5861 key_type: ::std::option::Option<i32>,
5863 pub value_type: ::protobuf::SingularPtrField<TypeProto>,
5864 pub unknown_fields: ::protobuf::UnknownFields,
5866 pub cached_size: ::protobuf::CachedSize,
5867}
5868
5869impl<'a> ::std::default::Default for &'a TypeProto_Map {
5870 fn default() -> &'a TypeProto_Map {
5871 <TypeProto_Map as ::protobuf::Message>::default_instance()
5872 }
5873}
5874
5875impl TypeProto_Map {
5876 pub fn new() -> TypeProto_Map {
5877 ::std::default::Default::default()
5878 }
5879
5880 pub fn get_key_type(&self) -> i32 {
5884 self.key_type.unwrap_or(0)
5885 }
5886 pub fn clear_key_type(&mut self) {
5887 self.key_type = ::std::option::Option::None;
5888 }
5889
5890 pub fn has_key_type(&self) -> bool {
5891 self.key_type.is_some()
5892 }
5893
5894 pub fn set_key_type(&mut self, v: i32) {
5896 self.key_type = ::std::option::Option::Some(v);
5897 }
5898
5899 pub fn get_value_type(&self) -> &TypeProto {
5903 self.value_type.as_ref().unwrap_or_else(|| <TypeProto as ::protobuf::Message>::default_instance())
5904 }
5905 pub fn clear_value_type(&mut self) {
5906 self.value_type.clear();
5907 }
5908
5909 pub fn has_value_type(&self) -> bool {
5910 self.value_type.is_some()
5911 }
5912
5913 pub fn set_value_type(&mut self, v: TypeProto) {
5915 self.value_type = ::protobuf::SingularPtrField::some(v);
5916 }
5917
5918 pub fn mut_value_type(&mut self) -> &mut TypeProto {
5921 if self.value_type.is_none() {
5922 self.value_type.set_default();
5923 }
5924 self.value_type.as_mut().unwrap()
5925 }
5926
5927 pub fn take_value_type(&mut self) -> TypeProto {
5929 self.value_type.take().unwrap_or_else(|| TypeProto::new())
5930 }
5931}
5932
5933impl ::protobuf::Message for TypeProto_Map {
5934 fn is_initialized(&self) -> bool {
5935 for v in &self.value_type {
5936 if !v.is_initialized() {
5937 return false;
5938 }
5939 };
5940 true
5941 }
5942
5943 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5944 while !is.eof()? {
5945 let (field_number, wire_type) = is.read_tag_unpack()?;
5946 match field_number {
5947 1 => {
5948 if wire_type != ::protobuf::wire_format::WireTypeVarint {
5949 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
5950 }
5951 let tmp = is.read_int32()?;
5952 self.key_type = ::std::option::Option::Some(tmp);
5953 },
5954 2 => {
5955 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.value_type)?;
5956 },
5957 _ => {
5958 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
5959 },
5960 };
5961 }
5962 ::std::result::Result::Ok(())
5963 }
5964
5965 #[allow(unused_variables)]
5967 fn compute_size(&self) -> u32 {
5968 let mut my_size = 0;
5969 if let Some(v) = self.key_type {
5970 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
5971 }
5972 if let Some(ref v) = self.value_type.as_ref() {
5973 let len = v.compute_size();
5974 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
5975 }
5976 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
5977 self.cached_size.set(my_size);
5978 my_size
5979 }
5980
5981 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
5982 if let Some(v) = self.key_type {
5983 os.write_int32(1, v)?;
5984 }
5985 if let Some(ref v) = self.value_type.as_ref() {
5986 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
5987 os.write_raw_varint32(v.get_cached_size())?;
5988 v.write_to_with_cached_sizes(os)?;
5989 }
5990 os.write_unknown_fields(self.get_unknown_fields())?;
5991 ::std::result::Result::Ok(())
5992 }
5993
5994 fn get_cached_size(&self) -> u32 {
5995 self.cached_size.get()
5996 }
5997
5998 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
5999 &self.unknown_fields
6000 }
6001
6002 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
6003 &mut self.unknown_fields
6004 }
6005
6006 fn as_any(&self) -> &dyn (::std::any::Any) {
6007 self as &dyn (::std::any::Any)
6008 }
6009 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6010 self as &mut dyn (::std::any::Any)
6011 }
6012 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
6013 self
6014 }
6015
6016 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
6017 Self::descriptor_static()
6018 }
6019
6020 fn new() -> TypeProto_Map {
6021 TypeProto_Map::new()
6022 }
6023
6024 fn default_instance() -> &'static TypeProto_Map {
6025 static instance: ::protobuf::rt::LazyV2<TypeProto_Map> = ::protobuf::rt::LazyV2::INIT;
6026 instance.get(TypeProto_Map::new)
6027 }
6028}
6029
6030impl ::protobuf::Clear for TypeProto_Map {
6031 fn clear(&mut self) {
6032 self.key_type = ::std::option::Option::None;
6033 self.value_type.clear();
6034 self.unknown_fields.clear();
6035 }
6036}
6037
6038impl ::protobuf::reflect::ProtobufValue for TypeProto_Map {
6039 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
6040 ::protobuf::reflect::ReflectValueRef::Message(self)
6041 }
6042}
6043
6044#[derive(PartialEq,Clone,Default,Debug)]
6045pub struct TypeProto_Optional {
6046 pub elem_type: ::protobuf::SingularPtrField<TypeProto>,
6048 pub unknown_fields: ::protobuf::UnknownFields,
6050 pub cached_size: ::protobuf::CachedSize,
6051}
6052
6053impl<'a> ::std::default::Default for &'a TypeProto_Optional {
6054 fn default() -> &'a TypeProto_Optional {
6055 <TypeProto_Optional as ::protobuf::Message>::default_instance()
6056 }
6057}
6058
6059impl TypeProto_Optional {
6060 pub fn new() -> TypeProto_Optional {
6061 ::std::default::Default::default()
6062 }
6063
6064 pub fn get_elem_type(&self) -> &TypeProto {
6068 self.elem_type.as_ref().unwrap_or_else(|| <TypeProto as ::protobuf::Message>::default_instance())
6069 }
6070 pub fn clear_elem_type(&mut self) {
6071 self.elem_type.clear();
6072 }
6073
6074 pub fn has_elem_type(&self) -> bool {
6075 self.elem_type.is_some()
6076 }
6077
6078 pub fn set_elem_type(&mut self, v: TypeProto) {
6080 self.elem_type = ::protobuf::SingularPtrField::some(v);
6081 }
6082
6083 pub fn mut_elem_type(&mut self) -> &mut TypeProto {
6086 if self.elem_type.is_none() {
6087 self.elem_type.set_default();
6088 }
6089 self.elem_type.as_mut().unwrap()
6090 }
6091
6092 pub fn take_elem_type(&mut self) -> TypeProto {
6094 self.elem_type.take().unwrap_or_else(|| TypeProto::new())
6095 }
6096}
6097
6098impl ::protobuf::Message for TypeProto_Optional {
6099 fn is_initialized(&self) -> bool {
6100 for v in &self.elem_type {
6101 if !v.is_initialized() {
6102 return false;
6103 }
6104 };
6105 true
6106 }
6107
6108 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6109 while !is.eof()? {
6110 let (field_number, wire_type) = is.read_tag_unpack()?;
6111 match field_number {
6112 1 => {
6113 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.elem_type)?;
6114 },
6115 _ => {
6116 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
6117 },
6118 };
6119 }
6120 ::std::result::Result::Ok(())
6121 }
6122
6123 #[allow(unused_variables)]
6125 fn compute_size(&self) -> u32 {
6126 let mut my_size = 0;
6127 if let Some(ref v) = self.elem_type.as_ref() {
6128 let len = v.compute_size();
6129 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
6130 }
6131 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
6132 self.cached_size.set(my_size);
6133 my_size
6134 }
6135
6136 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6137 if let Some(ref v) = self.elem_type.as_ref() {
6138 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
6139 os.write_raw_varint32(v.get_cached_size())?;
6140 v.write_to_with_cached_sizes(os)?;
6141 }
6142 os.write_unknown_fields(self.get_unknown_fields())?;
6143 ::std::result::Result::Ok(())
6144 }
6145
6146 fn get_cached_size(&self) -> u32 {
6147 self.cached_size.get()
6148 }
6149
6150 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
6151 &self.unknown_fields
6152 }
6153
6154 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
6155 &mut self.unknown_fields
6156 }
6157
6158 fn as_any(&self) -> &dyn (::std::any::Any) {
6159 self as &dyn (::std::any::Any)
6160 }
6161 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6162 self as &mut dyn (::std::any::Any)
6163 }
6164 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
6165 self
6166 }
6167
6168 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
6169 Self::descriptor_static()
6170 }
6171
6172 fn new() -> TypeProto_Optional {
6173 TypeProto_Optional::new()
6174 }
6175
6176 fn default_instance() -> &'static TypeProto_Optional {
6177 static instance: ::protobuf::rt::LazyV2<TypeProto_Optional> = ::protobuf::rt::LazyV2::INIT;
6178 instance.get(TypeProto_Optional::new)
6179 }
6180}
6181
6182impl ::protobuf::Clear for TypeProto_Optional {
6183 fn clear(&mut self) {
6184 self.elem_type.clear();
6185 self.unknown_fields.clear();
6186 }
6187}
6188
6189impl ::protobuf::reflect::ProtobufValue for TypeProto_Optional {
6190 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
6191 ::protobuf::reflect::ReflectValueRef::Message(self)
6192 }
6193}
6194
6195#[derive(PartialEq,Clone,Default,Debug)]
6196pub struct TypeProto_SparseTensor {
6197 elem_type: ::std::option::Option<i32>,
6199 pub shape: ::protobuf::SingularPtrField<TensorShapeProto>,
6200 pub unknown_fields: ::protobuf::UnknownFields,
6202 pub cached_size: ::protobuf::CachedSize,
6203}
6204
6205impl<'a> ::std::default::Default for &'a TypeProto_SparseTensor {
6206 fn default() -> &'a TypeProto_SparseTensor {
6207 <TypeProto_SparseTensor as ::protobuf::Message>::default_instance()
6208 }
6209}
6210
6211impl TypeProto_SparseTensor {
6212 pub fn new() -> TypeProto_SparseTensor {
6213 ::std::default::Default::default()
6214 }
6215
6216 pub fn get_elem_type(&self) -> i32 {
6220 self.elem_type.unwrap_or(0)
6221 }
6222 pub fn clear_elem_type(&mut self) {
6223 self.elem_type = ::std::option::Option::None;
6224 }
6225
6226 pub fn has_elem_type(&self) -> bool {
6227 self.elem_type.is_some()
6228 }
6229
6230 pub fn set_elem_type(&mut self, v: i32) {
6232 self.elem_type = ::std::option::Option::Some(v);
6233 }
6234
6235 pub fn get_shape(&self) -> &TensorShapeProto {
6239 self.shape.as_ref().unwrap_or_else(|| <TensorShapeProto as ::protobuf::Message>::default_instance())
6240 }
6241 pub fn clear_shape(&mut self) {
6242 self.shape.clear();
6243 }
6244
6245 pub fn has_shape(&self) -> bool {
6246 self.shape.is_some()
6247 }
6248
6249 pub fn set_shape(&mut self, v: TensorShapeProto) {
6251 self.shape = ::protobuf::SingularPtrField::some(v);
6252 }
6253
6254 pub fn mut_shape(&mut self) -> &mut TensorShapeProto {
6257 if self.shape.is_none() {
6258 self.shape.set_default();
6259 }
6260 self.shape.as_mut().unwrap()
6261 }
6262
6263 pub fn take_shape(&mut self) -> TensorShapeProto {
6265 self.shape.take().unwrap_or_else(|| TensorShapeProto::new())
6266 }
6267}
6268
6269impl ::protobuf::Message for TypeProto_SparseTensor {
6270 fn is_initialized(&self) -> bool {
6271 for v in &self.shape {
6272 if !v.is_initialized() {
6273 return false;
6274 }
6275 };
6276 true
6277 }
6278
6279 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6280 while !is.eof()? {
6281 let (field_number, wire_type) = is.read_tag_unpack()?;
6282 match field_number {
6283 1 => {
6284 if wire_type != ::protobuf::wire_format::WireTypeVarint {
6285 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
6286 }
6287 let tmp = is.read_int32()?;
6288 self.elem_type = ::std::option::Option::Some(tmp);
6289 },
6290 2 => {
6291 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shape)?;
6292 },
6293 _ => {
6294 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
6295 },
6296 };
6297 }
6298 ::std::result::Result::Ok(())
6299 }
6300
6301 #[allow(unused_variables)]
6303 fn compute_size(&self) -> u32 {
6304 let mut my_size = 0;
6305 if let Some(v) = self.elem_type {
6306 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
6307 }
6308 if let Some(ref v) = self.shape.as_ref() {
6309 let len = v.compute_size();
6310 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
6311 }
6312 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
6313 self.cached_size.set(my_size);
6314 my_size
6315 }
6316
6317 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6318 if let Some(v) = self.elem_type {
6319 os.write_int32(1, v)?;
6320 }
6321 if let Some(ref v) = self.shape.as_ref() {
6322 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
6323 os.write_raw_varint32(v.get_cached_size())?;
6324 v.write_to_with_cached_sizes(os)?;
6325 }
6326 os.write_unknown_fields(self.get_unknown_fields())?;
6327 ::std::result::Result::Ok(())
6328 }
6329
6330 fn get_cached_size(&self) -> u32 {
6331 self.cached_size.get()
6332 }
6333
6334 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
6335 &self.unknown_fields
6336 }
6337
6338 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
6339 &mut self.unknown_fields
6340 }
6341
6342 fn as_any(&self) -> &dyn (::std::any::Any) {
6343 self as &dyn (::std::any::Any)
6344 }
6345 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6346 self as &mut dyn (::std::any::Any)
6347 }
6348 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
6349 self
6350 }
6351
6352 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
6353 Self::descriptor_static()
6354 }
6355
6356 fn new() -> TypeProto_SparseTensor {
6357 TypeProto_SparseTensor::new()
6358 }
6359
6360 fn default_instance() -> &'static TypeProto_SparseTensor {
6361 static instance: ::protobuf::rt::LazyV2<TypeProto_SparseTensor> = ::protobuf::rt::LazyV2::INIT;
6362 instance.get(TypeProto_SparseTensor::new)
6363 }
6364}
6365
6366impl ::protobuf::Clear for TypeProto_SparseTensor {
6367 fn clear(&mut self) {
6368 self.elem_type = ::std::option::Option::None;
6369 self.shape.clear();
6370 self.unknown_fields.clear();
6371 }
6372}
6373
6374impl ::protobuf::reflect::ProtobufValue for TypeProto_SparseTensor {
6375 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
6376 ::protobuf::reflect::ReflectValueRef::Message(self)
6377 }
6378}
6379
6380#[derive(PartialEq,Clone,Default,Debug)]
6381pub struct OperatorSetIdProto {
6382 domain: ::protobuf::SingularField<::std::string::String>,
6384 version: ::std::option::Option<i64>,
6385 pub unknown_fields: ::protobuf::UnknownFields,
6387 pub cached_size: ::protobuf::CachedSize,
6388}
6389
6390impl<'a> ::std::default::Default for &'a OperatorSetIdProto {
6391 fn default() -> &'a OperatorSetIdProto {
6392 <OperatorSetIdProto as ::protobuf::Message>::default_instance()
6393 }
6394}
6395
6396impl OperatorSetIdProto {
6397 pub fn new() -> OperatorSetIdProto {
6398 ::std::default::Default::default()
6399 }
6400
6401 pub fn get_domain(&self) -> &str {
6405 match self.domain.as_ref() {
6406 Some(v) => &v,
6407 None => "",
6408 }
6409 }
6410 pub fn clear_domain(&mut self) {
6411 self.domain.clear();
6412 }
6413
6414 pub fn has_domain(&self) -> bool {
6415 self.domain.is_some()
6416 }
6417
6418 pub fn set_domain(&mut self, v: ::std::string::String) {
6420 self.domain = ::protobuf::SingularField::some(v);
6421 }
6422
6423 pub fn mut_domain(&mut self) -> &mut ::std::string::String {
6426 if self.domain.is_none() {
6427 self.domain.set_default();
6428 }
6429 self.domain.as_mut().unwrap()
6430 }
6431
6432 pub fn take_domain(&mut self) -> ::std::string::String {
6434 self.domain.take().unwrap_or_else(|| ::std::string::String::new())
6435 }
6436
6437 pub fn get_version(&self) -> i64 {
6441 self.version.unwrap_or(0)
6442 }
6443 pub fn clear_version(&mut self) {
6444 self.version = ::std::option::Option::None;
6445 }
6446
6447 pub fn has_version(&self) -> bool {
6448 self.version.is_some()
6449 }
6450
6451 pub fn set_version(&mut self, v: i64) {
6453 self.version = ::std::option::Option::Some(v);
6454 }
6455}
6456
6457impl ::protobuf::Message for OperatorSetIdProto {
6458 fn is_initialized(&self) -> bool {
6459 true
6460 }
6461
6462 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6463 while !is.eof()? {
6464 let (field_number, wire_type) = is.read_tag_unpack()?;
6465 match field_number {
6466 1 => {
6467 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.domain)?;
6468 },
6469 2 => {
6470 if wire_type != ::protobuf::wire_format::WireTypeVarint {
6471 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
6472 }
6473 let tmp = is.read_int64()?;
6474 self.version = ::std::option::Option::Some(tmp);
6475 },
6476 _ => {
6477 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
6478 },
6479 };
6480 }
6481 ::std::result::Result::Ok(())
6482 }
6483
6484 #[allow(unused_variables)]
6486 fn compute_size(&self) -> u32 {
6487 let mut my_size = 0;
6488 if let Some(ref v) = self.domain.as_ref() {
6489 my_size += ::protobuf::rt::string_size(1, &v);
6490 }
6491 if let Some(v) = self.version {
6492 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
6493 }
6494 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
6495 self.cached_size.set(my_size);
6496 my_size
6497 }
6498
6499 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6500 if let Some(ref v) = self.domain.as_ref() {
6501 os.write_string(1, &v)?;
6502 }
6503 if let Some(v) = self.version {
6504 os.write_int64(2, v)?;
6505 }
6506 os.write_unknown_fields(self.get_unknown_fields())?;
6507 ::std::result::Result::Ok(())
6508 }
6509
6510 fn get_cached_size(&self) -> u32 {
6511 self.cached_size.get()
6512 }
6513
6514 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
6515 &self.unknown_fields
6516 }
6517
6518 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
6519 &mut self.unknown_fields
6520 }
6521
6522 fn as_any(&self) -> &dyn (::std::any::Any) {
6523 self as &dyn (::std::any::Any)
6524 }
6525 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6526 self as &mut dyn (::std::any::Any)
6527 }
6528 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
6529 self
6530 }
6531
6532 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
6533 Self::descriptor_static()
6534 }
6535
6536 fn new() -> OperatorSetIdProto {
6537 OperatorSetIdProto::new()
6538 }
6539
6540 fn default_instance() -> &'static OperatorSetIdProto {
6541 static instance: ::protobuf::rt::LazyV2<OperatorSetIdProto> = ::protobuf::rt::LazyV2::INIT;
6542 instance.get(OperatorSetIdProto::new)
6543 }
6544}
6545
6546impl ::protobuf::Clear for OperatorSetIdProto {
6547 fn clear(&mut self) {
6548 self.domain.clear();
6549 self.version = ::std::option::Option::None;
6550 self.unknown_fields.clear();
6551 }
6552}
6553
6554impl ::protobuf::reflect::ProtobufValue for OperatorSetIdProto {
6555 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
6556 ::protobuf::reflect::ReflectValueRef::Message(self)
6557 }
6558}
6559
6560#[derive(PartialEq,Clone,Default,Debug)]
6561pub struct FunctionProto {
6562 name: ::protobuf::SingularField<::std::string::String>,
6564 pub input: ::protobuf::RepeatedField<::std::string::String>,
6565 pub output: ::protobuf::RepeatedField<::std::string::String>,
6566 pub attribute: ::protobuf::RepeatedField<::std::string::String>,
6567 pub node: ::protobuf::RepeatedField<NodeProto>,
6568 doc_string: ::protobuf::SingularField<::std::string::String>,
6569 pub opset_import: ::protobuf::RepeatedField<OperatorSetIdProto>,
6570 domain: ::protobuf::SingularField<::std::string::String>,
6571 pub unknown_fields: ::protobuf::UnknownFields,
6573 pub cached_size: ::protobuf::CachedSize,
6574}
6575
6576impl<'a> ::std::default::Default for &'a FunctionProto {
6577 fn default() -> &'a FunctionProto {
6578 <FunctionProto as ::protobuf::Message>::default_instance()
6579 }
6580}
6581
6582impl FunctionProto {
6583 pub fn new() -> FunctionProto {
6584 ::std::default::Default::default()
6585 }
6586
6587 pub fn get_name(&self) -> &str {
6591 match self.name.as_ref() {
6592 Some(v) => &v,
6593 None => "",
6594 }
6595 }
6596 pub fn clear_name(&mut self) {
6597 self.name.clear();
6598 }
6599
6600 pub fn has_name(&self) -> bool {
6601 self.name.is_some()
6602 }
6603
6604 pub fn set_name(&mut self, v: ::std::string::String) {
6606 self.name = ::protobuf::SingularField::some(v);
6607 }
6608
6609 pub fn mut_name(&mut self) -> &mut ::std::string::String {
6612 if self.name.is_none() {
6613 self.name.set_default();
6614 }
6615 self.name.as_mut().unwrap()
6616 }
6617
6618 pub fn take_name(&mut self) -> ::std::string::String {
6620 self.name.take().unwrap_or_else(|| ::std::string::String::new())
6621 }
6622
6623 pub fn get_input(&self) -> &[::std::string::String] {
6627 &self.input
6628 }
6629 pub fn clear_input(&mut self) {
6630 self.input.clear();
6631 }
6632
6633 pub fn set_input(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
6635 self.input = v;
6636 }
6637
6638 pub fn mut_input(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
6640 &mut self.input
6641 }
6642
6643 pub fn take_input(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
6645 ::std::mem::replace(&mut self.input, ::protobuf::RepeatedField::new())
6646 }
6647
6648 pub fn get_output(&self) -> &[::std::string::String] {
6652 &self.output
6653 }
6654 pub fn clear_output(&mut self) {
6655 self.output.clear();
6656 }
6657
6658 pub fn set_output(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
6660 self.output = v;
6661 }
6662
6663 pub fn mut_output(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
6665 &mut self.output
6666 }
6667
6668 pub fn take_output(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
6670 ::std::mem::replace(&mut self.output, ::protobuf::RepeatedField::new())
6671 }
6672
6673 pub fn get_attribute(&self) -> &[::std::string::String] {
6677 &self.attribute
6678 }
6679 pub fn clear_attribute(&mut self) {
6680 self.attribute.clear();
6681 }
6682
6683 pub fn set_attribute(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
6685 self.attribute = v;
6686 }
6687
6688 pub fn mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
6690 &mut self.attribute
6691 }
6692
6693 pub fn take_attribute(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
6695 ::std::mem::replace(&mut self.attribute, ::protobuf::RepeatedField::new())
6696 }
6697
6698 pub fn get_node(&self) -> &[NodeProto] {
6702 &self.node
6703 }
6704 pub fn clear_node(&mut self) {
6705 self.node.clear();
6706 }
6707
6708 pub fn set_node(&mut self, v: ::protobuf::RepeatedField<NodeProto>) {
6710 self.node = v;
6711 }
6712
6713 pub fn mut_node(&mut self) -> &mut ::protobuf::RepeatedField<NodeProto> {
6715 &mut self.node
6716 }
6717
6718 pub fn take_node(&mut self) -> ::protobuf::RepeatedField<NodeProto> {
6720 ::std::mem::replace(&mut self.node, ::protobuf::RepeatedField::new())
6721 }
6722
6723 pub fn get_doc_string(&self) -> &str {
6727 match self.doc_string.as_ref() {
6728 Some(v) => &v,
6729 None => "",
6730 }
6731 }
6732 pub fn clear_doc_string(&mut self) {
6733 self.doc_string.clear();
6734 }
6735
6736 pub fn has_doc_string(&self) -> bool {
6737 self.doc_string.is_some()
6738 }
6739
6740 pub fn set_doc_string(&mut self, v: ::std::string::String) {
6742 self.doc_string = ::protobuf::SingularField::some(v);
6743 }
6744
6745 pub fn mut_doc_string(&mut self) -> &mut ::std::string::String {
6748 if self.doc_string.is_none() {
6749 self.doc_string.set_default();
6750 }
6751 self.doc_string.as_mut().unwrap()
6752 }
6753
6754 pub fn take_doc_string(&mut self) -> ::std::string::String {
6756 self.doc_string.take().unwrap_or_else(|| ::std::string::String::new())
6757 }
6758
6759 pub fn get_opset_import(&self) -> &[OperatorSetIdProto] {
6763 &self.opset_import
6764 }
6765 pub fn clear_opset_import(&mut self) {
6766 self.opset_import.clear();
6767 }
6768
6769 pub fn set_opset_import(&mut self, v: ::protobuf::RepeatedField<OperatorSetIdProto>) {
6771 self.opset_import = v;
6772 }
6773
6774 pub fn mut_opset_import(&mut self) -> &mut ::protobuf::RepeatedField<OperatorSetIdProto> {
6776 &mut self.opset_import
6777 }
6778
6779 pub fn take_opset_import(&mut self) -> ::protobuf::RepeatedField<OperatorSetIdProto> {
6781 ::std::mem::replace(&mut self.opset_import, ::protobuf::RepeatedField::new())
6782 }
6783
6784 pub fn get_domain(&self) -> &str {
6788 match self.domain.as_ref() {
6789 Some(v) => &v,
6790 None => "",
6791 }
6792 }
6793 pub fn clear_domain(&mut self) {
6794 self.domain.clear();
6795 }
6796
6797 pub fn has_domain(&self) -> bool {
6798 self.domain.is_some()
6799 }
6800
6801 pub fn set_domain(&mut self, v: ::std::string::String) {
6803 self.domain = ::protobuf::SingularField::some(v);
6804 }
6805
6806 pub fn mut_domain(&mut self) -> &mut ::std::string::String {
6809 if self.domain.is_none() {
6810 self.domain.set_default();
6811 }
6812 self.domain.as_mut().unwrap()
6813 }
6814
6815 pub fn take_domain(&mut self) -> ::std::string::String {
6817 self.domain.take().unwrap_or_else(|| ::std::string::String::new())
6818 }
6819}
6820
6821impl ::protobuf::Message for FunctionProto {
6822 fn is_initialized(&self) -> bool {
6823 for v in &self.node {
6824 if !v.is_initialized() {
6825 return false;
6826 }
6827 };
6828 for v in &self.opset_import {
6829 if !v.is_initialized() {
6830 return false;
6831 }
6832 };
6833 true
6834 }
6835
6836 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6837 while !is.eof()? {
6838 let (field_number, wire_type) = is.read_tag_unpack()?;
6839 match field_number {
6840 1 => {
6841 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
6842 },
6843 4 => {
6844 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.input)?;
6845 },
6846 5 => {
6847 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.output)?;
6848 },
6849 6 => {
6850 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.attribute)?;
6851 },
6852 7 => {
6853 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.node)?;
6854 },
6855 8 => {
6856 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.doc_string)?;
6857 },
6858 9 => {
6859 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.opset_import)?;
6860 },
6861 10 => {
6862 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.domain)?;
6863 },
6864 _ => {
6865 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
6866 },
6867 };
6868 }
6869 ::std::result::Result::Ok(())
6870 }
6871
6872 #[allow(unused_variables)]
6874 fn compute_size(&self) -> u32 {
6875 let mut my_size = 0;
6876 if let Some(ref v) = self.name.as_ref() {
6877 my_size += ::protobuf::rt::string_size(1, &v);
6878 }
6879 for value in &self.input {
6880 my_size += ::protobuf::rt::string_size(4, &value);
6881 };
6882 for value in &self.output {
6883 my_size += ::protobuf::rt::string_size(5, &value);
6884 };
6885 for value in &self.attribute {
6886 my_size += ::protobuf::rt::string_size(6, &value);
6887 };
6888 for value in &self.node {
6889 let len = value.compute_size();
6890 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
6891 };
6892 if let Some(ref v) = self.doc_string.as_ref() {
6893 my_size += ::protobuf::rt::string_size(8, &v);
6894 }
6895 for value in &self.opset_import {
6896 let len = value.compute_size();
6897 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
6898 };
6899 if let Some(ref v) = self.domain.as_ref() {
6900 my_size += ::protobuf::rt::string_size(10, &v);
6901 }
6902 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
6903 self.cached_size.set(my_size);
6904 my_size
6905 }
6906
6907 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
6908 if let Some(ref v) = self.name.as_ref() {
6909 os.write_string(1, &v)?;
6910 }
6911 for v in &self.input {
6912 os.write_string(4, &v)?;
6913 };
6914 for v in &self.output {
6915 os.write_string(5, &v)?;
6916 };
6917 for v in &self.attribute {
6918 os.write_string(6, &v)?;
6919 };
6920 for v in &self.node {
6921 os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
6922 os.write_raw_varint32(v.get_cached_size())?;
6923 v.write_to_with_cached_sizes(os)?;
6924 };
6925 if let Some(ref v) = self.doc_string.as_ref() {
6926 os.write_string(8, &v)?;
6927 }
6928 for v in &self.opset_import {
6929 os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
6930 os.write_raw_varint32(v.get_cached_size())?;
6931 v.write_to_with_cached_sizes(os)?;
6932 };
6933 if let Some(ref v) = self.domain.as_ref() {
6934 os.write_string(10, &v)?;
6935 }
6936 os.write_unknown_fields(self.get_unknown_fields())?;
6937 ::std::result::Result::Ok(())
6938 }
6939
6940 fn get_cached_size(&self) -> u32 {
6941 self.cached_size.get()
6942 }
6943
6944 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
6945 &self.unknown_fields
6946 }
6947
6948 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
6949 &mut self.unknown_fields
6950 }
6951
6952 fn as_any(&self) -> &dyn (::std::any::Any) {
6953 self as &dyn (::std::any::Any)
6954 }
6955 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6956 self as &mut dyn (::std::any::Any)
6957 }
6958 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
6959 self
6960 }
6961
6962 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
6963 Self::descriptor_static()
6964 }
6965
6966 fn new() -> FunctionProto {
6967 FunctionProto::new()
6968 }
6969
6970 fn default_instance() -> &'static FunctionProto {
6971 static instance: ::protobuf::rt::LazyV2<FunctionProto> = ::protobuf::rt::LazyV2::INIT;
6972 instance.get(FunctionProto::new)
6973 }
6974}
6975
6976impl ::protobuf::Clear for FunctionProto {
6977 fn clear(&mut self) {
6978 self.name.clear();
6979 self.input.clear();
6980 self.output.clear();
6981 self.attribute.clear();
6982 self.node.clear();
6983 self.doc_string.clear();
6984 self.opset_import.clear();
6985 self.domain.clear();
6986 self.unknown_fields.clear();
6987 }
6988}
6989
6990impl ::protobuf::reflect::ProtobufValue for FunctionProto {
6991 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
6992 ::protobuf::reflect::ReflectValueRef::Message(self)
6993 }
6994}
6995
6996#[derive(Clone,PartialEq,Eq,Debug,Hash)]
6997pub enum Version {
6998 _START_VERSION = 0,
6999 IR_VERSION_2017_10_10 = 1,
7000 IR_VERSION_2017_10_30 = 2,
7001 IR_VERSION_2017_11_3 = 3,
7002 IR_VERSION_2019_1_22 = 4,
7003 IR_VERSION_2019_3_18 = 5,
7004 IR_VERSION_2019_9_19 = 6,
7005 IR_VERSION_2020_5_8 = 7,
7006 IR_VERSION = 8,
7007}
7008
7009impl ::protobuf::ProtobufEnum for Version {
7010 fn value(&self) -> i32 {
7011 *self as i32
7012 }
7013
7014 fn from_i32(value: i32) -> ::std::option::Option<Version> {
7015 match value {
7016 0 => ::std::option::Option::Some(Version::_START_VERSION),
7017 1 => ::std::option::Option::Some(Version::IR_VERSION_2017_10_10),
7018 2 => ::std::option::Option::Some(Version::IR_VERSION_2017_10_30),
7019 3 => ::std::option::Option::Some(Version::IR_VERSION_2017_11_3),
7020 4 => ::std::option::Option::Some(Version::IR_VERSION_2019_1_22),
7021 5 => ::std::option::Option::Some(Version::IR_VERSION_2019_3_18),
7022 6 => ::std::option::Option::Some(Version::IR_VERSION_2019_9_19),
7023 7 => ::std::option::Option::Some(Version::IR_VERSION_2020_5_8),
7024 8 => ::std::option::Option::Some(Version::IR_VERSION),
7025 _ => ::std::option::Option::None
7026 }
7027 }
7028
7029 fn values() -> &'static [Self] {
7030 static values: &'static [Version] = &[
7031 Version::_START_VERSION,
7032 Version::IR_VERSION_2017_10_10,
7033 Version::IR_VERSION_2017_10_30,
7034 Version::IR_VERSION_2017_11_3,
7035 Version::IR_VERSION_2019_1_22,
7036 Version::IR_VERSION_2019_3_18,
7037 Version::IR_VERSION_2019_9_19,
7038 Version::IR_VERSION_2020_5_8,
7039 Version::IR_VERSION,
7040 ];
7041 values
7042 }
7043}
7044
7045impl ::std::marker::Copy for Version {
7046}
7047
7048impl ::std::default::Default for Version {
7049 fn default() -> Self {
7050 Version::_START_VERSION
7051 }
7052}
7053
7054impl ::protobuf::reflect::ProtobufValue for Version {
7055 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
7056 ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
7057 }
7058}
7059
7060#[derive(Clone,PartialEq,Eq,Debug,Hash)]
7061pub enum OperatorStatus {
7062 EXPERIMENTAL = 0,
7063 STABLE = 1,
7064}
7065
7066impl ::protobuf::ProtobufEnum for OperatorStatus {
7067 fn value(&self) -> i32 {
7068 *self as i32
7069 }
7070
7071 fn from_i32(value: i32) -> ::std::option::Option<OperatorStatus> {
7072 match value {
7073 0 => ::std::option::Option::Some(OperatorStatus::EXPERIMENTAL),
7074 1 => ::std::option::Option::Some(OperatorStatus::STABLE),
7075 _ => ::std::option::Option::None
7076 }
7077 }
7078
7079 fn values() -> &'static [Self] {
7080 static values: &'static [OperatorStatus] = &[
7081 OperatorStatus::EXPERIMENTAL,
7082 OperatorStatus::STABLE,
7083 ];
7084 values
7085 }
7086}
7087
7088impl ::std::marker::Copy for OperatorStatus {
7089}
7090
7091impl ::std::default::Default for OperatorStatus {
7092 fn default() -> Self {
7093 OperatorStatus::EXPERIMENTAL
7094 }
7095}
7096
7097impl ::protobuf::reflect::ProtobufValue for OperatorStatus {
7098 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
7099 ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
7100 }
7101}