1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // source: onnx-ml.proto
4 // Protobuf Java Version: 4.29.3
5
6 package onnx;
7
8 public final class OnnxMl {
9 private OnnxMl() {}
10 static {
11 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
12 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
13 /* major= */ 4,
14 /* minor= */ 29,
15 /* patch= */ 3,
16 /* suffix= */ "",
17 OnnxMl.class.getName());
18 }
19 public static void registerAllExtensions(
20 com.google.protobuf.ExtensionRegistryLite registry) {
21 }
22
23 public static void registerAllExtensions(
24 com.google.protobuf.ExtensionRegistry registry) {
25 registerAllExtensions(
26 (com.google.protobuf.ExtensionRegistryLite) registry);
27 }
28 /**
29 * <pre>
30 * Versioning
31 *
32 * ONNX versioning is specified in docs/IR.md and elaborated on in docs/Versioning.md
33 *
34 * To be compatible with both proto2 and proto3, we will use a version number
35 * that is not defined by the default value but an explicit enum number.
36 * </pre>
37 *
38 * Protobuf enum {@code onnx.Version}
39 */
40 public enum Version
41 implements com.google.protobuf.ProtocolMessageEnum {
42 /**
43 * <pre>
44 * proto3 requires the first enum value to be zero.
45 * We add this just to appease the compiler.
46 * </pre>
47 *
48 * <code>_START_VERSION = 0;</code>
49 */
50 _START_VERSION(0),
51 /**
52 * <pre>
53 * The version field is always serialized and we will use it to store the
54 * version that the graph is generated from. This helps us set up version
55 * control.
56 * For the IR, we are using simple numbers starting with 0x00000001,
57 * which was the version we published on Oct 10, 2017.
58 * </pre>
59 *
60 * <code>IR_VERSION_2017_10_10 = 1;</code>
61 */
62 IR_VERSION_2017_10_10(1),
63 /**
64 * <pre>
65 * IR_VERSION 2 published on Oct 30, 2017
66 * - Added type discriminator to AttributeProto to support proto3 users
67 * </pre>
68 *
69 * <code>IR_VERSION_2017_10_30 = 2;</code>
70 */
71 IR_VERSION_2017_10_30(2),
72 /**
73 * <pre>
74 * IR VERSION 3 published on Nov 3, 2017
75 * - For operator versioning:
76 * - Added new message OperatorSetIdProto
77 * - Added opset_import in ModelProto
78 * - For vendor extensions, added domain in NodeProto
79 * </pre>
80 *
81 * <code>IR_VERSION_2017_11_3 = 3;</code>
82 */
83 IR_VERSION_2017_11_3(3),
84 /**
85 * <pre>
86 * IR VERSION 4 published on Jan 22, 2019
87 * - Relax constraint that initializers should be a subset of graph inputs
88 * - Add type BFLOAT16
89 * </pre>
90 *
91 * <code>IR_VERSION_2019_1_22 = 4;</code>
92 */
93 IR_VERSION_2019_1_22(4),
94 /**
95 * <pre>
96 * IR VERSION 5 published on March 18, 2019
97 * - Add message TensorAnnotation.
98 * - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters.
99 * </pre>
100 *
101 * <code>IR_VERSION_2019_3_18 = 5;</code>
102 */
103 IR_VERSION_2019_3_18(5),
104 /**
105 * <pre>
106 * IR VERSION 6 published on Sep 19, 2019
107 * - Add support for sparse tensor constants stored in model.
108 * - Add message SparseTensorProto
109 * - Add sparse initializers
110 * </pre>
111 *
112 * <code>IR_VERSION_2019_9_19 = 6;</code>
113 */
114 IR_VERSION_2019_9_19(6),
115 /**
116 * <pre>
117 * IR VERSION 7 published on May 8, 2020
118 * - Add support to allow function body graph to rely on multiple external opreator sets.
119 * - Add a list to promote inference graph's initializers to global and
120 * mutable variables. Global variables are visible in all graphs of the
121 * stored models.
122 * - Add message TrainingInfoProto to store initialization
123 * method and training algorithm. The execution of TrainingInfoProto
124 * can modify the values of mutable variables.
125 * - Implicitly add inference graph into each TrainingInfoProto's algorithm.
126 * </pre>
127 *
128 * <code>IR_VERSION_2020_5_8 = 7;</code>
129 */
130 IR_VERSION_2020_5_8(7),
131 /**
132 * <pre>
133 * IR VERSION 8 published on July 30, 2021
134 * Introduce TypeProto.SparseTensor
135 * Introduce TypeProto.Optional
136 * Added a list of FunctionProtos local to the model
137 * Deprecated since_version and operator status from FunctionProto
138 * </pre>
139 *
140 * <code>IR_VERSION_2021_7_30 = 8;</code>
141 */
142 IR_VERSION_2021_7_30(8),
143 /**
144 * <pre>
145 * IR VERSION 9 published on May 5, 2023
146 * Added AttributeProto to FunctionProto so that default attribute values can be set.
147 * Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ.
148 * </pre>
149 *
150 * <code>IR_VERSION_2023_5_5 = 9;</code>
151 */
152 IR_VERSION_2023_5_5(9),
153 /**
154 * <pre>
155 * IR VERSION 10 published on TBD
156 * Added UINT4, INT4.
157 * </pre>
158 *
159 * <code>IR_VERSION = 10;</code>
160 */
161 IR_VERSION(10),
162 ;
163
164 static {
165 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
166 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
167 /* major= */ 4,
168 /* minor= */ 29,
169 /* patch= */ 3,
170 /* suffix= */ "",
171 Version.class.getName());
172 }
173 /**
174 * <pre>
175 * proto3 requires the first enum value to be zero.
176 * We add this just to appease the compiler.
177 * </pre>
178 *
179 * <code>_START_VERSION = 0;</code>
180 */
181 public static final int _START_VERSION_VALUE = 0;
182 /**
183 * <pre>
184 * The version field is always serialized and we will use it to store the
185 * version that the graph is generated from. This helps us set up version
186 * control.
187 * For the IR, we are using simple numbers starting with 0x00000001,
188 * which was the version we published on Oct 10, 2017.
189 * </pre>
190 *
191 * <code>IR_VERSION_2017_10_10 = 1;</code>
192 */
193 public static final int IR_VERSION_2017_10_10_VALUE = 1;
194 /**
195 * <pre>
196 * IR_VERSION 2 published on Oct 30, 2017
197 * - Added type discriminator to AttributeProto to support proto3 users
198 * </pre>
199 *
200 * <code>IR_VERSION_2017_10_30 = 2;</code>
201 */
202 public static final int IR_VERSION_2017_10_30_VALUE = 2;
203 /**
204 * <pre>
205 * IR VERSION 3 published on Nov 3, 2017
206 * - For operator versioning:
207 * - Added new message OperatorSetIdProto
208 * - Added opset_import in ModelProto
209 * - For vendor extensions, added domain in NodeProto
210 * </pre>
211 *
212 * <code>IR_VERSION_2017_11_3 = 3;</code>
213 */
214 public static final int IR_VERSION_2017_11_3_VALUE = 3;
215 /**
216 * <pre>
217 * IR VERSION 4 published on Jan 22, 2019
218 * - Relax constraint that initializers should be a subset of graph inputs
219 * - Add type BFLOAT16
220 * </pre>
221 *
222 * <code>IR_VERSION_2019_1_22 = 4;</code>
223 */
224 public static final int IR_VERSION_2019_1_22_VALUE = 4;
225 /**
226 * <pre>
227 * IR VERSION 5 published on March 18, 2019
228 * - Add message TensorAnnotation.
229 * - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters.
230 * </pre>
231 *
232 * <code>IR_VERSION_2019_3_18 = 5;</code>
233 */
234 public static final int IR_VERSION_2019_3_18_VALUE = 5;
235 /**
236 * <pre>
237 * IR VERSION 6 published on Sep 19, 2019
238 * - Add support for sparse tensor constants stored in model.
239 * - Add message SparseTensorProto
240 * - Add sparse initializers
241 * </pre>
242 *
243 * <code>IR_VERSION_2019_9_19 = 6;</code>
244 */
245 public static final int IR_VERSION_2019_9_19_VALUE = 6;
246 /**
247 * <pre>
248 * IR VERSION 7 published on May 8, 2020
249 * - Add support to allow function body graph to rely on multiple external opreator sets.
250 * - Add a list to promote inference graph's initializers to global and
251 * mutable variables. Global variables are visible in all graphs of the
252 * stored models.
253 * - Add message TrainingInfoProto to store initialization
254 * method and training algorithm. The execution of TrainingInfoProto
255 * can modify the values of mutable variables.
256 * - Implicitly add inference graph into each TrainingInfoProto's algorithm.
257 * </pre>
258 *
259 * <code>IR_VERSION_2020_5_8 = 7;</code>
260 */
261 public static final int IR_VERSION_2020_5_8_VALUE = 7;
262 /**
263 * <pre>
264 * IR VERSION 8 published on July 30, 2021
265 * Introduce TypeProto.SparseTensor
266 * Introduce TypeProto.Optional
267 * Added a list of FunctionProtos local to the model
268 * Deprecated since_version and operator status from FunctionProto
269 * </pre>
270 *
271 * <code>IR_VERSION_2021_7_30 = 8;</code>
272 */
273 public static final int IR_VERSION_2021_7_30_VALUE = 8;
274 /**
275 * <pre>
276 * IR VERSION 9 published on May 5, 2023
277 * Added AttributeProto to FunctionProto so that default attribute values can be set.
278 * Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ.
279 * </pre>
280 *
281 * <code>IR_VERSION_2023_5_5 = 9;</code>
282 */
283 public static final int IR_VERSION_2023_5_5_VALUE = 9;
284 /**
285 * <pre>
286 * IR VERSION 10 published on TBD
287 * Added UINT4, INT4.
288 * </pre>
289 *
290 * <code>IR_VERSION = 10;</code>
291 */
292 public static final int IR_VERSION_VALUE = 10;
293
294 public final int getNumber() {
295 return value;
296 }
297
298 /**
299 * @param value The numeric wire value of the corresponding enum entry.
300 * @return The enum associated with the given numeric wire value.
301 * @deprecated Use {@link #forNumber(int)} instead.
302 */
303 @java.lang.Deprecated
304 public static Version valueOf(int value) {
305 return forNumber(value);
306 }
307
308 /**
309 * @param value The numeric wire value of the corresponding enum entry.
310 * @return The enum associated with the given numeric wire value.
311 */
312 public static Version forNumber(int value) {
313 switch (value) {
314 case 0: return _START_VERSION;
315 case 1: return IR_VERSION_2017_10_10;
316 case 2: return IR_VERSION_2017_10_30;
317 case 3: return IR_VERSION_2017_11_3;
318 case 4: return IR_VERSION_2019_1_22;
319 case 5: return IR_VERSION_2019_3_18;
320 case 6: return IR_VERSION_2019_9_19;
321 case 7: return IR_VERSION_2020_5_8;
322 case 8: return IR_VERSION_2021_7_30;
323 case 9: return IR_VERSION_2023_5_5;
324 case 10: return IR_VERSION;
325 default: return null;
326 }
327 }
328
329 public static com.google.protobuf.Internal.EnumLiteMap<Version>
330 internalGetValueMap() {
331 return internalValueMap;
332 }
333 private static final com.google.protobuf.Internal.EnumLiteMap<
334 Version> internalValueMap =
335 new com.google.protobuf.Internal.EnumLiteMap<Version>() {
336 public Version findValueByNumber(int number) {
337 return Version.forNumber(number);
338 }
339 };
340
341 public final com.google.protobuf.Descriptors.EnumValueDescriptor
342 getValueDescriptor() {
343 return getDescriptor().getValues().get(ordinal());
344 }
345 public final com.google.protobuf.Descriptors.EnumDescriptor
346 getDescriptorForType() {
347 return getDescriptor();
348 }
349 public static final com.google.protobuf.Descriptors.EnumDescriptor
350 getDescriptor() {
351 return onnx.OnnxMl.getDescriptor().getEnumTypes().get(0);
352 }
353
354 private static final Version[] VALUES = values();
355
356 public static Version valueOf(
357 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
358 if (desc.getType() != getDescriptor()) {
359 throw new java.lang.IllegalArgumentException(
360 "EnumValueDescriptor is not for this type.");
361 }
362 return VALUES[desc.getIndex()];
363 }
364
365 private final int value;
366
367 private Version(int value) {
368 this.value = value;
369 }
370
371 // @@protoc_insertion_point(enum_scope:onnx.Version)
372 }
373
374 /**
375 * <pre>
376 * Operator/function status.
377 * </pre>
378 *
379 * Protobuf enum {@code onnx.OperatorStatus}
380 */
381 public enum OperatorStatus
382 implements com.google.protobuf.ProtocolMessageEnum {
383 /**
384 * <code>EXPERIMENTAL = 0;</code>
385 */
386 EXPERIMENTAL(0),
387 /**
388 * <code>STABLE = 1;</code>
389 */
390 STABLE(1),
391 ;
392
393 static {
394 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
395 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
396 /* major= */ 4,
397 /* minor= */ 29,
398 /* patch= */ 3,
399 /* suffix= */ "",
400 OperatorStatus.class.getName());
401 }
402 /**
403 * <code>EXPERIMENTAL = 0;</code>
404 */
405 public static final int EXPERIMENTAL_VALUE = 0;
406 /**
407 * <code>STABLE = 1;</code>
408 */
409 public static final int STABLE_VALUE = 1;
410
411 public final int getNumber() {
412 return value;
413 }
414
415 /**
416 * @param value The numeric wire value of the corresponding enum entry.
417 * @return The enum associated with the given numeric wire value.
418 * @deprecated Use {@link #forNumber(int)} instead.
419 */
420 @java.lang.Deprecated
421 public static OperatorStatus valueOf(int value) {
422 return forNumber(value);
423 }
424
425 /**
426 * @param value The numeric wire value of the corresponding enum entry.
427 * @return The enum associated with the given numeric wire value.
428 */
429 public static OperatorStatus forNumber(int value) {
430 switch (value) {
431 case 0: return EXPERIMENTAL;
432 case 1: return STABLE;
433 default: return null;
434 }
435 }
436
437 public static com.google.protobuf.Internal.EnumLiteMap<OperatorStatus>
438 internalGetValueMap() {
439 return internalValueMap;
440 }
441 private static final com.google.protobuf.Internal.EnumLiteMap<
442 OperatorStatus> internalValueMap =
443 new com.google.protobuf.Internal.EnumLiteMap<OperatorStatus>() {
444 public OperatorStatus findValueByNumber(int number) {
445 return OperatorStatus.forNumber(number);
446 }
447 };
448
449 public final com.google.protobuf.Descriptors.EnumValueDescriptor
450 getValueDescriptor() {
451 return getDescriptor().getValues().get(ordinal());
452 }
453 public final com.google.protobuf.Descriptors.EnumDescriptor
454 getDescriptorForType() {
455 return getDescriptor();
456 }
457 public static final com.google.protobuf.Descriptors.EnumDescriptor
458 getDescriptor() {
459 return onnx.OnnxMl.getDescriptor().getEnumTypes().get(1);
460 }
461
462 private static final OperatorStatus[] VALUES = values();
463
464 public static OperatorStatus valueOf(
465 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
466 if (desc.getType() != getDescriptor()) {
467 throw new java.lang.IllegalArgumentException(
468 "EnumValueDescriptor is not for this type.");
469 }
470 return VALUES[desc.getIndex()];
471 }
472
473 private final int value;
474
475 private OperatorStatus(int value) {
476 this.value = value;
477 }
478
479 // @@protoc_insertion_point(enum_scope:onnx.OperatorStatus)
480 }
481
482 public interface AttributeProtoOrBuilder extends
483 // @@protoc_insertion_point(interface_extends:onnx.AttributeProto)
484 com.google.protobuf.MessageOrBuilder {
485
486 /**
487 * <pre>
488 * The name field MUST be present for this version of the IR.
489 * </pre>
490 *
491 * <code>optional string name = 1;</code>
492 * @return Whether the name field is set.
493 */
494 boolean hasName();
495 /**
496 * <pre>
497 * The name field MUST be present for this version of the IR.
498 * </pre>
499 *
500 * <code>optional string name = 1;</code>
501 * @return The name.
502 */
503 java.lang.String getName();
504 /**
505 * <pre>
506 * The name field MUST be present for this version of the IR.
507 * </pre>
508 *
509 * <code>optional string name = 1;</code>
510 * @return The bytes for name.
511 */
512 com.google.protobuf.ByteString
513 getNameBytes();
514
515 /**
516 * <pre>
517 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
518 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
519 * in parent scope.
520 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
521 * </pre>
522 *
523 * <code>optional string ref_attr_name = 21;</code>
524 * @return Whether the refAttrName field is set.
525 */
526 boolean hasRefAttrName();
527 /**
528 * <pre>
529 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
530 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
531 * in parent scope.
532 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
533 * </pre>
534 *
535 * <code>optional string ref_attr_name = 21;</code>
536 * @return The refAttrName.
537 */
538 java.lang.String getRefAttrName();
539 /**
540 * <pre>
541 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
542 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
543 * in parent scope.
544 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
545 * </pre>
546 *
547 * <code>optional string ref_attr_name = 21;</code>
548 * @return The bytes for refAttrName.
549 */
550 com.google.protobuf.ByteString
551 getRefAttrNameBytes();
552
553 /**
554 * <pre>
555 * A human-readable documentation for this attribute. Markdown is allowed.
556 * </pre>
557 *
558 * <code>optional string doc_string = 13;</code>
559 * @return Whether the docString field is set.
560 */
561 boolean hasDocString();
562 /**
563 * <pre>
564 * A human-readable documentation for this attribute. Markdown is allowed.
565 * </pre>
566 *
567 * <code>optional string doc_string = 13;</code>
568 * @return The docString.
569 */
570 java.lang.String getDocString();
571 /**
572 * <pre>
573 * A human-readable documentation for this attribute. Markdown is allowed.
574 * </pre>
575 *
576 * <code>optional string doc_string = 13;</code>
577 * @return The bytes for docString.
578 */
579 com.google.protobuf.ByteString
580 getDocStringBytes();
581
582 /**
583 * <pre>
584 * The type field MUST be present for this version of the IR.
585 * For 0.0.1 versions of the IR, this field was not defined, and
586 * implementations needed to use has_field heuristics to determine
587 * which value field was in use. For IR_VERSION 0.0.2 or later, this
588 * field MUST be set and match the f|i|s|t|... field in use. This
589 * change was made to accommodate proto3 implementations.
590 * </pre>
591 *
592 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
593 * @return Whether the type field is set.
594 */
595 boolean hasType();
596 /**
597 * <pre>
598 * The type field MUST be present for this version of the IR.
599 * For 0.0.1 versions of the IR, this field was not defined, and
600 * implementations needed to use has_field heuristics to determine
601 * which value field was in use. For IR_VERSION 0.0.2 or later, this
602 * field MUST be set and match the f|i|s|t|... field in use. This
603 * change was made to accommodate proto3 implementations.
604 * </pre>
605 *
606 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
607 * @return The type.
608 */
609 onnx.OnnxMl.AttributeProto.AttributeType getType();
610
611 /**
612 * <pre>
613 * Exactly ONE of the following fields must be present for this version of the IR
614 * </pre>
615 *
616 * <code>optional float f = 2;</code>
617 * @return Whether the f field is set.
618 */
619 boolean hasF();
620 /**
621 * <pre>
622 * Exactly ONE of the following fields must be present for this version of the IR
623 * </pre>
624 *
625 * <code>optional float f = 2;</code>
626 * @return The f.
627 */
628 float getF();
629
630 /**
631 * <pre>
632 * int
633 * </pre>
634 *
635 * <code>optional int64 i = 3;</code>
636 * @return Whether the i field is set.
637 */
638 boolean hasI();
639 /**
640 * <pre>
641 * int
642 * </pre>
643 *
644 * <code>optional int64 i = 3;</code>
645 * @return The i.
646 */
647 long getI();
648
649 /**
650 * <pre>
651 * UTF-8 string
652 * </pre>
653 *
654 * <code>optional bytes s = 4;</code>
655 * @return Whether the s field is set.
656 */
657 boolean hasS();
658 /**
659 * <pre>
660 * UTF-8 string
661 * </pre>
662 *
663 * <code>optional bytes s = 4;</code>
664 * @return The s.
665 */
666 com.google.protobuf.ByteString getS();
667
668 /**
669 * <pre>
670 * tensor value
671 * </pre>
672 *
673 * <code>optional .onnx.TensorProto t = 5;</code>
674 * @return Whether the t field is set.
675 */
676 boolean hasT();
677 /**
678 * <pre>
679 * tensor value
680 * </pre>
681 *
682 * <code>optional .onnx.TensorProto t = 5;</code>
683 * @return The t.
684 */
685 onnx.OnnxMl.TensorProto getT();
686 /**
687 * <pre>
688 * tensor value
689 * </pre>
690 *
691 * <code>optional .onnx.TensorProto t = 5;</code>
692 */
693 onnx.OnnxMl.TensorProtoOrBuilder getTOrBuilder();
694
695 /**
696 * <pre>
697 * graph
698 * </pre>
699 *
700 * <code>optional .onnx.GraphProto g = 6;</code>
701 * @return Whether the g field is set.
702 */
703 boolean hasG();
704 /**
705 * <pre>
706 * graph
707 * </pre>
708 *
709 * <code>optional .onnx.GraphProto g = 6;</code>
710 * @return The g.
711 */
712 onnx.OnnxMl.GraphProto getG();
713 /**
714 * <pre>
715 * graph
716 * </pre>
717 *
718 * <code>optional .onnx.GraphProto g = 6;</code>
719 */
720 onnx.OnnxMl.GraphProtoOrBuilder getGOrBuilder();
721
722 /**
723 * <pre>
724 * sparse tensor value
725 * </pre>
726 *
727 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
728 * @return Whether the sparseTensor field is set.
729 */
730 boolean hasSparseTensor();
731 /**
732 * <pre>
733 * sparse tensor value
734 * </pre>
735 *
736 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
737 * @return The sparseTensor.
738 */
739 onnx.OnnxMl.SparseTensorProto getSparseTensor();
740 /**
741 * <pre>
742 * sparse tensor value
743 * </pre>
744 *
745 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
746 */
747 onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorOrBuilder();
748
749 /**
750 * <pre>
751 * Do not use field below, it's deprecated.
752 * optional ValueProto v = 12; // value - subsumes everything but graph
753 * </pre>
754 *
755 * <code>optional .onnx.TypeProto tp = 14;</code>
756 * @return Whether the tp field is set.
757 */
758 boolean hasTp();
759 /**
760 * <pre>
761 * Do not use field below, it's deprecated.
762 * optional ValueProto v = 12; // value - subsumes everything but graph
763 * </pre>
764 *
765 * <code>optional .onnx.TypeProto tp = 14;</code>
766 * @return The tp.
767 */
768 onnx.OnnxMl.TypeProto getTp();
769 /**
770 * <pre>
771 * Do not use field below, it's deprecated.
772 * optional ValueProto v = 12; // value - subsumes everything but graph
773 * </pre>
774 *
775 * <code>optional .onnx.TypeProto tp = 14;</code>
776 */
777 onnx.OnnxMl.TypeProtoOrBuilder getTpOrBuilder();
778
779 /**
780 * <pre>
781 * list of floats
782 * </pre>
783 *
784 * <code>repeated float floats = 7;</code>
785 * @return A list containing the floats.
786 */
787 java.util.List<java.lang.Float> getFloatsList();
788 /**
789 * <pre>
790 * list of floats
791 * </pre>
792 *
793 * <code>repeated float floats = 7;</code>
794 * @return The count of floats.
795 */
796 int getFloatsCount();
797 /**
798 * <pre>
799 * list of floats
800 * </pre>
801 *
802 * <code>repeated float floats = 7;</code>
803 * @param index The index of the element to return.
804 * @return The floats at the given index.
805 */
806 float getFloats(int index);
807
808 /**
809 * <pre>
810 * list of ints
811 * </pre>
812 *
813 * <code>repeated int64 ints = 8;</code>
814 * @return A list containing the ints.
815 */
816 java.util.List<java.lang.Long> getIntsList();
817 /**
818 * <pre>
819 * list of ints
820 * </pre>
821 *
822 * <code>repeated int64 ints = 8;</code>
823 * @return The count of ints.
824 */
825 int getIntsCount();
826 /**
827 * <pre>
828 * list of ints
829 * </pre>
830 *
831 * <code>repeated int64 ints = 8;</code>
832 * @param index The index of the element to return.
833 * @return The ints at the given index.
834 */
835 long getInts(int index);
836
837 /**
838 * <pre>
839 * list of UTF-8 strings
840 * </pre>
841 *
842 * <code>repeated bytes strings = 9;</code>
843 * @return A list containing the strings.
844 */
845 java.util.List<com.google.protobuf.ByteString> getStringsList();
846 /**
847 * <pre>
848 * list of UTF-8 strings
849 * </pre>
850 *
851 * <code>repeated bytes strings = 9;</code>
852 * @return The count of strings.
853 */
854 int getStringsCount();
855 /**
856 * <pre>
857 * list of UTF-8 strings
858 * </pre>
859 *
860 * <code>repeated bytes strings = 9;</code>
861 * @param index The index of the element to return.
862 * @return The strings at the given index.
863 */
864 com.google.protobuf.ByteString getStrings(int index);
865
866 /**
867 * <pre>
868 * list of tensors
869 * </pre>
870 *
871 * <code>repeated .onnx.TensorProto tensors = 10;</code>
872 */
873 java.util.List<onnx.OnnxMl.TensorProto>
874 getTensorsList();
875 /**
876 * <pre>
877 * list of tensors
878 * </pre>
879 *
880 * <code>repeated .onnx.TensorProto tensors = 10;</code>
881 */
882 onnx.OnnxMl.TensorProto getTensors(int index);
883 /**
884 * <pre>
885 * list of tensors
886 * </pre>
887 *
888 * <code>repeated .onnx.TensorProto tensors = 10;</code>
889 */
890 int getTensorsCount();
891 /**
892 * <pre>
893 * list of tensors
894 * </pre>
895 *
896 * <code>repeated .onnx.TensorProto tensors = 10;</code>
897 */
898 java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
899 getTensorsOrBuilderList();
900 /**
901 * <pre>
902 * list of tensors
903 * </pre>
904 *
905 * <code>repeated .onnx.TensorProto tensors = 10;</code>
906 */
907 onnx.OnnxMl.TensorProtoOrBuilder getTensorsOrBuilder(
908 int index);
909
910 /**
911 * <pre>
912 * list of graph
913 * </pre>
914 *
915 * <code>repeated .onnx.GraphProto graphs = 11;</code>
916 */
917 java.util.List<onnx.OnnxMl.GraphProto>
918 getGraphsList();
919 /**
920 * <pre>
921 * list of graph
922 * </pre>
923 *
924 * <code>repeated .onnx.GraphProto graphs = 11;</code>
925 */
926 onnx.OnnxMl.GraphProto getGraphs(int index);
927 /**
928 * <pre>
929 * list of graph
930 * </pre>
931 *
932 * <code>repeated .onnx.GraphProto graphs = 11;</code>
933 */
934 int getGraphsCount();
935 /**
936 * <pre>
937 * list of graph
938 * </pre>
939 *
940 * <code>repeated .onnx.GraphProto graphs = 11;</code>
941 */
942 java.util.List<? extends onnx.OnnxMl.GraphProtoOrBuilder>
943 getGraphsOrBuilderList();
944 /**
945 * <pre>
946 * list of graph
947 * </pre>
948 *
949 * <code>repeated .onnx.GraphProto graphs = 11;</code>
950 */
951 onnx.OnnxMl.GraphProtoOrBuilder getGraphsOrBuilder(
952 int index);
953
954 /**
955 * <pre>
956 * list of sparse tensors
957 * </pre>
958 *
959 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
960 */
961 java.util.List<onnx.OnnxMl.SparseTensorProto>
962 getSparseTensorsList();
963 /**
964 * <pre>
965 * list of sparse tensors
966 * </pre>
967 *
968 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
969 */
970 onnx.OnnxMl.SparseTensorProto getSparseTensors(int index);
971 /**
972 * <pre>
973 * list of sparse tensors
974 * </pre>
975 *
976 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
977 */
978 int getSparseTensorsCount();
979 /**
980 * <pre>
981 * list of sparse tensors
982 * </pre>
983 *
984 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
985 */
986 java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
987 getSparseTensorsOrBuilderList();
988 /**
989 * <pre>
990 * list of sparse tensors
991 * </pre>
992 *
993 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
994 */
995 onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorsOrBuilder(
996 int index);
997
998 /**
999 * <pre>
1000 * list of type protos
1001 * </pre>
1002 *
1003 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
1004 */
1005 java.util.List<onnx.OnnxMl.TypeProto>
1006 getTypeProtosList();
1007 /**
1008 * <pre>
1009 * list of type protos
1010 * </pre>
1011 *
1012 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
1013 */
1014 onnx.OnnxMl.TypeProto getTypeProtos(int index);
1015 /**
1016 * <pre>
1017 * list of type protos
1018 * </pre>
1019 *
1020 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
1021 */
1022 int getTypeProtosCount();
1023 /**
1024 * <pre>
1025 * list of type protos
1026 * </pre>
1027 *
1028 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
1029 */
1030 java.util.List<? extends onnx.OnnxMl.TypeProtoOrBuilder>
1031 getTypeProtosOrBuilderList();
1032 /**
1033 * <pre>
1034 * list of type protos
1035 * </pre>
1036 *
1037 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
1038 */
1039 onnx.OnnxMl.TypeProtoOrBuilder getTypeProtosOrBuilder(
1040 int index);
1041 }
1042 /**
1043 * <pre>
1044 * Attributes
1045 *
1046 * A named attribute containing either singular float, integer, string, graph,
1047 * and tensor values, or repeated float, integer, string, graph, and tensor values.
1048 * An AttributeProto MUST contain the name field, and *only one* of the
1049 * following content fields, effectively enforcing a C/C++ union equivalent.
1050 * </pre>
1051 *
1052 * Protobuf type {@code onnx.AttributeProto}
1053 */
1054 public static final class AttributeProto extends
1055 com.google.protobuf.GeneratedMessage implements
1056 // @@protoc_insertion_point(message_implements:onnx.AttributeProto)
1057 AttributeProtoOrBuilder {
1058 private static final long serialVersionUID = 0L;
1059 static {
1060 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
1061 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
1062 /* major= */ 4,
1063 /* minor= */ 29,
1064 /* patch= */ 3,
1065 /* suffix= */ "",
1066 AttributeProto.class.getName());
1067 }
1068 // Use AttributeProto.newBuilder() to construct.
1069 private AttributeProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1070 super(builder);
1071 }
1072 private AttributeProto() {
1073 name_ = "";
1074 refAttrName_ = "";
1075 docString_ = "";
1076 type_ = 0;
1077 s_ = com.google.protobuf.ByteString.EMPTY;
1078 floats_ = emptyFloatList();
1079 ints_ = emptyLongList();
1080 strings_ = emptyList(com.google.protobuf.ByteString.class);
1081 tensors_ = java.util.Collections.emptyList();
1082 graphs_ = java.util.Collections.emptyList();
1083 sparseTensors_ = java.util.Collections.emptyList();
1084 typeProtos_ = java.util.Collections.emptyList();
1085 }
1086
1087 public static final com.google.protobuf.Descriptors.Descriptor
1088 getDescriptor() {
1089 return onnx.OnnxMl.internal_static_onnx_AttributeProto_descriptor;
1090 }
1091
1092 @java.lang.Override
1093 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1094 internalGetFieldAccessorTable() {
1095 return onnx.OnnxMl.internal_static_onnx_AttributeProto_fieldAccessorTable
1096 .ensureFieldAccessorsInitialized(
1097 onnx.OnnxMl.AttributeProto.class, onnx.OnnxMl.AttributeProto.Builder.class);
1098 }
1099
1100 /**
1101 * <pre>
1102 * Note: this enum is structurally identical to the OpSchema::AttrType
1103 * enum defined in schema.h. If you rev one, you likely need to rev the other.
1104 * </pre>
1105 *
1106 * Protobuf enum {@code onnx.AttributeProto.AttributeType}
1107 */
1108 public enum AttributeType
1109 implements com.google.protobuf.ProtocolMessageEnum {
1110 /**
1111 * <code>UNDEFINED = 0;</code>
1112 */
1113 UNDEFINED(0),
1114 /**
1115 * <code>FLOAT = 1;</code>
1116 */
1117 FLOAT(1),
1118 /**
1119 * <code>INT = 2;</code>
1120 */
1121 INT(2),
1122 /**
1123 * <code>STRING = 3;</code>
1124 */
1125 STRING(3),
1126 /**
1127 * <code>TENSOR = 4;</code>
1128 */
1129 TENSOR(4),
1130 /**
1131 * <code>GRAPH = 5;</code>
1132 */
1133 GRAPH(5),
1134 /**
1135 * <code>SPARSE_TENSOR = 11;</code>
1136 */
1137 SPARSE_TENSOR(11),
1138 /**
1139 * <code>TYPE_PROTO = 13;</code>
1140 */
1141 TYPE_PROTO(13),
1142 /**
1143 * <code>FLOATS = 6;</code>
1144 */
1145 FLOATS(6),
1146 /**
1147 * <code>INTS = 7;</code>
1148 */
1149 INTS(7),
1150 /**
1151 * <code>STRINGS = 8;</code>
1152 */
1153 STRINGS(8),
1154 /**
1155 * <code>TENSORS = 9;</code>
1156 */
1157 TENSORS(9),
1158 /**
1159 * <code>GRAPHS = 10;</code>
1160 */
1161 GRAPHS(10),
1162 /**
1163 * <code>SPARSE_TENSORS = 12;</code>
1164 */
1165 SPARSE_TENSORS(12),
1166 /**
1167 * <code>TYPE_PROTOS = 14;</code>
1168 */
1169 TYPE_PROTOS(14),
1170 ;
1171
1172 static {
1173 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
1174 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
1175 /* major= */ 4,
1176 /* minor= */ 29,
1177 /* patch= */ 3,
1178 /* suffix= */ "",
1179 AttributeType.class.getName());
1180 }
1181 /**
1182 * <code>UNDEFINED = 0;</code>
1183 */
1184 public static final int UNDEFINED_VALUE = 0;
1185 /**
1186 * <code>FLOAT = 1;</code>
1187 */
1188 public static final int FLOAT_VALUE = 1;
1189 /**
1190 * <code>INT = 2;</code>
1191 */
1192 public static final int INT_VALUE = 2;
1193 /**
1194 * <code>STRING = 3;</code>
1195 */
1196 public static final int STRING_VALUE = 3;
1197 /**
1198 * <code>TENSOR = 4;</code>
1199 */
1200 public static final int TENSOR_VALUE = 4;
1201 /**
1202 * <code>GRAPH = 5;</code>
1203 */
1204 public static final int GRAPH_VALUE = 5;
1205 /**
1206 * <code>SPARSE_TENSOR = 11;</code>
1207 */
1208 public static final int SPARSE_TENSOR_VALUE = 11;
1209 /**
1210 * <code>TYPE_PROTO = 13;</code>
1211 */
1212 public static final int TYPE_PROTO_VALUE = 13;
1213 /**
1214 * <code>FLOATS = 6;</code>
1215 */
1216 public static final int FLOATS_VALUE = 6;
1217 /**
1218 * <code>INTS = 7;</code>
1219 */
1220 public static final int INTS_VALUE = 7;
1221 /**
1222 * <code>STRINGS = 8;</code>
1223 */
1224 public static final int STRINGS_VALUE = 8;
1225 /**
1226 * <code>TENSORS = 9;</code>
1227 */
1228 public static final int TENSORS_VALUE = 9;
1229 /**
1230 * <code>GRAPHS = 10;</code>
1231 */
1232 public static final int GRAPHS_VALUE = 10;
1233 /**
1234 * <code>SPARSE_TENSORS = 12;</code>
1235 */
1236 public static final int SPARSE_TENSORS_VALUE = 12;
1237 /**
1238 * <code>TYPE_PROTOS = 14;</code>
1239 */
1240 public static final int TYPE_PROTOS_VALUE = 14;
1241
1242 public final int getNumber() {
1243 return value;
1244 }
1245
1246 /**
1247 * @param value The numeric wire value of the corresponding enum entry.
1248 * @return The enum associated with the given numeric wire value.
1249 * @deprecated Use {@link #forNumber(int)} instead.
1250 */
1251 @java.lang.Deprecated
1252 public static AttributeType valueOf(int value) {
1253 return forNumber(value);
1254 }
1255
1256 /**
1257 * @param value The numeric wire value of the corresponding enum entry.
1258 * @return The enum associated with the given numeric wire value.
1259 */
1260 public static AttributeType forNumber(int value) {
1261 switch (value) {
1262 case 0: return UNDEFINED;
1263 case 1: return FLOAT;
1264 case 2: return INT;
1265 case 3: return STRING;
1266 case 4: return TENSOR;
1267 case 5: return GRAPH;
1268 case 11: return SPARSE_TENSOR;
1269 case 13: return TYPE_PROTO;
1270 case 6: return FLOATS;
1271 case 7: return INTS;
1272 case 8: return STRINGS;
1273 case 9: return TENSORS;
1274 case 10: return GRAPHS;
1275 case 12: return SPARSE_TENSORS;
1276 case 14: return TYPE_PROTOS;
1277 default: return null;
1278 }
1279 }
1280
1281 public static com.google.protobuf.Internal.EnumLiteMap<AttributeType>
1282 internalGetValueMap() {
1283 return internalValueMap;
1284 }
1285 private static final com.google.protobuf.Internal.EnumLiteMap<
1286 AttributeType> internalValueMap =
1287 new com.google.protobuf.Internal.EnumLiteMap<AttributeType>() {
1288 public AttributeType findValueByNumber(int number) {
1289 return AttributeType.forNumber(number);
1290 }
1291 };
1292
1293 public final com.google.protobuf.Descriptors.EnumValueDescriptor
1294 getValueDescriptor() {
1295 return getDescriptor().getValues().get(ordinal());
1296 }
1297 public final com.google.protobuf.Descriptors.EnumDescriptor
1298 getDescriptorForType() {
1299 return getDescriptor();
1300 }
1301 public static final com.google.protobuf.Descriptors.EnumDescriptor
1302 getDescriptor() {
1303 return onnx.OnnxMl.AttributeProto.getDescriptor().getEnumTypes().get(0);
1304 }
1305
1306 private static final AttributeType[] VALUES = values();
1307
1308 public static AttributeType valueOf(
1309 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1310 if (desc.getType() != getDescriptor()) {
1311 throw new java.lang.IllegalArgumentException(
1312 "EnumValueDescriptor is not for this type.");
1313 }
1314 return VALUES[desc.getIndex()];
1315 }
1316
1317 private final int value;
1318
1319 private AttributeType(int value) {
1320 this.value = value;
1321 }
1322
1323 // @@protoc_insertion_point(enum_scope:onnx.AttributeProto.AttributeType)
1324 }
1325
1326 private int bitField0_;
1327 public static final int NAME_FIELD_NUMBER = 1;
1328 @SuppressWarnings("serial")
1329 private volatile java.lang.Object name_ = "";
1330 /**
1331 * <pre>
1332 * The name field MUST be present for this version of the IR.
1333 * </pre>
1334 *
1335 * <code>optional string name = 1;</code>
1336 * @return Whether the name field is set.
1337 */
1338 @java.lang.Override
1339 public boolean hasName() {
1340 return ((bitField0_ & 0x00000001) != 0);
1341 }
1342 /**
1343 * <pre>
1344 * The name field MUST be present for this version of the IR.
1345 * </pre>
1346 *
1347 * <code>optional string name = 1;</code>
1348 * @return The name.
1349 */
1350 @java.lang.Override
1351 public java.lang.String getName() {
1352 java.lang.Object ref = name_;
1353 if (ref instanceof java.lang.String) {
1354 return (java.lang.String) ref;
1355 } else {
1356 com.google.protobuf.ByteString bs =
1357 (com.google.protobuf.ByteString) ref;
1358 java.lang.String s = bs.toStringUtf8();
1359 if (bs.isValidUtf8()) {
1360 name_ = s;
1361 }
1362 return s;
1363 }
1364 }
1365 /**
1366 * <pre>
1367 * The name field MUST be present for this version of the IR.
1368 * </pre>
1369 *
1370 * <code>optional string name = 1;</code>
1371 * @return The bytes for name.
1372 */
1373 @java.lang.Override
1374 public com.google.protobuf.ByteString
1375 getNameBytes() {
1376 java.lang.Object ref = name_;
1377 if (ref instanceof java.lang.String) {
1378 com.google.protobuf.ByteString b =
1379 com.google.protobuf.ByteString.copyFromUtf8(
1380 (java.lang.String) ref);
1381 name_ = b;
1382 return b;
1383 } else {
1384 return (com.google.protobuf.ByteString) ref;
1385 }
1386 }
1387
1388 public static final int REF_ATTR_NAME_FIELD_NUMBER = 21;
1389 @SuppressWarnings("serial")
1390 private volatile java.lang.Object refAttrName_ = "";
1391 /**
1392 * <pre>
1393 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
1394 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
1395 * in parent scope.
1396 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
1397 * </pre>
1398 *
1399 * <code>optional string ref_attr_name = 21;</code>
1400 * @return Whether the refAttrName field is set.
1401 */
1402 @java.lang.Override
1403 public boolean hasRefAttrName() {
1404 return ((bitField0_ & 0x00000002) != 0);
1405 }
1406 /**
1407 * <pre>
1408 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
1409 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
1410 * in parent scope.
1411 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
1412 * </pre>
1413 *
1414 * <code>optional string ref_attr_name = 21;</code>
1415 * @return The refAttrName.
1416 */
1417 @java.lang.Override
1418 public java.lang.String getRefAttrName() {
1419 java.lang.Object ref = refAttrName_;
1420 if (ref instanceof java.lang.String) {
1421 return (java.lang.String) ref;
1422 } else {
1423 com.google.protobuf.ByteString bs =
1424 (com.google.protobuf.ByteString) ref;
1425 java.lang.String s = bs.toStringUtf8();
1426 if (bs.isValidUtf8()) {
1427 refAttrName_ = s;
1428 }
1429 return s;
1430 }
1431 }
1432 /**
1433 * <pre>
1434 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
1435 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
1436 * in parent scope.
1437 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
1438 * </pre>
1439 *
1440 * <code>optional string ref_attr_name = 21;</code>
1441 * @return The bytes for refAttrName.
1442 */
1443 @java.lang.Override
1444 public com.google.protobuf.ByteString
1445 getRefAttrNameBytes() {
1446 java.lang.Object ref = refAttrName_;
1447 if (ref instanceof java.lang.String) {
1448 com.google.protobuf.ByteString b =
1449 com.google.protobuf.ByteString.copyFromUtf8(
1450 (java.lang.String) ref);
1451 refAttrName_ = b;
1452 return b;
1453 } else {
1454 return (com.google.protobuf.ByteString) ref;
1455 }
1456 }
1457
1458 public static final int DOC_STRING_FIELD_NUMBER = 13;
1459 @SuppressWarnings("serial")
1460 private volatile java.lang.Object docString_ = "";
1461 /**
1462 * <pre>
1463 * A human-readable documentation for this attribute. Markdown is allowed.
1464 * </pre>
1465 *
1466 * <code>optional string doc_string = 13;</code>
1467 * @return Whether the docString field is set.
1468 */
1469 @java.lang.Override
1470 public boolean hasDocString() {
1471 return ((bitField0_ & 0x00000004) != 0);
1472 }
1473 /**
1474 * <pre>
1475 * A human-readable documentation for this attribute. Markdown is allowed.
1476 * </pre>
1477 *
1478 * <code>optional string doc_string = 13;</code>
1479 * @return The docString.
1480 */
1481 @java.lang.Override
1482 public java.lang.String getDocString() {
1483 java.lang.Object ref = docString_;
1484 if (ref instanceof java.lang.String) {
1485 return (java.lang.String) ref;
1486 } else {
1487 com.google.protobuf.ByteString bs =
1488 (com.google.protobuf.ByteString) ref;
1489 java.lang.String s = bs.toStringUtf8();
1490 if (bs.isValidUtf8()) {
1491 docString_ = s;
1492 }
1493 return s;
1494 }
1495 }
1496 /**
1497 * <pre>
1498 * A human-readable documentation for this attribute. Markdown is allowed.
1499 * </pre>
1500 *
1501 * <code>optional string doc_string = 13;</code>
1502 * @return The bytes for docString.
1503 */
1504 @java.lang.Override
1505 public com.google.protobuf.ByteString
1506 getDocStringBytes() {
1507 java.lang.Object ref = docString_;
1508 if (ref instanceof java.lang.String) {
1509 com.google.protobuf.ByteString b =
1510 com.google.protobuf.ByteString.copyFromUtf8(
1511 (java.lang.String) ref);
1512 docString_ = b;
1513 return b;
1514 } else {
1515 return (com.google.protobuf.ByteString) ref;
1516 }
1517 }
1518
1519 public static final int TYPE_FIELD_NUMBER = 20;
1520 private int type_ = 0;
1521 /**
1522 * <pre>
1523 * The type field MUST be present for this version of the IR.
1524 * For 0.0.1 versions of the IR, this field was not defined, and
1525 * implementations needed to use has_field heuristics to determine
1526 * which value field was in use. For IR_VERSION 0.0.2 or later, this
1527 * field MUST be set and match the f|i|s|t|... field in use. This
1528 * change was made to accommodate proto3 implementations.
1529 * </pre>
1530 *
1531 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
1532 * @return Whether the type field is set.
1533 */
1534 @java.lang.Override public boolean hasType() {
1535 return ((bitField0_ & 0x00000008) != 0);
1536 }
1537 /**
1538 * <pre>
1539 * The type field MUST be present for this version of the IR.
1540 * For 0.0.1 versions of the IR, this field was not defined, and
1541 * implementations needed to use has_field heuristics to determine
1542 * which value field was in use. For IR_VERSION 0.0.2 or later, this
1543 * field MUST be set and match the f|i|s|t|... field in use. This
1544 * change was made to accommodate proto3 implementations.
1545 * </pre>
1546 *
1547 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
1548 * @return The type.
1549 */
1550 @java.lang.Override public onnx.OnnxMl.AttributeProto.AttributeType getType() {
1551 onnx.OnnxMl.AttributeProto.AttributeType result = onnx.OnnxMl.AttributeProto.AttributeType.forNumber(type_);
1552 return result == null ? onnx.OnnxMl.AttributeProto.AttributeType.UNDEFINED : result;
1553 }
1554
1555 public static final int F_FIELD_NUMBER = 2;
1556 private float f_ = 0F;
1557 /**
1558 * <pre>
1559 * Exactly ONE of the following fields must be present for this version of the IR
1560 * </pre>
1561 *
1562 * <code>optional float f = 2;</code>
1563 * @return Whether the f field is set.
1564 */
1565 @java.lang.Override
1566 public boolean hasF() {
1567 return ((bitField0_ & 0x00000010) != 0);
1568 }
1569 /**
1570 * <pre>
1571 * Exactly ONE of the following fields must be present for this version of the IR
1572 * </pre>
1573 *
1574 * <code>optional float f = 2;</code>
1575 * @return The f.
1576 */
1577 @java.lang.Override
1578 public float getF() {
1579 return f_;
1580 }
1581
1582 public static final int I_FIELD_NUMBER = 3;
1583 private long i_ = 0L;
1584 /**
1585 * <pre>
1586 * int
1587 * </pre>
1588 *
1589 * <code>optional int64 i = 3;</code>
1590 * @return Whether the i field is set.
1591 */
1592 @java.lang.Override
1593 public boolean hasI() {
1594 return ((bitField0_ & 0x00000020) != 0);
1595 }
1596 /**
1597 * <pre>
1598 * int
1599 * </pre>
1600 *
1601 * <code>optional int64 i = 3;</code>
1602 * @return The i.
1603 */
1604 @java.lang.Override
1605 public long getI() {
1606 return i_;
1607 }
1608
1609 public static final int S_FIELD_NUMBER = 4;
1610 private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
1611 /**
1612 * <pre>
1613 * UTF-8 string
1614 * </pre>
1615 *
1616 * <code>optional bytes s = 4;</code>
1617 * @return Whether the s field is set.
1618 */
1619 @java.lang.Override
1620 public boolean hasS() {
1621 return ((bitField0_ & 0x00000040) != 0);
1622 }
1623 /**
1624 * <pre>
1625 * UTF-8 string
1626 * </pre>
1627 *
1628 * <code>optional bytes s = 4;</code>
1629 * @return The s.
1630 */
1631 @java.lang.Override
1632 public com.google.protobuf.ByteString getS() {
1633 return s_;
1634 }
1635
1636 public static final int T_FIELD_NUMBER = 5;
1637 private onnx.OnnxMl.TensorProto t_;
1638 /**
1639 * <pre>
1640 * tensor value
1641 * </pre>
1642 *
1643 * <code>optional .onnx.TensorProto t = 5;</code>
1644 * @return Whether the t field is set.
1645 */
1646 @java.lang.Override
1647 public boolean hasT() {
1648 return ((bitField0_ & 0x00000080) != 0);
1649 }
1650 /**
1651 * <pre>
1652 * tensor value
1653 * </pre>
1654 *
1655 * <code>optional .onnx.TensorProto t = 5;</code>
1656 * @return The t.
1657 */
1658 @java.lang.Override
1659 public onnx.OnnxMl.TensorProto getT() {
1660 return t_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : t_;
1661 }
1662 /**
1663 * <pre>
1664 * tensor value
1665 * </pre>
1666 *
1667 * <code>optional .onnx.TensorProto t = 5;</code>
1668 */
1669 @java.lang.Override
1670 public onnx.OnnxMl.TensorProtoOrBuilder getTOrBuilder() {
1671 return t_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : t_;
1672 }
1673
1674 public static final int G_FIELD_NUMBER = 6;
1675 private onnx.OnnxMl.GraphProto g_;
1676 /**
1677 * <pre>
1678 * graph
1679 * </pre>
1680 *
1681 * <code>optional .onnx.GraphProto g = 6;</code>
1682 * @return Whether the g field is set.
1683 */
1684 @java.lang.Override
1685 public boolean hasG() {
1686 return ((bitField0_ & 0x00000100) != 0);
1687 }
1688 /**
1689 * <pre>
1690 * graph
1691 * </pre>
1692 *
1693 * <code>optional .onnx.GraphProto g = 6;</code>
1694 * @return The g.
1695 */
1696 @java.lang.Override
1697 public onnx.OnnxMl.GraphProto getG() {
1698 return g_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : g_;
1699 }
1700 /**
1701 * <pre>
1702 * graph
1703 * </pre>
1704 *
1705 * <code>optional .onnx.GraphProto g = 6;</code>
1706 */
1707 @java.lang.Override
1708 public onnx.OnnxMl.GraphProtoOrBuilder getGOrBuilder() {
1709 return g_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : g_;
1710 }
1711
1712 public static final int SPARSE_TENSOR_FIELD_NUMBER = 22;
1713 private onnx.OnnxMl.SparseTensorProto sparseTensor_;
1714 /**
1715 * <pre>
1716 * sparse tensor value
1717 * </pre>
1718 *
1719 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
1720 * @return Whether the sparseTensor field is set.
1721 */
1722 @java.lang.Override
1723 public boolean hasSparseTensor() {
1724 return ((bitField0_ & 0x00000200) != 0);
1725 }
1726 /**
1727 * <pre>
1728 * sparse tensor value
1729 * </pre>
1730 *
1731 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
1732 * @return The sparseTensor.
1733 */
1734 @java.lang.Override
1735 public onnx.OnnxMl.SparseTensorProto getSparseTensor() {
1736 return sparseTensor_ == null ? onnx.OnnxMl.SparseTensorProto.getDefaultInstance() : sparseTensor_;
1737 }
1738 /**
1739 * <pre>
1740 * sparse tensor value
1741 * </pre>
1742 *
1743 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
1744 */
1745 @java.lang.Override
1746 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorOrBuilder() {
1747 return sparseTensor_ == null ? onnx.OnnxMl.SparseTensorProto.getDefaultInstance() : sparseTensor_;
1748 }
1749
1750 public static final int TP_FIELD_NUMBER = 14;
1751 private onnx.OnnxMl.TypeProto tp_;
1752 /**
1753 * <pre>
1754 * Do not use field below, it's deprecated.
1755 * optional ValueProto v = 12; // value - subsumes everything but graph
1756 * </pre>
1757 *
1758 * <code>optional .onnx.TypeProto tp = 14;</code>
1759 * @return Whether the tp field is set.
1760 */
1761 @java.lang.Override
1762 public boolean hasTp() {
1763 return ((bitField0_ & 0x00000400) != 0);
1764 }
1765 /**
1766 * <pre>
1767 * Do not use field below, it's deprecated.
1768 * optional ValueProto v = 12; // value - subsumes everything but graph
1769 * </pre>
1770 *
1771 * <code>optional .onnx.TypeProto tp = 14;</code>
1772 * @return The tp.
1773 */
1774 @java.lang.Override
1775 public onnx.OnnxMl.TypeProto getTp() {
1776 return tp_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : tp_;
1777 }
1778 /**
1779 * <pre>
1780 * Do not use field below, it's deprecated.
1781 * optional ValueProto v = 12; // value - subsumes everything but graph
1782 * </pre>
1783 *
1784 * <code>optional .onnx.TypeProto tp = 14;</code>
1785 */
1786 @java.lang.Override
1787 public onnx.OnnxMl.TypeProtoOrBuilder getTpOrBuilder() {
1788 return tp_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : tp_;
1789 }
1790
1791 public static final int FLOATS_FIELD_NUMBER = 7;
1792 @SuppressWarnings("serial")
1793 private com.google.protobuf.Internal.FloatList floats_ =
1794 emptyFloatList();
1795 /**
1796 * <pre>
1797 * list of floats
1798 * </pre>
1799 *
1800 * <code>repeated float floats = 7;</code>
1801 * @return A list containing the floats.
1802 */
1803 @java.lang.Override
1804 public java.util.List<java.lang.Float>
1805 getFloatsList() {
1806 return floats_;
1807 }
1808 /**
1809 * <pre>
1810 * list of floats
1811 * </pre>
1812 *
1813 * <code>repeated float floats = 7;</code>
1814 * @return The count of floats.
1815 */
1816 public int getFloatsCount() {
1817 return floats_.size();
1818 }
1819 /**
1820 * <pre>
1821 * list of floats
1822 * </pre>
1823 *
1824 * <code>repeated float floats = 7;</code>
1825 * @param index The index of the element to return.
1826 * @return The floats at the given index.
1827 */
1828 public float getFloats(int index) {
1829 return floats_.getFloat(index);
1830 }
1831
1832 public static final int INTS_FIELD_NUMBER = 8;
1833 @SuppressWarnings("serial")
1834 private com.google.protobuf.Internal.LongList ints_ =
1835 emptyLongList();
1836 /**
1837 * <pre>
1838 * list of ints
1839 * </pre>
1840 *
1841 * <code>repeated int64 ints = 8;</code>
1842 * @return A list containing the ints.
1843 */
1844 @java.lang.Override
1845 public java.util.List<java.lang.Long>
1846 getIntsList() {
1847 return ints_;
1848 }
1849 /**
1850 * <pre>
1851 * list of ints
1852 * </pre>
1853 *
1854 * <code>repeated int64 ints = 8;</code>
1855 * @return The count of ints.
1856 */
1857 public int getIntsCount() {
1858 return ints_.size();
1859 }
1860 /**
1861 * <pre>
1862 * list of ints
1863 * </pre>
1864 *
1865 * <code>repeated int64 ints = 8;</code>
1866 * @param index The index of the element to return.
1867 * @return The ints at the given index.
1868 */
1869 public long getInts(int index) {
1870 return ints_.getLong(index);
1871 }
1872
1873 public static final int STRINGS_FIELD_NUMBER = 9;
1874 @SuppressWarnings("serial")
1875 private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> strings_ =
1876 emptyList(com.google.protobuf.ByteString.class);
1877 /**
1878 * <pre>
1879 * list of UTF-8 strings
1880 * </pre>
1881 *
1882 * <code>repeated bytes strings = 9;</code>
1883 * @return A list containing the strings.
1884 */
1885 @java.lang.Override
1886 public java.util.List<com.google.protobuf.ByteString>
1887 getStringsList() {
1888 return strings_;
1889 }
1890 /**
1891 * <pre>
1892 * list of UTF-8 strings
1893 * </pre>
1894 *
1895 * <code>repeated bytes strings = 9;</code>
1896 * @return The count of strings.
1897 */
1898 public int getStringsCount() {
1899 return strings_.size();
1900 }
1901 /**
1902 * <pre>
1903 * list of UTF-8 strings
1904 * </pre>
1905 *
1906 * <code>repeated bytes strings = 9;</code>
1907 * @param index The index of the element to return.
1908 * @return The strings at the given index.
1909 */
1910 public com.google.protobuf.ByteString getStrings(int index) {
1911 return strings_.get(index);
1912 }
1913
1914 public static final int TENSORS_FIELD_NUMBER = 10;
1915 @SuppressWarnings("serial")
1916 private java.util.List<onnx.OnnxMl.TensorProto> tensors_;
1917 /**
1918 * <pre>
1919 * list of tensors
1920 * </pre>
1921 *
1922 * <code>repeated .onnx.TensorProto tensors = 10;</code>
1923 */
1924 @java.lang.Override
1925 public java.util.List<onnx.OnnxMl.TensorProto> getTensorsList() {
1926 return tensors_;
1927 }
1928 /**
1929 * <pre>
1930 * list of tensors
1931 * </pre>
1932 *
1933 * <code>repeated .onnx.TensorProto tensors = 10;</code>
1934 */
1935 @java.lang.Override
1936 public java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
1937 getTensorsOrBuilderList() {
1938 return tensors_;
1939 }
1940 /**
1941 * <pre>
1942 * list of tensors
1943 * </pre>
1944 *
1945 * <code>repeated .onnx.TensorProto tensors = 10;</code>
1946 */
1947 @java.lang.Override
1948 public int getTensorsCount() {
1949 return tensors_.size();
1950 }
1951 /**
1952 * <pre>
1953 * list of tensors
1954 * </pre>
1955 *
1956 * <code>repeated .onnx.TensorProto tensors = 10;</code>
1957 */
1958 @java.lang.Override
1959 public onnx.OnnxMl.TensorProto getTensors(int index) {
1960 return tensors_.get(index);
1961 }
1962 /**
1963 * <pre>
1964 * list of tensors
1965 * </pre>
1966 *
1967 * <code>repeated .onnx.TensorProto tensors = 10;</code>
1968 */
1969 @java.lang.Override
1970 public onnx.OnnxMl.TensorProtoOrBuilder getTensorsOrBuilder(
1971 int index) {
1972 return tensors_.get(index);
1973 }
1974
1975 public static final int GRAPHS_FIELD_NUMBER = 11;
1976 @SuppressWarnings("serial")
1977 private java.util.List<onnx.OnnxMl.GraphProto> graphs_;
1978 /**
1979 * <pre>
1980 * list of graph
1981 * </pre>
1982 *
1983 * <code>repeated .onnx.GraphProto graphs = 11;</code>
1984 */
1985 @java.lang.Override
1986 public java.util.List<onnx.OnnxMl.GraphProto> getGraphsList() {
1987 return graphs_;
1988 }
1989 /**
1990 * <pre>
1991 * list of graph
1992 * </pre>
1993 *
1994 * <code>repeated .onnx.GraphProto graphs = 11;</code>
1995 */
1996 @java.lang.Override
1997 public java.util.List<? extends onnx.OnnxMl.GraphProtoOrBuilder>
1998 getGraphsOrBuilderList() {
1999 return graphs_;
2000 }
2001 /**
2002 * <pre>
2003 * list of graph
2004 * </pre>
2005 *
2006 * <code>repeated .onnx.GraphProto graphs = 11;</code>
2007 */
2008 @java.lang.Override
2009 public int getGraphsCount() {
2010 return graphs_.size();
2011 }
2012 /**
2013 * <pre>
2014 * list of graph
2015 * </pre>
2016 *
2017 * <code>repeated .onnx.GraphProto graphs = 11;</code>
2018 */
2019 @java.lang.Override
2020 public onnx.OnnxMl.GraphProto getGraphs(int index) {
2021 return graphs_.get(index);
2022 }
2023 /**
2024 * <pre>
2025 * list of graph
2026 * </pre>
2027 *
2028 * <code>repeated .onnx.GraphProto graphs = 11;</code>
2029 */
2030 @java.lang.Override
2031 public onnx.OnnxMl.GraphProtoOrBuilder getGraphsOrBuilder(
2032 int index) {
2033 return graphs_.get(index);
2034 }
2035
2036 public static final int SPARSE_TENSORS_FIELD_NUMBER = 23;
2037 @SuppressWarnings("serial")
2038 private java.util.List<onnx.OnnxMl.SparseTensorProto> sparseTensors_;
2039 /**
2040 * <pre>
2041 * list of sparse tensors
2042 * </pre>
2043 *
2044 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
2045 */
2046 @java.lang.Override
2047 public java.util.List<onnx.OnnxMl.SparseTensorProto> getSparseTensorsList() {
2048 return sparseTensors_;
2049 }
2050 /**
2051 * <pre>
2052 * list of sparse tensors
2053 * </pre>
2054 *
2055 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
2056 */
2057 @java.lang.Override
2058 public java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
2059 getSparseTensorsOrBuilderList() {
2060 return sparseTensors_;
2061 }
2062 /**
2063 * <pre>
2064 * list of sparse tensors
2065 * </pre>
2066 *
2067 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
2068 */
2069 @java.lang.Override
2070 public int getSparseTensorsCount() {
2071 return sparseTensors_.size();
2072 }
2073 /**
2074 * <pre>
2075 * list of sparse tensors
2076 * </pre>
2077 *
2078 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
2079 */
2080 @java.lang.Override
2081 public onnx.OnnxMl.SparseTensorProto getSparseTensors(int index) {
2082 return sparseTensors_.get(index);
2083 }
2084 /**
2085 * <pre>
2086 * list of sparse tensors
2087 * </pre>
2088 *
2089 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
2090 */
2091 @java.lang.Override
2092 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorsOrBuilder(
2093 int index) {
2094 return sparseTensors_.get(index);
2095 }
2096
2097 public static final int TYPE_PROTOS_FIELD_NUMBER = 15;
2098 @SuppressWarnings("serial")
2099 private java.util.List<onnx.OnnxMl.TypeProto> typeProtos_;
2100 /**
2101 * <pre>
2102 * list of type protos
2103 * </pre>
2104 *
2105 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
2106 */
2107 @java.lang.Override
2108 public java.util.List<onnx.OnnxMl.TypeProto> getTypeProtosList() {
2109 return typeProtos_;
2110 }
2111 /**
2112 * <pre>
2113 * list of type protos
2114 * </pre>
2115 *
2116 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
2117 */
2118 @java.lang.Override
2119 public java.util.List<? extends onnx.OnnxMl.TypeProtoOrBuilder>
2120 getTypeProtosOrBuilderList() {
2121 return typeProtos_;
2122 }
2123 /**
2124 * <pre>
2125 * list of type protos
2126 * </pre>
2127 *
2128 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
2129 */
2130 @java.lang.Override
2131 public int getTypeProtosCount() {
2132 return typeProtos_.size();
2133 }
2134 /**
2135 * <pre>
2136 * list of type protos
2137 * </pre>
2138 *
2139 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
2140 */
2141 @java.lang.Override
2142 public onnx.OnnxMl.TypeProto getTypeProtos(int index) {
2143 return typeProtos_.get(index);
2144 }
2145 /**
2146 * <pre>
2147 * list of type protos
2148 * </pre>
2149 *
2150 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
2151 */
2152 @java.lang.Override
2153 public onnx.OnnxMl.TypeProtoOrBuilder getTypeProtosOrBuilder(
2154 int index) {
2155 return typeProtos_.get(index);
2156 }
2157
2158 private byte memoizedIsInitialized = -1;
2159 @java.lang.Override
2160 public final boolean isInitialized() {
2161 byte isInitialized = memoizedIsInitialized;
2162 if (isInitialized == 1) return true;
2163 if (isInitialized == 0) return false;
2164
2165 memoizedIsInitialized = 1;
2166 return true;
2167 }
2168
2169 @java.lang.Override
2170 public void writeTo(com.google.protobuf.CodedOutputStream output)
2171 throws java.io.IOException {
2172 if (((bitField0_ & 0x00000001) != 0)) {
2173 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
2174 }
2175 if (((bitField0_ & 0x00000010) != 0)) {
2176 output.writeFloat(2, f_);
2177 }
2178 if (((bitField0_ & 0x00000020) != 0)) {
2179 output.writeInt64(3, i_);
2180 }
2181 if (((bitField0_ & 0x00000040) != 0)) {
2182 output.writeBytes(4, s_);
2183 }
2184 if (((bitField0_ & 0x00000080) != 0)) {
2185 output.writeMessage(5, getT());
2186 }
2187 if (((bitField0_ & 0x00000100) != 0)) {
2188 output.writeMessage(6, getG());
2189 }
2190 for (int i = 0; i < floats_.size(); i++) {
2191 output.writeFloat(7, floats_.getFloat(i));
2192 }
2193 for (int i = 0; i < ints_.size(); i++) {
2194 output.writeInt64(8, ints_.getLong(i));
2195 }
2196 for (int i = 0; i < strings_.size(); i++) {
2197 output.writeBytes(9, strings_.get(i));
2198 }
2199 for (int i = 0; i < tensors_.size(); i++) {
2200 output.writeMessage(10, tensors_.get(i));
2201 }
2202 for (int i = 0; i < graphs_.size(); i++) {
2203 output.writeMessage(11, graphs_.get(i));
2204 }
2205 if (((bitField0_ & 0x00000004) != 0)) {
2206 com.google.protobuf.GeneratedMessage.writeString(output, 13, docString_);
2207 }
2208 if (((bitField0_ & 0x00000400) != 0)) {
2209 output.writeMessage(14, getTp());
2210 }
2211 for (int i = 0; i < typeProtos_.size(); i++) {
2212 output.writeMessage(15, typeProtos_.get(i));
2213 }
2214 if (((bitField0_ & 0x00000008) != 0)) {
2215 output.writeEnum(20, type_);
2216 }
2217 if (((bitField0_ & 0x00000002) != 0)) {
2218 com.google.protobuf.GeneratedMessage.writeString(output, 21, refAttrName_);
2219 }
2220 if (((bitField0_ & 0x00000200) != 0)) {
2221 output.writeMessage(22, getSparseTensor());
2222 }
2223 for (int i = 0; i < sparseTensors_.size(); i++) {
2224 output.writeMessage(23, sparseTensors_.get(i));
2225 }
2226 getUnknownFields().writeTo(output);
2227 }
2228
2229 @java.lang.Override
2230 public int getSerializedSize() {
2231 int size = memoizedSize;
2232 if (size != -1) return size;
2233
2234 size = 0;
2235 if (((bitField0_ & 0x00000001) != 0)) {
2236 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
2237 }
2238 if (((bitField0_ & 0x00000010) != 0)) {
2239 size += com.google.protobuf.CodedOutputStream
2240 .computeFloatSize(2, f_);
2241 }
2242 if (((bitField0_ & 0x00000020) != 0)) {
2243 size += com.google.protobuf.CodedOutputStream
2244 .computeInt64Size(3, i_);
2245 }
2246 if (((bitField0_ & 0x00000040) != 0)) {
2247 size += com.google.protobuf.CodedOutputStream
2248 .computeBytesSize(4, s_);
2249 }
2250 if (((bitField0_ & 0x00000080) != 0)) {
2251 size += com.google.protobuf.CodedOutputStream
2252 .computeMessageSize(5, getT());
2253 }
2254 if (((bitField0_ & 0x00000100) != 0)) {
2255 size += com.google.protobuf.CodedOutputStream
2256 .computeMessageSize(6, getG());
2257 }
2258 {
2259 int dataSize = 0;
2260 dataSize = 4 * getFloatsList().size();
2261 size += dataSize;
2262 size += 1 * getFloatsList().size();
2263 }
2264 {
2265 int dataSize = 0;
2266 for (int i = 0; i < ints_.size(); i++) {
2267 dataSize += com.google.protobuf.CodedOutputStream
2268 .computeInt64SizeNoTag(ints_.getLong(i));
2269 }
2270 size += dataSize;
2271 size += 1 * getIntsList().size();
2272 }
2273 {
2274 int dataSize = 0;
2275 for (int i = 0; i < strings_.size(); i++) {
2276 dataSize += com.google.protobuf.CodedOutputStream
2277 .computeBytesSizeNoTag(strings_.get(i));
2278 }
2279 size += dataSize;
2280 size += 1 * getStringsList().size();
2281 }
2282 for (int i = 0; i < tensors_.size(); i++) {
2283 size += com.google.protobuf.CodedOutputStream
2284 .computeMessageSize(10, tensors_.get(i));
2285 }
2286 for (int i = 0; i < graphs_.size(); i++) {
2287 size += com.google.protobuf.CodedOutputStream
2288 .computeMessageSize(11, graphs_.get(i));
2289 }
2290 if (((bitField0_ & 0x00000004) != 0)) {
2291 size += com.google.protobuf.GeneratedMessage.computeStringSize(13, docString_);
2292 }
2293 if (((bitField0_ & 0x00000400) != 0)) {
2294 size += com.google.protobuf.CodedOutputStream
2295 .computeMessageSize(14, getTp());
2296 }
2297 for (int i = 0; i < typeProtos_.size(); i++) {
2298 size += com.google.protobuf.CodedOutputStream
2299 .computeMessageSize(15, typeProtos_.get(i));
2300 }
2301 if (((bitField0_ & 0x00000008) != 0)) {
2302 size += com.google.protobuf.CodedOutputStream
2303 .computeEnumSize(20, type_);
2304 }
2305 if (((bitField0_ & 0x00000002) != 0)) {
2306 size += com.google.protobuf.GeneratedMessage.computeStringSize(21, refAttrName_);
2307 }
2308 if (((bitField0_ & 0x00000200) != 0)) {
2309 size += com.google.protobuf.CodedOutputStream
2310 .computeMessageSize(22, getSparseTensor());
2311 }
2312 for (int i = 0; i < sparseTensors_.size(); i++) {
2313 size += com.google.protobuf.CodedOutputStream
2314 .computeMessageSize(23, sparseTensors_.get(i));
2315 }
2316 size += getUnknownFields().getSerializedSize();
2317 memoizedSize = size;
2318 return size;
2319 }
2320
2321 @java.lang.Override
2322 public boolean equals(final java.lang.Object obj) {
2323 if (obj == this) {
2324 return true;
2325 }
2326 if (!(obj instanceof onnx.OnnxMl.AttributeProto)) {
2327 return super.equals(obj);
2328 }
2329 onnx.OnnxMl.AttributeProto other = (onnx.OnnxMl.AttributeProto) obj;
2330
2331 if (hasName() != other.hasName()) return false;
2332 if (hasName()) {
2333 if (!getName()
2334 .equals(other.getName())) return false;
2335 }
2336 if (hasRefAttrName() != other.hasRefAttrName()) return false;
2337 if (hasRefAttrName()) {
2338 if (!getRefAttrName()
2339 .equals(other.getRefAttrName())) return false;
2340 }
2341 if (hasDocString() != other.hasDocString()) return false;
2342 if (hasDocString()) {
2343 if (!getDocString()
2344 .equals(other.getDocString())) return false;
2345 }
2346 if (hasType() != other.hasType()) return false;
2347 if (hasType()) {
2348 if (type_ != other.type_) return false;
2349 }
2350 if (hasF() != other.hasF()) return false;
2351 if (hasF()) {
2352 if (java.lang.Float.floatToIntBits(getF())
2353 != java.lang.Float.floatToIntBits(
2354 other.getF())) return false;
2355 }
2356 if (hasI() != other.hasI()) return false;
2357 if (hasI()) {
2358 if (getI()
2359 != other.getI()) return false;
2360 }
2361 if (hasS() != other.hasS()) return false;
2362 if (hasS()) {
2363 if (!getS()
2364 .equals(other.getS())) return false;
2365 }
2366 if (hasT() != other.hasT()) return false;
2367 if (hasT()) {
2368 if (!getT()
2369 .equals(other.getT())) return false;
2370 }
2371 if (hasG() != other.hasG()) return false;
2372 if (hasG()) {
2373 if (!getG()
2374 .equals(other.getG())) return false;
2375 }
2376 if (hasSparseTensor() != other.hasSparseTensor()) return false;
2377 if (hasSparseTensor()) {
2378 if (!getSparseTensor()
2379 .equals(other.getSparseTensor())) return false;
2380 }
2381 if (hasTp() != other.hasTp()) return false;
2382 if (hasTp()) {
2383 if (!getTp()
2384 .equals(other.getTp())) return false;
2385 }
2386 if (!getFloatsList()
2387 .equals(other.getFloatsList())) return false;
2388 if (!getIntsList()
2389 .equals(other.getIntsList())) return false;
2390 if (!getStringsList()
2391 .equals(other.getStringsList())) return false;
2392 if (!getTensorsList()
2393 .equals(other.getTensorsList())) return false;
2394 if (!getGraphsList()
2395 .equals(other.getGraphsList())) return false;
2396 if (!getSparseTensorsList()
2397 .equals(other.getSparseTensorsList())) return false;
2398 if (!getTypeProtosList()
2399 .equals(other.getTypeProtosList())) return false;
2400 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2401 return true;
2402 }
2403
2404 @java.lang.Override
2405 public int hashCode() {
2406 if (memoizedHashCode != 0) {
2407 return memoizedHashCode;
2408 }
2409 int hash = 41;
2410 hash = (19 * hash) + getDescriptor().hashCode();
2411 if (hasName()) {
2412 hash = (37 * hash) + NAME_FIELD_NUMBER;
2413 hash = (53 * hash) + getName().hashCode();
2414 }
2415 if (hasRefAttrName()) {
2416 hash = (37 * hash) + REF_ATTR_NAME_FIELD_NUMBER;
2417 hash = (53 * hash) + getRefAttrName().hashCode();
2418 }
2419 if (hasDocString()) {
2420 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
2421 hash = (53 * hash) + getDocString().hashCode();
2422 }
2423 if (hasType()) {
2424 hash = (37 * hash) + TYPE_FIELD_NUMBER;
2425 hash = (53 * hash) + type_;
2426 }
2427 if (hasF()) {
2428 hash = (37 * hash) + F_FIELD_NUMBER;
2429 hash = (53 * hash) + java.lang.Float.floatToIntBits(
2430 getF());
2431 }
2432 if (hasI()) {
2433 hash = (37 * hash) + I_FIELD_NUMBER;
2434 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2435 getI());
2436 }
2437 if (hasS()) {
2438 hash = (37 * hash) + S_FIELD_NUMBER;
2439 hash = (53 * hash) + getS().hashCode();
2440 }
2441 if (hasT()) {
2442 hash = (37 * hash) + T_FIELD_NUMBER;
2443 hash = (53 * hash) + getT().hashCode();
2444 }
2445 if (hasG()) {
2446 hash = (37 * hash) + G_FIELD_NUMBER;
2447 hash = (53 * hash) + getG().hashCode();
2448 }
2449 if (hasSparseTensor()) {
2450 hash = (37 * hash) + SPARSE_TENSOR_FIELD_NUMBER;
2451 hash = (53 * hash) + getSparseTensor().hashCode();
2452 }
2453 if (hasTp()) {
2454 hash = (37 * hash) + TP_FIELD_NUMBER;
2455 hash = (53 * hash) + getTp().hashCode();
2456 }
2457 if (getFloatsCount() > 0) {
2458 hash = (37 * hash) + FLOATS_FIELD_NUMBER;
2459 hash = (53 * hash) + getFloatsList().hashCode();
2460 }
2461 if (getIntsCount() > 0) {
2462 hash = (37 * hash) + INTS_FIELD_NUMBER;
2463 hash = (53 * hash) + getIntsList().hashCode();
2464 }
2465 if (getStringsCount() > 0) {
2466 hash = (37 * hash) + STRINGS_FIELD_NUMBER;
2467 hash = (53 * hash) + getStringsList().hashCode();
2468 }
2469 if (getTensorsCount() > 0) {
2470 hash = (37 * hash) + TENSORS_FIELD_NUMBER;
2471 hash = (53 * hash) + getTensorsList().hashCode();
2472 }
2473 if (getGraphsCount() > 0) {
2474 hash = (37 * hash) + GRAPHS_FIELD_NUMBER;
2475 hash = (53 * hash) + getGraphsList().hashCode();
2476 }
2477 if (getSparseTensorsCount() > 0) {
2478 hash = (37 * hash) + SPARSE_TENSORS_FIELD_NUMBER;
2479 hash = (53 * hash) + getSparseTensorsList().hashCode();
2480 }
2481 if (getTypeProtosCount() > 0) {
2482 hash = (37 * hash) + TYPE_PROTOS_FIELD_NUMBER;
2483 hash = (53 * hash) + getTypeProtosList().hashCode();
2484 }
2485 hash = (29 * hash) + getUnknownFields().hashCode();
2486 memoizedHashCode = hash;
2487 return hash;
2488 }
2489
2490 public static onnx.OnnxMl.AttributeProto parseFrom(
2491 java.nio.ByteBuffer data)
2492 throws com.google.protobuf.InvalidProtocolBufferException {
2493 return PARSER.parseFrom(data);
2494 }
2495 public static onnx.OnnxMl.AttributeProto parseFrom(
2496 java.nio.ByteBuffer data,
2497 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2498 throws com.google.protobuf.InvalidProtocolBufferException {
2499 return PARSER.parseFrom(data, extensionRegistry);
2500 }
2501 public static onnx.OnnxMl.AttributeProto parseFrom(
2502 com.google.protobuf.ByteString data)
2503 throws com.google.protobuf.InvalidProtocolBufferException {
2504 return PARSER.parseFrom(data);
2505 }
2506 public static onnx.OnnxMl.AttributeProto parseFrom(
2507 com.google.protobuf.ByteString data,
2508 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2509 throws com.google.protobuf.InvalidProtocolBufferException {
2510 return PARSER.parseFrom(data, extensionRegistry);
2511 }
2512 public static onnx.OnnxMl.AttributeProto parseFrom(byte[] data)
2513 throws com.google.protobuf.InvalidProtocolBufferException {
2514 return PARSER.parseFrom(data);
2515 }
2516 public static onnx.OnnxMl.AttributeProto parseFrom(
2517 byte[] data,
2518 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2519 throws com.google.protobuf.InvalidProtocolBufferException {
2520 return PARSER.parseFrom(data, extensionRegistry);
2521 }
2522 public static onnx.OnnxMl.AttributeProto parseFrom(java.io.InputStream input)
2523 throws java.io.IOException {
2524 return com.google.protobuf.GeneratedMessage
2525 .parseWithIOException(PARSER, input);
2526 }
2527 public static onnx.OnnxMl.AttributeProto parseFrom(
2528 java.io.InputStream input,
2529 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2530 throws java.io.IOException {
2531 return com.google.protobuf.GeneratedMessage
2532 .parseWithIOException(PARSER, input, extensionRegistry);
2533 }
2534
2535 public static onnx.OnnxMl.AttributeProto parseDelimitedFrom(java.io.InputStream input)
2536 throws java.io.IOException {
2537 return com.google.protobuf.GeneratedMessage
2538 .parseDelimitedWithIOException(PARSER, input);
2539 }
2540
2541 public static onnx.OnnxMl.AttributeProto parseDelimitedFrom(
2542 java.io.InputStream input,
2543 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2544 throws java.io.IOException {
2545 return com.google.protobuf.GeneratedMessage
2546 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
2547 }
2548 public static onnx.OnnxMl.AttributeProto parseFrom(
2549 com.google.protobuf.CodedInputStream input)
2550 throws java.io.IOException {
2551 return com.google.protobuf.GeneratedMessage
2552 .parseWithIOException(PARSER, input);
2553 }
2554 public static onnx.OnnxMl.AttributeProto parseFrom(
2555 com.google.protobuf.CodedInputStream input,
2556 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2557 throws java.io.IOException {
2558 return com.google.protobuf.GeneratedMessage
2559 .parseWithIOException(PARSER, input, extensionRegistry);
2560 }
2561
2562 @java.lang.Override
2563 public Builder newBuilderForType() { return newBuilder(); }
2564 public static Builder newBuilder() {
2565 return DEFAULT_INSTANCE.toBuilder();
2566 }
2567 public static Builder newBuilder(onnx.OnnxMl.AttributeProto prototype) {
2568 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2569 }
2570 @java.lang.Override
2571 public Builder toBuilder() {
2572 return this == DEFAULT_INSTANCE
2573 ? new Builder() : new Builder().mergeFrom(this);
2574 }
2575
2576 @java.lang.Override
2577 protected Builder newBuilderForType(
2578 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2579 Builder builder = new Builder(parent);
2580 return builder;
2581 }
2582 /**
2583 * <pre>
2584 * Attributes
2585 *
2586 * A named attribute containing either singular float, integer, string, graph,
2587 * and tensor values, or repeated float, integer, string, graph, and tensor values.
2588 * An AttributeProto MUST contain the name field, and *only one* of the
2589 * following content fields, effectively enforcing a C/C++ union equivalent.
2590 * </pre>
2591 *
2592 * Protobuf type {@code onnx.AttributeProto}
2593 */
2594 public static final class Builder extends
2595 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
2596 // @@protoc_insertion_point(builder_implements:onnx.AttributeProto)
2597 onnx.OnnxMl.AttributeProtoOrBuilder {
2598 public static final com.google.protobuf.Descriptors.Descriptor
2599 getDescriptor() {
2600 return onnx.OnnxMl.internal_static_onnx_AttributeProto_descriptor;
2601 }
2602
2603 @java.lang.Override
2604 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2605 internalGetFieldAccessorTable() {
2606 return onnx.OnnxMl.internal_static_onnx_AttributeProto_fieldAccessorTable
2607 .ensureFieldAccessorsInitialized(
2608 onnx.OnnxMl.AttributeProto.class, onnx.OnnxMl.AttributeProto.Builder.class);
2609 }
2610
2611 // Construct using onnx.OnnxMl.AttributeProto.newBuilder()
2612 private Builder() {
2613 maybeForceBuilderInitialization();
2614 }
2615
2616 private Builder(
2617 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2618 super(parent);
2619 maybeForceBuilderInitialization();
2620 }
2621 private void maybeForceBuilderInitialization() {
2622 if (com.google.protobuf.GeneratedMessage
2623 .alwaysUseFieldBuilders) {
2624 getTFieldBuilder();
2625 getGFieldBuilder();
2626 getSparseTensorFieldBuilder();
2627 getTpFieldBuilder();
2628 getTensorsFieldBuilder();
2629 getGraphsFieldBuilder();
2630 getSparseTensorsFieldBuilder();
2631 getTypeProtosFieldBuilder();
2632 }
2633 }
2634 @java.lang.Override
2635 public Builder clear() {
2636 super.clear();
2637 bitField0_ = 0;
2638 name_ = "";
2639 refAttrName_ = "";
2640 docString_ = "";
2641 type_ = 0;
2642 f_ = 0F;
2643 i_ = 0L;
2644 s_ = com.google.protobuf.ByteString.EMPTY;
2645 t_ = null;
2646 if (tBuilder_ != null) {
2647 tBuilder_.dispose();
2648 tBuilder_ = null;
2649 }
2650 g_ = null;
2651 if (gBuilder_ != null) {
2652 gBuilder_.dispose();
2653 gBuilder_ = null;
2654 }
2655 sparseTensor_ = null;
2656 if (sparseTensorBuilder_ != null) {
2657 sparseTensorBuilder_.dispose();
2658 sparseTensorBuilder_ = null;
2659 }
2660 tp_ = null;
2661 if (tpBuilder_ != null) {
2662 tpBuilder_.dispose();
2663 tpBuilder_ = null;
2664 }
2665 floats_ = emptyFloatList();
2666 ints_ = emptyLongList();
2667 strings_ = emptyList(com.google.protobuf.ByteString.class);
2668 if (tensorsBuilder_ == null) {
2669 tensors_ = java.util.Collections.emptyList();
2670 } else {
2671 tensors_ = null;
2672 tensorsBuilder_.clear();
2673 }
2674 bitField0_ = (bitField0_ & ~0x00004000);
2675 if (graphsBuilder_ == null) {
2676 graphs_ = java.util.Collections.emptyList();
2677 } else {
2678 graphs_ = null;
2679 graphsBuilder_.clear();
2680 }
2681 bitField0_ = (bitField0_ & ~0x00008000);
2682 if (sparseTensorsBuilder_ == null) {
2683 sparseTensors_ = java.util.Collections.emptyList();
2684 } else {
2685 sparseTensors_ = null;
2686 sparseTensorsBuilder_.clear();
2687 }
2688 bitField0_ = (bitField0_ & ~0x00010000);
2689 if (typeProtosBuilder_ == null) {
2690 typeProtos_ = java.util.Collections.emptyList();
2691 } else {
2692 typeProtos_ = null;
2693 typeProtosBuilder_.clear();
2694 }
2695 bitField0_ = (bitField0_ & ~0x00020000);
2696 return this;
2697 }
2698
2699 @java.lang.Override
2700 public com.google.protobuf.Descriptors.Descriptor
2701 getDescriptorForType() {
2702 return onnx.OnnxMl.internal_static_onnx_AttributeProto_descriptor;
2703 }
2704
2705 @java.lang.Override
2706 public onnx.OnnxMl.AttributeProto getDefaultInstanceForType() {
2707 return onnx.OnnxMl.AttributeProto.getDefaultInstance();
2708 }
2709
2710 @java.lang.Override
2711 public onnx.OnnxMl.AttributeProto build() {
2712 onnx.OnnxMl.AttributeProto result = buildPartial();
2713 if (!result.isInitialized()) {
2714 throw newUninitializedMessageException(result);
2715 }
2716 return result;
2717 }
2718
2719 @java.lang.Override
2720 public onnx.OnnxMl.AttributeProto buildPartial() {
2721 onnx.OnnxMl.AttributeProto result = new onnx.OnnxMl.AttributeProto(this);
2722 buildPartialRepeatedFields(result);
2723 if (bitField0_ != 0) { buildPartial0(result); }
2724 onBuilt();
2725 return result;
2726 }
2727
2728 private void buildPartialRepeatedFields(onnx.OnnxMl.AttributeProto result) {
2729 if (tensorsBuilder_ == null) {
2730 if (((bitField0_ & 0x00004000) != 0)) {
2731 tensors_ = java.util.Collections.unmodifiableList(tensors_);
2732 bitField0_ = (bitField0_ & ~0x00004000);
2733 }
2734 result.tensors_ = tensors_;
2735 } else {
2736 result.tensors_ = tensorsBuilder_.build();
2737 }
2738 if (graphsBuilder_ == null) {
2739 if (((bitField0_ & 0x00008000) != 0)) {
2740 graphs_ = java.util.Collections.unmodifiableList(graphs_);
2741 bitField0_ = (bitField0_ & ~0x00008000);
2742 }
2743 result.graphs_ = graphs_;
2744 } else {
2745 result.graphs_ = graphsBuilder_.build();
2746 }
2747 if (sparseTensorsBuilder_ == null) {
2748 if (((bitField0_ & 0x00010000) != 0)) {
2749 sparseTensors_ = java.util.Collections.unmodifiableList(sparseTensors_);
2750 bitField0_ = (bitField0_ & ~0x00010000);
2751 }
2752 result.sparseTensors_ = sparseTensors_;
2753 } else {
2754 result.sparseTensors_ = sparseTensorsBuilder_.build();
2755 }
2756 if (typeProtosBuilder_ == null) {
2757 if (((bitField0_ & 0x00020000) != 0)) {
2758 typeProtos_ = java.util.Collections.unmodifiableList(typeProtos_);
2759 bitField0_ = (bitField0_ & ~0x00020000);
2760 }
2761 result.typeProtos_ = typeProtos_;
2762 } else {
2763 result.typeProtos_ = typeProtosBuilder_.build();
2764 }
2765 }
2766
2767 private void buildPartial0(onnx.OnnxMl.AttributeProto result) {
2768 int from_bitField0_ = bitField0_;
2769 int to_bitField0_ = 0;
2770 if (((from_bitField0_ & 0x00000001) != 0)) {
2771 result.name_ = name_;
2772 to_bitField0_ |= 0x00000001;
2773 }
2774 if (((from_bitField0_ & 0x00000002) != 0)) {
2775 result.refAttrName_ = refAttrName_;
2776 to_bitField0_ |= 0x00000002;
2777 }
2778 if (((from_bitField0_ & 0x00000004) != 0)) {
2779 result.docString_ = docString_;
2780 to_bitField0_ |= 0x00000004;
2781 }
2782 if (((from_bitField0_ & 0x00000008) != 0)) {
2783 result.type_ = type_;
2784 to_bitField0_ |= 0x00000008;
2785 }
2786 if (((from_bitField0_ & 0x00000010) != 0)) {
2787 result.f_ = f_;
2788 to_bitField0_ |= 0x00000010;
2789 }
2790 if (((from_bitField0_ & 0x00000020) != 0)) {
2791 result.i_ = i_;
2792 to_bitField0_ |= 0x00000020;
2793 }
2794 if (((from_bitField0_ & 0x00000040) != 0)) {
2795 result.s_ = s_;
2796 to_bitField0_ |= 0x00000040;
2797 }
2798 if (((from_bitField0_ & 0x00000080) != 0)) {
2799 result.t_ = tBuilder_ == null
2800 ? t_
2801 : tBuilder_.build();
2802 to_bitField0_ |= 0x00000080;
2803 }
2804 if (((from_bitField0_ & 0x00000100) != 0)) {
2805 result.g_ = gBuilder_ == null
2806 ? g_
2807 : gBuilder_.build();
2808 to_bitField0_ |= 0x00000100;
2809 }
2810 if (((from_bitField0_ & 0x00000200) != 0)) {
2811 result.sparseTensor_ = sparseTensorBuilder_ == null
2812 ? sparseTensor_
2813 : sparseTensorBuilder_.build();
2814 to_bitField0_ |= 0x00000200;
2815 }
2816 if (((from_bitField0_ & 0x00000400) != 0)) {
2817 result.tp_ = tpBuilder_ == null
2818 ? tp_
2819 : tpBuilder_.build();
2820 to_bitField0_ |= 0x00000400;
2821 }
2822 if (((from_bitField0_ & 0x00000800) != 0)) {
2823 floats_.makeImmutable();
2824 result.floats_ = floats_;
2825 }
2826 if (((from_bitField0_ & 0x00001000) != 0)) {
2827 ints_.makeImmutable();
2828 result.ints_ = ints_;
2829 }
2830 if (((from_bitField0_ & 0x00002000) != 0)) {
2831 strings_.makeImmutable();
2832 result.strings_ = strings_;
2833 }
2834 result.bitField0_ |= to_bitField0_;
2835 }
2836
2837 @java.lang.Override
2838 public Builder mergeFrom(com.google.protobuf.Message other) {
2839 if (other instanceof onnx.OnnxMl.AttributeProto) {
2840 return mergeFrom((onnx.OnnxMl.AttributeProto)other);
2841 } else {
2842 super.mergeFrom(other);
2843 return this;
2844 }
2845 }
2846
2847 public Builder mergeFrom(onnx.OnnxMl.AttributeProto other) {
2848 if (other == onnx.OnnxMl.AttributeProto.getDefaultInstance()) return this;
2849 if (other.hasName()) {
2850 name_ = other.name_;
2851 bitField0_ |= 0x00000001;
2852 onChanged();
2853 }
2854 if (other.hasRefAttrName()) {
2855 refAttrName_ = other.refAttrName_;
2856 bitField0_ |= 0x00000002;
2857 onChanged();
2858 }
2859 if (other.hasDocString()) {
2860 docString_ = other.docString_;
2861 bitField0_ |= 0x00000004;
2862 onChanged();
2863 }
2864 if (other.hasType()) {
2865 setType(other.getType());
2866 }
2867 if (other.hasF()) {
2868 setF(other.getF());
2869 }
2870 if (other.hasI()) {
2871 setI(other.getI());
2872 }
2873 if (other.hasS()) {
2874 setS(other.getS());
2875 }
2876 if (other.hasT()) {
2877 mergeT(other.getT());
2878 }
2879 if (other.hasG()) {
2880 mergeG(other.getG());
2881 }
2882 if (other.hasSparseTensor()) {
2883 mergeSparseTensor(other.getSparseTensor());
2884 }
2885 if (other.hasTp()) {
2886 mergeTp(other.getTp());
2887 }
2888 if (!other.floats_.isEmpty()) {
2889 if (floats_.isEmpty()) {
2890 floats_ = other.floats_;
2891 floats_.makeImmutable();
2892 bitField0_ |= 0x00000800;
2893 } else {
2894 ensureFloatsIsMutable();
2895 floats_.addAll(other.floats_);
2896 }
2897 onChanged();
2898 }
2899 if (!other.ints_.isEmpty()) {
2900 if (ints_.isEmpty()) {
2901 ints_ = other.ints_;
2902 ints_.makeImmutable();
2903 bitField0_ |= 0x00001000;
2904 } else {
2905 ensureIntsIsMutable();
2906 ints_.addAll(other.ints_);
2907 }
2908 onChanged();
2909 }
2910 if (!other.strings_.isEmpty()) {
2911 if (strings_.isEmpty()) {
2912 strings_ = other.strings_;
2913 strings_.makeImmutable();
2914 bitField0_ |= 0x00002000;
2915 } else {
2916 ensureStringsIsMutable();
2917 strings_.addAll(other.strings_);
2918 }
2919 onChanged();
2920 }
2921 if (tensorsBuilder_ == null) {
2922 if (!other.tensors_.isEmpty()) {
2923 if (tensors_.isEmpty()) {
2924 tensors_ = other.tensors_;
2925 bitField0_ = (bitField0_ & ~0x00004000);
2926 } else {
2927 ensureTensorsIsMutable();
2928 tensors_.addAll(other.tensors_);
2929 }
2930 onChanged();
2931 }
2932 } else {
2933 if (!other.tensors_.isEmpty()) {
2934 if (tensorsBuilder_.isEmpty()) {
2935 tensorsBuilder_.dispose();
2936 tensorsBuilder_ = null;
2937 tensors_ = other.tensors_;
2938 bitField0_ = (bitField0_ & ~0x00004000);
2939 tensorsBuilder_ =
2940 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2941 getTensorsFieldBuilder() : null;
2942 } else {
2943 tensorsBuilder_.addAllMessages(other.tensors_);
2944 }
2945 }
2946 }
2947 if (graphsBuilder_ == null) {
2948 if (!other.graphs_.isEmpty()) {
2949 if (graphs_.isEmpty()) {
2950 graphs_ = other.graphs_;
2951 bitField0_ = (bitField0_ & ~0x00008000);
2952 } else {
2953 ensureGraphsIsMutable();
2954 graphs_.addAll(other.graphs_);
2955 }
2956 onChanged();
2957 }
2958 } else {
2959 if (!other.graphs_.isEmpty()) {
2960 if (graphsBuilder_.isEmpty()) {
2961 graphsBuilder_.dispose();
2962 graphsBuilder_ = null;
2963 graphs_ = other.graphs_;
2964 bitField0_ = (bitField0_ & ~0x00008000);
2965 graphsBuilder_ =
2966 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2967 getGraphsFieldBuilder() : null;
2968 } else {
2969 graphsBuilder_.addAllMessages(other.graphs_);
2970 }
2971 }
2972 }
2973 if (sparseTensorsBuilder_ == null) {
2974 if (!other.sparseTensors_.isEmpty()) {
2975 if (sparseTensors_.isEmpty()) {
2976 sparseTensors_ = other.sparseTensors_;
2977 bitField0_ = (bitField0_ & ~0x00010000);
2978 } else {
2979 ensureSparseTensorsIsMutable();
2980 sparseTensors_.addAll(other.sparseTensors_);
2981 }
2982 onChanged();
2983 }
2984 } else {
2985 if (!other.sparseTensors_.isEmpty()) {
2986 if (sparseTensorsBuilder_.isEmpty()) {
2987 sparseTensorsBuilder_.dispose();
2988 sparseTensorsBuilder_ = null;
2989 sparseTensors_ = other.sparseTensors_;
2990 bitField0_ = (bitField0_ & ~0x00010000);
2991 sparseTensorsBuilder_ =
2992 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2993 getSparseTensorsFieldBuilder() : null;
2994 } else {
2995 sparseTensorsBuilder_.addAllMessages(other.sparseTensors_);
2996 }
2997 }
2998 }
2999 if (typeProtosBuilder_ == null) {
3000 if (!other.typeProtos_.isEmpty()) {
3001 if (typeProtos_.isEmpty()) {
3002 typeProtos_ = other.typeProtos_;
3003 bitField0_ = (bitField0_ & ~0x00020000);
3004 } else {
3005 ensureTypeProtosIsMutable();
3006 typeProtos_.addAll(other.typeProtos_);
3007 }
3008 onChanged();
3009 }
3010 } else {
3011 if (!other.typeProtos_.isEmpty()) {
3012 if (typeProtosBuilder_.isEmpty()) {
3013 typeProtosBuilder_.dispose();
3014 typeProtosBuilder_ = null;
3015 typeProtos_ = other.typeProtos_;
3016 bitField0_ = (bitField0_ & ~0x00020000);
3017 typeProtosBuilder_ =
3018 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
3019 getTypeProtosFieldBuilder() : null;
3020 } else {
3021 typeProtosBuilder_.addAllMessages(other.typeProtos_);
3022 }
3023 }
3024 }
3025 this.mergeUnknownFields(other.getUnknownFields());
3026 onChanged();
3027 return this;
3028 }
3029
3030 @java.lang.Override
3031 public final boolean isInitialized() {
3032 return true;
3033 }
3034
3035 @java.lang.Override
3036 public Builder mergeFrom(
3037 com.google.protobuf.CodedInputStream input,
3038 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3039 throws java.io.IOException {
3040 if (extensionRegistry == null) {
3041 throw new java.lang.NullPointerException();
3042 }
3043 try {
3044 boolean done = false;
3045 while (!done) {
3046 int tag = input.readTag();
3047 switch (tag) {
3048 case 0:
3049 done = true;
3050 break;
3051 case 10: {
3052 name_ = input.readBytes();
3053 bitField0_ |= 0x00000001;
3054 break;
3055 } // case 10
3056 case 21: {
3057 f_ = input.readFloat();
3058 bitField0_ |= 0x00000010;
3059 break;
3060 } // case 21
3061 case 24: {
3062 i_ = input.readInt64();
3063 bitField0_ |= 0x00000020;
3064 break;
3065 } // case 24
3066 case 34: {
3067 s_ = input.readBytes();
3068 bitField0_ |= 0x00000040;
3069 break;
3070 } // case 34
3071 case 42: {
3072 input.readMessage(
3073 getTFieldBuilder().getBuilder(),
3074 extensionRegistry);
3075 bitField0_ |= 0x00000080;
3076 break;
3077 } // case 42
3078 case 50: {
3079 input.readMessage(
3080 getGFieldBuilder().getBuilder(),
3081 extensionRegistry);
3082 bitField0_ |= 0x00000100;
3083 break;
3084 } // case 50
3085 case 61: {
3086 float v = input.readFloat();
3087 ensureFloatsIsMutable();
3088 floats_.addFloat(v);
3089 break;
3090 } // case 61
3091 case 58: {
3092 int length = input.readRawVarint32();
3093 int limit = input.pushLimit(length);
3094 int alloc = length > 4096 ? 4096 : length;
3095 ensureFloatsIsMutable(alloc / 4);
3096 while (input.getBytesUntilLimit() > 0) {
3097 floats_.addFloat(input.readFloat());
3098 }
3099 input.popLimit(limit);
3100 break;
3101 } // case 58
3102 case 64: {
3103 long v = input.readInt64();
3104 ensureIntsIsMutable();
3105 ints_.addLong(v);
3106 break;
3107 } // case 64
3108 case 66: {
3109 int length = input.readRawVarint32();
3110 int limit = input.pushLimit(length);
3111 ensureIntsIsMutable();
3112 while (input.getBytesUntilLimit() > 0) {
3113 ints_.addLong(input.readInt64());
3114 }
3115 input.popLimit(limit);
3116 break;
3117 } // case 66
3118 case 74: {
3119 com.google.protobuf.ByteString v = input.readBytes();
3120 ensureStringsIsMutable();
3121 strings_.add(v);
3122 break;
3123 } // case 74
3124 case 82: {
3125 onnx.OnnxMl.TensorProto m =
3126 input.readMessage(
3127 onnx.OnnxMl.TensorProto.parser(),
3128 extensionRegistry);
3129 if (tensorsBuilder_ == null) {
3130 ensureTensorsIsMutable();
3131 tensors_.add(m);
3132 } else {
3133 tensorsBuilder_.addMessage(m);
3134 }
3135 break;
3136 } // case 82
3137 case 90: {
3138 onnx.OnnxMl.GraphProto m =
3139 input.readMessage(
3140 onnx.OnnxMl.GraphProto.parser(),
3141 extensionRegistry);
3142 if (graphsBuilder_ == null) {
3143 ensureGraphsIsMutable();
3144 graphs_.add(m);
3145 } else {
3146 graphsBuilder_.addMessage(m);
3147 }
3148 break;
3149 } // case 90
3150 case 106: {
3151 docString_ = input.readBytes();
3152 bitField0_ |= 0x00000004;
3153 break;
3154 } // case 106
3155 case 114: {
3156 input.readMessage(
3157 getTpFieldBuilder().getBuilder(),
3158 extensionRegistry);
3159 bitField0_ |= 0x00000400;
3160 break;
3161 } // case 114
3162 case 122: {
3163 onnx.OnnxMl.TypeProto m =
3164 input.readMessage(
3165 onnx.OnnxMl.TypeProto.parser(),
3166 extensionRegistry);
3167 if (typeProtosBuilder_ == null) {
3168 ensureTypeProtosIsMutable();
3169 typeProtos_.add(m);
3170 } else {
3171 typeProtosBuilder_.addMessage(m);
3172 }
3173 break;
3174 } // case 122
3175 case 160: {
3176 int tmpRaw = input.readEnum();
3177 onnx.OnnxMl.AttributeProto.AttributeType tmpValue =
3178 onnx.OnnxMl.AttributeProto.AttributeType.forNumber(tmpRaw);
3179 if (tmpValue == null) {
3180 mergeUnknownVarintField(20, tmpRaw);
3181 } else {
3182 type_ = tmpRaw;
3183 bitField0_ |= 0x00000008;
3184 }
3185 break;
3186 } // case 160
3187 case 170: {
3188 refAttrName_ = input.readBytes();
3189 bitField0_ |= 0x00000002;
3190 break;
3191 } // case 170
3192 case 178: {
3193 input.readMessage(
3194 getSparseTensorFieldBuilder().getBuilder(),
3195 extensionRegistry);
3196 bitField0_ |= 0x00000200;
3197 break;
3198 } // case 178
3199 case 186: {
3200 onnx.OnnxMl.SparseTensorProto m =
3201 input.readMessage(
3202 onnx.OnnxMl.SparseTensorProto.parser(),
3203 extensionRegistry);
3204 if (sparseTensorsBuilder_ == null) {
3205 ensureSparseTensorsIsMutable();
3206 sparseTensors_.add(m);
3207 } else {
3208 sparseTensorsBuilder_.addMessage(m);
3209 }
3210 break;
3211 } // case 186
3212 default: {
3213 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
3214 done = true; // was an endgroup tag
3215 }
3216 break;
3217 } // default:
3218 } // switch (tag)
3219 } // while (!done)
3220 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3221 throw e.unwrapIOException();
3222 } finally {
3223 onChanged();
3224 } // finally
3225 return this;
3226 }
3227 private int bitField0_;
3228
3229 private java.lang.Object name_ = "";
3230 /**
3231 * <pre>
3232 * The name field MUST be present for this version of the IR.
3233 * </pre>
3234 *
3235 * <code>optional string name = 1;</code>
3236 * @return Whether the name field is set.
3237 */
3238 public boolean hasName() {
3239 return ((bitField0_ & 0x00000001) != 0);
3240 }
3241 /**
3242 * <pre>
3243 * The name field MUST be present for this version of the IR.
3244 * </pre>
3245 *
3246 * <code>optional string name = 1;</code>
3247 * @return The name.
3248 */
3249 public java.lang.String getName() {
3250 java.lang.Object ref = name_;
3251 if (!(ref instanceof java.lang.String)) {
3252 com.google.protobuf.ByteString bs =
3253 (com.google.protobuf.ByteString) ref;
3254 java.lang.String s = bs.toStringUtf8();
3255 if (bs.isValidUtf8()) {
3256 name_ = s;
3257 }
3258 return s;
3259 } else {
3260 return (java.lang.String) ref;
3261 }
3262 }
3263 /**
3264 * <pre>
3265 * The name field MUST be present for this version of the IR.
3266 * </pre>
3267 *
3268 * <code>optional string name = 1;</code>
3269 * @return The bytes for name.
3270 */
3271 public com.google.protobuf.ByteString
3272 getNameBytes() {
3273 java.lang.Object ref = name_;
3274 if (ref instanceof String) {
3275 com.google.protobuf.ByteString b =
3276 com.google.protobuf.ByteString.copyFromUtf8(
3277 (java.lang.String) ref);
3278 name_ = b;
3279 return b;
3280 } else {
3281 return (com.google.protobuf.ByteString) ref;
3282 }
3283 }
3284 /**
3285 * <pre>
3286 * The name field MUST be present for this version of the IR.
3287 * </pre>
3288 *
3289 * <code>optional string name = 1;</code>
3290 * @param value The name to set.
3291 * @return This builder for chaining.
3292 */
3293 public Builder setName(
3294 java.lang.String value) {
3295 if (value == null) { throw new NullPointerException(); }
3296 name_ = value;
3297 bitField0_ |= 0x00000001;
3298 onChanged();
3299 return this;
3300 }
3301 /**
3302 * <pre>
3303 * The name field MUST be present for this version of the IR.
3304 * </pre>
3305 *
3306 * <code>optional string name = 1;</code>
3307 * @return This builder for chaining.
3308 */
3309 public Builder clearName() {
3310 name_ = getDefaultInstance().getName();
3311 bitField0_ = (bitField0_ & ~0x00000001);
3312 onChanged();
3313 return this;
3314 }
3315 /**
3316 * <pre>
3317 * The name field MUST be present for this version of the IR.
3318 * </pre>
3319 *
3320 * <code>optional string name = 1;</code>
3321 * @param value The bytes for name to set.
3322 * @return This builder for chaining.
3323 */
3324 public Builder setNameBytes(
3325 com.google.protobuf.ByteString value) {
3326 if (value == null) { throw new NullPointerException(); }
3327 name_ = value;
3328 bitField0_ |= 0x00000001;
3329 onChanged();
3330 return this;
3331 }
3332
3333 private java.lang.Object refAttrName_ = "";
3334 /**
3335 * <pre>
3336 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3337 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3338 * in parent scope.
3339 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3340 * </pre>
3341 *
3342 * <code>optional string ref_attr_name = 21;</code>
3343 * @return Whether the refAttrName field is set.
3344 */
3345 public boolean hasRefAttrName() {
3346 return ((bitField0_ & 0x00000002) != 0);
3347 }
3348 /**
3349 * <pre>
3350 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3351 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3352 * in parent scope.
3353 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3354 * </pre>
3355 *
3356 * <code>optional string ref_attr_name = 21;</code>
3357 * @return The refAttrName.
3358 */
3359 public java.lang.String getRefAttrName() {
3360 java.lang.Object ref = refAttrName_;
3361 if (!(ref instanceof java.lang.String)) {
3362 com.google.protobuf.ByteString bs =
3363 (com.google.protobuf.ByteString) ref;
3364 java.lang.String s = bs.toStringUtf8();
3365 if (bs.isValidUtf8()) {
3366 refAttrName_ = s;
3367 }
3368 return s;
3369 } else {
3370 return (java.lang.String) ref;
3371 }
3372 }
3373 /**
3374 * <pre>
3375 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3376 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3377 * in parent scope.
3378 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3379 * </pre>
3380 *
3381 * <code>optional string ref_attr_name = 21;</code>
3382 * @return The bytes for refAttrName.
3383 */
3384 public com.google.protobuf.ByteString
3385 getRefAttrNameBytes() {
3386 java.lang.Object ref = refAttrName_;
3387 if (ref instanceof String) {
3388 com.google.protobuf.ByteString b =
3389 com.google.protobuf.ByteString.copyFromUtf8(
3390 (java.lang.String) ref);
3391 refAttrName_ = b;
3392 return b;
3393 } else {
3394 return (com.google.protobuf.ByteString) ref;
3395 }
3396 }
3397 /**
3398 * <pre>
3399 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3400 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3401 * in parent scope.
3402 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3403 * </pre>
3404 *
3405 * <code>optional string ref_attr_name = 21;</code>
3406 * @param value The refAttrName to set.
3407 * @return This builder for chaining.
3408 */
3409 public Builder setRefAttrName(
3410 java.lang.String value) {
3411 if (value == null) { throw new NullPointerException(); }
3412 refAttrName_ = value;
3413 bitField0_ |= 0x00000002;
3414 onChanged();
3415 return this;
3416 }
3417 /**
3418 * <pre>
3419 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3420 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3421 * in parent scope.
3422 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3423 * </pre>
3424 *
3425 * <code>optional string ref_attr_name = 21;</code>
3426 * @return This builder for chaining.
3427 */
3428 public Builder clearRefAttrName() {
3429 refAttrName_ = getDefaultInstance().getRefAttrName();
3430 bitField0_ = (bitField0_ & ~0x00000002);
3431 onChanged();
3432 return this;
3433 }
3434 /**
3435 * <pre>
3436 * if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
3437 * In this case, this AttributeProto does not contain data, and it's a reference of attribute
3438 * in parent scope.
3439 * NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
3440 * </pre>
3441 *
3442 * <code>optional string ref_attr_name = 21;</code>
3443 * @param value The bytes for refAttrName to set.
3444 * @return This builder for chaining.
3445 */
3446 public Builder setRefAttrNameBytes(
3447 com.google.protobuf.ByteString value) {
3448 if (value == null) { throw new NullPointerException(); }
3449 refAttrName_ = value;
3450 bitField0_ |= 0x00000002;
3451 onChanged();
3452 return this;
3453 }
3454
3455 private java.lang.Object docString_ = "";
3456 /**
3457 * <pre>
3458 * A human-readable documentation for this attribute. Markdown is allowed.
3459 * </pre>
3460 *
3461 * <code>optional string doc_string = 13;</code>
3462 * @return Whether the docString field is set.
3463 */
3464 public boolean hasDocString() {
3465 return ((bitField0_ & 0x00000004) != 0);
3466 }
3467 /**
3468 * <pre>
3469 * A human-readable documentation for this attribute. Markdown is allowed.
3470 * </pre>
3471 *
3472 * <code>optional string doc_string = 13;</code>
3473 * @return The docString.
3474 */
3475 public java.lang.String getDocString() {
3476 java.lang.Object ref = docString_;
3477 if (!(ref instanceof java.lang.String)) {
3478 com.google.protobuf.ByteString bs =
3479 (com.google.protobuf.ByteString) ref;
3480 java.lang.String s = bs.toStringUtf8();
3481 if (bs.isValidUtf8()) {
3482 docString_ = s;
3483 }
3484 return s;
3485 } else {
3486 return (java.lang.String) ref;
3487 }
3488 }
3489 /**
3490 * <pre>
3491 * A human-readable documentation for this attribute. Markdown is allowed.
3492 * </pre>
3493 *
3494 * <code>optional string doc_string = 13;</code>
3495 * @return The bytes for docString.
3496 */
3497 public com.google.protobuf.ByteString
3498 getDocStringBytes() {
3499 java.lang.Object ref = docString_;
3500 if (ref instanceof String) {
3501 com.google.protobuf.ByteString b =
3502 com.google.protobuf.ByteString.copyFromUtf8(
3503 (java.lang.String) ref);
3504 docString_ = b;
3505 return b;
3506 } else {
3507 return (com.google.protobuf.ByteString) ref;
3508 }
3509 }
3510 /**
3511 * <pre>
3512 * A human-readable documentation for this attribute. Markdown is allowed.
3513 * </pre>
3514 *
3515 * <code>optional string doc_string = 13;</code>
3516 * @param value The docString to set.
3517 * @return This builder for chaining.
3518 */
3519 public Builder setDocString(
3520 java.lang.String value) {
3521 if (value == null) { throw new NullPointerException(); }
3522 docString_ = value;
3523 bitField0_ |= 0x00000004;
3524 onChanged();
3525 return this;
3526 }
3527 /**
3528 * <pre>
3529 * A human-readable documentation for this attribute. Markdown is allowed.
3530 * </pre>
3531 *
3532 * <code>optional string doc_string = 13;</code>
3533 * @return This builder for chaining.
3534 */
3535 public Builder clearDocString() {
3536 docString_ = getDefaultInstance().getDocString();
3537 bitField0_ = (bitField0_ & ~0x00000004);
3538 onChanged();
3539 return this;
3540 }
3541 /**
3542 * <pre>
3543 * A human-readable documentation for this attribute. Markdown is allowed.
3544 * </pre>
3545 *
3546 * <code>optional string doc_string = 13;</code>
3547 * @param value The bytes for docString to set.
3548 * @return This builder for chaining.
3549 */
3550 public Builder setDocStringBytes(
3551 com.google.protobuf.ByteString value) {
3552 if (value == null) { throw new NullPointerException(); }
3553 docString_ = value;
3554 bitField0_ |= 0x00000004;
3555 onChanged();
3556 return this;
3557 }
3558
3559 private int type_ = 0;
3560 /**
3561 * <pre>
3562 * The type field MUST be present for this version of the IR.
3563 * For 0.0.1 versions of the IR, this field was not defined, and
3564 * implementations needed to use has_field heuristics to determine
3565 * which value field was in use. For IR_VERSION 0.0.2 or later, this
3566 * field MUST be set and match the f|i|s|t|... field in use. This
3567 * change was made to accommodate proto3 implementations.
3568 * </pre>
3569 *
3570 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
3571 * @return Whether the type field is set.
3572 */
3573 @java.lang.Override public boolean hasType() {
3574 return ((bitField0_ & 0x00000008) != 0);
3575 }
3576 /**
3577 * <pre>
3578 * The type field MUST be present for this version of the IR.
3579 * For 0.0.1 versions of the IR, this field was not defined, and
3580 * implementations needed to use has_field heuristics to determine
3581 * which value field was in use. For IR_VERSION 0.0.2 or later, this
3582 * field MUST be set and match the f|i|s|t|... field in use. This
3583 * change was made to accommodate proto3 implementations.
3584 * </pre>
3585 *
3586 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
3587 * @return The type.
3588 */
3589 @java.lang.Override
3590 public onnx.OnnxMl.AttributeProto.AttributeType getType() {
3591 onnx.OnnxMl.AttributeProto.AttributeType result = onnx.OnnxMl.AttributeProto.AttributeType.forNumber(type_);
3592 return result == null ? onnx.OnnxMl.AttributeProto.AttributeType.UNDEFINED : result;
3593 }
3594 /**
3595 * <pre>
3596 * The type field MUST be present for this version of the IR.
3597 * For 0.0.1 versions of the IR, this field was not defined, and
3598 * implementations needed to use has_field heuristics to determine
3599 * which value field was in use. For IR_VERSION 0.0.2 or later, this
3600 * field MUST be set and match the f|i|s|t|... field in use. This
3601 * change was made to accommodate proto3 implementations.
3602 * </pre>
3603 *
3604 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
3605 * @param value The type to set.
3606 * @return This builder for chaining.
3607 */
3608 public Builder setType(onnx.OnnxMl.AttributeProto.AttributeType value) {
3609 if (value == null) {
3610 throw new NullPointerException();
3611 }
3612 bitField0_ |= 0x00000008;
3613 type_ = value.getNumber();
3614 onChanged();
3615 return this;
3616 }
3617 /**
3618 * <pre>
3619 * The type field MUST be present for this version of the IR.
3620 * For 0.0.1 versions of the IR, this field was not defined, and
3621 * implementations needed to use has_field heuristics to determine
3622 * which value field was in use. For IR_VERSION 0.0.2 or later, this
3623 * field MUST be set and match the f|i|s|t|... field in use. This
3624 * change was made to accommodate proto3 implementations.
3625 * </pre>
3626 *
3627 * <code>optional .onnx.AttributeProto.AttributeType type = 20;</code>
3628 * @return This builder for chaining.
3629 */
3630 public Builder clearType() {
3631 bitField0_ = (bitField0_ & ~0x00000008);
3632 type_ = 0;
3633 onChanged();
3634 return this;
3635 }
3636
3637 private float f_ ;
3638 /**
3639 * <pre>
3640 * Exactly ONE of the following fields must be present for this version of the IR
3641 * </pre>
3642 *
3643 * <code>optional float f = 2;</code>
3644 * @return Whether the f field is set.
3645 */
3646 @java.lang.Override
3647 public boolean hasF() {
3648 return ((bitField0_ & 0x00000010) != 0);
3649 }
3650 /**
3651 * <pre>
3652 * Exactly ONE of the following fields must be present for this version of the IR
3653 * </pre>
3654 *
3655 * <code>optional float f = 2;</code>
3656 * @return The f.
3657 */
3658 @java.lang.Override
3659 public float getF() {
3660 return f_;
3661 }
3662 /**
3663 * <pre>
3664 * Exactly ONE of the following fields must be present for this version of the IR
3665 * </pre>
3666 *
3667 * <code>optional float f = 2;</code>
3668 * @param value The f to set.
3669 * @return This builder for chaining.
3670 */
3671 public Builder setF(float value) {
3672
3673 f_ = value;
3674 bitField0_ |= 0x00000010;
3675 onChanged();
3676 return this;
3677 }
3678 /**
3679 * <pre>
3680 * Exactly ONE of the following fields must be present for this version of the IR
3681 * </pre>
3682 *
3683 * <code>optional float f = 2;</code>
3684 * @return This builder for chaining.
3685 */
3686 public Builder clearF() {
3687 bitField0_ = (bitField0_ & ~0x00000010);
3688 f_ = 0F;
3689 onChanged();
3690 return this;
3691 }
3692
3693 private long i_ ;
3694 /**
3695 * <pre>
3696 * int
3697 * </pre>
3698 *
3699 * <code>optional int64 i = 3;</code>
3700 * @return Whether the i field is set.
3701 */
3702 @java.lang.Override
3703 public boolean hasI() {
3704 return ((bitField0_ & 0x00000020) != 0);
3705 }
3706 /**
3707 * <pre>
3708 * int
3709 * </pre>
3710 *
3711 * <code>optional int64 i = 3;</code>
3712 * @return The i.
3713 */
3714 @java.lang.Override
3715 public long getI() {
3716 return i_;
3717 }
3718 /**
3719 * <pre>
3720 * int
3721 * </pre>
3722 *
3723 * <code>optional int64 i = 3;</code>
3724 * @param value The i to set.
3725 * @return This builder for chaining.
3726 */
3727 public Builder setI(long value) {
3728
3729 i_ = value;
3730 bitField0_ |= 0x00000020;
3731 onChanged();
3732 return this;
3733 }
3734 /**
3735 * <pre>
3736 * int
3737 * </pre>
3738 *
3739 * <code>optional int64 i = 3;</code>
3740 * @return This builder for chaining.
3741 */
3742 public Builder clearI() {
3743 bitField0_ = (bitField0_ & ~0x00000020);
3744 i_ = 0L;
3745 onChanged();
3746 return this;
3747 }
3748
3749 private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
3750 /**
3751 * <pre>
3752 * UTF-8 string
3753 * </pre>
3754 *
3755 * <code>optional bytes s = 4;</code>
3756 * @return Whether the s field is set.
3757 */
3758 @java.lang.Override
3759 public boolean hasS() {
3760 return ((bitField0_ & 0x00000040) != 0);
3761 }
3762 /**
3763 * <pre>
3764 * UTF-8 string
3765 * </pre>
3766 *
3767 * <code>optional bytes s = 4;</code>
3768 * @return The s.
3769 */
3770 @java.lang.Override
3771 public com.google.protobuf.ByteString getS() {
3772 return s_;
3773 }
3774 /**
3775 * <pre>
3776 * UTF-8 string
3777 * </pre>
3778 *
3779 * <code>optional bytes s = 4;</code>
3780 * @param value The s to set.
3781 * @return This builder for chaining.
3782 */
3783 public Builder setS(com.google.protobuf.ByteString value) {
3784 if (value == null) { throw new NullPointerException(); }
3785 s_ = value;
3786 bitField0_ |= 0x00000040;
3787 onChanged();
3788 return this;
3789 }
3790 /**
3791 * <pre>
3792 * UTF-8 string
3793 * </pre>
3794 *
3795 * <code>optional bytes s = 4;</code>
3796 * @return This builder for chaining.
3797 */
3798 public Builder clearS() {
3799 bitField0_ = (bitField0_ & ~0x00000040);
3800 s_ = getDefaultInstance().getS();
3801 onChanged();
3802 return this;
3803 }
3804
3805 private onnx.OnnxMl.TensorProto t_;
3806 private com.google.protobuf.SingleFieldBuilder<
3807 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder> tBuilder_;
3808 /**
3809 * <pre>
3810 * tensor value
3811 * </pre>
3812 *
3813 * <code>optional .onnx.TensorProto t = 5;</code>
3814 * @return Whether the t field is set.
3815 */
3816 public boolean hasT() {
3817 return ((bitField0_ & 0x00000080) != 0);
3818 }
3819 /**
3820 * <pre>
3821 * tensor value
3822 * </pre>
3823 *
3824 * <code>optional .onnx.TensorProto t = 5;</code>
3825 * @return The t.
3826 */
3827 public onnx.OnnxMl.TensorProto getT() {
3828 if (tBuilder_ == null) {
3829 return t_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : t_;
3830 } else {
3831 return tBuilder_.getMessage();
3832 }
3833 }
3834 /**
3835 * <pre>
3836 * tensor value
3837 * </pre>
3838 *
3839 * <code>optional .onnx.TensorProto t = 5;</code>
3840 */
3841 public Builder setT(onnx.OnnxMl.TensorProto value) {
3842 if (tBuilder_ == null) {
3843 if (value == null) {
3844 throw new NullPointerException();
3845 }
3846 t_ = value;
3847 } else {
3848 tBuilder_.setMessage(value);
3849 }
3850 bitField0_ |= 0x00000080;
3851 onChanged();
3852 return this;
3853 }
3854 /**
3855 * <pre>
3856 * tensor value
3857 * </pre>
3858 *
3859 * <code>optional .onnx.TensorProto t = 5;</code>
3860 */
3861 public Builder setT(
3862 onnx.OnnxMl.TensorProto.Builder builderForValue) {
3863 if (tBuilder_ == null) {
3864 t_ = builderForValue.build();
3865 } else {
3866 tBuilder_.setMessage(builderForValue.build());
3867 }
3868 bitField0_ |= 0x00000080;
3869 onChanged();
3870 return this;
3871 }
3872 /**
3873 * <pre>
3874 * tensor value
3875 * </pre>
3876 *
3877 * <code>optional .onnx.TensorProto t = 5;</code>
3878 */
3879 public Builder mergeT(onnx.OnnxMl.TensorProto value) {
3880 if (tBuilder_ == null) {
3881 if (((bitField0_ & 0x00000080) != 0) &&
3882 t_ != null &&
3883 t_ != onnx.OnnxMl.TensorProto.getDefaultInstance()) {
3884 getTBuilder().mergeFrom(value);
3885 } else {
3886 t_ = value;
3887 }
3888 } else {
3889 tBuilder_.mergeFrom(value);
3890 }
3891 if (t_ != null) {
3892 bitField0_ |= 0x00000080;
3893 onChanged();
3894 }
3895 return this;
3896 }
3897 /**
3898 * <pre>
3899 * tensor value
3900 * </pre>
3901 *
3902 * <code>optional .onnx.TensorProto t = 5;</code>
3903 */
3904 public Builder clearT() {
3905 bitField0_ = (bitField0_ & ~0x00000080);
3906 t_ = null;
3907 if (tBuilder_ != null) {
3908 tBuilder_.dispose();
3909 tBuilder_ = null;
3910 }
3911 onChanged();
3912 return this;
3913 }
3914 /**
3915 * <pre>
3916 * tensor value
3917 * </pre>
3918 *
3919 * <code>optional .onnx.TensorProto t = 5;</code>
3920 */
3921 public onnx.OnnxMl.TensorProto.Builder getTBuilder() {
3922 bitField0_ |= 0x00000080;
3923 onChanged();
3924 return getTFieldBuilder().getBuilder();
3925 }
3926 /**
3927 * <pre>
3928 * tensor value
3929 * </pre>
3930 *
3931 * <code>optional .onnx.TensorProto t = 5;</code>
3932 */
3933 public onnx.OnnxMl.TensorProtoOrBuilder getTOrBuilder() {
3934 if (tBuilder_ != null) {
3935 return tBuilder_.getMessageOrBuilder();
3936 } else {
3937 return t_ == null ?
3938 onnx.OnnxMl.TensorProto.getDefaultInstance() : t_;
3939 }
3940 }
3941 /**
3942 * <pre>
3943 * tensor value
3944 * </pre>
3945 *
3946 * <code>optional .onnx.TensorProto t = 5;</code>
3947 */
3948 private com.google.protobuf.SingleFieldBuilder<
3949 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>
3950 getTFieldBuilder() {
3951 if (tBuilder_ == null) {
3952 tBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3953 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>(
3954 getT(),
3955 getParentForChildren(),
3956 isClean());
3957 t_ = null;
3958 }
3959 return tBuilder_;
3960 }
3961
3962 private onnx.OnnxMl.GraphProto g_;
3963 private com.google.protobuf.SingleFieldBuilder<
3964 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder> gBuilder_;
3965 /**
3966 * <pre>
3967 * graph
3968 * </pre>
3969 *
3970 * <code>optional .onnx.GraphProto g = 6;</code>
3971 * @return Whether the g field is set.
3972 */
3973 public boolean hasG() {
3974 return ((bitField0_ & 0x00000100) != 0);
3975 }
3976 /**
3977 * <pre>
3978 * graph
3979 * </pre>
3980 *
3981 * <code>optional .onnx.GraphProto g = 6;</code>
3982 * @return The g.
3983 */
3984 public onnx.OnnxMl.GraphProto getG() {
3985 if (gBuilder_ == null) {
3986 return g_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : g_;
3987 } else {
3988 return gBuilder_.getMessage();
3989 }
3990 }
3991 /**
3992 * <pre>
3993 * graph
3994 * </pre>
3995 *
3996 * <code>optional .onnx.GraphProto g = 6;</code>
3997 */
3998 public Builder setG(onnx.OnnxMl.GraphProto value) {
3999 if (gBuilder_ == null) {
4000 if (value == null) {
4001 throw new NullPointerException();
4002 }
4003 g_ = value;
4004 } else {
4005 gBuilder_.setMessage(value);
4006 }
4007 bitField0_ |= 0x00000100;
4008 onChanged();
4009 return this;
4010 }
4011 /**
4012 * <pre>
4013 * graph
4014 * </pre>
4015 *
4016 * <code>optional .onnx.GraphProto g = 6;</code>
4017 */
4018 public Builder setG(
4019 onnx.OnnxMl.GraphProto.Builder builderForValue) {
4020 if (gBuilder_ == null) {
4021 g_ = builderForValue.build();
4022 } else {
4023 gBuilder_.setMessage(builderForValue.build());
4024 }
4025 bitField0_ |= 0x00000100;
4026 onChanged();
4027 return this;
4028 }
4029 /**
4030 * <pre>
4031 * graph
4032 * </pre>
4033 *
4034 * <code>optional .onnx.GraphProto g = 6;</code>
4035 */
4036 public Builder mergeG(onnx.OnnxMl.GraphProto value) {
4037 if (gBuilder_ == null) {
4038 if (((bitField0_ & 0x00000100) != 0) &&
4039 g_ != null &&
4040 g_ != onnx.OnnxMl.GraphProto.getDefaultInstance()) {
4041 getGBuilder().mergeFrom(value);
4042 } else {
4043 g_ = value;
4044 }
4045 } else {
4046 gBuilder_.mergeFrom(value);
4047 }
4048 if (g_ != null) {
4049 bitField0_ |= 0x00000100;
4050 onChanged();
4051 }
4052 return this;
4053 }
4054 /**
4055 * <pre>
4056 * graph
4057 * </pre>
4058 *
4059 * <code>optional .onnx.GraphProto g = 6;</code>
4060 */
4061 public Builder clearG() {
4062 bitField0_ = (bitField0_ & ~0x00000100);
4063 g_ = null;
4064 if (gBuilder_ != null) {
4065 gBuilder_.dispose();
4066 gBuilder_ = null;
4067 }
4068 onChanged();
4069 return this;
4070 }
4071 /**
4072 * <pre>
4073 * graph
4074 * </pre>
4075 *
4076 * <code>optional .onnx.GraphProto g = 6;</code>
4077 */
4078 public onnx.OnnxMl.GraphProto.Builder getGBuilder() {
4079 bitField0_ |= 0x00000100;
4080 onChanged();
4081 return getGFieldBuilder().getBuilder();
4082 }
4083 /**
4084 * <pre>
4085 * graph
4086 * </pre>
4087 *
4088 * <code>optional .onnx.GraphProto g = 6;</code>
4089 */
4090 public onnx.OnnxMl.GraphProtoOrBuilder getGOrBuilder() {
4091 if (gBuilder_ != null) {
4092 return gBuilder_.getMessageOrBuilder();
4093 } else {
4094 return g_ == null ?
4095 onnx.OnnxMl.GraphProto.getDefaultInstance() : g_;
4096 }
4097 }
4098 /**
4099 * <pre>
4100 * graph
4101 * </pre>
4102 *
4103 * <code>optional .onnx.GraphProto g = 6;</code>
4104 */
4105 private com.google.protobuf.SingleFieldBuilder<
4106 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>
4107 getGFieldBuilder() {
4108 if (gBuilder_ == null) {
4109 gBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4110 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>(
4111 getG(),
4112 getParentForChildren(),
4113 isClean());
4114 g_ = null;
4115 }
4116 return gBuilder_;
4117 }
4118
4119 private onnx.OnnxMl.SparseTensorProto sparseTensor_;
4120 private com.google.protobuf.SingleFieldBuilder<
4121 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder> sparseTensorBuilder_;
4122 /**
4123 * <pre>
4124 * sparse tensor value
4125 * </pre>
4126 *
4127 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4128 * @return Whether the sparseTensor field is set.
4129 */
4130 public boolean hasSparseTensor() {
4131 return ((bitField0_ & 0x00000200) != 0);
4132 }
4133 /**
4134 * <pre>
4135 * sparse tensor value
4136 * </pre>
4137 *
4138 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4139 * @return The sparseTensor.
4140 */
4141 public onnx.OnnxMl.SparseTensorProto getSparseTensor() {
4142 if (sparseTensorBuilder_ == null) {
4143 return sparseTensor_ == null ? onnx.OnnxMl.SparseTensorProto.getDefaultInstance() : sparseTensor_;
4144 } else {
4145 return sparseTensorBuilder_.getMessage();
4146 }
4147 }
4148 /**
4149 * <pre>
4150 * sparse tensor value
4151 * </pre>
4152 *
4153 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4154 */
4155 public Builder setSparseTensor(onnx.OnnxMl.SparseTensorProto value) {
4156 if (sparseTensorBuilder_ == null) {
4157 if (value == null) {
4158 throw new NullPointerException();
4159 }
4160 sparseTensor_ = value;
4161 } else {
4162 sparseTensorBuilder_.setMessage(value);
4163 }
4164 bitField0_ |= 0x00000200;
4165 onChanged();
4166 return this;
4167 }
4168 /**
4169 * <pre>
4170 * sparse tensor value
4171 * </pre>
4172 *
4173 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4174 */
4175 public Builder setSparseTensor(
4176 onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
4177 if (sparseTensorBuilder_ == null) {
4178 sparseTensor_ = builderForValue.build();
4179 } else {
4180 sparseTensorBuilder_.setMessage(builderForValue.build());
4181 }
4182 bitField0_ |= 0x00000200;
4183 onChanged();
4184 return this;
4185 }
4186 /**
4187 * <pre>
4188 * sparse tensor value
4189 * </pre>
4190 *
4191 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4192 */
4193 public Builder mergeSparseTensor(onnx.OnnxMl.SparseTensorProto value) {
4194 if (sparseTensorBuilder_ == null) {
4195 if (((bitField0_ & 0x00000200) != 0) &&
4196 sparseTensor_ != null &&
4197 sparseTensor_ != onnx.OnnxMl.SparseTensorProto.getDefaultInstance()) {
4198 getSparseTensorBuilder().mergeFrom(value);
4199 } else {
4200 sparseTensor_ = value;
4201 }
4202 } else {
4203 sparseTensorBuilder_.mergeFrom(value);
4204 }
4205 if (sparseTensor_ != null) {
4206 bitField0_ |= 0x00000200;
4207 onChanged();
4208 }
4209 return this;
4210 }
4211 /**
4212 * <pre>
4213 * sparse tensor value
4214 * </pre>
4215 *
4216 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4217 */
4218 public Builder clearSparseTensor() {
4219 bitField0_ = (bitField0_ & ~0x00000200);
4220 sparseTensor_ = null;
4221 if (sparseTensorBuilder_ != null) {
4222 sparseTensorBuilder_.dispose();
4223 sparseTensorBuilder_ = null;
4224 }
4225 onChanged();
4226 return this;
4227 }
4228 /**
4229 * <pre>
4230 * sparse tensor value
4231 * </pre>
4232 *
4233 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4234 */
4235 public onnx.OnnxMl.SparseTensorProto.Builder getSparseTensorBuilder() {
4236 bitField0_ |= 0x00000200;
4237 onChanged();
4238 return getSparseTensorFieldBuilder().getBuilder();
4239 }
4240 /**
4241 * <pre>
4242 * sparse tensor value
4243 * </pre>
4244 *
4245 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4246 */
4247 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorOrBuilder() {
4248 if (sparseTensorBuilder_ != null) {
4249 return sparseTensorBuilder_.getMessageOrBuilder();
4250 } else {
4251 return sparseTensor_ == null ?
4252 onnx.OnnxMl.SparseTensorProto.getDefaultInstance() : sparseTensor_;
4253 }
4254 }
4255 /**
4256 * <pre>
4257 * sparse tensor value
4258 * </pre>
4259 *
4260 * <code>optional .onnx.SparseTensorProto sparse_tensor = 22;</code>
4261 */
4262 private com.google.protobuf.SingleFieldBuilder<
4263 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>
4264 getSparseTensorFieldBuilder() {
4265 if (sparseTensorBuilder_ == null) {
4266 sparseTensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4267 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>(
4268 getSparseTensor(),
4269 getParentForChildren(),
4270 isClean());
4271 sparseTensor_ = null;
4272 }
4273 return sparseTensorBuilder_;
4274 }
4275
4276 private onnx.OnnxMl.TypeProto tp_;
4277 private com.google.protobuf.SingleFieldBuilder<
4278 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> tpBuilder_;
4279 /**
4280 * <pre>
4281 * Do not use field below, it's deprecated.
4282 * optional ValueProto v = 12; // value - subsumes everything but graph
4283 * </pre>
4284 *
4285 * <code>optional .onnx.TypeProto tp = 14;</code>
4286 * @return Whether the tp field is set.
4287 */
4288 public boolean hasTp() {
4289 return ((bitField0_ & 0x00000400) != 0);
4290 }
4291 /**
4292 * <pre>
4293 * Do not use field below, it's deprecated.
4294 * optional ValueProto v = 12; // value - subsumes everything but graph
4295 * </pre>
4296 *
4297 * <code>optional .onnx.TypeProto tp = 14;</code>
4298 * @return The tp.
4299 */
4300 public onnx.OnnxMl.TypeProto getTp() {
4301 if (tpBuilder_ == null) {
4302 return tp_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : tp_;
4303 } else {
4304 return tpBuilder_.getMessage();
4305 }
4306 }
4307 /**
4308 * <pre>
4309 * Do not use field below, it's deprecated.
4310 * optional ValueProto v = 12; // value - subsumes everything but graph
4311 * </pre>
4312 *
4313 * <code>optional .onnx.TypeProto tp = 14;</code>
4314 */
4315 public Builder setTp(onnx.OnnxMl.TypeProto value) {
4316 if (tpBuilder_ == null) {
4317 if (value == null) {
4318 throw new NullPointerException();
4319 }
4320 tp_ = value;
4321 } else {
4322 tpBuilder_.setMessage(value);
4323 }
4324 bitField0_ |= 0x00000400;
4325 onChanged();
4326 return this;
4327 }
4328 /**
4329 * <pre>
4330 * Do not use field below, it's deprecated.
4331 * optional ValueProto v = 12; // value - subsumes everything but graph
4332 * </pre>
4333 *
4334 * <code>optional .onnx.TypeProto tp = 14;</code>
4335 */
4336 public Builder setTp(
4337 onnx.OnnxMl.TypeProto.Builder builderForValue) {
4338 if (tpBuilder_ == null) {
4339 tp_ = builderForValue.build();
4340 } else {
4341 tpBuilder_.setMessage(builderForValue.build());
4342 }
4343 bitField0_ |= 0x00000400;
4344 onChanged();
4345 return this;
4346 }
4347 /**
4348 * <pre>
4349 * Do not use field below, it's deprecated.
4350 * optional ValueProto v = 12; // value - subsumes everything but graph
4351 * </pre>
4352 *
4353 * <code>optional .onnx.TypeProto tp = 14;</code>
4354 */
4355 public Builder mergeTp(onnx.OnnxMl.TypeProto value) {
4356 if (tpBuilder_ == null) {
4357 if (((bitField0_ & 0x00000400) != 0) &&
4358 tp_ != null &&
4359 tp_ != onnx.OnnxMl.TypeProto.getDefaultInstance()) {
4360 getTpBuilder().mergeFrom(value);
4361 } else {
4362 tp_ = value;
4363 }
4364 } else {
4365 tpBuilder_.mergeFrom(value);
4366 }
4367 if (tp_ != null) {
4368 bitField0_ |= 0x00000400;
4369 onChanged();
4370 }
4371 return this;
4372 }
4373 /**
4374 * <pre>
4375 * Do not use field below, it's deprecated.
4376 * optional ValueProto v = 12; // value - subsumes everything but graph
4377 * </pre>
4378 *
4379 * <code>optional .onnx.TypeProto tp = 14;</code>
4380 */
4381 public Builder clearTp() {
4382 bitField0_ = (bitField0_ & ~0x00000400);
4383 tp_ = null;
4384 if (tpBuilder_ != null) {
4385 tpBuilder_.dispose();
4386 tpBuilder_ = null;
4387 }
4388 onChanged();
4389 return this;
4390 }
4391 /**
4392 * <pre>
4393 * Do not use field below, it's deprecated.
4394 * optional ValueProto v = 12; // value - subsumes everything but graph
4395 * </pre>
4396 *
4397 * <code>optional .onnx.TypeProto tp = 14;</code>
4398 */
4399 public onnx.OnnxMl.TypeProto.Builder getTpBuilder() {
4400 bitField0_ |= 0x00000400;
4401 onChanged();
4402 return getTpFieldBuilder().getBuilder();
4403 }
4404 /**
4405 * <pre>
4406 * Do not use field below, it's deprecated.
4407 * optional ValueProto v = 12; // value - subsumes everything but graph
4408 * </pre>
4409 *
4410 * <code>optional .onnx.TypeProto tp = 14;</code>
4411 */
4412 public onnx.OnnxMl.TypeProtoOrBuilder getTpOrBuilder() {
4413 if (tpBuilder_ != null) {
4414 return tpBuilder_.getMessageOrBuilder();
4415 } else {
4416 return tp_ == null ?
4417 onnx.OnnxMl.TypeProto.getDefaultInstance() : tp_;
4418 }
4419 }
4420 /**
4421 * <pre>
4422 * Do not use field below, it's deprecated.
4423 * optional ValueProto v = 12; // value - subsumes everything but graph
4424 * </pre>
4425 *
4426 * <code>optional .onnx.TypeProto tp = 14;</code>
4427 */
4428 private com.google.protobuf.SingleFieldBuilder<
4429 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
4430 getTpFieldBuilder() {
4431 if (tpBuilder_ == null) {
4432 tpBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4433 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
4434 getTp(),
4435 getParentForChildren(),
4436 isClean());
4437 tp_ = null;
4438 }
4439 return tpBuilder_;
4440 }
4441
4442 private com.google.protobuf.Internal.FloatList floats_ = emptyFloatList();
4443 private void ensureFloatsIsMutable() {
4444 if (!floats_.isModifiable()) {
4445 floats_ = makeMutableCopy(floats_);
4446 }
4447 bitField0_ |= 0x00000800;
4448 }
4449 private void ensureFloatsIsMutable(int capacity) {
4450 if (!floats_.isModifiable()) {
4451 floats_ = makeMutableCopy(floats_, capacity);
4452 }
4453 bitField0_ |= 0x00000800;
4454 }
4455 /**
4456 * <pre>
4457 * list of floats
4458 * </pre>
4459 *
4460 * <code>repeated float floats = 7;</code>
4461 * @return A list containing the floats.
4462 */
4463 public java.util.List<java.lang.Float>
4464 getFloatsList() {
4465 floats_.makeImmutable();
4466 return floats_;
4467 }
4468 /**
4469 * <pre>
4470 * list of floats
4471 * </pre>
4472 *
4473 * <code>repeated float floats = 7;</code>
4474 * @return The count of floats.
4475 */
4476 public int getFloatsCount() {
4477 return floats_.size();
4478 }
4479 /**
4480 * <pre>
4481 * list of floats
4482 * </pre>
4483 *
4484 * <code>repeated float floats = 7;</code>
4485 * @param index The index of the element to return.
4486 * @return The floats at the given index.
4487 */
4488 public float getFloats(int index) {
4489 return floats_.getFloat(index);
4490 }
4491 /**
4492 * <pre>
4493 * list of floats
4494 * </pre>
4495 *
4496 * <code>repeated float floats = 7;</code>
4497 * @param index The index to set the value at.
4498 * @param value The floats to set.
4499 * @return This builder for chaining.
4500 */
4501 public Builder setFloats(
4502 int index, float value) {
4503
4504 ensureFloatsIsMutable();
4505 floats_.setFloat(index, value);
4506 bitField0_ |= 0x00000800;
4507 onChanged();
4508 return this;
4509 }
4510 /**
4511 * <pre>
4512 * list of floats
4513 * </pre>
4514 *
4515 * <code>repeated float floats = 7;</code>
4516 * @param value The floats to add.
4517 * @return This builder for chaining.
4518 */
4519 public Builder addFloats(float value) {
4520
4521 ensureFloatsIsMutable();
4522 floats_.addFloat(value);
4523 bitField0_ |= 0x00000800;
4524 onChanged();
4525 return this;
4526 }
4527 /**
4528 * <pre>
4529 * list of floats
4530 * </pre>
4531 *
4532 * <code>repeated float floats = 7;</code>
4533 * @param values The floats to add.
4534 * @return This builder for chaining.
4535 */
4536 public Builder addAllFloats(
4537 java.lang.Iterable<? extends java.lang.Float> values) {
4538 ensureFloatsIsMutable();
4539 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4540 values, floats_);
4541 bitField0_ |= 0x00000800;
4542 onChanged();
4543 return this;
4544 }
4545 /**
4546 * <pre>
4547 * list of floats
4548 * </pre>
4549 *
4550 * <code>repeated float floats = 7;</code>
4551 * @return This builder for chaining.
4552 */
4553 public Builder clearFloats() {
4554 floats_ = emptyFloatList();
4555 bitField0_ = (bitField0_ & ~0x00000800);
4556 onChanged();
4557 return this;
4558 }
4559
4560 private com.google.protobuf.Internal.LongList ints_ = emptyLongList();
4561 private void ensureIntsIsMutable() {
4562 if (!ints_.isModifiable()) {
4563 ints_ = makeMutableCopy(ints_);
4564 }
4565 bitField0_ |= 0x00001000;
4566 }
4567 /**
4568 * <pre>
4569 * list of ints
4570 * </pre>
4571 *
4572 * <code>repeated int64 ints = 8;</code>
4573 * @return A list containing the ints.
4574 */
4575 public java.util.List<java.lang.Long>
4576 getIntsList() {
4577 ints_.makeImmutable();
4578 return ints_;
4579 }
4580 /**
4581 * <pre>
4582 * list of ints
4583 * </pre>
4584 *
4585 * <code>repeated int64 ints = 8;</code>
4586 * @return The count of ints.
4587 */
4588 public int getIntsCount() {
4589 return ints_.size();
4590 }
4591 /**
4592 * <pre>
4593 * list of ints
4594 * </pre>
4595 *
4596 * <code>repeated int64 ints = 8;</code>
4597 * @param index The index of the element to return.
4598 * @return The ints at the given index.
4599 */
4600 public long getInts(int index) {
4601 return ints_.getLong(index);
4602 }
4603 /**
4604 * <pre>
4605 * list of ints
4606 * </pre>
4607 *
4608 * <code>repeated int64 ints = 8;</code>
4609 * @param index The index to set the value at.
4610 * @param value The ints to set.
4611 * @return This builder for chaining.
4612 */
4613 public Builder setInts(
4614 int index, long value) {
4615
4616 ensureIntsIsMutable();
4617 ints_.setLong(index, value);
4618 bitField0_ |= 0x00001000;
4619 onChanged();
4620 return this;
4621 }
4622 /**
4623 * <pre>
4624 * list of ints
4625 * </pre>
4626 *
4627 * <code>repeated int64 ints = 8;</code>
4628 * @param value The ints to add.
4629 * @return This builder for chaining.
4630 */
4631 public Builder addInts(long value) {
4632
4633 ensureIntsIsMutable();
4634 ints_.addLong(value);
4635 bitField0_ |= 0x00001000;
4636 onChanged();
4637 return this;
4638 }
4639 /**
4640 * <pre>
4641 * list of ints
4642 * </pre>
4643 *
4644 * <code>repeated int64 ints = 8;</code>
4645 * @param values The ints to add.
4646 * @return This builder for chaining.
4647 */
4648 public Builder addAllInts(
4649 java.lang.Iterable<? extends java.lang.Long> values) {
4650 ensureIntsIsMutable();
4651 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4652 values, ints_);
4653 bitField0_ |= 0x00001000;
4654 onChanged();
4655 return this;
4656 }
4657 /**
4658 * <pre>
4659 * list of ints
4660 * </pre>
4661 *
4662 * <code>repeated int64 ints = 8;</code>
4663 * @return This builder for chaining.
4664 */
4665 public Builder clearInts() {
4666 ints_ = emptyLongList();
4667 bitField0_ = (bitField0_ & ~0x00001000);
4668 onChanged();
4669 return this;
4670 }
4671
4672 private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> strings_ = emptyList(com.google.protobuf.ByteString.class);
4673 private void ensureStringsIsMutable() {
4674 if (!strings_.isModifiable()) {
4675 strings_ = makeMutableCopy(strings_);
4676 }
4677 bitField0_ |= 0x00002000;
4678 }
4679 /**
4680 * <pre>
4681 * list of UTF-8 strings
4682 * </pre>
4683 *
4684 * <code>repeated bytes strings = 9;</code>
4685 * @return A list containing the strings.
4686 */
4687 public java.util.List<com.google.protobuf.ByteString>
4688 getStringsList() {
4689 strings_.makeImmutable();
4690 return strings_;
4691 }
4692 /**
4693 * <pre>
4694 * list of UTF-8 strings
4695 * </pre>
4696 *
4697 * <code>repeated bytes strings = 9;</code>
4698 * @return The count of strings.
4699 */
4700 public int getStringsCount() {
4701 return strings_.size();
4702 }
4703 /**
4704 * <pre>
4705 * list of UTF-8 strings
4706 * </pre>
4707 *
4708 * <code>repeated bytes strings = 9;</code>
4709 * @param index The index of the element to return.
4710 * @return The strings at the given index.
4711 */
4712 public com.google.protobuf.ByteString getStrings(int index) {
4713 return strings_.get(index);
4714 }
4715 /**
4716 * <pre>
4717 * list of UTF-8 strings
4718 * </pre>
4719 *
4720 * <code>repeated bytes strings = 9;</code>
4721 * @param index The index to set the value at.
4722 * @param value The strings to set.
4723 * @return This builder for chaining.
4724 */
4725 public Builder setStrings(
4726 int index, com.google.protobuf.ByteString value) {
4727 if (value == null) { throw new NullPointerException(); }
4728 ensureStringsIsMutable();
4729 strings_.set(index, value);
4730 bitField0_ |= 0x00002000;
4731 onChanged();
4732 return this;
4733 }
4734 /**
4735 * <pre>
4736 * list of UTF-8 strings
4737 * </pre>
4738 *
4739 * <code>repeated bytes strings = 9;</code>
4740 * @param value The strings to add.
4741 * @return This builder for chaining.
4742 */
4743 public Builder addStrings(com.google.protobuf.ByteString value) {
4744 if (value == null) { throw new NullPointerException(); }
4745 ensureStringsIsMutable();
4746 strings_.add(value);
4747 bitField0_ |= 0x00002000;
4748 onChanged();
4749 return this;
4750 }
4751 /**
4752 * <pre>
4753 * list of UTF-8 strings
4754 * </pre>
4755 *
4756 * <code>repeated bytes strings = 9;</code>
4757 * @param values The strings to add.
4758 * @return This builder for chaining.
4759 */
4760 public Builder addAllStrings(
4761 java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
4762 ensureStringsIsMutable();
4763 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4764 values, strings_);
4765 bitField0_ |= 0x00002000;
4766 onChanged();
4767 return this;
4768 }
4769 /**
4770 * <pre>
4771 * list of UTF-8 strings
4772 * </pre>
4773 *
4774 * <code>repeated bytes strings = 9;</code>
4775 * @return This builder for chaining.
4776 */
4777 public Builder clearStrings() {
4778 strings_ = emptyList(com.google.protobuf.ByteString.class);
4779 bitField0_ = (bitField0_ & ~0x00002000);
4780 onChanged();
4781 return this;
4782 }
4783
4784 private java.util.List<onnx.OnnxMl.TensorProto> tensors_ =
4785 java.util.Collections.emptyList();
4786 private void ensureTensorsIsMutable() {
4787 if (!((bitField0_ & 0x00004000) != 0)) {
4788 tensors_ = new java.util.ArrayList<onnx.OnnxMl.TensorProto>(tensors_);
4789 bitField0_ |= 0x00004000;
4790 }
4791 }
4792
4793 private com.google.protobuf.RepeatedFieldBuilder<
4794 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder> tensorsBuilder_;
4795
4796 /**
4797 * <pre>
4798 * list of tensors
4799 * </pre>
4800 *
4801 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4802 */
4803 public java.util.List<onnx.OnnxMl.TensorProto> getTensorsList() {
4804 if (tensorsBuilder_ == null) {
4805 return java.util.Collections.unmodifiableList(tensors_);
4806 } else {
4807 return tensorsBuilder_.getMessageList();
4808 }
4809 }
4810 /**
4811 * <pre>
4812 * list of tensors
4813 * </pre>
4814 *
4815 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4816 */
4817 public int getTensorsCount() {
4818 if (tensorsBuilder_ == null) {
4819 return tensors_.size();
4820 } else {
4821 return tensorsBuilder_.getCount();
4822 }
4823 }
4824 /**
4825 * <pre>
4826 * list of tensors
4827 * </pre>
4828 *
4829 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4830 */
4831 public onnx.OnnxMl.TensorProto getTensors(int index) {
4832 if (tensorsBuilder_ == null) {
4833 return tensors_.get(index);
4834 } else {
4835 return tensorsBuilder_.getMessage(index);
4836 }
4837 }
4838 /**
4839 * <pre>
4840 * list of tensors
4841 * </pre>
4842 *
4843 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4844 */
4845 public Builder setTensors(
4846 int index, onnx.OnnxMl.TensorProto value) {
4847 if (tensorsBuilder_ == null) {
4848 if (value == null) {
4849 throw new NullPointerException();
4850 }
4851 ensureTensorsIsMutable();
4852 tensors_.set(index, value);
4853 onChanged();
4854 } else {
4855 tensorsBuilder_.setMessage(index, value);
4856 }
4857 return this;
4858 }
4859 /**
4860 * <pre>
4861 * list of tensors
4862 * </pre>
4863 *
4864 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4865 */
4866 public Builder setTensors(
4867 int index, onnx.OnnxMl.TensorProto.Builder builderForValue) {
4868 if (tensorsBuilder_ == null) {
4869 ensureTensorsIsMutable();
4870 tensors_.set(index, builderForValue.build());
4871 onChanged();
4872 } else {
4873 tensorsBuilder_.setMessage(index, builderForValue.build());
4874 }
4875 return this;
4876 }
4877 /**
4878 * <pre>
4879 * list of tensors
4880 * </pre>
4881 *
4882 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4883 */
4884 public Builder addTensors(onnx.OnnxMl.TensorProto value) {
4885 if (tensorsBuilder_ == null) {
4886 if (value == null) {
4887 throw new NullPointerException();
4888 }
4889 ensureTensorsIsMutable();
4890 tensors_.add(value);
4891 onChanged();
4892 } else {
4893 tensorsBuilder_.addMessage(value);
4894 }
4895 return this;
4896 }
4897 /**
4898 * <pre>
4899 * list of tensors
4900 * </pre>
4901 *
4902 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4903 */
4904 public Builder addTensors(
4905 int index, onnx.OnnxMl.TensorProto value) {
4906 if (tensorsBuilder_ == null) {
4907 if (value == null) {
4908 throw new NullPointerException();
4909 }
4910 ensureTensorsIsMutable();
4911 tensors_.add(index, value);
4912 onChanged();
4913 } else {
4914 tensorsBuilder_.addMessage(index, value);
4915 }
4916 return this;
4917 }
4918 /**
4919 * <pre>
4920 * list of tensors
4921 * </pre>
4922 *
4923 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4924 */
4925 public Builder addTensors(
4926 onnx.OnnxMl.TensorProto.Builder builderForValue) {
4927 if (tensorsBuilder_ == null) {
4928 ensureTensorsIsMutable();
4929 tensors_.add(builderForValue.build());
4930 onChanged();
4931 } else {
4932 tensorsBuilder_.addMessage(builderForValue.build());
4933 }
4934 return this;
4935 }
4936 /**
4937 * <pre>
4938 * list of tensors
4939 * </pre>
4940 *
4941 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4942 */
4943 public Builder addTensors(
4944 int index, onnx.OnnxMl.TensorProto.Builder builderForValue) {
4945 if (tensorsBuilder_ == null) {
4946 ensureTensorsIsMutable();
4947 tensors_.add(index, builderForValue.build());
4948 onChanged();
4949 } else {
4950 tensorsBuilder_.addMessage(index, builderForValue.build());
4951 }
4952 return this;
4953 }
4954 /**
4955 * <pre>
4956 * list of tensors
4957 * </pre>
4958 *
4959 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4960 */
4961 public Builder addAllTensors(
4962 java.lang.Iterable<? extends onnx.OnnxMl.TensorProto> values) {
4963 if (tensorsBuilder_ == null) {
4964 ensureTensorsIsMutable();
4965 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4966 values, tensors_);
4967 onChanged();
4968 } else {
4969 tensorsBuilder_.addAllMessages(values);
4970 }
4971 return this;
4972 }
4973 /**
4974 * <pre>
4975 * list of tensors
4976 * </pre>
4977 *
4978 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4979 */
4980 public Builder clearTensors() {
4981 if (tensorsBuilder_ == null) {
4982 tensors_ = java.util.Collections.emptyList();
4983 bitField0_ = (bitField0_ & ~0x00004000);
4984 onChanged();
4985 } else {
4986 tensorsBuilder_.clear();
4987 }
4988 return this;
4989 }
4990 /**
4991 * <pre>
4992 * list of tensors
4993 * </pre>
4994 *
4995 * <code>repeated .onnx.TensorProto tensors = 10;</code>
4996 */
4997 public Builder removeTensors(int index) {
4998 if (tensorsBuilder_ == null) {
4999 ensureTensorsIsMutable();
5000 tensors_.remove(index);
5001 onChanged();
5002 } else {
5003 tensorsBuilder_.remove(index);
5004 }
5005 return this;
5006 }
5007 /**
5008 * <pre>
5009 * list of tensors
5010 * </pre>
5011 *
5012 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5013 */
5014 public onnx.OnnxMl.TensorProto.Builder getTensorsBuilder(
5015 int index) {
5016 return getTensorsFieldBuilder().getBuilder(index);
5017 }
5018 /**
5019 * <pre>
5020 * list of tensors
5021 * </pre>
5022 *
5023 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5024 */
5025 public onnx.OnnxMl.TensorProtoOrBuilder getTensorsOrBuilder(
5026 int index) {
5027 if (tensorsBuilder_ == null) {
5028 return tensors_.get(index); } else {
5029 return tensorsBuilder_.getMessageOrBuilder(index);
5030 }
5031 }
5032 /**
5033 * <pre>
5034 * list of tensors
5035 * </pre>
5036 *
5037 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5038 */
5039 public java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
5040 getTensorsOrBuilderList() {
5041 if (tensorsBuilder_ != null) {
5042 return tensorsBuilder_.getMessageOrBuilderList();
5043 } else {
5044 return java.util.Collections.unmodifiableList(tensors_);
5045 }
5046 }
5047 /**
5048 * <pre>
5049 * list of tensors
5050 * </pre>
5051 *
5052 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5053 */
5054 public onnx.OnnxMl.TensorProto.Builder addTensorsBuilder() {
5055 return getTensorsFieldBuilder().addBuilder(
5056 onnx.OnnxMl.TensorProto.getDefaultInstance());
5057 }
5058 /**
5059 * <pre>
5060 * list of tensors
5061 * </pre>
5062 *
5063 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5064 */
5065 public onnx.OnnxMl.TensorProto.Builder addTensorsBuilder(
5066 int index) {
5067 return getTensorsFieldBuilder().addBuilder(
5068 index, onnx.OnnxMl.TensorProto.getDefaultInstance());
5069 }
5070 /**
5071 * <pre>
5072 * list of tensors
5073 * </pre>
5074 *
5075 * <code>repeated .onnx.TensorProto tensors = 10;</code>
5076 */
5077 public java.util.List<onnx.OnnxMl.TensorProto.Builder>
5078 getTensorsBuilderList() {
5079 return getTensorsFieldBuilder().getBuilderList();
5080 }
5081 private com.google.protobuf.RepeatedFieldBuilder<
5082 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>
5083 getTensorsFieldBuilder() {
5084 if (tensorsBuilder_ == null) {
5085 tensorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
5086 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>(
5087 tensors_,
5088 ((bitField0_ & 0x00004000) != 0),
5089 getParentForChildren(),
5090 isClean());
5091 tensors_ = null;
5092 }
5093 return tensorsBuilder_;
5094 }
5095
5096 private java.util.List<onnx.OnnxMl.GraphProto> graphs_ =
5097 java.util.Collections.emptyList();
5098 private void ensureGraphsIsMutable() {
5099 if (!((bitField0_ & 0x00008000) != 0)) {
5100 graphs_ = new java.util.ArrayList<onnx.OnnxMl.GraphProto>(graphs_);
5101 bitField0_ |= 0x00008000;
5102 }
5103 }
5104
5105 private com.google.protobuf.RepeatedFieldBuilder<
5106 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder> graphsBuilder_;
5107
5108 /**
5109 * <pre>
5110 * list of graph
5111 * </pre>
5112 *
5113 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5114 */
5115 public java.util.List<onnx.OnnxMl.GraphProto> getGraphsList() {
5116 if (graphsBuilder_ == null) {
5117 return java.util.Collections.unmodifiableList(graphs_);
5118 } else {
5119 return graphsBuilder_.getMessageList();
5120 }
5121 }
5122 /**
5123 * <pre>
5124 * list of graph
5125 * </pre>
5126 *
5127 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5128 */
5129 public int getGraphsCount() {
5130 if (graphsBuilder_ == null) {
5131 return graphs_.size();
5132 } else {
5133 return graphsBuilder_.getCount();
5134 }
5135 }
5136 /**
5137 * <pre>
5138 * list of graph
5139 * </pre>
5140 *
5141 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5142 */
5143 public onnx.OnnxMl.GraphProto getGraphs(int index) {
5144 if (graphsBuilder_ == null) {
5145 return graphs_.get(index);
5146 } else {
5147 return graphsBuilder_.getMessage(index);
5148 }
5149 }
5150 /**
5151 * <pre>
5152 * list of graph
5153 * </pre>
5154 *
5155 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5156 */
5157 public Builder setGraphs(
5158 int index, onnx.OnnxMl.GraphProto value) {
5159 if (graphsBuilder_ == null) {
5160 if (value == null) {
5161 throw new NullPointerException();
5162 }
5163 ensureGraphsIsMutable();
5164 graphs_.set(index, value);
5165 onChanged();
5166 } else {
5167 graphsBuilder_.setMessage(index, value);
5168 }
5169 return this;
5170 }
5171 /**
5172 * <pre>
5173 * list of graph
5174 * </pre>
5175 *
5176 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5177 */
5178 public Builder setGraphs(
5179 int index, onnx.OnnxMl.GraphProto.Builder builderForValue) {
5180 if (graphsBuilder_ == null) {
5181 ensureGraphsIsMutable();
5182 graphs_.set(index, builderForValue.build());
5183 onChanged();
5184 } else {
5185 graphsBuilder_.setMessage(index, builderForValue.build());
5186 }
5187 return this;
5188 }
5189 /**
5190 * <pre>
5191 * list of graph
5192 * </pre>
5193 *
5194 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5195 */
5196 public Builder addGraphs(onnx.OnnxMl.GraphProto value) {
5197 if (graphsBuilder_ == null) {
5198 if (value == null) {
5199 throw new NullPointerException();
5200 }
5201 ensureGraphsIsMutable();
5202 graphs_.add(value);
5203 onChanged();
5204 } else {
5205 graphsBuilder_.addMessage(value);
5206 }
5207 return this;
5208 }
5209 /**
5210 * <pre>
5211 * list of graph
5212 * </pre>
5213 *
5214 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5215 */
5216 public Builder addGraphs(
5217 int index, onnx.OnnxMl.GraphProto value) {
5218 if (graphsBuilder_ == null) {
5219 if (value == null) {
5220 throw new NullPointerException();
5221 }
5222 ensureGraphsIsMutable();
5223 graphs_.add(index, value);
5224 onChanged();
5225 } else {
5226 graphsBuilder_.addMessage(index, value);
5227 }
5228 return this;
5229 }
5230 /**
5231 * <pre>
5232 * list of graph
5233 * </pre>
5234 *
5235 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5236 */
5237 public Builder addGraphs(
5238 onnx.OnnxMl.GraphProto.Builder builderForValue) {
5239 if (graphsBuilder_ == null) {
5240 ensureGraphsIsMutable();
5241 graphs_.add(builderForValue.build());
5242 onChanged();
5243 } else {
5244 graphsBuilder_.addMessage(builderForValue.build());
5245 }
5246 return this;
5247 }
5248 /**
5249 * <pre>
5250 * list of graph
5251 * </pre>
5252 *
5253 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5254 */
5255 public Builder addGraphs(
5256 int index, onnx.OnnxMl.GraphProto.Builder builderForValue) {
5257 if (graphsBuilder_ == null) {
5258 ensureGraphsIsMutable();
5259 graphs_.add(index, builderForValue.build());
5260 onChanged();
5261 } else {
5262 graphsBuilder_.addMessage(index, builderForValue.build());
5263 }
5264 return this;
5265 }
5266 /**
5267 * <pre>
5268 * list of graph
5269 * </pre>
5270 *
5271 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5272 */
5273 public Builder addAllGraphs(
5274 java.lang.Iterable<? extends onnx.OnnxMl.GraphProto> values) {
5275 if (graphsBuilder_ == null) {
5276 ensureGraphsIsMutable();
5277 com.google.protobuf.AbstractMessageLite.Builder.addAll(
5278 values, graphs_);
5279 onChanged();
5280 } else {
5281 graphsBuilder_.addAllMessages(values);
5282 }
5283 return this;
5284 }
5285 /**
5286 * <pre>
5287 * list of graph
5288 * </pre>
5289 *
5290 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5291 */
5292 public Builder clearGraphs() {
5293 if (graphsBuilder_ == null) {
5294 graphs_ = java.util.Collections.emptyList();
5295 bitField0_ = (bitField0_ & ~0x00008000);
5296 onChanged();
5297 } else {
5298 graphsBuilder_.clear();
5299 }
5300 return this;
5301 }
5302 /**
5303 * <pre>
5304 * list of graph
5305 * </pre>
5306 *
5307 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5308 */
5309 public Builder removeGraphs(int index) {
5310 if (graphsBuilder_ == null) {
5311 ensureGraphsIsMutable();
5312 graphs_.remove(index);
5313 onChanged();
5314 } else {
5315 graphsBuilder_.remove(index);
5316 }
5317 return this;
5318 }
5319 /**
5320 * <pre>
5321 * list of graph
5322 * </pre>
5323 *
5324 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5325 */
5326 public onnx.OnnxMl.GraphProto.Builder getGraphsBuilder(
5327 int index) {
5328 return getGraphsFieldBuilder().getBuilder(index);
5329 }
5330 /**
5331 * <pre>
5332 * list of graph
5333 * </pre>
5334 *
5335 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5336 */
5337 public onnx.OnnxMl.GraphProtoOrBuilder getGraphsOrBuilder(
5338 int index) {
5339 if (graphsBuilder_ == null) {
5340 return graphs_.get(index); } else {
5341 return graphsBuilder_.getMessageOrBuilder(index);
5342 }
5343 }
5344 /**
5345 * <pre>
5346 * list of graph
5347 * </pre>
5348 *
5349 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5350 */
5351 public java.util.List<? extends onnx.OnnxMl.GraphProtoOrBuilder>
5352 getGraphsOrBuilderList() {
5353 if (graphsBuilder_ != null) {
5354 return graphsBuilder_.getMessageOrBuilderList();
5355 } else {
5356 return java.util.Collections.unmodifiableList(graphs_);
5357 }
5358 }
5359 /**
5360 * <pre>
5361 * list of graph
5362 * </pre>
5363 *
5364 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5365 */
5366 public onnx.OnnxMl.GraphProto.Builder addGraphsBuilder() {
5367 return getGraphsFieldBuilder().addBuilder(
5368 onnx.OnnxMl.GraphProto.getDefaultInstance());
5369 }
5370 /**
5371 * <pre>
5372 * list of graph
5373 * </pre>
5374 *
5375 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5376 */
5377 public onnx.OnnxMl.GraphProto.Builder addGraphsBuilder(
5378 int index) {
5379 return getGraphsFieldBuilder().addBuilder(
5380 index, onnx.OnnxMl.GraphProto.getDefaultInstance());
5381 }
5382 /**
5383 * <pre>
5384 * list of graph
5385 * </pre>
5386 *
5387 * <code>repeated .onnx.GraphProto graphs = 11;</code>
5388 */
5389 public java.util.List<onnx.OnnxMl.GraphProto.Builder>
5390 getGraphsBuilderList() {
5391 return getGraphsFieldBuilder().getBuilderList();
5392 }
5393 private com.google.protobuf.RepeatedFieldBuilder<
5394 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>
5395 getGraphsFieldBuilder() {
5396 if (graphsBuilder_ == null) {
5397 graphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
5398 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>(
5399 graphs_,
5400 ((bitField0_ & 0x00008000) != 0),
5401 getParentForChildren(),
5402 isClean());
5403 graphs_ = null;
5404 }
5405 return graphsBuilder_;
5406 }
5407
5408 private java.util.List<onnx.OnnxMl.SparseTensorProto> sparseTensors_ =
5409 java.util.Collections.emptyList();
5410 private void ensureSparseTensorsIsMutable() {
5411 if (!((bitField0_ & 0x00010000) != 0)) {
5412 sparseTensors_ = new java.util.ArrayList<onnx.OnnxMl.SparseTensorProto>(sparseTensors_);
5413 bitField0_ |= 0x00010000;
5414 }
5415 }
5416
5417 private com.google.protobuf.RepeatedFieldBuilder<
5418 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder> sparseTensorsBuilder_;
5419
5420 /**
5421 * <pre>
5422 * list of sparse tensors
5423 * </pre>
5424 *
5425 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5426 */
5427 public java.util.List<onnx.OnnxMl.SparseTensorProto> getSparseTensorsList() {
5428 if (sparseTensorsBuilder_ == null) {
5429 return java.util.Collections.unmodifiableList(sparseTensors_);
5430 } else {
5431 return sparseTensorsBuilder_.getMessageList();
5432 }
5433 }
5434 /**
5435 * <pre>
5436 * list of sparse tensors
5437 * </pre>
5438 *
5439 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5440 */
5441 public int getSparseTensorsCount() {
5442 if (sparseTensorsBuilder_ == null) {
5443 return sparseTensors_.size();
5444 } else {
5445 return sparseTensorsBuilder_.getCount();
5446 }
5447 }
5448 /**
5449 * <pre>
5450 * list of sparse tensors
5451 * </pre>
5452 *
5453 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5454 */
5455 public onnx.OnnxMl.SparseTensorProto getSparseTensors(int index) {
5456 if (sparseTensorsBuilder_ == null) {
5457 return sparseTensors_.get(index);
5458 } else {
5459 return sparseTensorsBuilder_.getMessage(index);
5460 }
5461 }
5462 /**
5463 * <pre>
5464 * list of sparse tensors
5465 * </pre>
5466 *
5467 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5468 */
5469 public Builder setSparseTensors(
5470 int index, onnx.OnnxMl.SparseTensorProto value) {
5471 if (sparseTensorsBuilder_ == null) {
5472 if (value == null) {
5473 throw new NullPointerException();
5474 }
5475 ensureSparseTensorsIsMutable();
5476 sparseTensors_.set(index, value);
5477 onChanged();
5478 } else {
5479 sparseTensorsBuilder_.setMessage(index, value);
5480 }
5481 return this;
5482 }
5483 /**
5484 * <pre>
5485 * list of sparse tensors
5486 * </pre>
5487 *
5488 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5489 */
5490 public Builder setSparseTensors(
5491 int index, onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
5492 if (sparseTensorsBuilder_ == null) {
5493 ensureSparseTensorsIsMutable();
5494 sparseTensors_.set(index, builderForValue.build());
5495 onChanged();
5496 } else {
5497 sparseTensorsBuilder_.setMessage(index, builderForValue.build());
5498 }
5499 return this;
5500 }
5501 /**
5502 * <pre>
5503 * list of sparse tensors
5504 * </pre>
5505 *
5506 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5507 */
5508 public Builder addSparseTensors(onnx.OnnxMl.SparseTensorProto value) {
5509 if (sparseTensorsBuilder_ == null) {
5510 if (value == null) {
5511 throw new NullPointerException();
5512 }
5513 ensureSparseTensorsIsMutable();
5514 sparseTensors_.add(value);
5515 onChanged();
5516 } else {
5517 sparseTensorsBuilder_.addMessage(value);
5518 }
5519 return this;
5520 }
5521 /**
5522 * <pre>
5523 * list of sparse tensors
5524 * </pre>
5525 *
5526 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5527 */
5528 public Builder addSparseTensors(
5529 int index, onnx.OnnxMl.SparseTensorProto value) {
5530 if (sparseTensorsBuilder_ == null) {
5531 if (value == null) {
5532 throw new NullPointerException();
5533 }
5534 ensureSparseTensorsIsMutable();
5535 sparseTensors_.add(index, value);
5536 onChanged();
5537 } else {
5538 sparseTensorsBuilder_.addMessage(index, value);
5539 }
5540 return this;
5541 }
5542 /**
5543 * <pre>
5544 * list of sparse tensors
5545 * </pre>
5546 *
5547 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5548 */
5549 public Builder addSparseTensors(
5550 onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
5551 if (sparseTensorsBuilder_ == null) {
5552 ensureSparseTensorsIsMutable();
5553 sparseTensors_.add(builderForValue.build());
5554 onChanged();
5555 } else {
5556 sparseTensorsBuilder_.addMessage(builderForValue.build());
5557 }
5558 return this;
5559 }
5560 /**
5561 * <pre>
5562 * list of sparse tensors
5563 * </pre>
5564 *
5565 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5566 */
5567 public Builder addSparseTensors(
5568 int index, onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
5569 if (sparseTensorsBuilder_ == null) {
5570 ensureSparseTensorsIsMutable();
5571 sparseTensors_.add(index, builderForValue.build());
5572 onChanged();
5573 } else {
5574 sparseTensorsBuilder_.addMessage(index, builderForValue.build());
5575 }
5576 return this;
5577 }
5578 /**
5579 * <pre>
5580 * list of sparse tensors
5581 * </pre>
5582 *
5583 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5584 */
5585 public Builder addAllSparseTensors(
5586 java.lang.Iterable<? extends onnx.OnnxMl.SparseTensorProto> values) {
5587 if (sparseTensorsBuilder_ == null) {
5588 ensureSparseTensorsIsMutable();
5589 com.google.protobuf.AbstractMessageLite.Builder.addAll(
5590 values, sparseTensors_);
5591 onChanged();
5592 } else {
5593 sparseTensorsBuilder_.addAllMessages(values);
5594 }
5595 return this;
5596 }
5597 /**
5598 * <pre>
5599 * list of sparse tensors
5600 * </pre>
5601 *
5602 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5603 */
5604 public Builder clearSparseTensors() {
5605 if (sparseTensorsBuilder_ == null) {
5606 sparseTensors_ = java.util.Collections.emptyList();
5607 bitField0_ = (bitField0_ & ~0x00010000);
5608 onChanged();
5609 } else {
5610 sparseTensorsBuilder_.clear();
5611 }
5612 return this;
5613 }
5614 /**
5615 * <pre>
5616 * list of sparse tensors
5617 * </pre>
5618 *
5619 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5620 */
5621 public Builder removeSparseTensors(int index) {
5622 if (sparseTensorsBuilder_ == null) {
5623 ensureSparseTensorsIsMutable();
5624 sparseTensors_.remove(index);
5625 onChanged();
5626 } else {
5627 sparseTensorsBuilder_.remove(index);
5628 }
5629 return this;
5630 }
5631 /**
5632 * <pre>
5633 * list of sparse tensors
5634 * </pre>
5635 *
5636 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5637 */
5638 public onnx.OnnxMl.SparseTensorProto.Builder getSparseTensorsBuilder(
5639 int index) {
5640 return getSparseTensorsFieldBuilder().getBuilder(index);
5641 }
5642 /**
5643 * <pre>
5644 * list of sparse tensors
5645 * </pre>
5646 *
5647 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5648 */
5649 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseTensorsOrBuilder(
5650 int index) {
5651 if (sparseTensorsBuilder_ == null) {
5652 return sparseTensors_.get(index); } else {
5653 return sparseTensorsBuilder_.getMessageOrBuilder(index);
5654 }
5655 }
5656 /**
5657 * <pre>
5658 * list of sparse tensors
5659 * </pre>
5660 *
5661 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5662 */
5663 public java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
5664 getSparseTensorsOrBuilderList() {
5665 if (sparseTensorsBuilder_ != null) {
5666 return sparseTensorsBuilder_.getMessageOrBuilderList();
5667 } else {
5668 return java.util.Collections.unmodifiableList(sparseTensors_);
5669 }
5670 }
5671 /**
5672 * <pre>
5673 * list of sparse tensors
5674 * </pre>
5675 *
5676 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5677 */
5678 public onnx.OnnxMl.SparseTensorProto.Builder addSparseTensorsBuilder() {
5679 return getSparseTensorsFieldBuilder().addBuilder(
5680 onnx.OnnxMl.SparseTensorProto.getDefaultInstance());
5681 }
5682 /**
5683 * <pre>
5684 * list of sparse tensors
5685 * </pre>
5686 *
5687 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5688 */
5689 public onnx.OnnxMl.SparseTensorProto.Builder addSparseTensorsBuilder(
5690 int index) {
5691 return getSparseTensorsFieldBuilder().addBuilder(
5692 index, onnx.OnnxMl.SparseTensorProto.getDefaultInstance());
5693 }
5694 /**
5695 * <pre>
5696 * list of sparse tensors
5697 * </pre>
5698 *
5699 * <code>repeated .onnx.SparseTensorProto sparse_tensors = 23;</code>
5700 */
5701 public java.util.List<onnx.OnnxMl.SparseTensorProto.Builder>
5702 getSparseTensorsBuilderList() {
5703 return getSparseTensorsFieldBuilder().getBuilderList();
5704 }
5705 private com.google.protobuf.RepeatedFieldBuilder<
5706 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>
5707 getSparseTensorsFieldBuilder() {
5708 if (sparseTensorsBuilder_ == null) {
5709 sparseTensorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
5710 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>(
5711 sparseTensors_,
5712 ((bitField0_ & 0x00010000) != 0),
5713 getParentForChildren(),
5714 isClean());
5715 sparseTensors_ = null;
5716 }
5717 return sparseTensorsBuilder_;
5718 }
5719
5720 private java.util.List<onnx.OnnxMl.TypeProto> typeProtos_ =
5721 java.util.Collections.emptyList();
5722 private void ensureTypeProtosIsMutable() {
5723 if (!((bitField0_ & 0x00020000) != 0)) {
5724 typeProtos_ = new java.util.ArrayList<onnx.OnnxMl.TypeProto>(typeProtos_);
5725 bitField0_ |= 0x00020000;
5726 }
5727 }
5728
5729 private com.google.protobuf.RepeatedFieldBuilder<
5730 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> typeProtosBuilder_;
5731
5732 /**
5733 * <pre>
5734 * list of type protos
5735 * </pre>
5736 *
5737 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5738 */
5739 public java.util.List<onnx.OnnxMl.TypeProto> getTypeProtosList() {
5740 if (typeProtosBuilder_ == null) {
5741 return java.util.Collections.unmodifiableList(typeProtos_);
5742 } else {
5743 return typeProtosBuilder_.getMessageList();
5744 }
5745 }
5746 /**
5747 * <pre>
5748 * list of type protos
5749 * </pre>
5750 *
5751 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5752 */
5753 public int getTypeProtosCount() {
5754 if (typeProtosBuilder_ == null) {
5755 return typeProtos_.size();
5756 } else {
5757 return typeProtosBuilder_.getCount();
5758 }
5759 }
5760 /**
5761 * <pre>
5762 * list of type protos
5763 * </pre>
5764 *
5765 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5766 */
5767 public onnx.OnnxMl.TypeProto getTypeProtos(int index) {
5768 if (typeProtosBuilder_ == null) {
5769 return typeProtos_.get(index);
5770 } else {
5771 return typeProtosBuilder_.getMessage(index);
5772 }
5773 }
5774 /**
5775 * <pre>
5776 * list of type protos
5777 * </pre>
5778 *
5779 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5780 */
5781 public Builder setTypeProtos(
5782 int index, onnx.OnnxMl.TypeProto value) {
5783 if (typeProtosBuilder_ == null) {
5784 if (value == null) {
5785 throw new NullPointerException();
5786 }
5787 ensureTypeProtosIsMutable();
5788 typeProtos_.set(index, value);
5789 onChanged();
5790 } else {
5791 typeProtosBuilder_.setMessage(index, value);
5792 }
5793 return this;
5794 }
5795 /**
5796 * <pre>
5797 * list of type protos
5798 * </pre>
5799 *
5800 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5801 */
5802 public Builder setTypeProtos(
5803 int index, onnx.OnnxMl.TypeProto.Builder builderForValue) {
5804 if (typeProtosBuilder_ == null) {
5805 ensureTypeProtosIsMutable();
5806 typeProtos_.set(index, builderForValue.build());
5807 onChanged();
5808 } else {
5809 typeProtosBuilder_.setMessage(index, builderForValue.build());
5810 }
5811 return this;
5812 }
5813 /**
5814 * <pre>
5815 * list of type protos
5816 * </pre>
5817 *
5818 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5819 */
5820 public Builder addTypeProtos(onnx.OnnxMl.TypeProto value) {
5821 if (typeProtosBuilder_ == null) {
5822 if (value == null) {
5823 throw new NullPointerException();
5824 }
5825 ensureTypeProtosIsMutable();
5826 typeProtos_.add(value);
5827 onChanged();
5828 } else {
5829 typeProtosBuilder_.addMessage(value);
5830 }
5831 return this;
5832 }
5833 /**
5834 * <pre>
5835 * list of type protos
5836 * </pre>
5837 *
5838 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5839 */
5840 public Builder addTypeProtos(
5841 int index, onnx.OnnxMl.TypeProto value) {
5842 if (typeProtosBuilder_ == null) {
5843 if (value == null) {
5844 throw new NullPointerException();
5845 }
5846 ensureTypeProtosIsMutable();
5847 typeProtos_.add(index, value);
5848 onChanged();
5849 } else {
5850 typeProtosBuilder_.addMessage(index, value);
5851 }
5852 return this;
5853 }
5854 /**
5855 * <pre>
5856 * list of type protos
5857 * </pre>
5858 *
5859 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5860 */
5861 public Builder addTypeProtos(
5862 onnx.OnnxMl.TypeProto.Builder builderForValue) {
5863 if (typeProtosBuilder_ == null) {
5864 ensureTypeProtosIsMutable();
5865 typeProtos_.add(builderForValue.build());
5866 onChanged();
5867 } else {
5868 typeProtosBuilder_.addMessage(builderForValue.build());
5869 }
5870 return this;
5871 }
5872 /**
5873 * <pre>
5874 * list of type protos
5875 * </pre>
5876 *
5877 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5878 */
5879 public Builder addTypeProtos(
5880 int index, onnx.OnnxMl.TypeProto.Builder builderForValue) {
5881 if (typeProtosBuilder_ == null) {
5882 ensureTypeProtosIsMutable();
5883 typeProtos_.add(index, builderForValue.build());
5884 onChanged();
5885 } else {
5886 typeProtosBuilder_.addMessage(index, builderForValue.build());
5887 }
5888 return this;
5889 }
5890 /**
5891 * <pre>
5892 * list of type protos
5893 * </pre>
5894 *
5895 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5896 */
5897 public Builder addAllTypeProtos(
5898 java.lang.Iterable<? extends onnx.OnnxMl.TypeProto> values) {
5899 if (typeProtosBuilder_ == null) {
5900 ensureTypeProtosIsMutable();
5901 com.google.protobuf.AbstractMessageLite.Builder.addAll(
5902 values, typeProtos_);
5903 onChanged();
5904 } else {
5905 typeProtosBuilder_.addAllMessages(values);
5906 }
5907 return this;
5908 }
5909 /**
5910 * <pre>
5911 * list of type protos
5912 * </pre>
5913 *
5914 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5915 */
5916 public Builder clearTypeProtos() {
5917 if (typeProtosBuilder_ == null) {
5918 typeProtos_ = java.util.Collections.emptyList();
5919 bitField0_ = (bitField0_ & ~0x00020000);
5920 onChanged();
5921 } else {
5922 typeProtosBuilder_.clear();
5923 }
5924 return this;
5925 }
5926 /**
5927 * <pre>
5928 * list of type protos
5929 * </pre>
5930 *
5931 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5932 */
5933 public Builder removeTypeProtos(int index) {
5934 if (typeProtosBuilder_ == null) {
5935 ensureTypeProtosIsMutable();
5936 typeProtos_.remove(index);
5937 onChanged();
5938 } else {
5939 typeProtosBuilder_.remove(index);
5940 }
5941 return this;
5942 }
5943 /**
5944 * <pre>
5945 * list of type protos
5946 * </pre>
5947 *
5948 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5949 */
5950 public onnx.OnnxMl.TypeProto.Builder getTypeProtosBuilder(
5951 int index) {
5952 return getTypeProtosFieldBuilder().getBuilder(index);
5953 }
5954 /**
5955 * <pre>
5956 * list of type protos
5957 * </pre>
5958 *
5959 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5960 */
5961 public onnx.OnnxMl.TypeProtoOrBuilder getTypeProtosOrBuilder(
5962 int index) {
5963 if (typeProtosBuilder_ == null) {
5964 return typeProtos_.get(index); } else {
5965 return typeProtosBuilder_.getMessageOrBuilder(index);
5966 }
5967 }
5968 /**
5969 * <pre>
5970 * list of type protos
5971 * </pre>
5972 *
5973 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5974 */
5975 public java.util.List<? extends onnx.OnnxMl.TypeProtoOrBuilder>
5976 getTypeProtosOrBuilderList() {
5977 if (typeProtosBuilder_ != null) {
5978 return typeProtosBuilder_.getMessageOrBuilderList();
5979 } else {
5980 return java.util.Collections.unmodifiableList(typeProtos_);
5981 }
5982 }
5983 /**
5984 * <pre>
5985 * list of type protos
5986 * </pre>
5987 *
5988 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
5989 */
5990 public onnx.OnnxMl.TypeProto.Builder addTypeProtosBuilder() {
5991 return getTypeProtosFieldBuilder().addBuilder(
5992 onnx.OnnxMl.TypeProto.getDefaultInstance());
5993 }
5994 /**
5995 * <pre>
5996 * list of type protos
5997 * </pre>
5998 *
5999 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
6000 */
6001 public onnx.OnnxMl.TypeProto.Builder addTypeProtosBuilder(
6002 int index) {
6003 return getTypeProtosFieldBuilder().addBuilder(
6004 index, onnx.OnnxMl.TypeProto.getDefaultInstance());
6005 }
6006 /**
6007 * <pre>
6008 * list of type protos
6009 * </pre>
6010 *
6011 * <code>repeated .onnx.TypeProto type_protos = 15;</code>
6012 */
6013 public java.util.List<onnx.OnnxMl.TypeProto.Builder>
6014 getTypeProtosBuilderList() {
6015 return getTypeProtosFieldBuilder().getBuilderList();
6016 }
6017 private com.google.protobuf.RepeatedFieldBuilder<
6018 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
6019 getTypeProtosFieldBuilder() {
6020 if (typeProtosBuilder_ == null) {
6021 typeProtosBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
6022 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
6023 typeProtos_,
6024 ((bitField0_ & 0x00020000) != 0),
6025 getParentForChildren(),
6026 isClean());
6027 typeProtos_ = null;
6028 }
6029 return typeProtosBuilder_;
6030 }
6031
6032 // @@protoc_insertion_point(builder_scope:onnx.AttributeProto)
6033 }
6034
6035 // @@protoc_insertion_point(class_scope:onnx.AttributeProto)
6036 private static final onnx.OnnxMl.AttributeProto DEFAULT_INSTANCE;
6037 static {
6038 DEFAULT_INSTANCE = new onnx.OnnxMl.AttributeProto();
6039 }
6040
6041 public static onnx.OnnxMl.AttributeProto getDefaultInstance() {
6042 return DEFAULT_INSTANCE;
6043 }
6044
6045 private static final com.google.protobuf.Parser<AttributeProto>
6046 PARSER = new com.google.protobuf.AbstractParser<AttributeProto>() {
6047 @java.lang.Override
6048 public AttributeProto parsePartialFrom(
6049 com.google.protobuf.CodedInputStream input,
6050 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6051 throws com.google.protobuf.InvalidProtocolBufferException {
6052 Builder builder = newBuilder();
6053 try {
6054 builder.mergeFrom(input, extensionRegistry);
6055 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6056 throw e.setUnfinishedMessage(builder.buildPartial());
6057 } catch (com.google.protobuf.UninitializedMessageException e) {
6058 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
6059 } catch (java.io.IOException e) {
6060 throw new com.google.protobuf.InvalidProtocolBufferException(e)
6061 .setUnfinishedMessage(builder.buildPartial());
6062 }
6063 return builder.buildPartial();
6064 }
6065 };
6066
6067 public static com.google.protobuf.Parser<AttributeProto> parser() {
6068 return PARSER;
6069 }
6070
6071 @java.lang.Override
6072 public com.google.protobuf.Parser<AttributeProto> getParserForType() {
6073 return PARSER;
6074 }
6075
6076 @java.lang.Override
6077 public onnx.OnnxMl.AttributeProto getDefaultInstanceForType() {
6078 return DEFAULT_INSTANCE;
6079 }
6080
6081 }
6082
6083 public interface ValueInfoProtoOrBuilder extends
6084 // @@protoc_insertion_point(interface_extends:onnx.ValueInfoProto)
6085 com.google.protobuf.MessageOrBuilder {
6086
6087 /**
6088 * <pre>
6089 * This field MUST be present in this version of the IR.
6090 * </pre>
6091 *
6092 * <code>optional string name = 1;</code>
6093 * @return Whether the name field is set.
6094 */
6095 boolean hasName();
6096 /**
6097 * <pre>
6098 * This field MUST be present in this version of the IR.
6099 * </pre>
6100 *
6101 * <code>optional string name = 1;</code>
6102 * @return The name.
6103 */
6104 java.lang.String getName();
6105 /**
6106 * <pre>
6107 * This field MUST be present in this version of the IR.
6108 * </pre>
6109 *
6110 * <code>optional string name = 1;</code>
6111 * @return The bytes for name.
6112 */
6113 com.google.protobuf.ByteString
6114 getNameBytes();
6115
6116 /**
6117 * <pre>
6118 * This field MUST be present in this version of the IR for
6119 * inputs and outputs of the top-level graph.
6120 * </pre>
6121 *
6122 * <code>optional .onnx.TypeProto type = 2;</code>
6123 * @return Whether the type field is set.
6124 */
6125 boolean hasType();
6126 /**
6127 * <pre>
6128 * This field MUST be present in this version of the IR for
6129 * inputs and outputs of the top-level graph.
6130 * </pre>
6131 *
6132 * <code>optional .onnx.TypeProto type = 2;</code>
6133 * @return The type.
6134 */
6135 onnx.OnnxMl.TypeProto getType();
6136 /**
6137 * <pre>
6138 * This field MUST be present in this version of the IR for
6139 * inputs and outputs of the top-level graph.
6140 * </pre>
6141 *
6142 * <code>optional .onnx.TypeProto type = 2;</code>
6143 */
6144 onnx.OnnxMl.TypeProtoOrBuilder getTypeOrBuilder();
6145
6146 /**
6147 * <pre>
6148 * A human-readable documentation for this value. Markdown is allowed.
6149 * </pre>
6150 *
6151 * <code>optional string doc_string = 3;</code>
6152 * @return Whether the docString field is set.
6153 */
6154 boolean hasDocString();
6155 /**
6156 * <pre>
6157 * A human-readable documentation for this value. Markdown is allowed.
6158 * </pre>
6159 *
6160 * <code>optional string doc_string = 3;</code>
6161 * @return The docString.
6162 */
6163 java.lang.String getDocString();
6164 /**
6165 * <pre>
6166 * A human-readable documentation for this value. Markdown is allowed.
6167 * </pre>
6168 *
6169 * <code>optional string doc_string = 3;</code>
6170 * @return The bytes for docString.
6171 */
6172 com.google.protobuf.ByteString
6173 getDocStringBytes();
6174
6175 /**
6176 * <pre>
6177 * Named metadata values; keys should be distinct.
6178 * </pre>
6179 *
6180 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6181 */
6182 java.util.List<onnx.OnnxMl.StringStringEntryProto>
6183 getMetadataPropsList();
6184 /**
6185 * <pre>
6186 * Named metadata values; keys should be distinct.
6187 * </pre>
6188 *
6189 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6190 */
6191 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
6192 /**
6193 * <pre>
6194 * Named metadata values; keys should be distinct.
6195 * </pre>
6196 *
6197 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6198 */
6199 int getMetadataPropsCount();
6200 /**
6201 * <pre>
6202 * Named metadata values; keys should be distinct.
6203 * </pre>
6204 *
6205 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6206 */
6207 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
6208 getMetadataPropsOrBuilderList();
6209 /**
6210 * <pre>
6211 * Named metadata values; keys should be distinct.
6212 * </pre>
6213 *
6214 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6215 */
6216 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
6217 int index);
6218 }
6219 /**
6220 * <pre>
6221 * Defines information on value, including the name, the type, and
6222 * the shape of the value.
6223 * </pre>
6224 *
6225 * Protobuf type {@code onnx.ValueInfoProto}
6226 */
6227 public static final class ValueInfoProto extends
6228 com.google.protobuf.GeneratedMessage implements
6229 // @@protoc_insertion_point(message_implements:onnx.ValueInfoProto)
6230 ValueInfoProtoOrBuilder {
6231 private static final long serialVersionUID = 0L;
6232 static {
6233 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
6234 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
6235 /* major= */ 4,
6236 /* minor= */ 29,
6237 /* patch= */ 3,
6238 /* suffix= */ "",
6239 ValueInfoProto.class.getName());
6240 }
6241 // Use ValueInfoProto.newBuilder() to construct.
6242 private ValueInfoProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6243 super(builder);
6244 }
6245 private ValueInfoProto() {
6246 name_ = "";
6247 docString_ = "";
6248 metadataProps_ = java.util.Collections.emptyList();
6249 }
6250
6251 public static final com.google.protobuf.Descriptors.Descriptor
6252 getDescriptor() {
6253 return onnx.OnnxMl.internal_static_onnx_ValueInfoProto_descriptor;
6254 }
6255
6256 @java.lang.Override
6257 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6258 internalGetFieldAccessorTable() {
6259 return onnx.OnnxMl.internal_static_onnx_ValueInfoProto_fieldAccessorTable
6260 .ensureFieldAccessorsInitialized(
6261 onnx.OnnxMl.ValueInfoProto.class, onnx.OnnxMl.ValueInfoProto.Builder.class);
6262 }
6263
6264 private int bitField0_;
6265 public static final int NAME_FIELD_NUMBER = 1;
6266 @SuppressWarnings("serial")
6267 private volatile java.lang.Object name_ = "";
6268 /**
6269 * <pre>
6270 * This field MUST be present in this version of the IR.
6271 * </pre>
6272 *
6273 * <code>optional string name = 1;</code>
6274 * @return Whether the name field is set.
6275 */
6276 @java.lang.Override
6277 public boolean hasName() {
6278 return ((bitField0_ & 0x00000001) != 0);
6279 }
6280 /**
6281 * <pre>
6282 * This field MUST be present in this version of the IR.
6283 * </pre>
6284 *
6285 * <code>optional string name = 1;</code>
6286 * @return The name.
6287 */
6288 @java.lang.Override
6289 public java.lang.String getName() {
6290 java.lang.Object ref = name_;
6291 if (ref instanceof java.lang.String) {
6292 return (java.lang.String) ref;
6293 } else {
6294 com.google.protobuf.ByteString bs =
6295 (com.google.protobuf.ByteString) ref;
6296 java.lang.String s = bs.toStringUtf8();
6297 if (bs.isValidUtf8()) {
6298 name_ = s;
6299 }
6300 return s;
6301 }
6302 }
6303 /**
6304 * <pre>
6305 * This field MUST be present in this version of the IR.
6306 * </pre>
6307 *
6308 * <code>optional string name = 1;</code>
6309 * @return The bytes for name.
6310 */
6311 @java.lang.Override
6312 public com.google.protobuf.ByteString
6313 getNameBytes() {
6314 java.lang.Object ref = name_;
6315 if (ref instanceof java.lang.String) {
6316 com.google.protobuf.ByteString b =
6317 com.google.protobuf.ByteString.copyFromUtf8(
6318 (java.lang.String) ref);
6319 name_ = b;
6320 return b;
6321 } else {
6322 return (com.google.protobuf.ByteString) ref;
6323 }
6324 }
6325
6326 public static final int TYPE_FIELD_NUMBER = 2;
6327 private onnx.OnnxMl.TypeProto type_;
6328 /**
6329 * <pre>
6330 * This field MUST be present in this version of the IR for
6331 * inputs and outputs of the top-level graph.
6332 * </pre>
6333 *
6334 * <code>optional .onnx.TypeProto type = 2;</code>
6335 * @return Whether the type field is set.
6336 */
6337 @java.lang.Override
6338 public boolean hasType() {
6339 return ((bitField0_ & 0x00000002) != 0);
6340 }
6341 /**
6342 * <pre>
6343 * This field MUST be present in this version of the IR for
6344 * inputs and outputs of the top-level graph.
6345 * </pre>
6346 *
6347 * <code>optional .onnx.TypeProto type = 2;</code>
6348 * @return The type.
6349 */
6350 @java.lang.Override
6351 public onnx.OnnxMl.TypeProto getType() {
6352 return type_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : type_;
6353 }
6354 /**
6355 * <pre>
6356 * This field MUST be present in this version of the IR for
6357 * inputs and outputs of the top-level graph.
6358 * </pre>
6359 *
6360 * <code>optional .onnx.TypeProto type = 2;</code>
6361 */
6362 @java.lang.Override
6363 public onnx.OnnxMl.TypeProtoOrBuilder getTypeOrBuilder() {
6364 return type_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : type_;
6365 }
6366
6367 public static final int DOC_STRING_FIELD_NUMBER = 3;
6368 @SuppressWarnings("serial")
6369 private volatile java.lang.Object docString_ = "";
6370 /**
6371 * <pre>
6372 * A human-readable documentation for this value. Markdown is allowed.
6373 * </pre>
6374 *
6375 * <code>optional string doc_string = 3;</code>
6376 * @return Whether the docString field is set.
6377 */
6378 @java.lang.Override
6379 public boolean hasDocString() {
6380 return ((bitField0_ & 0x00000004) != 0);
6381 }
6382 /**
6383 * <pre>
6384 * A human-readable documentation for this value. Markdown is allowed.
6385 * </pre>
6386 *
6387 * <code>optional string doc_string = 3;</code>
6388 * @return The docString.
6389 */
6390 @java.lang.Override
6391 public java.lang.String getDocString() {
6392 java.lang.Object ref = docString_;
6393 if (ref instanceof java.lang.String) {
6394 return (java.lang.String) ref;
6395 } else {
6396 com.google.protobuf.ByteString bs =
6397 (com.google.protobuf.ByteString) ref;
6398 java.lang.String s = bs.toStringUtf8();
6399 if (bs.isValidUtf8()) {
6400 docString_ = s;
6401 }
6402 return s;
6403 }
6404 }
6405 /**
6406 * <pre>
6407 * A human-readable documentation for this value. Markdown is allowed.
6408 * </pre>
6409 *
6410 * <code>optional string doc_string = 3;</code>
6411 * @return The bytes for docString.
6412 */
6413 @java.lang.Override
6414 public com.google.protobuf.ByteString
6415 getDocStringBytes() {
6416 java.lang.Object ref = docString_;
6417 if (ref instanceof java.lang.String) {
6418 com.google.protobuf.ByteString b =
6419 com.google.protobuf.ByteString.copyFromUtf8(
6420 (java.lang.String) ref);
6421 docString_ = b;
6422 return b;
6423 } else {
6424 return (com.google.protobuf.ByteString) ref;
6425 }
6426 }
6427
6428 public static final int METADATA_PROPS_FIELD_NUMBER = 4;
6429 @SuppressWarnings("serial")
6430 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
6431 /**
6432 * <pre>
6433 * Named metadata values; keys should be distinct.
6434 * </pre>
6435 *
6436 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6437 */
6438 @java.lang.Override
6439 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
6440 return metadataProps_;
6441 }
6442 /**
6443 * <pre>
6444 * Named metadata values; keys should be distinct.
6445 * </pre>
6446 *
6447 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6448 */
6449 @java.lang.Override
6450 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
6451 getMetadataPropsOrBuilderList() {
6452 return metadataProps_;
6453 }
6454 /**
6455 * <pre>
6456 * Named metadata values; keys should be distinct.
6457 * </pre>
6458 *
6459 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6460 */
6461 @java.lang.Override
6462 public int getMetadataPropsCount() {
6463 return metadataProps_.size();
6464 }
6465 /**
6466 * <pre>
6467 * Named metadata values; keys should be distinct.
6468 * </pre>
6469 *
6470 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6471 */
6472 @java.lang.Override
6473 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
6474 return metadataProps_.get(index);
6475 }
6476 /**
6477 * <pre>
6478 * Named metadata values; keys should be distinct.
6479 * </pre>
6480 *
6481 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
6482 */
6483 @java.lang.Override
6484 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
6485 int index) {
6486 return metadataProps_.get(index);
6487 }
6488
6489 private byte memoizedIsInitialized = -1;
6490 @java.lang.Override
6491 public final boolean isInitialized() {
6492 byte isInitialized = memoizedIsInitialized;
6493 if (isInitialized == 1) return true;
6494 if (isInitialized == 0) return false;
6495
6496 memoizedIsInitialized = 1;
6497 return true;
6498 }
6499
6500 @java.lang.Override
6501 public void writeTo(com.google.protobuf.CodedOutputStream output)
6502 throws java.io.IOException {
6503 if (((bitField0_ & 0x00000001) != 0)) {
6504 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
6505 }
6506 if (((bitField0_ & 0x00000002) != 0)) {
6507 output.writeMessage(2, getType());
6508 }
6509 if (((bitField0_ & 0x00000004) != 0)) {
6510 com.google.protobuf.GeneratedMessage.writeString(output, 3, docString_);
6511 }
6512 for (int i = 0; i < metadataProps_.size(); i++) {
6513 output.writeMessage(4, metadataProps_.get(i));
6514 }
6515 getUnknownFields().writeTo(output);
6516 }
6517
6518 @java.lang.Override
6519 public int getSerializedSize() {
6520 int size = memoizedSize;
6521 if (size != -1) return size;
6522
6523 size = 0;
6524 if (((bitField0_ & 0x00000001) != 0)) {
6525 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
6526 }
6527 if (((bitField0_ & 0x00000002) != 0)) {
6528 size += com.google.protobuf.CodedOutputStream
6529 .computeMessageSize(2, getType());
6530 }
6531 if (((bitField0_ & 0x00000004) != 0)) {
6532 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, docString_);
6533 }
6534 for (int i = 0; i < metadataProps_.size(); i++) {
6535 size += com.google.protobuf.CodedOutputStream
6536 .computeMessageSize(4, metadataProps_.get(i));
6537 }
6538 size += getUnknownFields().getSerializedSize();
6539 memoizedSize = size;
6540 return size;
6541 }
6542
6543 @java.lang.Override
6544 public boolean equals(final java.lang.Object obj) {
6545 if (obj == this) {
6546 return true;
6547 }
6548 if (!(obj instanceof onnx.OnnxMl.ValueInfoProto)) {
6549 return super.equals(obj);
6550 }
6551 onnx.OnnxMl.ValueInfoProto other = (onnx.OnnxMl.ValueInfoProto) obj;
6552
6553 if (hasName() != other.hasName()) return false;
6554 if (hasName()) {
6555 if (!getName()
6556 .equals(other.getName())) return false;
6557 }
6558 if (hasType() != other.hasType()) return false;
6559 if (hasType()) {
6560 if (!getType()
6561 .equals(other.getType())) return false;
6562 }
6563 if (hasDocString() != other.hasDocString()) return false;
6564 if (hasDocString()) {
6565 if (!getDocString()
6566 .equals(other.getDocString())) return false;
6567 }
6568 if (!getMetadataPropsList()
6569 .equals(other.getMetadataPropsList())) return false;
6570 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
6571 return true;
6572 }
6573
6574 @java.lang.Override
6575 public int hashCode() {
6576 if (memoizedHashCode != 0) {
6577 return memoizedHashCode;
6578 }
6579 int hash = 41;
6580 hash = (19 * hash) + getDescriptor().hashCode();
6581 if (hasName()) {
6582 hash = (37 * hash) + NAME_FIELD_NUMBER;
6583 hash = (53 * hash) + getName().hashCode();
6584 }
6585 if (hasType()) {
6586 hash = (37 * hash) + TYPE_FIELD_NUMBER;
6587 hash = (53 * hash) + getType().hashCode();
6588 }
6589 if (hasDocString()) {
6590 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
6591 hash = (53 * hash) + getDocString().hashCode();
6592 }
6593 if (getMetadataPropsCount() > 0) {
6594 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
6595 hash = (53 * hash) + getMetadataPropsList().hashCode();
6596 }
6597 hash = (29 * hash) + getUnknownFields().hashCode();
6598 memoizedHashCode = hash;
6599 return hash;
6600 }
6601
6602 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6603 java.nio.ByteBuffer data)
6604 throws com.google.protobuf.InvalidProtocolBufferException {
6605 return PARSER.parseFrom(data);
6606 }
6607 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6608 java.nio.ByteBuffer data,
6609 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6610 throws com.google.protobuf.InvalidProtocolBufferException {
6611 return PARSER.parseFrom(data, extensionRegistry);
6612 }
6613 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6614 com.google.protobuf.ByteString data)
6615 throws com.google.protobuf.InvalidProtocolBufferException {
6616 return PARSER.parseFrom(data);
6617 }
6618 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6619 com.google.protobuf.ByteString data,
6620 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6621 throws com.google.protobuf.InvalidProtocolBufferException {
6622 return PARSER.parseFrom(data, extensionRegistry);
6623 }
6624 public static onnx.OnnxMl.ValueInfoProto parseFrom(byte[] data)
6625 throws com.google.protobuf.InvalidProtocolBufferException {
6626 return PARSER.parseFrom(data);
6627 }
6628 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6629 byte[] data,
6630 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6631 throws com.google.protobuf.InvalidProtocolBufferException {
6632 return PARSER.parseFrom(data, extensionRegistry);
6633 }
6634 public static onnx.OnnxMl.ValueInfoProto parseFrom(java.io.InputStream input)
6635 throws java.io.IOException {
6636 return com.google.protobuf.GeneratedMessage
6637 .parseWithIOException(PARSER, input);
6638 }
6639 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6640 java.io.InputStream input,
6641 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6642 throws java.io.IOException {
6643 return com.google.protobuf.GeneratedMessage
6644 .parseWithIOException(PARSER, input, extensionRegistry);
6645 }
6646
6647 public static onnx.OnnxMl.ValueInfoProto parseDelimitedFrom(java.io.InputStream input)
6648 throws java.io.IOException {
6649 return com.google.protobuf.GeneratedMessage
6650 .parseDelimitedWithIOException(PARSER, input);
6651 }
6652
6653 public static onnx.OnnxMl.ValueInfoProto parseDelimitedFrom(
6654 java.io.InputStream input,
6655 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6656 throws java.io.IOException {
6657 return com.google.protobuf.GeneratedMessage
6658 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
6659 }
6660 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6661 com.google.protobuf.CodedInputStream input)
6662 throws java.io.IOException {
6663 return com.google.protobuf.GeneratedMessage
6664 .parseWithIOException(PARSER, input);
6665 }
6666 public static onnx.OnnxMl.ValueInfoProto parseFrom(
6667 com.google.protobuf.CodedInputStream input,
6668 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6669 throws java.io.IOException {
6670 return com.google.protobuf.GeneratedMessage
6671 .parseWithIOException(PARSER, input, extensionRegistry);
6672 }
6673
6674 @java.lang.Override
6675 public Builder newBuilderForType() { return newBuilder(); }
6676 public static Builder newBuilder() {
6677 return DEFAULT_INSTANCE.toBuilder();
6678 }
6679 public static Builder newBuilder(onnx.OnnxMl.ValueInfoProto prototype) {
6680 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
6681 }
6682 @java.lang.Override
6683 public Builder toBuilder() {
6684 return this == DEFAULT_INSTANCE
6685 ? new Builder() : new Builder().mergeFrom(this);
6686 }
6687
6688 @java.lang.Override
6689 protected Builder newBuilderForType(
6690 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6691 Builder builder = new Builder(parent);
6692 return builder;
6693 }
6694 /**
6695 * <pre>
6696 * Defines information on value, including the name, the type, and
6697 * the shape of the value.
6698 * </pre>
6699 *
6700 * Protobuf type {@code onnx.ValueInfoProto}
6701 */
6702 public static final class Builder extends
6703 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
6704 // @@protoc_insertion_point(builder_implements:onnx.ValueInfoProto)
6705 onnx.OnnxMl.ValueInfoProtoOrBuilder {
6706 public static final com.google.protobuf.Descriptors.Descriptor
6707 getDescriptor() {
6708 return onnx.OnnxMl.internal_static_onnx_ValueInfoProto_descriptor;
6709 }
6710
6711 @java.lang.Override
6712 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6713 internalGetFieldAccessorTable() {
6714 return onnx.OnnxMl.internal_static_onnx_ValueInfoProto_fieldAccessorTable
6715 .ensureFieldAccessorsInitialized(
6716 onnx.OnnxMl.ValueInfoProto.class, onnx.OnnxMl.ValueInfoProto.Builder.class);
6717 }
6718
6719 // Construct using onnx.OnnxMl.ValueInfoProto.newBuilder()
6720 private Builder() {
6721 maybeForceBuilderInitialization();
6722 }
6723
6724 private Builder(
6725 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6726 super(parent);
6727 maybeForceBuilderInitialization();
6728 }
6729 private void maybeForceBuilderInitialization() {
6730 if (com.google.protobuf.GeneratedMessage
6731 .alwaysUseFieldBuilders) {
6732 getTypeFieldBuilder();
6733 getMetadataPropsFieldBuilder();
6734 }
6735 }
6736 @java.lang.Override
6737 public Builder clear() {
6738 super.clear();
6739 bitField0_ = 0;
6740 name_ = "";
6741 type_ = null;
6742 if (typeBuilder_ != null) {
6743 typeBuilder_.dispose();
6744 typeBuilder_ = null;
6745 }
6746 docString_ = "";
6747 if (metadataPropsBuilder_ == null) {
6748 metadataProps_ = java.util.Collections.emptyList();
6749 } else {
6750 metadataProps_ = null;
6751 metadataPropsBuilder_.clear();
6752 }
6753 bitField0_ = (bitField0_ & ~0x00000008);
6754 return this;
6755 }
6756
6757 @java.lang.Override
6758 public com.google.protobuf.Descriptors.Descriptor
6759 getDescriptorForType() {
6760 return onnx.OnnxMl.internal_static_onnx_ValueInfoProto_descriptor;
6761 }
6762
6763 @java.lang.Override
6764 public onnx.OnnxMl.ValueInfoProto getDefaultInstanceForType() {
6765 return onnx.OnnxMl.ValueInfoProto.getDefaultInstance();
6766 }
6767
6768 @java.lang.Override
6769 public onnx.OnnxMl.ValueInfoProto build() {
6770 onnx.OnnxMl.ValueInfoProto result = buildPartial();
6771 if (!result.isInitialized()) {
6772 throw newUninitializedMessageException(result);
6773 }
6774 return result;
6775 }
6776
6777 @java.lang.Override
6778 public onnx.OnnxMl.ValueInfoProto buildPartial() {
6779 onnx.OnnxMl.ValueInfoProto result = new onnx.OnnxMl.ValueInfoProto(this);
6780 buildPartialRepeatedFields(result);
6781 if (bitField0_ != 0) { buildPartial0(result); }
6782 onBuilt();
6783 return result;
6784 }
6785
6786 private void buildPartialRepeatedFields(onnx.OnnxMl.ValueInfoProto result) {
6787 if (metadataPropsBuilder_ == null) {
6788 if (((bitField0_ & 0x00000008) != 0)) {
6789 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
6790 bitField0_ = (bitField0_ & ~0x00000008);
6791 }
6792 result.metadataProps_ = metadataProps_;
6793 } else {
6794 result.metadataProps_ = metadataPropsBuilder_.build();
6795 }
6796 }
6797
6798 private void buildPartial0(onnx.OnnxMl.ValueInfoProto result) {
6799 int from_bitField0_ = bitField0_;
6800 int to_bitField0_ = 0;
6801 if (((from_bitField0_ & 0x00000001) != 0)) {
6802 result.name_ = name_;
6803 to_bitField0_ |= 0x00000001;
6804 }
6805 if (((from_bitField0_ & 0x00000002) != 0)) {
6806 result.type_ = typeBuilder_ == null
6807 ? type_
6808 : typeBuilder_.build();
6809 to_bitField0_ |= 0x00000002;
6810 }
6811 if (((from_bitField0_ & 0x00000004) != 0)) {
6812 result.docString_ = docString_;
6813 to_bitField0_ |= 0x00000004;
6814 }
6815 result.bitField0_ |= to_bitField0_;
6816 }
6817
6818 @java.lang.Override
6819 public Builder mergeFrom(com.google.protobuf.Message other) {
6820 if (other instanceof onnx.OnnxMl.ValueInfoProto) {
6821 return mergeFrom((onnx.OnnxMl.ValueInfoProto)other);
6822 } else {
6823 super.mergeFrom(other);
6824 return this;
6825 }
6826 }
6827
6828 public Builder mergeFrom(onnx.OnnxMl.ValueInfoProto other) {
6829 if (other == onnx.OnnxMl.ValueInfoProto.getDefaultInstance()) return this;
6830 if (other.hasName()) {
6831 name_ = other.name_;
6832 bitField0_ |= 0x00000001;
6833 onChanged();
6834 }
6835 if (other.hasType()) {
6836 mergeType(other.getType());
6837 }
6838 if (other.hasDocString()) {
6839 docString_ = other.docString_;
6840 bitField0_ |= 0x00000004;
6841 onChanged();
6842 }
6843 if (metadataPropsBuilder_ == null) {
6844 if (!other.metadataProps_.isEmpty()) {
6845 if (metadataProps_.isEmpty()) {
6846 metadataProps_ = other.metadataProps_;
6847 bitField0_ = (bitField0_ & ~0x00000008);
6848 } else {
6849 ensureMetadataPropsIsMutable();
6850 metadataProps_.addAll(other.metadataProps_);
6851 }
6852 onChanged();
6853 }
6854 } else {
6855 if (!other.metadataProps_.isEmpty()) {
6856 if (metadataPropsBuilder_.isEmpty()) {
6857 metadataPropsBuilder_.dispose();
6858 metadataPropsBuilder_ = null;
6859 metadataProps_ = other.metadataProps_;
6860 bitField0_ = (bitField0_ & ~0x00000008);
6861 metadataPropsBuilder_ =
6862 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
6863 getMetadataPropsFieldBuilder() : null;
6864 } else {
6865 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
6866 }
6867 }
6868 }
6869 this.mergeUnknownFields(other.getUnknownFields());
6870 onChanged();
6871 return this;
6872 }
6873
6874 @java.lang.Override
6875 public final boolean isInitialized() {
6876 return true;
6877 }
6878
6879 @java.lang.Override
6880 public Builder mergeFrom(
6881 com.google.protobuf.CodedInputStream input,
6882 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6883 throws java.io.IOException {
6884 if (extensionRegistry == null) {
6885 throw new java.lang.NullPointerException();
6886 }
6887 try {
6888 boolean done = false;
6889 while (!done) {
6890 int tag = input.readTag();
6891 switch (tag) {
6892 case 0:
6893 done = true;
6894 break;
6895 case 10: {
6896 name_ = input.readBytes();
6897 bitField0_ |= 0x00000001;
6898 break;
6899 } // case 10
6900 case 18: {
6901 input.readMessage(
6902 getTypeFieldBuilder().getBuilder(),
6903 extensionRegistry);
6904 bitField0_ |= 0x00000002;
6905 break;
6906 } // case 18
6907 case 26: {
6908 docString_ = input.readBytes();
6909 bitField0_ |= 0x00000004;
6910 break;
6911 } // case 26
6912 case 34: {
6913 onnx.OnnxMl.StringStringEntryProto m =
6914 input.readMessage(
6915 onnx.OnnxMl.StringStringEntryProto.parser(),
6916 extensionRegistry);
6917 if (metadataPropsBuilder_ == null) {
6918 ensureMetadataPropsIsMutable();
6919 metadataProps_.add(m);
6920 } else {
6921 metadataPropsBuilder_.addMessage(m);
6922 }
6923 break;
6924 } // case 34
6925 default: {
6926 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
6927 done = true; // was an endgroup tag
6928 }
6929 break;
6930 } // default:
6931 } // switch (tag)
6932 } // while (!done)
6933 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6934 throw e.unwrapIOException();
6935 } finally {
6936 onChanged();
6937 } // finally
6938 return this;
6939 }
6940 private int bitField0_;
6941
6942 private java.lang.Object name_ = "";
6943 /**
6944 * <pre>
6945 * This field MUST be present in this version of the IR.
6946 * </pre>
6947 *
6948 * <code>optional string name = 1;</code>
6949 * @return Whether the name field is set.
6950 */
6951 public boolean hasName() {
6952 return ((bitField0_ & 0x00000001) != 0);
6953 }
6954 /**
6955 * <pre>
6956 * This field MUST be present in this version of the IR.
6957 * </pre>
6958 *
6959 * <code>optional string name = 1;</code>
6960 * @return The name.
6961 */
6962 public java.lang.String getName() {
6963 java.lang.Object ref = name_;
6964 if (!(ref instanceof java.lang.String)) {
6965 com.google.protobuf.ByteString bs =
6966 (com.google.protobuf.ByteString) ref;
6967 java.lang.String s = bs.toStringUtf8();
6968 if (bs.isValidUtf8()) {
6969 name_ = s;
6970 }
6971 return s;
6972 } else {
6973 return (java.lang.String) ref;
6974 }
6975 }
6976 /**
6977 * <pre>
6978 * This field MUST be present in this version of the IR.
6979 * </pre>
6980 *
6981 * <code>optional string name = 1;</code>
6982 * @return The bytes for name.
6983 */
6984 public com.google.protobuf.ByteString
6985 getNameBytes() {
6986 java.lang.Object ref = name_;
6987 if (ref instanceof String) {
6988 com.google.protobuf.ByteString b =
6989 com.google.protobuf.ByteString.copyFromUtf8(
6990 (java.lang.String) ref);
6991 name_ = b;
6992 return b;
6993 } else {
6994 return (com.google.protobuf.ByteString) ref;
6995 }
6996 }
6997 /**
6998 * <pre>
6999 * This field MUST be present in this version of the IR.
7000 * </pre>
7001 *
7002 * <code>optional string name = 1;</code>
7003 * @param value The name to set.
7004 * @return This builder for chaining.
7005 */
7006 public Builder setName(
7007 java.lang.String value) {
7008 if (value == null) { throw new NullPointerException(); }
7009 name_ = value;
7010 bitField0_ |= 0x00000001;
7011 onChanged();
7012 return this;
7013 }
7014 /**
7015 * <pre>
7016 * This field MUST be present in this version of the IR.
7017 * </pre>
7018 *
7019 * <code>optional string name = 1;</code>
7020 * @return This builder for chaining.
7021 */
7022 public Builder clearName() {
7023 name_ = getDefaultInstance().getName();
7024 bitField0_ = (bitField0_ & ~0x00000001);
7025 onChanged();
7026 return this;
7027 }
7028 /**
7029 * <pre>
7030 * This field MUST be present in this version of the IR.
7031 * </pre>
7032 *
7033 * <code>optional string name = 1;</code>
7034 * @param value The bytes for name to set.
7035 * @return This builder for chaining.
7036 */
7037 public Builder setNameBytes(
7038 com.google.protobuf.ByteString value) {
7039 if (value == null) { throw new NullPointerException(); }
7040 name_ = value;
7041 bitField0_ |= 0x00000001;
7042 onChanged();
7043 return this;
7044 }
7045
7046 private onnx.OnnxMl.TypeProto type_;
7047 private com.google.protobuf.SingleFieldBuilder<
7048 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> typeBuilder_;
7049 /**
7050 * <pre>
7051 * This field MUST be present in this version of the IR for
7052 * inputs and outputs of the top-level graph.
7053 * </pre>
7054 *
7055 * <code>optional .onnx.TypeProto type = 2;</code>
7056 * @return Whether the type field is set.
7057 */
7058 public boolean hasType() {
7059 return ((bitField0_ & 0x00000002) != 0);
7060 }
7061 /**
7062 * <pre>
7063 * This field MUST be present in this version of the IR for
7064 * inputs and outputs of the top-level graph.
7065 * </pre>
7066 *
7067 * <code>optional .onnx.TypeProto type = 2;</code>
7068 * @return The type.
7069 */
7070 public onnx.OnnxMl.TypeProto getType() {
7071 if (typeBuilder_ == null) {
7072 return type_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : type_;
7073 } else {
7074 return typeBuilder_.getMessage();
7075 }
7076 }
7077 /**
7078 * <pre>
7079 * This field MUST be present in this version of the IR for
7080 * inputs and outputs of the top-level graph.
7081 * </pre>
7082 *
7083 * <code>optional .onnx.TypeProto type = 2;</code>
7084 */
7085 public Builder setType(onnx.OnnxMl.TypeProto value) {
7086 if (typeBuilder_ == null) {
7087 if (value == null) {
7088 throw new NullPointerException();
7089 }
7090 type_ = value;
7091 } else {
7092 typeBuilder_.setMessage(value);
7093 }
7094 bitField0_ |= 0x00000002;
7095 onChanged();
7096 return this;
7097 }
7098 /**
7099 * <pre>
7100 * This field MUST be present in this version of the IR for
7101 * inputs and outputs of the top-level graph.
7102 * </pre>
7103 *
7104 * <code>optional .onnx.TypeProto type = 2;</code>
7105 */
7106 public Builder setType(
7107 onnx.OnnxMl.TypeProto.Builder builderForValue) {
7108 if (typeBuilder_ == null) {
7109 type_ = builderForValue.build();
7110 } else {
7111 typeBuilder_.setMessage(builderForValue.build());
7112 }
7113 bitField0_ |= 0x00000002;
7114 onChanged();
7115 return this;
7116 }
7117 /**
7118 * <pre>
7119 * This field MUST be present in this version of the IR for
7120 * inputs and outputs of the top-level graph.
7121 * </pre>
7122 *
7123 * <code>optional .onnx.TypeProto type = 2;</code>
7124 */
7125 public Builder mergeType(onnx.OnnxMl.TypeProto value) {
7126 if (typeBuilder_ == null) {
7127 if (((bitField0_ & 0x00000002) != 0) &&
7128 type_ != null &&
7129 type_ != onnx.OnnxMl.TypeProto.getDefaultInstance()) {
7130 getTypeBuilder().mergeFrom(value);
7131 } else {
7132 type_ = value;
7133 }
7134 } else {
7135 typeBuilder_.mergeFrom(value);
7136 }
7137 if (type_ != null) {
7138 bitField0_ |= 0x00000002;
7139 onChanged();
7140 }
7141 return this;
7142 }
7143 /**
7144 * <pre>
7145 * This field MUST be present in this version of the IR for
7146 * inputs and outputs of the top-level graph.
7147 * </pre>
7148 *
7149 * <code>optional .onnx.TypeProto type = 2;</code>
7150 */
7151 public Builder clearType() {
7152 bitField0_ = (bitField0_ & ~0x00000002);
7153 type_ = null;
7154 if (typeBuilder_ != null) {
7155 typeBuilder_.dispose();
7156 typeBuilder_ = null;
7157 }
7158 onChanged();
7159 return this;
7160 }
7161 /**
7162 * <pre>
7163 * This field MUST be present in this version of the IR for
7164 * inputs and outputs of the top-level graph.
7165 * </pre>
7166 *
7167 * <code>optional .onnx.TypeProto type = 2;</code>
7168 */
7169 public onnx.OnnxMl.TypeProto.Builder getTypeBuilder() {
7170 bitField0_ |= 0x00000002;
7171 onChanged();
7172 return getTypeFieldBuilder().getBuilder();
7173 }
7174 /**
7175 * <pre>
7176 * This field MUST be present in this version of the IR for
7177 * inputs and outputs of the top-level graph.
7178 * </pre>
7179 *
7180 * <code>optional .onnx.TypeProto type = 2;</code>
7181 */
7182 public onnx.OnnxMl.TypeProtoOrBuilder getTypeOrBuilder() {
7183 if (typeBuilder_ != null) {
7184 return typeBuilder_.getMessageOrBuilder();
7185 } else {
7186 return type_ == null ?
7187 onnx.OnnxMl.TypeProto.getDefaultInstance() : type_;
7188 }
7189 }
7190 /**
7191 * <pre>
7192 * This field MUST be present in this version of the IR for
7193 * inputs and outputs of the top-level graph.
7194 * </pre>
7195 *
7196 * <code>optional .onnx.TypeProto type = 2;</code>
7197 */
7198 private com.google.protobuf.SingleFieldBuilder<
7199 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
7200 getTypeFieldBuilder() {
7201 if (typeBuilder_ == null) {
7202 typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7203 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
7204 getType(),
7205 getParentForChildren(),
7206 isClean());
7207 type_ = null;
7208 }
7209 return typeBuilder_;
7210 }
7211
7212 private java.lang.Object docString_ = "";
7213 /**
7214 * <pre>
7215 * A human-readable documentation for this value. Markdown is allowed.
7216 * </pre>
7217 *
7218 * <code>optional string doc_string = 3;</code>
7219 * @return Whether the docString field is set.
7220 */
7221 public boolean hasDocString() {
7222 return ((bitField0_ & 0x00000004) != 0);
7223 }
7224 /**
7225 * <pre>
7226 * A human-readable documentation for this value. Markdown is allowed.
7227 * </pre>
7228 *
7229 * <code>optional string doc_string = 3;</code>
7230 * @return The docString.
7231 */
7232 public java.lang.String getDocString() {
7233 java.lang.Object ref = docString_;
7234 if (!(ref instanceof java.lang.String)) {
7235 com.google.protobuf.ByteString bs =
7236 (com.google.protobuf.ByteString) ref;
7237 java.lang.String s = bs.toStringUtf8();
7238 if (bs.isValidUtf8()) {
7239 docString_ = s;
7240 }
7241 return s;
7242 } else {
7243 return (java.lang.String) ref;
7244 }
7245 }
7246 /**
7247 * <pre>
7248 * A human-readable documentation for this value. Markdown is allowed.
7249 * </pre>
7250 *
7251 * <code>optional string doc_string = 3;</code>
7252 * @return The bytes for docString.
7253 */
7254 public com.google.protobuf.ByteString
7255 getDocStringBytes() {
7256 java.lang.Object ref = docString_;
7257 if (ref instanceof String) {
7258 com.google.protobuf.ByteString b =
7259 com.google.protobuf.ByteString.copyFromUtf8(
7260 (java.lang.String) ref);
7261 docString_ = b;
7262 return b;
7263 } else {
7264 return (com.google.protobuf.ByteString) ref;
7265 }
7266 }
7267 /**
7268 * <pre>
7269 * A human-readable documentation for this value. Markdown is allowed.
7270 * </pre>
7271 *
7272 * <code>optional string doc_string = 3;</code>
7273 * @param value The docString to set.
7274 * @return This builder for chaining.
7275 */
7276 public Builder setDocString(
7277 java.lang.String value) {
7278 if (value == null) { throw new NullPointerException(); }
7279 docString_ = value;
7280 bitField0_ |= 0x00000004;
7281 onChanged();
7282 return this;
7283 }
7284 /**
7285 * <pre>
7286 * A human-readable documentation for this value. Markdown is allowed.
7287 * </pre>
7288 *
7289 * <code>optional string doc_string = 3;</code>
7290 * @return This builder for chaining.
7291 */
7292 public Builder clearDocString() {
7293 docString_ = getDefaultInstance().getDocString();
7294 bitField0_ = (bitField0_ & ~0x00000004);
7295 onChanged();
7296 return this;
7297 }
7298 /**
7299 * <pre>
7300 * A human-readable documentation for this value. Markdown is allowed.
7301 * </pre>
7302 *
7303 * <code>optional string doc_string = 3;</code>
7304 * @param value The bytes for docString to set.
7305 * @return This builder for chaining.
7306 */
7307 public Builder setDocStringBytes(
7308 com.google.protobuf.ByteString value) {
7309 if (value == null) { throw new NullPointerException(); }
7310 docString_ = value;
7311 bitField0_ |= 0x00000004;
7312 onChanged();
7313 return this;
7314 }
7315
7316 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
7317 java.util.Collections.emptyList();
7318 private void ensureMetadataPropsIsMutable() {
7319 if (!((bitField0_ & 0x00000008) != 0)) {
7320 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
7321 bitField0_ |= 0x00000008;
7322 }
7323 }
7324
7325 private com.google.protobuf.RepeatedFieldBuilder<
7326 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
7327
7328 /**
7329 * <pre>
7330 * Named metadata values; keys should be distinct.
7331 * </pre>
7332 *
7333 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7334 */
7335 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
7336 if (metadataPropsBuilder_ == null) {
7337 return java.util.Collections.unmodifiableList(metadataProps_);
7338 } else {
7339 return metadataPropsBuilder_.getMessageList();
7340 }
7341 }
7342 /**
7343 * <pre>
7344 * Named metadata values; keys should be distinct.
7345 * </pre>
7346 *
7347 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7348 */
7349 public int getMetadataPropsCount() {
7350 if (metadataPropsBuilder_ == null) {
7351 return metadataProps_.size();
7352 } else {
7353 return metadataPropsBuilder_.getCount();
7354 }
7355 }
7356 /**
7357 * <pre>
7358 * Named metadata values; keys should be distinct.
7359 * </pre>
7360 *
7361 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7362 */
7363 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
7364 if (metadataPropsBuilder_ == null) {
7365 return metadataProps_.get(index);
7366 } else {
7367 return metadataPropsBuilder_.getMessage(index);
7368 }
7369 }
7370 /**
7371 * <pre>
7372 * Named metadata values; keys should be distinct.
7373 * </pre>
7374 *
7375 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7376 */
7377 public Builder setMetadataProps(
7378 int index, onnx.OnnxMl.StringStringEntryProto value) {
7379 if (metadataPropsBuilder_ == null) {
7380 if (value == null) {
7381 throw new NullPointerException();
7382 }
7383 ensureMetadataPropsIsMutable();
7384 metadataProps_.set(index, value);
7385 onChanged();
7386 } else {
7387 metadataPropsBuilder_.setMessage(index, value);
7388 }
7389 return this;
7390 }
7391 /**
7392 * <pre>
7393 * Named metadata values; keys should be distinct.
7394 * </pre>
7395 *
7396 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7397 */
7398 public Builder setMetadataProps(
7399 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
7400 if (metadataPropsBuilder_ == null) {
7401 ensureMetadataPropsIsMutable();
7402 metadataProps_.set(index, builderForValue.build());
7403 onChanged();
7404 } else {
7405 metadataPropsBuilder_.setMessage(index, builderForValue.build());
7406 }
7407 return this;
7408 }
7409 /**
7410 * <pre>
7411 * Named metadata values; keys should be distinct.
7412 * </pre>
7413 *
7414 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7415 */
7416 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
7417 if (metadataPropsBuilder_ == null) {
7418 if (value == null) {
7419 throw new NullPointerException();
7420 }
7421 ensureMetadataPropsIsMutable();
7422 metadataProps_.add(value);
7423 onChanged();
7424 } else {
7425 metadataPropsBuilder_.addMessage(value);
7426 }
7427 return this;
7428 }
7429 /**
7430 * <pre>
7431 * Named metadata values; keys should be distinct.
7432 * </pre>
7433 *
7434 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7435 */
7436 public Builder addMetadataProps(
7437 int index, onnx.OnnxMl.StringStringEntryProto value) {
7438 if (metadataPropsBuilder_ == null) {
7439 if (value == null) {
7440 throw new NullPointerException();
7441 }
7442 ensureMetadataPropsIsMutable();
7443 metadataProps_.add(index, value);
7444 onChanged();
7445 } else {
7446 metadataPropsBuilder_.addMessage(index, value);
7447 }
7448 return this;
7449 }
7450 /**
7451 * <pre>
7452 * Named metadata values; keys should be distinct.
7453 * </pre>
7454 *
7455 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7456 */
7457 public Builder addMetadataProps(
7458 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
7459 if (metadataPropsBuilder_ == null) {
7460 ensureMetadataPropsIsMutable();
7461 metadataProps_.add(builderForValue.build());
7462 onChanged();
7463 } else {
7464 metadataPropsBuilder_.addMessage(builderForValue.build());
7465 }
7466 return this;
7467 }
7468 /**
7469 * <pre>
7470 * Named metadata values; keys should be distinct.
7471 * </pre>
7472 *
7473 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7474 */
7475 public Builder addMetadataProps(
7476 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
7477 if (metadataPropsBuilder_ == null) {
7478 ensureMetadataPropsIsMutable();
7479 metadataProps_.add(index, builderForValue.build());
7480 onChanged();
7481 } else {
7482 metadataPropsBuilder_.addMessage(index, builderForValue.build());
7483 }
7484 return this;
7485 }
7486 /**
7487 * <pre>
7488 * Named metadata values; keys should be distinct.
7489 * </pre>
7490 *
7491 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7492 */
7493 public Builder addAllMetadataProps(
7494 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
7495 if (metadataPropsBuilder_ == null) {
7496 ensureMetadataPropsIsMutable();
7497 com.google.protobuf.AbstractMessageLite.Builder.addAll(
7498 values, metadataProps_);
7499 onChanged();
7500 } else {
7501 metadataPropsBuilder_.addAllMessages(values);
7502 }
7503 return this;
7504 }
7505 /**
7506 * <pre>
7507 * Named metadata values; keys should be distinct.
7508 * </pre>
7509 *
7510 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7511 */
7512 public Builder clearMetadataProps() {
7513 if (metadataPropsBuilder_ == null) {
7514 metadataProps_ = java.util.Collections.emptyList();
7515 bitField0_ = (bitField0_ & ~0x00000008);
7516 onChanged();
7517 } else {
7518 metadataPropsBuilder_.clear();
7519 }
7520 return this;
7521 }
7522 /**
7523 * <pre>
7524 * Named metadata values; keys should be distinct.
7525 * </pre>
7526 *
7527 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7528 */
7529 public Builder removeMetadataProps(int index) {
7530 if (metadataPropsBuilder_ == null) {
7531 ensureMetadataPropsIsMutable();
7532 metadataProps_.remove(index);
7533 onChanged();
7534 } else {
7535 metadataPropsBuilder_.remove(index);
7536 }
7537 return this;
7538 }
7539 /**
7540 * <pre>
7541 * Named metadata values; keys should be distinct.
7542 * </pre>
7543 *
7544 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7545 */
7546 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
7547 int index) {
7548 return getMetadataPropsFieldBuilder().getBuilder(index);
7549 }
7550 /**
7551 * <pre>
7552 * Named metadata values; keys should be distinct.
7553 * </pre>
7554 *
7555 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7556 */
7557 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
7558 int index) {
7559 if (metadataPropsBuilder_ == null) {
7560 return metadataProps_.get(index); } else {
7561 return metadataPropsBuilder_.getMessageOrBuilder(index);
7562 }
7563 }
7564 /**
7565 * <pre>
7566 * Named metadata values; keys should be distinct.
7567 * </pre>
7568 *
7569 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7570 */
7571 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
7572 getMetadataPropsOrBuilderList() {
7573 if (metadataPropsBuilder_ != null) {
7574 return metadataPropsBuilder_.getMessageOrBuilderList();
7575 } else {
7576 return java.util.Collections.unmodifiableList(metadataProps_);
7577 }
7578 }
7579 /**
7580 * <pre>
7581 * Named metadata values; keys should be distinct.
7582 * </pre>
7583 *
7584 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7585 */
7586 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
7587 return getMetadataPropsFieldBuilder().addBuilder(
7588 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
7589 }
7590 /**
7591 * <pre>
7592 * Named metadata values; keys should be distinct.
7593 * </pre>
7594 *
7595 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7596 */
7597 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
7598 int index) {
7599 return getMetadataPropsFieldBuilder().addBuilder(
7600 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
7601 }
7602 /**
7603 * <pre>
7604 * Named metadata values; keys should be distinct.
7605 * </pre>
7606 *
7607 * <code>repeated .onnx.StringStringEntryProto metadata_props = 4;</code>
7608 */
7609 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
7610 getMetadataPropsBuilderList() {
7611 return getMetadataPropsFieldBuilder().getBuilderList();
7612 }
7613 private com.google.protobuf.RepeatedFieldBuilder<
7614 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
7615 getMetadataPropsFieldBuilder() {
7616 if (metadataPropsBuilder_ == null) {
7617 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
7618 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
7619 metadataProps_,
7620 ((bitField0_ & 0x00000008) != 0),
7621 getParentForChildren(),
7622 isClean());
7623 metadataProps_ = null;
7624 }
7625 return metadataPropsBuilder_;
7626 }
7627
7628 // @@protoc_insertion_point(builder_scope:onnx.ValueInfoProto)
7629 }
7630
7631 // @@protoc_insertion_point(class_scope:onnx.ValueInfoProto)
7632 private static final onnx.OnnxMl.ValueInfoProto DEFAULT_INSTANCE;
7633 static {
7634 DEFAULT_INSTANCE = new onnx.OnnxMl.ValueInfoProto();
7635 }
7636
7637 public static onnx.OnnxMl.ValueInfoProto getDefaultInstance() {
7638 return DEFAULT_INSTANCE;
7639 }
7640
7641 private static final com.google.protobuf.Parser<ValueInfoProto>
7642 PARSER = new com.google.protobuf.AbstractParser<ValueInfoProto>() {
7643 @java.lang.Override
7644 public ValueInfoProto parsePartialFrom(
7645 com.google.protobuf.CodedInputStream input,
7646 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7647 throws com.google.protobuf.InvalidProtocolBufferException {
7648 Builder builder = newBuilder();
7649 try {
7650 builder.mergeFrom(input, extensionRegistry);
7651 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7652 throw e.setUnfinishedMessage(builder.buildPartial());
7653 } catch (com.google.protobuf.UninitializedMessageException e) {
7654 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
7655 } catch (java.io.IOException e) {
7656 throw new com.google.protobuf.InvalidProtocolBufferException(e)
7657 .setUnfinishedMessage(builder.buildPartial());
7658 }
7659 return builder.buildPartial();
7660 }
7661 };
7662
7663 public static com.google.protobuf.Parser<ValueInfoProto> parser() {
7664 return PARSER;
7665 }
7666
7667 @java.lang.Override
7668 public com.google.protobuf.Parser<ValueInfoProto> getParserForType() {
7669 return PARSER;
7670 }
7671
7672 @java.lang.Override
7673 public onnx.OnnxMl.ValueInfoProto getDefaultInstanceForType() {
7674 return DEFAULT_INSTANCE;
7675 }
7676
7677 }
7678
7679 public interface NodeProtoOrBuilder extends
7680 // @@protoc_insertion_point(interface_extends:onnx.NodeProto)
7681 com.google.protobuf.MessageOrBuilder {
7682
7683 /**
7684 * <pre>
7685 * namespace Value
7686 * </pre>
7687 *
7688 * <code>repeated string input = 1;</code>
7689 * @return A list containing the input.
7690 */
7691 java.util.List<java.lang.String>
7692 getInputList();
7693 /**
7694 * <pre>
7695 * namespace Value
7696 * </pre>
7697 *
7698 * <code>repeated string input = 1;</code>
7699 * @return The count of input.
7700 */
7701 int getInputCount();
7702 /**
7703 * <pre>
7704 * namespace Value
7705 * </pre>
7706 *
7707 * <code>repeated string input = 1;</code>
7708 * @param index The index of the element to return.
7709 * @return The input at the given index.
7710 */
7711 java.lang.String getInput(int index);
7712 /**
7713 * <pre>
7714 * namespace Value
7715 * </pre>
7716 *
7717 * <code>repeated string input = 1;</code>
7718 * @param index The index of the value to return.
7719 * @return The bytes of the input at the given index.
7720 */
7721 com.google.protobuf.ByteString
7722 getInputBytes(int index);
7723
7724 /**
7725 * <pre>
7726 * namespace Value
7727 * </pre>
7728 *
7729 * <code>repeated string output = 2;</code>
7730 * @return A list containing the output.
7731 */
7732 java.util.List<java.lang.String>
7733 getOutputList();
7734 /**
7735 * <pre>
7736 * namespace Value
7737 * </pre>
7738 *
7739 * <code>repeated string output = 2;</code>
7740 * @return The count of output.
7741 */
7742 int getOutputCount();
7743 /**
7744 * <pre>
7745 * namespace Value
7746 * </pre>
7747 *
7748 * <code>repeated string output = 2;</code>
7749 * @param index The index of the element to return.
7750 * @return The output at the given index.
7751 */
7752 java.lang.String getOutput(int index);
7753 /**
7754 * <pre>
7755 * namespace Value
7756 * </pre>
7757 *
7758 * <code>repeated string output = 2;</code>
7759 * @param index The index of the value to return.
7760 * @return The bytes of the output at the given index.
7761 */
7762 com.google.protobuf.ByteString
7763 getOutputBytes(int index);
7764
7765 /**
7766 * <pre>
7767 * An optional identifier for this node in a graph.
7768 * This field MAY be absent in this version of the IR.
7769 * </pre>
7770 *
7771 * <code>optional string name = 3;</code>
7772 * @return Whether the name field is set.
7773 */
7774 boolean hasName();
7775 /**
7776 * <pre>
7777 * An optional identifier for this node in a graph.
7778 * This field MAY be absent in this version of the IR.
7779 * </pre>
7780 *
7781 * <code>optional string name = 3;</code>
7782 * @return The name.
7783 */
7784 java.lang.String getName();
7785 /**
7786 * <pre>
7787 * An optional identifier for this node in a graph.
7788 * This field MAY be absent in this version of the IR.
7789 * </pre>
7790 *
7791 * <code>optional string name = 3;</code>
7792 * @return The bytes for name.
7793 */
7794 com.google.protobuf.ByteString
7795 getNameBytes();
7796
7797 /**
7798 * <pre>
7799 * The symbolic identifier of the Operator to execute.
7800 * </pre>
7801 *
7802 * <code>optional string op_type = 4;</code>
7803 * @return Whether the opType field is set.
7804 */
7805 boolean hasOpType();
7806 /**
7807 * <pre>
7808 * The symbolic identifier of the Operator to execute.
7809 * </pre>
7810 *
7811 * <code>optional string op_type = 4;</code>
7812 * @return The opType.
7813 */
7814 java.lang.String getOpType();
7815 /**
7816 * <pre>
7817 * The symbolic identifier of the Operator to execute.
7818 * </pre>
7819 *
7820 * <code>optional string op_type = 4;</code>
7821 * @return The bytes for opType.
7822 */
7823 com.google.protobuf.ByteString
7824 getOpTypeBytes();
7825
7826 /**
7827 * <pre>
7828 * The domain of the OperatorSet that specifies the operator named by op_type.
7829 * </pre>
7830 *
7831 * <code>optional string domain = 7;</code>
7832 * @return Whether the domain field is set.
7833 */
7834 boolean hasDomain();
7835 /**
7836 * <pre>
7837 * The domain of the OperatorSet that specifies the operator named by op_type.
7838 * </pre>
7839 *
7840 * <code>optional string domain = 7;</code>
7841 * @return The domain.
7842 */
7843 java.lang.String getDomain();
7844 /**
7845 * <pre>
7846 * The domain of the OperatorSet that specifies the operator named by op_type.
7847 * </pre>
7848 *
7849 * <code>optional string domain = 7;</code>
7850 * @return The bytes for domain.
7851 */
7852 com.google.protobuf.ByteString
7853 getDomainBytes();
7854
7855 /**
7856 * <pre>
7857 * Overload identifier, used only to map this to a model-local function.
7858 * </pre>
7859 *
7860 * <code>optional string overload = 8;</code>
7861 * @return Whether the overload field is set.
7862 */
7863 boolean hasOverload();
7864 /**
7865 * <pre>
7866 * Overload identifier, used only to map this to a model-local function.
7867 * </pre>
7868 *
7869 * <code>optional string overload = 8;</code>
7870 * @return The overload.
7871 */
7872 java.lang.String getOverload();
7873 /**
7874 * <pre>
7875 * Overload identifier, used only to map this to a model-local function.
7876 * </pre>
7877 *
7878 * <code>optional string overload = 8;</code>
7879 * @return The bytes for overload.
7880 */
7881 com.google.protobuf.ByteString
7882 getOverloadBytes();
7883
7884 /**
7885 * <pre>
7886 * Additional named attributes.
7887 * </pre>
7888 *
7889 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
7890 */
7891 java.util.List<onnx.OnnxMl.AttributeProto>
7892 getAttributeList();
7893 /**
7894 * <pre>
7895 * Additional named attributes.
7896 * </pre>
7897 *
7898 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
7899 */
7900 onnx.OnnxMl.AttributeProto getAttribute(int index);
7901 /**
7902 * <pre>
7903 * Additional named attributes.
7904 * </pre>
7905 *
7906 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
7907 */
7908 int getAttributeCount();
7909 /**
7910 * <pre>
7911 * Additional named attributes.
7912 * </pre>
7913 *
7914 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
7915 */
7916 java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
7917 getAttributeOrBuilderList();
7918 /**
7919 * <pre>
7920 * Additional named attributes.
7921 * </pre>
7922 *
7923 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
7924 */
7925 onnx.OnnxMl.AttributeProtoOrBuilder getAttributeOrBuilder(
7926 int index);
7927
7928 /**
7929 * <pre>
7930 * A human-readable documentation for this node. Markdown is allowed.
7931 * </pre>
7932 *
7933 * <code>optional string doc_string = 6;</code>
7934 * @return Whether the docString field is set.
7935 */
7936 boolean hasDocString();
7937 /**
7938 * <pre>
7939 * A human-readable documentation for this node. Markdown is allowed.
7940 * </pre>
7941 *
7942 * <code>optional string doc_string = 6;</code>
7943 * @return The docString.
7944 */
7945 java.lang.String getDocString();
7946 /**
7947 * <pre>
7948 * A human-readable documentation for this node. Markdown is allowed.
7949 * </pre>
7950 *
7951 * <code>optional string doc_string = 6;</code>
7952 * @return The bytes for docString.
7953 */
7954 com.google.protobuf.ByteString
7955 getDocStringBytes();
7956
7957 /**
7958 * <pre>
7959 * Named metadata values; keys should be distinct.
7960 * </pre>
7961 *
7962 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
7963 */
7964 java.util.List<onnx.OnnxMl.StringStringEntryProto>
7965 getMetadataPropsList();
7966 /**
7967 * <pre>
7968 * Named metadata values; keys should be distinct.
7969 * </pre>
7970 *
7971 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
7972 */
7973 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
7974 /**
7975 * <pre>
7976 * Named metadata values; keys should be distinct.
7977 * </pre>
7978 *
7979 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
7980 */
7981 int getMetadataPropsCount();
7982 /**
7983 * <pre>
7984 * Named metadata values; keys should be distinct.
7985 * </pre>
7986 *
7987 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
7988 */
7989 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
7990 getMetadataPropsOrBuilderList();
7991 /**
7992 * <pre>
7993 * Named metadata values; keys should be distinct.
7994 * </pre>
7995 *
7996 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
7997 */
7998 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
7999 int index);
8000 }
8001 /**
8002 * <pre>
8003 * Nodes
8004 *
8005 * Computation graphs are made up of a DAG of nodes, which represent what is
8006 * commonly called a "layer" or "pipeline stage" in machine learning frameworks.
8007 *
8008 * For example, it can be a node of type "Conv" that takes in an image, a filter
8009 * tensor and a bias tensor, and produces the convolved output.
8010 * </pre>
8011 *
8012 * Protobuf type {@code onnx.NodeProto}
8013 */
8014 public static final class NodeProto extends
8015 com.google.protobuf.GeneratedMessage implements
8016 // @@protoc_insertion_point(message_implements:onnx.NodeProto)
8017 NodeProtoOrBuilder {
8018 private static final long serialVersionUID = 0L;
8019 static {
8020 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
8021 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
8022 /* major= */ 4,
8023 /* minor= */ 29,
8024 /* patch= */ 3,
8025 /* suffix= */ "",
8026 NodeProto.class.getName());
8027 }
8028 // Use NodeProto.newBuilder() to construct.
8029 private NodeProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
8030 super(builder);
8031 }
8032 private NodeProto() {
8033 input_ =
8034 com.google.protobuf.LazyStringArrayList.emptyList();
8035 output_ =
8036 com.google.protobuf.LazyStringArrayList.emptyList();
8037 name_ = "";
8038 opType_ = "";
8039 domain_ = "";
8040 overload_ = "";
8041 attribute_ = java.util.Collections.emptyList();
8042 docString_ = "";
8043 metadataProps_ = java.util.Collections.emptyList();
8044 }
8045
8046 public static final com.google.protobuf.Descriptors.Descriptor
8047 getDescriptor() {
8048 return onnx.OnnxMl.internal_static_onnx_NodeProto_descriptor;
8049 }
8050
8051 @java.lang.Override
8052 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
8053 internalGetFieldAccessorTable() {
8054 return onnx.OnnxMl.internal_static_onnx_NodeProto_fieldAccessorTable
8055 .ensureFieldAccessorsInitialized(
8056 onnx.OnnxMl.NodeProto.class, onnx.OnnxMl.NodeProto.Builder.class);
8057 }
8058
8059 private int bitField0_;
8060 public static final int INPUT_FIELD_NUMBER = 1;
8061 @SuppressWarnings("serial")
8062 private com.google.protobuf.LazyStringArrayList input_ =
8063 com.google.protobuf.LazyStringArrayList.emptyList();
8064 /**
8065 * <pre>
8066 * namespace Value
8067 * </pre>
8068 *
8069 * <code>repeated string input = 1;</code>
8070 * @return A list containing the input.
8071 */
8072 public com.google.protobuf.ProtocolStringList
8073 getInputList() {
8074 return input_;
8075 }
8076 /**
8077 * <pre>
8078 * namespace Value
8079 * </pre>
8080 *
8081 * <code>repeated string input = 1;</code>
8082 * @return The count of input.
8083 */
8084 public int getInputCount() {
8085 return input_.size();
8086 }
8087 /**
8088 * <pre>
8089 * namespace Value
8090 * </pre>
8091 *
8092 * <code>repeated string input = 1;</code>
8093 * @param index The index of the element to return.
8094 * @return The input at the given index.
8095 */
8096 public java.lang.String getInput(int index) {
8097 return input_.get(index);
8098 }
8099 /**
8100 * <pre>
8101 * namespace Value
8102 * </pre>
8103 *
8104 * <code>repeated string input = 1;</code>
8105 * @param index The index of the value to return.
8106 * @return The bytes of the input at the given index.
8107 */
8108 public com.google.protobuf.ByteString
8109 getInputBytes(int index) {
8110 return input_.getByteString(index);
8111 }
8112
8113 public static final int OUTPUT_FIELD_NUMBER = 2;
8114 @SuppressWarnings("serial")
8115 private com.google.protobuf.LazyStringArrayList output_ =
8116 com.google.protobuf.LazyStringArrayList.emptyList();
8117 /**
8118 * <pre>
8119 * namespace Value
8120 * </pre>
8121 *
8122 * <code>repeated string output = 2;</code>
8123 * @return A list containing the output.
8124 */
8125 public com.google.protobuf.ProtocolStringList
8126 getOutputList() {
8127 return output_;
8128 }
8129 /**
8130 * <pre>
8131 * namespace Value
8132 * </pre>
8133 *
8134 * <code>repeated string output = 2;</code>
8135 * @return The count of output.
8136 */
8137 public int getOutputCount() {
8138 return output_.size();
8139 }
8140 /**
8141 * <pre>
8142 * namespace Value
8143 * </pre>
8144 *
8145 * <code>repeated string output = 2;</code>
8146 * @param index The index of the element to return.
8147 * @return The output at the given index.
8148 */
8149 public java.lang.String getOutput(int index) {
8150 return output_.get(index);
8151 }
8152 /**
8153 * <pre>
8154 * namespace Value
8155 * </pre>
8156 *
8157 * <code>repeated string output = 2;</code>
8158 * @param index The index of the value to return.
8159 * @return The bytes of the output at the given index.
8160 */
8161 public com.google.protobuf.ByteString
8162 getOutputBytes(int index) {
8163 return output_.getByteString(index);
8164 }
8165
8166 public static final int NAME_FIELD_NUMBER = 3;
8167 @SuppressWarnings("serial")
8168 private volatile java.lang.Object name_ = "";
8169 /**
8170 * <pre>
8171 * An optional identifier for this node in a graph.
8172 * This field MAY be absent in this version of the IR.
8173 * </pre>
8174 *
8175 * <code>optional string name = 3;</code>
8176 * @return Whether the name field is set.
8177 */
8178 @java.lang.Override
8179 public boolean hasName() {
8180 return ((bitField0_ & 0x00000001) != 0);
8181 }
8182 /**
8183 * <pre>
8184 * An optional identifier for this node in a graph.
8185 * This field MAY be absent in this version of the IR.
8186 * </pre>
8187 *
8188 * <code>optional string name = 3;</code>
8189 * @return The name.
8190 */
8191 @java.lang.Override
8192 public java.lang.String getName() {
8193 java.lang.Object ref = name_;
8194 if (ref instanceof java.lang.String) {
8195 return (java.lang.String) ref;
8196 } else {
8197 com.google.protobuf.ByteString bs =
8198 (com.google.protobuf.ByteString) ref;
8199 java.lang.String s = bs.toStringUtf8();
8200 if (bs.isValidUtf8()) {
8201 name_ = s;
8202 }
8203 return s;
8204 }
8205 }
8206 /**
8207 * <pre>
8208 * An optional identifier for this node in a graph.
8209 * This field MAY be absent in this version of the IR.
8210 * </pre>
8211 *
8212 * <code>optional string name = 3;</code>
8213 * @return The bytes for name.
8214 */
8215 @java.lang.Override
8216 public com.google.protobuf.ByteString
8217 getNameBytes() {
8218 java.lang.Object ref = name_;
8219 if (ref instanceof java.lang.String) {
8220 com.google.protobuf.ByteString b =
8221 com.google.protobuf.ByteString.copyFromUtf8(
8222 (java.lang.String) ref);
8223 name_ = b;
8224 return b;
8225 } else {
8226 return (com.google.protobuf.ByteString) ref;
8227 }
8228 }
8229
8230 public static final int OP_TYPE_FIELD_NUMBER = 4;
8231 @SuppressWarnings("serial")
8232 private volatile java.lang.Object opType_ = "";
8233 /**
8234 * <pre>
8235 * The symbolic identifier of the Operator to execute.
8236 * </pre>
8237 *
8238 * <code>optional string op_type = 4;</code>
8239 * @return Whether the opType field is set.
8240 */
8241 @java.lang.Override
8242 public boolean hasOpType() {
8243 return ((bitField0_ & 0x00000002) != 0);
8244 }
8245 /**
8246 * <pre>
8247 * The symbolic identifier of the Operator to execute.
8248 * </pre>
8249 *
8250 * <code>optional string op_type = 4;</code>
8251 * @return The opType.
8252 */
8253 @java.lang.Override
8254 public java.lang.String getOpType() {
8255 java.lang.Object ref = opType_;
8256 if (ref instanceof java.lang.String) {
8257 return (java.lang.String) ref;
8258 } else {
8259 com.google.protobuf.ByteString bs =
8260 (com.google.protobuf.ByteString) ref;
8261 java.lang.String s = bs.toStringUtf8();
8262 if (bs.isValidUtf8()) {
8263 opType_ = s;
8264 }
8265 return s;
8266 }
8267 }
8268 /**
8269 * <pre>
8270 * The symbolic identifier of the Operator to execute.
8271 * </pre>
8272 *
8273 * <code>optional string op_type = 4;</code>
8274 * @return The bytes for opType.
8275 */
8276 @java.lang.Override
8277 public com.google.protobuf.ByteString
8278 getOpTypeBytes() {
8279 java.lang.Object ref = opType_;
8280 if (ref instanceof java.lang.String) {
8281 com.google.protobuf.ByteString b =
8282 com.google.protobuf.ByteString.copyFromUtf8(
8283 (java.lang.String) ref);
8284 opType_ = b;
8285 return b;
8286 } else {
8287 return (com.google.protobuf.ByteString) ref;
8288 }
8289 }
8290
8291 public static final int DOMAIN_FIELD_NUMBER = 7;
8292 @SuppressWarnings("serial")
8293 private volatile java.lang.Object domain_ = "";
8294 /**
8295 * <pre>
8296 * The domain of the OperatorSet that specifies the operator named by op_type.
8297 * </pre>
8298 *
8299 * <code>optional string domain = 7;</code>
8300 * @return Whether the domain field is set.
8301 */
8302 @java.lang.Override
8303 public boolean hasDomain() {
8304 return ((bitField0_ & 0x00000004) != 0);
8305 }
8306 /**
8307 * <pre>
8308 * The domain of the OperatorSet that specifies the operator named by op_type.
8309 * </pre>
8310 *
8311 * <code>optional string domain = 7;</code>
8312 * @return The domain.
8313 */
8314 @java.lang.Override
8315 public java.lang.String getDomain() {
8316 java.lang.Object ref = domain_;
8317 if (ref instanceof java.lang.String) {
8318 return (java.lang.String) ref;
8319 } else {
8320 com.google.protobuf.ByteString bs =
8321 (com.google.protobuf.ByteString) ref;
8322 java.lang.String s = bs.toStringUtf8();
8323 if (bs.isValidUtf8()) {
8324 domain_ = s;
8325 }
8326 return s;
8327 }
8328 }
8329 /**
8330 * <pre>
8331 * The domain of the OperatorSet that specifies the operator named by op_type.
8332 * </pre>
8333 *
8334 * <code>optional string domain = 7;</code>
8335 * @return The bytes for domain.
8336 */
8337 @java.lang.Override
8338 public com.google.protobuf.ByteString
8339 getDomainBytes() {
8340 java.lang.Object ref = domain_;
8341 if (ref instanceof java.lang.String) {
8342 com.google.protobuf.ByteString b =
8343 com.google.protobuf.ByteString.copyFromUtf8(
8344 (java.lang.String) ref);
8345 domain_ = b;
8346 return b;
8347 } else {
8348 return (com.google.protobuf.ByteString) ref;
8349 }
8350 }
8351
8352 public static final int OVERLOAD_FIELD_NUMBER = 8;
8353 @SuppressWarnings("serial")
8354 private volatile java.lang.Object overload_ = "";
8355 /**
8356 * <pre>
8357 * Overload identifier, used only to map this to a model-local function.
8358 * </pre>
8359 *
8360 * <code>optional string overload = 8;</code>
8361 * @return Whether the overload field is set.
8362 */
8363 @java.lang.Override
8364 public boolean hasOverload() {
8365 return ((bitField0_ & 0x00000008) != 0);
8366 }
8367 /**
8368 * <pre>
8369 * Overload identifier, used only to map this to a model-local function.
8370 * </pre>
8371 *
8372 * <code>optional string overload = 8;</code>
8373 * @return The overload.
8374 */
8375 @java.lang.Override
8376 public java.lang.String getOverload() {
8377 java.lang.Object ref = overload_;
8378 if (ref instanceof java.lang.String) {
8379 return (java.lang.String) ref;
8380 } else {
8381 com.google.protobuf.ByteString bs =
8382 (com.google.protobuf.ByteString) ref;
8383 java.lang.String s = bs.toStringUtf8();
8384 if (bs.isValidUtf8()) {
8385 overload_ = s;
8386 }
8387 return s;
8388 }
8389 }
8390 /**
8391 * <pre>
8392 * Overload identifier, used only to map this to a model-local function.
8393 * </pre>
8394 *
8395 * <code>optional string overload = 8;</code>
8396 * @return The bytes for overload.
8397 */
8398 @java.lang.Override
8399 public com.google.protobuf.ByteString
8400 getOverloadBytes() {
8401 java.lang.Object ref = overload_;
8402 if (ref instanceof java.lang.String) {
8403 com.google.protobuf.ByteString b =
8404 com.google.protobuf.ByteString.copyFromUtf8(
8405 (java.lang.String) ref);
8406 overload_ = b;
8407 return b;
8408 } else {
8409 return (com.google.protobuf.ByteString) ref;
8410 }
8411 }
8412
8413 public static final int ATTRIBUTE_FIELD_NUMBER = 5;
8414 @SuppressWarnings("serial")
8415 private java.util.List<onnx.OnnxMl.AttributeProto> attribute_;
8416 /**
8417 * <pre>
8418 * Additional named attributes.
8419 * </pre>
8420 *
8421 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
8422 */
8423 @java.lang.Override
8424 public java.util.List<onnx.OnnxMl.AttributeProto> getAttributeList() {
8425 return attribute_;
8426 }
8427 /**
8428 * <pre>
8429 * Additional named attributes.
8430 * </pre>
8431 *
8432 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
8433 */
8434 @java.lang.Override
8435 public java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
8436 getAttributeOrBuilderList() {
8437 return attribute_;
8438 }
8439 /**
8440 * <pre>
8441 * Additional named attributes.
8442 * </pre>
8443 *
8444 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
8445 */
8446 @java.lang.Override
8447 public int getAttributeCount() {
8448 return attribute_.size();
8449 }
8450 /**
8451 * <pre>
8452 * Additional named attributes.
8453 * </pre>
8454 *
8455 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
8456 */
8457 @java.lang.Override
8458 public onnx.OnnxMl.AttributeProto getAttribute(int index) {
8459 return attribute_.get(index);
8460 }
8461 /**
8462 * <pre>
8463 * Additional named attributes.
8464 * </pre>
8465 *
8466 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
8467 */
8468 @java.lang.Override
8469 public onnx.OnnxMl.AttributeProtoOrBuilder getAttributeOrBuilder(
8470 int index) {
8471 return attribute_.get(index);
8472 }
8473
8474 public static final int DOC_STRING_FIELD_NUMBER = 6;
8475 @SuppressWarnings("serial")
8476 private volatile java.lang.Object docString_ = "";
8477 /**
8478 * <pre>
8479 * A human-readable documentation for this node. Markdown is allowed.
8480 * </pre>
8481 *
8482 * <code>optional string doc_string = 6;</code>
8483 * @return Whether the docString field is set.
8484 */
8485 @java.lang.Override
8486 public boolean hasDocString() {
8487 return ((bitField0_ & 0x00000010) != 0);
8488 }
8489 /**
8490 * <pre>
8491 * A human-readable documentation for this node. Markdown is allowed.
8492 * </pre>
8493 *
8494 * <code>optional string doc_string = 6;</code>
8495 * @return The docString.
8496 */
8497 @java.lang.Override
8498 public java.lang.String getDocString() {
8499 java.lang.Object ref = docString_;
8500 if (ref instanceof java.lang.String) {
8501 return (java.lang.String) ref;
8502 } else {
8503 com.google.protobuf.ByteString bs =
8504 (com.google.protobuf.ByteString) ref;
8505 java.lang.String s = bs.toStringUtf8();
8506 if (bs.isValidUtf8()) {
8507 docString_ = s;
8508 }
8509 return s;
8510 }
8511 }
8512 /**
8513 * <pre>
8514 * A human-readable documentation for this node. Markdown is allowed.
8515 * </pre>
8516 *
8517 * <code>optional string doc_string = 6;</code>
8518 * @return The bytes for docString.
8519 */
8520 @java.lang.Override
8521 public com.google.protobuf.ByteString
8522 getDocStringBytes() {
8523 java.lang.Object ref = docString_;
8524 if (ref instanceof java.lang.String) {
8525 com.google.protobuf.ByteString b =
8526 com.google.protobuf.ByteString.copyFromUtf8(
8527 (java.lang.String) ref);
8528 docString_ = b;
8529 return b;
8530 } else {
8531 return (com.google.protobuf.ByteString) ref;
8532 }
8533 }
8534
8535 public static final int METADATA_PROPS_FIELD_NUMBER = 9;
8536 @SuppressWarnings("serial")
8537 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
8538 /**
8539 * <pre>
8540 * Named metadata values; keys should be distinct.
8541 * </pre>
8542 *
8543 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
8544 */
8545 @java.lang.Override
8546 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
8547 return metadataProps_;
8548 }
8549 /**
8550 * <pre>
8551 * Named metadata values; keys should be distinct.
8552 * </pre>
8553 *
8554 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
8555 */
8556 @java.lang.Override
8557 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
8558 getMetadataPropsOrBuilderList() {
8559 return metadataProps_;
8560 }
8561 /**
8562 * <pre>
8563 * Named metadata values; keys should be distinct.
8564 * </pre>
8565 *
8566 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
8567 */
8568 @java.lang.Override
8569 public int getMetadataPropsCount() {
8570 return metadataProps_.size();
8571 }
8572 /**
8573 * <pre>
8574 * Named metadata values; keys should be distinct.
8575 * </pre>
8576 *
8577 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
8578 */
8579 @java.lang.Override
8580 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
8581 return metadataProps_.get(index);
8582 }
8583 /**
8584 * <pre>
8585 * Named metadata values; keys should be distinct.
8586 * </pre>
8587 *
8588 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
8589 */
8590 @java.lang.Override
8591 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
8592 int index) {
8593 return metadataProps_.get(index);
8594 }
8595
8596 private byte memoizedIsInitialized = -1;
8597 @java.lang.Override
8598 public final boolean isInitialized() {
8599 byte isInitialized = memoizedIsInitialized;
8600 if (isInitialized == 1) return true;
8601 if (isInitialized == 0) return false;
8602
8603 memoizedIsInitialized = 1;
8604 return true;
8605 }
8606
8607 @java.lang.Override
8608 public void writeTo(com.google.protobuf.CodedOutputStream output)
8609 throws java.io.IOException {
8610 for (int i = 0; i < input_.size(); i++) {
8611 com.google.protobuf.GeneratedMessage.writeString(output, 1, input_.getRaw(i));
8612 }
8613 for (int i = 0; i < output_.size(); i++) {
8614 com.google.protobuf.GeneratedMessage.writeString(output, 2, output_.getRaw(i));
8615 }
8616 if (((bitField0_ & 0x00000001) != 0)) {
8617 com.google.protobuf.GeneratedMessage.writeString(output, 3, name_);
8618 }
8619 if (((bitField0_ & 0x00000002) != 0)) {
8620 com.google.protobuf.GeneratedMessage.writeString(output, 4, opType_);
8621 }
8622 for (int i = 0; i < attribute_.size(); i++) {
8623 output.writeMessage(5, attribute_.get(i));
8624 }
8625 if (((bitField0_ & 0x00000010) != 0)) {
8626 com.google.protobuf.GeneratedMessage.writeString(output, 6, docString_);
8627 }
8628 if (((bitField0_ & 0x00000004) != 0)) {
8629 com.google.protobuf.GeneratedMessage.writeString(output, 7, domain_);
8630 }
8631 if (((bitField0_ & 0x00000008) != 0)) {
8632 com.google.protobuf.GeneratedMessage.writeString(output, 8, overload_);
8633 }
8634 for (int i = 0; i < metadataProps_.size(); i++) {
8635 output.writeMessage(9, metadataProps_.get(i));
8636 }
8637 getUnknownFields().writeTo(output);
8638 }
8639
8640 @java.lang.Override
8641 public int getSerializedSize() {
8642 int size = memoizedSize;
8643 if (size != -1) return size;
8644
8645 size = 0;
8646 {
8647 int dataSize = 0;
8648 for (int i = 0; i < input_.size(); i++) {
8649 dataSize += computeStringSizeNoTag(input_.getRaw(i));
8650 }
8651 size += dataSize;
8652 size += 1 * getInputList().size();
8653 }
8654 {
8655 int dataSize = 0;
8656 for (int i = 0; i < output_.size(); i++) {
8657 dataSize += computeStringSizeNoTag(output_.getRaw(i));
8658 }
8659 size += dataSize;
8660 size += 1 * getOutputList().size();
8661 }
8662 if (((bitField0_ & 0x00000001) != 0)) {
8663 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_);
8664 }
8665 if (((bitField0_ & 0x00000002) != 0)) {
8666 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, opType_);
8667 }
8668 for (int i = 0; i < attribute_.size(); i++) {
8669 size += com.google.protobuf.CodedOutputStream
8670 .computeMessageSize(5, attribute_.get(i));
8671 }
8672 if (((bitField0_ & 0x00000010) != 0)) {
8673 size += com.google.protobuf.GeneratedMessage.computeStringSize(6, docString_);
8674 }
8675 if (((bitField0_ & 0x00000004) != 0)) {
8676 size += com.google.protobuf.GeneratedMessage.computeStringSize(7, domain_);
8677 }
8678 if (((bitField0_ & 0x00000008) != 0)) {
8679 size += com.google.protobuf.GeneratedMessage.computeStringSize(8, overload_);
8680 }
8681 for (int i = 0; i < metadataProps_.size(); i++) {
8682 size += com.google.protobuf.CodedOutputStream
8683 .computeMessageSize(9, metadataProps_.get(i));
8684 }
8685 size += getUnknownFields().getSerializedSize();
8686 memoizedSize = size;
8687 return size;
8688 }
8689
8690 @java.lang.Override
8691 public boolean equals(final java.lang.Object obj) {
8692 if (obj == this) {
8693 return true;
8694 }
8695 if (!(obj instanceof onnx.OnnxMl.NodeProto)) {
8696 return super.equals(obj);
8697 }
8698 onnx.OnnxMl.NodeProto other = (onnx.OnnxMl.NodeProto) obj;
8699
8700 if (!getInputList()
8701 .equals(other.getInputList())) return false;
8702 if (!getOutputList()
8703 .equals(other.getOutputList())) return false;
8704 if (hasName() != other.hasName()) return false;
8705 if (hasName()) {
8706 if (!getName()
8707 .equals(other.getName())) return false;
8708 }
8709 if (hasOpType() != other.hasOpType()) return false;
8710 if (hasOpType()) {
8711 if (!getOpType()
8712 .equals(other.getOpType())) return false;
8713 }
8714 if (hasDomain() != other.hasDomain()) return false;
8715 if (hasDomain()) {
8716 if (!getDomain()
8717 .equals(other.getDomain())) return false;
8718 }
8719 if (hasOverload() != other.hasOverload()) return false;
8720 if (hasOverload()) {
8721 if (!getOverload()
8722 .equals(other.getOverload())) return false;
8723 }
8724 if (!getAttributeList()
8725 .equals(other.getAttributeList())) return false;
8726 if (hasDocString() != other.hasDocString()) return false;
8727 if (hasDocString()) {
8728 if (!getDocString()
8729 .equals(other.getDocString())) return false;
8730 }
8731 if (!getMetadataPropsList()
8732 .equals(other.getMetadataPropsList())) return false;
8733 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
8734 return true;
8735 }
8736
8737 @java.lang.Override
8738 public int hashCode() {
8739 if (memoizedHashCode != 0) {
8740 return memoizedHashCode;
8741 }
8742 int hash = 41;
8743 hash = (19 * hash) + getDescriptor().hashCode();
8744 if (getInputCount() > 0) {
8745 hash = (37 * hash) + INPUT_FIELD_NUMBER;
8746 hash = (53 * hash) + getInputList().hashCode();
8747 }
8748 if (getOutputCount() > 0) {
8749 hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
8750 hash = (53 * hash) + getOutputList().hashCode();
8751 }
8752 if (hasName()) {
8753 hash = (37 * hash) + NAME_FIELD_NUMBER;
8754 hash = (53 * hash) + getName().hashCode();
8755 }
8756 if (hasOpType()) {
8757 hash = (37 * hash) + OP_TYPE_FIELD_NUMBER;
8758 hash = (53 * hash) + getOpType().hashCode();
8759 }
8760 if (hasDomain()) {
8761 hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
8762 hash = (53 * hash) + getDomain().hashCode();
8763 }
8764 if (hasOverload()) {
8765 hash = (37 * hash) + OVERLOAD_FIELD_NUMBER;
8766 hash = (53 * hash) + getOverload().hashCode();
8767 }
8768 if (getAttributeCount() > 0) {
8769 hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER;
8770 hash = (53 * hash) + getAttributeList().hashCode();
8771 }
8772 if (hasDocString()) {
8773 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
8774 hash = (53 * hash) + getDocString().hashCode();
8775 }
8776 if (getMetadataPropsCount() > 0) {
8777 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
8778 hash = (53 * hash) + getMetadataPropsList().hashCode();
8779 }
8780 hash = (29 * hash) + getUnknownFields().hashCode();
8781 memoizedHashCode = hash;
8782 return hash;
8783 }
8784
8785 public static onnx.OnnxMl.NodeProto parseFrom(
8786 java.nio.ByteBuffer data)
8787 throws com.google.protobuf.InvalidProtocolBufferException {
8788 return PARSER.parseFrom(data);
8789 }
8790 public static onnx.OnnxMl.NodeProto parseFrom(
8791 java.nio.ByteBuffer data,
8792 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8793 throws com.google.protobuf.InvalidProtocolBufferException {
8794 return PARSER.parseFrom(data, extensionRegistry);
8795 }
8796 public static onnx.OnnxMl.NodeProto parseFrom(
8797 com.google.protobuf.ByteString data)
8798 throws com.google.protobuf.InvalidProtocolBufferException {
8799 return PARSER.parseFrom(data);
8800 }
8801 public static onnx.OnnxMl.NodeProto parseFrom(
8802 com.google.protobuf.ByteString data,
8803 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8804 throws com.google.protobuf.InvalidProtocolBufferException {
8805 return PARSER.parseFrom(data, extensionRegistry);
8806 }
8807 public static onnx.OnnxMl.NodeProto parseFrom(byte[] data)
8808 throws com.google.protobuf.InvalidProtocolBufferException {
8809 return PARSER.parseFrom(data);
8810 }
8811 public static onnx.OnnxMl.NodeProto parseFrom(
8812 byte[] data,
8813 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8814 throws com.google.protobuf.InvalidProtocolBufferException {
8815 return PARSER.parseFrom(data, extensionRegistry);
8816 }
8817 public static onnx.OnnxMl.NodeProto parseFrom(java.io.InputStream input)
8818 throws java.io.IOException {
8819 return com.google.protobuf.GeneratedMessage
8820 .parseWithIOException(PARSER, input);
8821 }
8822 public static onnx.OnnxMl.NodeProto parseFrom(
8823 java.io.InputStream input,
8824 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8825 throws java.io.IOException {
8826 return com.google.protobuf.GeneratedMessage
8827 .parseWithIOException(PARSER, input, extensionRegistry);
8828 }
8829
8830 public static onnx.OnnxMl.NodeProto parseDelimitedFrom(java.io.InputStream input)
8831 throws java.io.IOException {
8832 return com.google.protobuf.GeneratedMessage
8833 .parseDelimitedWithIOException(PARSER, input);
8834 }
8835
8836 public static onnx.OnnxMl.NodeProto parseDelimitedFrom(
8837 java.io.InputStream input,
8838 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8839 throws java.io.IOException {
8840 return com.google.protobuf.GeneratedMessage
8841 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
8842 }
8843 public static onnx.OnnxMl.NodeProto parseFrom(
8844 com.google.protobuf.CodedInputStream input)
8845 throws java.io.IOException {
8846 return com.google.protobuf.GeneratedMessage
8847 .parseWithIOException(PARSER, input);
8848 }
8849 public static onnx.OnnxMl.NodeProto parseFrom(
8850 com.google.protobuf.CodedInputStream input,
8851 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8852 throws java.io.IOException {
8853 return com.google.protobuf.GeneratedMessage
8854 .parseWithIOException(PARSER, input, extensionRegistry);
8855 }
8856
8857 @java.lang.Override
8858 public Builder newBuilderForType() { return newBuilder(); }
8859 public static Builder newBuilder() {
8860 return DEFAULT_INSTANCE.toBuilder();
8861 }
8862 public static Builder newBuilder(onnx.OnnxMl.NodeProto prototype) {
8863 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
8864 }
8865 @java.lang.Override
8866 public Builder toBuilder() {
8867 return this == DEFAULT_INSTANCE
8868 ? new Builder() : new Builder().mergeFrom(this);
8869 }
8870
8871 @java.lang.Override
8872 protected Builder newBuilderForType(
8873 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
8874 Builder builder = new Builder(parent);
8875 return builder;
8876 }
8877 /**
8878 * <pre>
8879 * Nodes
8880 *
8881 * Computation graphs are made up of a DAG of nodes, which represent what is
8882 * commonly called a "layer" or "pipeline stage" in machine learning frameworks.
8883 *
8884 * For example, it can be a node of type "Conv" that takes in an image, a filter
8885 * tensor and a bias tensor, and produces the convolved output.
8886 * </pre>
8887 *
8888 * Protobuf type {@code onnx.NodeProto}
8889 */
8890 public static final class Builder extends
8891 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
8892 // @@protoc_insertion_point(builder_implements:onnx.NodeProto)
8893 onnx.OnnxMl.NodeProtoOrBuilder {
8894 public static final com.google.protobuf.Descriptors.Descriptor
8895 getDescriptor() {
8896 return onnx.OnnxMl.internal_static_onnx_NodeProto_descriptor;
8897 }
8898
8899 @java.lang.Override
8900 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
8901 internalGetFieldAccessorTable() {
8902 return onnx.OnnxMl.internal_static_onnx_NodeProto_fieldAccessorTable
8903 .ensureFieldAccessorsInitialized(
8904 onnx.OnnxMl.NodeProto.class, onnx.OnnxMl.NodeProto.Builder.class);
8905 }
8906
8907 // Construct using onnx.OnnxMl.NodeProto.newBuilder()
8908 private Builder() {
8909
8910 }
8911
8912 private Builder(
8913 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
8914 super(parent);
8915
8916 }
8917 @java.lang.Override
8918 public Builder clear() {
8919 super.clear();
8920 bitField0_ = 0;
8921 input_ =
8922 com.google.protobuf.LazyStringArrayList.emptyList();
8923 output_ =
8924 com.google.protobuf.LazyStringArrayList.emptyList();
8925 name_ = "";
8926 opType_ = "";
8927 domain_ = "";
8928 overload_ = "";
8929 if (attributeBuilder_ == null) {
8930 attribute_ = java.util.Collections.emptyList();
8931 } else {
8932 attribute_ = null;
8933 attributeBuilder_.clear();
8934 }
8935 bitField0_ = (bitField0_ & ~0x00000040);
8936 docString_ = "";
8937 if (metadataPropsBuilder_ == null) {
8938 metadataProps_ = java.util.Collections.emptyList();
8939 } else {
8940 metadataProps_ = null;
8941 metadataPropsBuilder_.clear();
8942 }
8943 bitField0_ = (bitField0_ & ~0x00000100);
8944 return this;
8945 }
8946
8947 @java.lang.Override
8948 public com.google.protobuf.Descriptors.Descriptor
8949 getDescriptorForType() {
8950 return onnx.OnnxMl.internal_static_onnx_NodeProto_descriptor;
8951 }
8952
8953 @java.lang.Override
8954 public onnx.OnnxMl.NodeProto getDefaultInstanceForType() {
8955 return onnx.OnnxMl.NodeProto.getDefaultInstance();
8956 }
8957
8958 @java.lang.Override
8959 public onnx.OnnxMl.NodeProto build() {
8960 onnx.OnnxMl.NodeProto result = buildPartial();
8961 if (!result.isInitialized()) {
8962 throw newUninitializedMessageException(result);
8963 }
8964 return result;
8965 }
8966
8967 @java.lang.Override
8968 public onnx.OnnxMl.NodeProto buildPartial() {
8969 onnx.OnnxMl.NodeProto result = new onnx.OnnxMl.NodeProto(this);
8970 buildPartialRepeatedFields(result);
8971 if (bitField0_ != 0) { buildPartial0(result); }
8972 onBuilt();
8973 return result;
8974 }
8975
8976 private void buildPartialRepeatedFields(onnx.OnnxMl.NodeProto result) {
8977 if (attributeBuilder_ == null) {
8978 if (((bitField0_ & 0x00000040) != 0)) {
8979 attribute_ = java.util.Collections.unmodifiableList(attribute_);
8980 bitField0_ = (bitField0_ & ~0x00000040);
8981 }
8982 result.attribute_ = attribute_;
8983 } else {
8984 result.attribute_ = attributeBuilder_.build();
8985 }
8986 if (metadataPropsBuilder_ == null) {
8987 if (((bitField0_ & 0x00000100) != 0)) {
8988 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
8989 bitField0_ = (bitField0_ & ~0x00000100);
8990 }
8991 result.metadataProps_ = metadataProps_;
8992 } else {
8993 result.metadataProps_ = metadataPropsBuilder_.build();
8994 }
8995 }
8996
8997 private void buildPartial0(onnx.OnnxMl.NodeProto result) {
8998 int from_bitField0_ = bitField0_;
8999 if (((from_bitField0_ & 0x00000001) != 0)) {
9000 input_.makeImmutable();
9001 result.input_ = input_;
9002 }
9003 if (((from_bitField0_ & 0x00000002) != 0)) {
9004 output_.makeImmutable();
9005 result.output_ = output_;
9006 }
9007 int to_bitField0_ = 0;
9008 if (((from_bitField0_ & 0x00000004) != 0)) {
9009 result.name_ = name_;
9010 to_bitField0_ |= 0x00000001;
9011 }
9012 if (((from_bitField0_ & 0x00000008) != 0)) {
9013 result.opType_ = opType_;
9014 to_bitField0_ |= 0x00000002;
9015 }
9016 if (((from_bitField0_ & 0x00000010) != 0)) {
9017 result.domain_ = domain_;
9018 to_bitField0_ |= 0x00000004;
9019 }
9020 if (((from_bitField0_ & 0x00000020) != 0)) {
9021 result.overload_ = overload_;
9022 to_bitField0_ |= 0x00000008;
9023 }
9024 if (((from_bitField0_ & 0x00000080) != 0)) {
9025 result.docString_ = docString_;
9026 to_bitField0_ |= 0x00000010;
9027 }
9028 result.bitField0_ |= to_bitField0_;
9029 }
9030
9031 @java.lang.Override
9032 public Builder mergeFrom(com.google.protobuf.Message other) {
9033 if (other instanceof onnx.OnnxMl.NodeProto) {
9034 return mergeFrom((onnx.OnnxMl.NodeProto)other);
9035 } else {
9036 super.mergeFrom(other);
9037 return this;
9038 }
9039 }
9040
9041 public Builder mergeFrom(onnx.OnnxMl.NodeProto other) {
9042 if (other == onnx.OnnxMl.NodeProto.getDefaultInstance()) return this;
9043 if (!other.input_.isEmpty()) {
9044 if (input_.isEmpty()) {
9045 input_ = other.input_;
9046 bitField0_ |= 0x00000001;
9047 } else {
9048 ensureInputIsMutable();
9049 input_.addAll(other.input_);
9050 }
9051 onChanged();
9052 }
9053 if (!other.output_.isEmpty()) {
9054 if (output_.isEmpty()) {
9055 output_ = other.output_;
9056 bitField0_ |= 0x00000002;
9057 } else {
9058 ensureOutputIsMutable();
9059 output_.addAll(other.output_);
9060 }
9061 onChanged();
9062 }
9063 if (other.hasName()) {
9064 name_ = other.name_;
9065 bitField0_ |= 0x00000004;
9066 onChanged();
9067 }
9068 if (other.hasOpType()) {
9069 opType_ = other.opType_;
9070 bitField0_ |= 0x00000008;
9071 onChanged();
9072 }
9073 if (other.hasDomain()) {
9074 domain_ = other.domain_;
9075 bitField0_ |= 0x00000010;
9076 onChanged();
9077 }
9078 if (other.hasOverload()) {
9079 overload_ = other.overload_;
9080 bitField0_ |= 0x00000020;
9081 onChanged();
9082 }
9083 if (attributeBuilder_ == null) {
9084 if (!other.attribute_.isEmpty()) {
9085 if (attribute_.isEmpty()) {
9086 attribute_ = other.attribute_;
9087 bitField0_ = (bitField0_ & ~0x00000040);
9088 } else {
9089 ensureAttributeIsMutable();
9090 attribute_.addAll(other.attribute_);
9091 }
9092 onChanged();
9093 }
9094 } else {
9095 if (!other.attribute_.isEmpty()) {
9096 if (attributeBuilder_.isEmpty()) {
9097 attributeBuilder_.dispose();
9098 attributeBuilder_ = null;
9099 attribute_ = other.attribute_;
9100 bitField0_ = (bitField0_ & ~0x00000040);
9101 attributeBuilder_ =
9102 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
9103 getAttributeFieldBuilder() : null;
9104 } else {
9105 attributeBuilder_.addAllMessages(other.attribute_);
9106 }
9107 }
9108 }
9109 if (other.hasDocString()) {
9110 docString_ = other.docString_;
9111 bitField0_ |= 0x00000080;
9112 onChanged();
9113 }
9114 if (metadataPropsBuilder_ == null) {
9115 if (!other.metadataProps_.isEmpty()) {
9116 if (metadataProps_.isEmpty()) {
9117 metadataProps_ = other.metadataProps_;
9118 bitField0_ = (bitField0_ & ~0x00000100);
9119 } else {
9120 ensureMetadataPropsIsMutable();
9121 metadataProps_.addAll(other.metadataProps_);
9122 }
9123 onChanged();
9124 }
9125 } else {
9126 if (!other.metadataProps_.isEmpty()) {
9127 if (metadataPropsBuilder_.isEmpty()) {
9128 metadataPropsBuilder_.dispose();
9129 metadataPropsBuilder_ = null;
9130 metadataProps_ = other.metadataProps_;
9131 bitField0_ = (bitField0_ & ~0x00000100);
9132 metadataPropsBuilder_ =
9133 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
9134 getMetadataPropsFieldBuilder() : null;
9135 } else {
9136 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
9137 }
9138 }
9139 }
9140 this.mergeUnknownFields(other.getUnknownFields());
9141 onChanged();
9142 return this;
9143 }
9144
9145 @java.lang.Override
9146 public final boolean isInitialized() {
9147 return true;
9148 }
9149
9150 @java.lang.Override
9151 public Builder mergeFrom(
9152 com.google.protobuf.CodedInputStream input,
9153 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9154 throws java.io.IOException {
9155 if (extensionRegistry == null) {
9156 throw new java.lang.NullPointerException();
9157 }
9158 try {
9159 boolean done = false;
9160 while (!done) {
9161 int tag = input.readTag();
9162 switch (tag) {
9163 case 0:
9164 done = true;
9165 break;
9166 case 10: {
9167 com.google.protobuf.ByteString bs = input.readBytes();
9168 ensureInputIsMutable();
9169 input_.add(bs);
9170 break;
9171 } // case 10
9172 case 18: {
9173 com.google.protobuf.ByteString bs = input.readBytes();
9174 ensureOutputIsMutable();
9175 output_.add(bs);
9176 break;
9177 } // case 18
9178 case 26: {
9179 name_ = input.readBytes();
9180 bitField0_ |= 0x00000004;
9181 break;
9182 } // case 26
9183 case 34: {
9184 opType_ = input.readBytes();
9185 bitField0_ |= 0x00000008;
9186 break;
9187 } // case 34
9188 case 42: {
9189 onnx.OnnxMl.AttributeProto m =
9190 input.readMessage(
9191 onnx.OnnxMl.AttributeProto.parser(),
9192 extensionRegistry);
9193 if (attributeBuilder_ == null) {
9194 ensureAttributeIsMutable();
9195 attribute_.add(m);
9196 } else {
9197 attributeBuilder_.addMessage(m);
9198 }
9199 break;
9200 } // case 42
9201 case 50: {
9202 docString_ = input.readBytes();
9203 bitField0_ |= 0x00000080;
9204 break;
9205 } // case 50
9206 case 58: {
9207 domain_ = input.readBytes();
9208 bitField0_ |= 0x00000010;
9209 break;
9210 } // case 58
9211 case 66: {
9212 overload_ = input.readBytes();
9213 bitField0_ |= 0x00000020;
9214 break;
9215 } // case 66
9216 case 74: {
9217 onnx.OnnxMl.StringStringEntryProto m =
9218 input.readMessage(
9219 onnx.OnnxMl.StringStringEntryProto.parser(),
9220 extensionRegistry);
9221 if (metadataPropsBuilder_ == null) {
9222 ensureMetadataPropsIsMutable();
9223 metadataProps_.add(m);
9224 } else {
9225 metadataPropsBuilder_.addMessage(m);
9226 }
9227 break;
9228 } // case 74
9229 default: {
9230 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
9231 done = true; // was an endgroup tag
9232 }
9233 break;
9234 } // default:
9235 } // switch (tag)
9236 } // while (!done)
9237 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
9238 throw e.unwrapIOException();
9239 } finally {
9240 onChanged();
9241 } // finally
9242 return this;
9243 }
9244 private int bitField0_;
9245
9246 private com.google.protobuf.LazyStringArrayList input_ =
9247 com.google.protobuf.LazyStringArrayList.emptyList();
9248 private void ensureInputIsMutable() {
9249 if (!input_.isModifiable()) {
9250 input_ = new com.google.protobuf.LazyStringArrayList(input_);
9251 }
9252 bitField0_ |= 0x00000001;
9253 }
9254 /**
9255 * <pre>
9256 * namespace Value
9257 * </pre>
9258 *
9259 * <code>repeated string input = 1;</code>
9260 * @return A list containing the input.
9261 */
9262 public com.google.protobuf.ProtocolStringList
9263 getInputList() {
9264 input_.makeImmutable();
9265 return input_;
9266 }
9267 /**
9268 * <pre>
9269 * namespace Value
9270 * </pre>
9271 *
9272 * <code>repeated string input = 1;</code>
9273 * @return The count of input.
9274 */
9275 public int getInputCount() {
9276 return input_.size();
9277 }
9278 /**
9279 * <pre>
9280 * namespace Value
9281 * </pre>
9282 *
9283 * <code>repeated string input = 1;</code>
9284 * @param index The index of the element to return.
9285 * @return The input at the given index.
9286 */
9287 public java.lang.String getInput(int index) {
9288 return input_.get(index);
9289 }
9290 /**
9291 * <pre>
9292 * namespace Value
9293 * </pre>
9294 *
9295 * <code>repeated string input = 1;</code>
9296 * @param index The index of the value to return.
9297 * @return The bytes of the input at the given index.
9298 */
9299 public com.google.protobuf.ByteString
9300 getInputBytes(int index) {
9301 return input_.getByteString(index);
9302 }
9303 /**
9304 * <pre>
9305 * namespace Value
9306 * </pre>
9307 *
9308 * <code>repeated string input = 1;</code>
9309 * @param index The index to set the value at.
9310 * @param value The input to set.
9311 * @return This builder for chaining.
9312 */
9313 public Builder setInput(
9314 int index, java.lang.String value) {
9315 if (value == null) { throw new NullPointerException(); }
9316 ensureInputIsMutable();
9317 input_.set(index, value);
9318 bitField0_ |= 0x00000001;
9319 onChanged();
9320 return this;
9321 }
9322 /**
9323 * <pre>
9324 * namespace Value
9325 * </pre>
9326 *
9327 * <code>repeated string input = 1;</code>
9328 * @param value The input to add.
9329 * @return This builder for chaining.
9330 */
9331 public Builder addInput(
9332 java.lang.String value) {
9333 if (value == null) { throw new NullPointerException(); }
9334 ensureInputIsMutable();
9335 input_.add(value);
9336 bitField0_ |= 0x00000001;
9337 onChanged();
9338 return this;
9339 }
9340 /**
9341 * <pre>
9342 * namespace Value
9343 * </pre>
9344 *
9345 * <code>repeated string input = 1;</code>
9346 * @param values The input to add.
9347 * @return This builder for chaining.
9348 */
9349 public Builder addAllInput(
9350 java.lang.Iterable<java.lang.String> values) {
9351 ensureInputIsMutable();
9352 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9353 values, input_);
9354 bitField0_ |= 0x00000001;
9355 onChanged();
9356 return this;
9357 }
9358 /**
9359 * <pre>
9360 * namespace Value
9361 * </pre>
9362 *
9363 * <code>repeated string input = 1;</code>
9364 * @return This builder for chaining.
9365 */
9366 public Builder clearInput() {
9367 input_ =
9368 com.google.protobuf.LazyStringArrayList.emptyList();
9369 bitField0_ = (bitField0_ & ~0x00000001);;
9370 onChanged();
9371 return this;
9372 }
9373 /**
9374 * <pre>
9375 * namespace Value
9376 * </pre>
9377 *
9378 * <code>repeated string input = 1;</code>
9379 * @param value The bytes of the input to add.
9380 * @return This builder for chaining.
9381 */
9382 public Builder addInputBytes(
9383 com.google.protobuf.ByteString value) {
9384 if (value == null) { throw new NullPointerException(); }
9385 ensureInputIsMutable();
9386 input_.add(value);
9387 bitField0_ |= 0x00000001;
9388 onChanged();
9389 return this;
9390 }
9391
9392 private com.google.protobuf.LazyStringArrayList output_ =
9393 com.google.protobuf.LazyStringArrayList.emptyList();
9394 private void ensureOutputIsMutable() {
9395 if (!output_.isModifiable()) {
9396 output_ = new com.google.protobuf.LazyStringArrayList(output_);
9397 }
9398 bitField0_ |= 0x00000002;
9399 }
9400 /**
9401 * <pre>
9402 * namespace Value
9403 * </pre>
9404 *
9405 * <code>repeated string output = 2;</code>
9406 * @return A list containing the output.
9407 */
9408 public com.google.protobuf.ProtocolStringList
9409 getOutputList() {
9410 output_.makeImmutable();
9411 return output_;
9412 }
9413 /**
9414 * <pre>
9415 * namespace Value
9416 * </pre>
9417 *
9418 * <code>repeated string output = 2;</code>
9419 * @return The count of output.
9420 */
9421 public int getOutputCount() {
9422 return output_.size();
9423 }
9424 /**
9425 * <pre>
9426 * namespace Value
9427 * </pre>
9428 *
9429 * <code>repeated string output = 2;</code>
9430 * @param index The index of the element to return.
9431 * @return The output at the given index.
9432 */
9433 public java.lang.String getOutput(int index) {
9434 return output_.get(index);
9435 }
9436 /**
9437 * <pre>
9438 * namespace Value
9439 * </pre>
9440 *
9441 * <code>repeated string output = 2;</code>
9442 * @param index The index of the value to return.
9443 * @return The bytes of the output at the given index.
9444 */
9445 public com.google.protobuf.ByteString
9446 getOutputBytes(int index) {
9447 return output_.getByteString(index);
9448 }
9449 /**
9450 * <pre>
9451 * namespace Value
9452 * </pre>
9453 *
9454 * <code>repeated string output = 2;</code>
9455 * @param index The index to set the value at.
9456 * @param value The output to set.
9457 * @return This builder for chaining.
9458 */
9459 public Builder setOutput(
9460 int index, java.lang.String value) {
9461 if (value == null) { throw new NullPointerException(); }
9462 ensureOutputIsMutable();
9463 output_.set(index, value);
9464 bitField0_ |= 0x00000002;
9465 onChanged();
9466 return this;
9467 }
9468 /**
9469 * <pre>
9470 * namespace Value
9471 * </pre>
9472 *
9473 * <code>repeated string output = 2;</code>
9474 * @param value The output to add.
9475 * @return This builder for chaining.
9476 */
9477 public Builder addOutput(
9478 java.lang.String value) {
9479 if (value == null) { throw new NullPointerException(); }
9480 ensureOutputIsMutable();
9481 output_.add(value);
9482 bitField0_ |= 0x00000002;
9483 onChanged();
9484 return this;
9485 }
9486 /**
9487 * <pre>
9488 * namespace Value
9489 * </pre>
9490 *
9491 * <code>repeated string output = 2;</code>
9492 * @param values The output to add.
9493 * @return This builder for chaining.
9494 */
9495 public Builder addAllOutput(
9496 java.lang.Iterable<java.lang.String> values) {
9497 ensureOutputIsMutable();
9498 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9499 values, output_);
9500 bitField0_ |= 0x00000002;
9501 onChanged();
9502 return this;
9503 }
9504 /**
9505 * <pre>
9506 * namespace Value
9507 * </pre>
9508 *
9509 * <code>repeated string output = 2;</code>
9510 * @return This builder for chaining.
9511 */
9512 public Builder clearOutput() {
9513 output_ =
9514 com.google.protobuf.LazyStringArrayList.emptyList();
9515 bitField0_ = (bitField0_ & ~0x00000002);;
9516 onChanged();
9517 return this;
9518 }
9519 /**
9520 * <pre>
9521 * namespace Value
9522 * </pre>
9523 *
9524 * <code>repeated string output = 2;</code>
9525 * @param value The bytes of the output to add.
9526 * @return This builder for chaining.
9527 */
9528 public Builder addOutputBytes(
9529 com.google.protobuf.ByteString value) {
9530 if (value == null) { throw new NullPointerException(); }
9531 ensureOutputIsMutable();
9532 output_.add(value);
9533 bitField0_ |= 0x00000002;
9534 onChanged();
9535 return this;
9536 }
9537
9538 private java.lang.Object name_ = "";
9539 /**
9540 * <pre>
9541 * An optional identifier for this node in a graph.
9542 * This field MAY be absent in this version of the IR.
9543 * </pre>
9544 *
9545 * <code>optional string name = 3;</code>
9546 * @return Whether the name field is set.
9547 */
9548 public boolean hasName() {
9549 return ((bitField0_ & 0x00000004) != 0);
9550 }
9551 /**
9552 * <pre>
9553 * An optional identifier for this node in a graph.
9554 * This field MAY be absent in this version of the IR.
9555 * </pre>
9556 *
9557 * <code>optional string name = 3;</code>
9558 * @return The name.
9559 */
9560 public java.lang.String getName() {
9561 java.lang.Object ref = name_;
9562 if (!(ref instanceof java.lang.String)) {
9563 com.google.protobuf.ByteString bs =
9564 (com.google.protobuf.ByteString) ref;
9565 java.lang.String s = bs.toStringUtf8();
9566 if (bs.isValidUtf8()) {
9567 name_ = s;
9568 }
9569 return s;
9570 } else {
9571 return (java.lang.String) ref;
9572 }
9573 }
9574 /**
9575 * <pre>
9576 * An optional identifier for this node in a graph.
9577 * This field MAY be absent in this version of the IR.
9578 * </pre>
9579 *
9580 * <code>optional string name = 3;</code>
9581 * @return The bytes for name.
9582 */
9583 public com.google.protobuf.ByteString
9584 getNameBytes() {
9585 java.lang.Object ref = name_;
9586 if (ref instanceof String) {
9587 com.google.protobuf.ByteString b =
9588 com.google.protobuf.ByteString.copyFromUtf8(
9589 (java.lang.String) ref);
9590 name_ = b;
9591 return b;
9592 } else {
9593 return (com.google.protobuf.ByteString) ref;
9594 }
9595 }
9596 /**
9597 * <pre>
9598 * An optional identifier for this node in a graph.
9599 * This field MAY be absent in this version of the IR.
9600 * </pre>
9601 *
9602 * <code>optional string name = 3;</code>
9603 * @param value The name to set.
9604 * @return This builder for chaining.
9605 */
9606 public Builder setName(
9607 java.lang.String value) {
9608 if (value == null) { throw new NullPointerException(); }
9609 name_ = value;
9610 bitField0_ |= 0x00000004;
9611 onChanged();
9612 return this;
9613 }
9614 /**
9615 * <pre>
9616 * An optional identifier for this node in a graph.
9617 * This field MAY be absent in this version of the IR.
9618 * </pre>
9619 *
9620 * <code>optional string name = 3;</code>
9621 * @return This builder for chaining.
9622 */
9623 public Builder clearName() {
9624 name_ = getDefaultInstance().getName();
9625 bitField0_ = (bitField0_ & ~0x00000004);
9626 onChanged();
9627 return this;
9628 }
9629 /**
9630 * <pre>
9631 * An optional identifier for this node in a graph.
9632 * This field MAY be absent in this version of the IR.
9633 * </pre>
9634 *
9635 * <code>optional string name = 3;</code>
9636 * @param value The bytes for name to set.
9637 * @return This builder for chaining.
9638 */
9639 public Builder setNameBytes(
9640 com.google.protobuf.ByteString value) {
9641 if (value == null) { throw new NullPointerException(); }
9642 name_ = value;
9643 bitField0_ |= 0x00000004;
9644 onChanged();
9645 return this;
9646 }
9647
9648 private java.lang.Object opType_ = "";
9649 /**
9650 * <pre>
9651 * The symbolic identifier of the Operator to execute.
9652 * </pre>
9653 *
9654 * <code>optional string op_type = 4;</code>
9655 * @return Whether the opType field is set.
9656 */
9657 public boolean hasOpType() {
9658 return ((bitField0_ & 0x00000008) != 0);
9659 }
9660 /**
9661 * <pre>
9662 * The symbolic identifier of the Operator to execute.
9663 * </pre>
9664 *
9665 * <code>optional string op_type = 4;</code>
9666 * @return The opType.
9667 */
9668 public java.lang.String getOpType() {
9669 java.lang.Object ref = opType_;
9670 if (!(ref instanceof java.lang.String)) {
9671 com.google.protobuf.ByteString bs =
9672 (com.google.protobuf.ByteString) ref;
9673 java.lang.String s = bs.toStringUtf8();
9674 if (bs.isValidUtf8()) {
9675 opType_ = s;
9676 }
9677 return s;
9678 } else {
9679 return (java.lang.String) ref;
9680 }
9681 }
9682 /**
9683 * <pre>
9684 * The symbolic identifier of the Operator to execute.
9685 * </pre>
9686 *
9687 * <code>optional string op_type = 4;</code>
9688 * @return The bytes for opType.
9689 */
9690 public com.google.protobuf.ByteString
9691 getOpTypeBytes() {
9692 java.lang.Object ref = opType_;
9693 if (ref instanceof String) {
9694 com.google.protobuf.ByteString b =
9695 com.google.protobuf.ByteString.copyFromUtf8(
9696 (java.lang.String) ref);
9697 opType_ = b;
9698 return b;
9699 } else {
9700 return (com.google.protobuf.ByteString) ref;
9701 }
9702 }
9703 /**
9704 * <pre>
9705 * The symbolic identifier of the Operator to execute.
9706 * </pre>
9707 *
9708 * <code>optional string op_type = 4;</code>
9709 * @param value The opType to set.
9710 * @return This builder for chaining.
9711 */
9712 public Builder setOpType(
9713 java.lang.String value) {
9714 if (value == null) { throw new NullPointerException(); }
9715 opType_ = value;
9716 bitField0_ |= 0x00000008;
9717 onChanged();
9718 return this;
9719 }
9720 /**
9721 * <pre>
9722 * The symbolic identifier of the Operator to execute.
9723 * </pre>
9724 *
9725 * <code>optional string op_type = 4;</code>
9726 * @return This builder for chaining.
9727 */
9728 public Builder clearOpType() {
9729 opType_ = getDefaultInstance().getOpType();
9730 bitField0_ = (bitField0_ & ~0x00000008);
9731 onChanged();
9732 return this;
9733 }
9734 /**
9735 * <pre>
9736 * The symbolic identifier of the Operator to execute.
9737 * </pre>
9738 *
9739 * <code>optional string op_type = 4;</code>
9740 * @param value The bytes for opType to set.
9741 * @return This builder for chaining.
9742 */
9743 public Builder setOpTypeBytes(
9744 com.google.protobuf.ByteString value) {
9745 if (value == null) { throw new NullPointerException(); }
9746 opType_ = value;
9747 bitField0_ |= 0x00000008;
9748 onChanged();
9749 return this;
9750 }
9751
9752 private java.lang.Object domain_ = "";
9753 /**
9754 * <pre>
9755 * The domain of the OperatorSet that specifies the operator named by op_type.
9756 * </pre>
9757 *
9758 * <code>optional string domain = 7;</code>
9759 * @return Whether the domain field is set.
9760 */
9761 public boolean hasDomain() {
9762 return ((bitField0_ & 0x00000010) != 0);
9763 }
9764 /**
9765 * <pre>
9766 * The domain of the OperatorSet that specifies the operator named by op_type.
9767 * </pre>
9768 *
9769 * <code>optional string domain = 7;</code>
9770 * @return The domain.
9771 */
9772 public java.lang.String getDomain() {
9773 java.lang.Object ref = domain_;
9774 if (!(ref instanceof java.lang.String)) {
9775 com.google.protobuf.ByteString bs =
9776 (com.google.protobuf.ByteString) ref;
9777 java.lang.String s = bs.toStringUtf8();
9778 if (bs.isValidUtf8()) {
9779 domain_ = s;
9780 }
9781 return s;
9782 } else {
9783 return (java.lang.String) ref;
9784 }
9785 }
9786 /**
9787 * <pre>
9788 * The domain of the OperatorSet that specifies the operator named by op_type.
9789 * </pre>
9790 *
9791 * <code>optional string domain = 7;</code>
9792 * @return The bytes for domain.
9793 */
9794 public com.google.protobuf.ByteString
9795 getDomainBytes() {
9796 java.lang.Object ref = domain_;
9797 if (ref instanceof String) {
9798 com.google.protobuf.ByteString b =
9799 com.google.protobuf.ByteString.copyFromUtf8(
9800 (java.lang.String) ref);
9801 domain_ = b;
9802 return b;
9803 } else {
9804 return (com.google.protobuf.ByteString) ref;
9805 }
9806 }
9807 /**
9808 * <pre>
9809 * The domain of the OperatorSet that specifies the operator named by op_type.
9810 * </pre>
9811 *
9812 * <code>optional string domain = 7;</code>
9813 * @param value The domain to set.
9814 * @return This builder for chaining.
9815 */
9816 public Builder setDomain(
9817 java.lang.String value) {
9818 if (value == null) { throw new NullPointerException(); }
9819 domain_ = value;
9820 bitField0_ |= 0x00000010;
9821 onChanged();
9822 return this;
9823 }
9824 /**
9825 * <pre>
9826 * The domain of the OperatorSet that specifies the operator named by op_type.
9827 * </pre>
9828 *
9829 * <code>optional string domain = 7;</code>
9830 * @return This builder for chaining.
9831 */
9832 public Builder clearDomain() {
9833 domain_ = getDefaultInstance().getDomain();
9834 bitField0_ = (bitField0_ & ~0x00000010);
9835 onChanged();
9836 return this;
9837 }
9838 /**
9839 * <pre>
9840 * The domain of the OperatorSet that specifies the operator named by op_type.
9841 * </pre>
9842 *
9843 * <code>optional string domain = 7;</code>
9844 * @param value The bytes for domain to set.
9845 * @return This builder for chaining.
9846 */
9847 public Builder setDomainBytes(
9848 com.google.protobuf.ByteString value) {
9849 if (value == null) { throw new NullPointerException(); }
9850 domain_ = value;
9851 bitField0_ |= 0x00000010;
9852 onChanged();
9853 return this;
9854 }
9855
9856 private java.lang.Object overload_ = "";
9857 /**
9858 * <pre>
9859 * Overload identifier, used only to map this to a model-local function.
9860 * </pre>
9861 *
9862 * <code>optional string overload = 8;</code>
9863 * @return Whether the overload field is set.
9864 */
9865 public boolean hasOverload() {
9866 return ((bitField0_ & 0x00000020) != 0);
9867 }
9868 /**
9869 * <pre>
9870 * Overload identifier, used only to map this to a model-local function.
9871 * </pre>
9872 *
9873 * <code>optional string overload = 8;</code>
9874 * @return The overload.
9875 */
9876 public java.lang.String getOverload() {
9877 java.lang.Object ref = overload_;
9878 if (!(ref instanceof java.lang.String)) {
9879 com.google.protobuf.ByteString bs =
9880 (com.google.protobuf.ByteString) ref;
9881 java.lang.String s = bs.toStringUtf8();
9882 if (bs.isValidUtf8()) {
9883 overload_ = s;
9884 }
9885 return s;
9886 } else {
9887 return (java.lang.String) ref;
9888 }
9889 }
9890 /**
9891 * <pre>
9892 * Overload identifier, used only to map this to a model-local function.
9893 * </pre>
9894 *
9895 * <code>optional string overload = 8;</code>
9896 * @return The bytes for overload.
9897 */
9898 public com.google.protobuf.ByteString
9899 getOverloadBytes() {
9900 java.lang.Object ref = overload_;
9901 if (ref instanceof String) {
9902 com.google.protobuf.ByteString b =
9903 com.google.protobuf.ByteString.copyFromUtf8(
9904 (java.lang.String) ref);
9905 overload_ = b;
9906 return b;
9907 } else {
9908 return (com.google.protobuf.ByteString) ref;
9909 }
9910 }
9911 /**
9912 * <pre>
9913 * Overload identifier, used only to map this to a model-local function.
9914 * </pre>
9915 *
9916 * <code>optional string overload = 8;</code>
9917 * @param value The overload to set.
9918 * @return This builder for chaining.
9919 */
9920 public Builder setOverload(
9921 java.lang.String value) {
9922 if (value == null) { throw new NullPointerException(); }
9923 overload_ = value;
9924 bitField0_ |= 0x00000020;
9925 onChanged();
9926 return this;
9927 }
9928 /**
9929 * <pre>
9930 * Overload identifier, used only to map this to a model-local function.
9931 * </pre>
9932 *
9933 * <code>optional string overload = 8;</code>
9934 * @return This builder for chaining.
9935 */
9936 public Builder clearOverload() {
9937 overload_ = getDefaultInstance().getOverload();
9938 bitField0_ = (bitField0_ & ~0x00000020);
9939 onChanged();
9940 return this;
9941 }
9942 /**
9943 * <pre>
9944 * Overload identifier, used only to map this to a model-local function.
9945 * </pre>
9946 *
9947 * <code>optional string overload = 8;</code>
9948 * @param value The bytes for overload to set.
9949 * @return This builder for chaining.
9950 */
9951 public Builder setOverloadBytes(
9952 com.google.protobuf.ByteString value) {
9953 if (value == null) { throw new NullPointerException(); }
9954 overload_ = value;
9955 bitField0_ |= 0x00000020;
9956 onChanged();
9957 return this;
9958 }
9959
9960 private java.util.List<onnx.OnnxMl.AttributeProto> attribute_ =
9961 java.util.Collections.emptyList();
9962 private void ensureAttributeIsMutable() {
9963 if (!((bitField0_ & 0x00000040) != 0)) {
9964 attribute_ = new java.util.ArrayList<onnx.OnnxMl.AttributeProto>(attribute_);
9965 bitField0_ |= 0x00000040;
9966 }
9967 }
9968
9969 private com.google.protobuf.RepeatedFieldBuilder<
9970 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder> attributeBuilder_;
9971
9972 /**
9973 * <pre>
9974 * Additional named attributes.
9975 * </pre>
9976 *
9977 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
9978 */
9979 public java.util.List<onnx.OnnxMl.AttributeProto> getAttributeList() {
9980 if (attributeBuilder_ == null) {
9981 return java.util.Collections.unmodifiableList(attribute_);
9982 } else {
9983 return attributeBuilder_.getMessageList();
9984 }
9985 }
9986 /**
9987 * <pre>
9988 * Additional named attributes.
9989 * </pre>
9990 *
9991 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
9992 */
9993 public int getAttributeCount() {
9994 if (attributeBuilder_ == null) {
9995 return attribute_.size();
9996 } else {
9997 return attributeBuilder_.getCount();
9998 }
9999 }
10000 /**
10001 * <pre>
10002 * Additional named attributes.
10003 * </pre>
10004 *
10005 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10006 */
10007 public onnx.OnnxMl.AttributeProto getAttribute(int index) {
10008 if (attributeBuilder_ == null) {
10009 return attribute_.get(index);
10010 } else {
10011 return attributeBuilder_.getMessage(index);
10012 }
10013 }
10014 /**
10015 * <pre>
10016 * Additional named attributes.
10017 * </pre>
10018 *
10019 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10020 */
10021 public Builder setAttribute(
10022 int index, onnx.OnnxMl.AttributeProto value) {
10023 if (attributeBuilder_ == null) {
10024 if (value == null) {
10025 throw new NullPointerException();
10026 }
10027 ensureAttributeIsMutable();
10028 attribute_.set(index, value);
10029 onChanged();
10030 } else {
10031 attributeBuilder_.setMessage(index, value);
10032 }
10033 return this;
10034 }
10035 /**
10036 * <pre>
10037 * Additional named attributes.
10038 * </pre>
10039 *
10040 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10041 */
10042 public Builder setAttribute(
10043 int index, onnx.OnnxMl.AttributeProto.Builder builderForValue) {
10044 if (attributeBuilder_ == null) {
10045 ensureAttributeIsMutable();
10046 attribute_.set(index, builderForValue.build());
10047 onChanged();
10048 } else {
10049 attributeBuilder_.setMessage(index, builderForValue.build());
10050 }
10051 return this;
10052 }
10053 /**
10054 * <pre>
10055 * Additional named attributes.
10056 * </pre>
10057 *
10058 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10059 */
10060 public Builder addAttribute(onnx.OnnxMl.AttributeProto value) {
10061 if (attributeBuilder_ == null) {
10062 if (value == null) {
10063 throw new NullPointerException();
10064 }
10065 ensureAttributeIsMutable();
10066 attribute_.add(value);
10067 onChanged();
10068 } else {
10069 attributeBuilder_.addMessage(value);
10070 }
10071 return this;
10072 }
10073 /**
10074 * <pre>
10075 * Additional named attributes.
10076 * </pre>
10077 *
10078 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10079 */
10080 public Builder addAttribute(
10081 int index, onnx.OnnxMl.AttributeProto value) {
10082 if (attributeBuilder_ == null) {
10083 if (value == null) {
10084 throw new NullPointerException();
10085 }
10086 ensureAttributeIsMutable();
10087 attribute_.add(index, value);
10088 onChanged();
10089 } else {
10090 attributeBuilder_.addMessage(index, value);
10091 }
10092 return this;
10093 }
10094 /**
10095 * <pre>
10096 * Additional named attributes.
10097 * </pre>
10098 *
10099 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10100 */
10101 public Builder addAttribute(
10102 onnx.OnnxMl.AttributeProto.Builder builderForValue) {
10103 if (attributeBuilder_ == null) {
10104 ensureAttributeIsMutable();
10105 attribute_.add(builderForValue.build());
10106 onChanged();
10107 } else {
10108 attributeBuilder_.addMessage(builderForValue.build());
10109 }
10110 return this;
10111 }
10112 /**
10113 * <pre>
10114 * Additional named attributes.
10115 * </pre>
10116 *
10117 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10118 */
10119 public Builder addAttribute(
10120 int index, onnx.OnnxMl.AttributeProto.Builder builderForValue) {
10121 if (attributeBuilder_ == null) {
10122 ensureAttributeIsMutable();
10123 attribute_.add(index, builderForValue.build());
10124 onChanged();
10125 } else {
10126 attributeBuilder_.addMessage(index, builderForValue.build());
10127 }
10128 return this;
10129 }
10130 /**
10131 * <pre>
10132 * Additional named attributes.
10133 * </pre>
10134 *
10135 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10136 */
10137 public Builder addAllAttribute(
10138 java.lang.Iterable<? extends onnx.OnnxMl.AttributeProto> values) {
10139 if (attributeBuilder_ == null) {
10140 ensureAttributeIsMutable();
10141 com.google.protobuf.AbstractMessageLite.Builder.addAll(
10142 values, attribute_);
10143 onChanged();
10144 } else {
10145 attributeBuilder_.addAllMessages(values);
10146 }
10147 return this;
10148 }
10149 /**
10150 * <pre>
10151 * Additional named attributes.
10152 * </pre>
10153 *
10154 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10155 */
10156 public Builder clearAttribute() {
10157 if (attributeBuilder_ == null) {
10158 attribute_ = java.util.Collections.emptyList();
10159 bitField0_ = (bitField0_ & ~0x00000040);
10160 onChanged();
10161 } else {
10162 attributeBuilder_.clear();
10163 }
10164 return this;
10165 }
10166 /**
10167 * <pre>
10168 * Additional named attributes.
10169 * </pre>
10170 *
10171 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10172 */
10173 public Builder removeAttribute(int index) {
10174 if (attributeBuilder_ == null) {
10175 ensureAttributeIsMutable();
10176 attribute_.remove(index);
10177 onChanged();
10178 } else {
10179 attributeBuilder_.remove(index);
10180 }
10181 return this;
10182 }
10183 /**
10184 * <pre>
10185 * Additional named attributes.
10186 * </pre>
10187 *
10188 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10189 */
10190 public onnx.OnnxMl.AttributeProto.Builder getAttributeBuilder(
10191 int index) {
10192 return getAttributeFieldBuilder().getBuilder(index);
10193 }
10194 /**
10195 * <pre>
10196 * Additional named attributes.
10197 * </pre>
10198 *
10199 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10200 */
10201 public onnx.OnnxMl.AttributeProtoOrBuilder getAttributeOrBuilder(
10202 int index) {
10203 if (attributeBuilder_ == null) {
10204 return attribute_.get(index); } else {
10205 return attributeBuilder_.getMessageOrBuilder(index);
10206 }
10207 }
10208 /**
10209 * <pre>
10210 * Additional named attributes.
10211 * </pre>
10212 *
10213 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10214 */
10215 public java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
10216 getAttributeOrBuilderList() {
10217 if (attributeBuilder_ != null) {
10218 return attributeBuilder_.getMessageOrBuilderList();
10219 } else {
10220 return java.util.Collections.unmodifiableList(attribute_);
10221 }
10222 }
10223 /**
10224 * <pre>
10225 * Additional named attributes.
10226 * </pre>
10227 *
10228 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10229 */
10230 public onnx.OnnxMl.AttributeProto.Builder addAttributeBuilder() {
10231 return getAttributeFieldBuilder().addBuilder(
10232 onnx.OnnxMl.AttributeProto.getDefaultInstance());
10233 }
10234 /**
10235 * <pre>
10236 * Additional named attributes.
10237 * </pre>
10238 *
10239 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10240 */
10241 public onnx.OnnxMl.AttributeProto.Builder addAttributeBuilder(
10242 int index) {
10243 return getAttributeFieldBuilder().addBuilder(
10244 index, onnx.OnnxMl.AttributeProto.getDefaultInstance());
10245 }
10246 /**
10247 * <pre>
10248 * Additional named attributes.
10249 * </pre>
10250 *
10251 * <code>repeated .onnx.AttributeProto attribute = 5;</code>
10252 */
10253 public java.util.List<onnx.OnnxMl.AttributeProto.Builder>
10254 getAttributeBuilderList() {
10255 return getAttributeFieldBuilder().getBuilderList();
10256 }
10257 private com.google.protobuf.RepeatedFieldBuilder<
10258 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder>
10259 getAttributeFieldBuilder() {
10260 if (attributeBuilder_ == null) {
10261 attributeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
10262 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder>(
10263 attribute_,
10264 ((bitField0_ & 0x00000040) != 0),
10265 getParentForChildren(),
10266 isClean());
10267 attribute_ = null;
10268 }
10269 return attributeBuilder_;
10270 }
10271
10272 private java.lang.Object docString_ = "";
10273 /**
10274 * <pre>
10275 * A human-readable documentation for this node. Markdown is allowed.
10276 * </pre>
10277 *
10278 * <code>optional string doc_string = 6;</code>
10279 * @return Whether the docString field is set.
10280 */
10281 public boolean hasDocString() {
10282 return ((bitField0_ & 0x00000080) != 0);
10283 }
10284 /**
10285 * <pre>
10286 * A human-readable documentation for this node. Markdown is allowed.
10287 * </pre>
10288 *
10289 * <code>optional string doc_string = 6;</code>
10290 * @return The docString.
10291 */
10292 public java.lang.String getDocString() {
10293 java.lang.Object ref = docString_;
10294 if (!(ref instanceof java.lang.String)) {
10295 com.google.protobuf.ByteString bs =
10296 (com.google.protobuf.ByteString) ref;
10297 java.lang.String s = bs.toStringUtf8();
10298 if (bs.isValidUtf8()) {
10299 docString_ = s;
10300 }
10301 return s;
10302 } else {
10303 return (java.lang.String) ref;
10304 }
10305 }
10306 /**
10307 * <pre>
10308 * A human-readable documentation for this node. Markdown is allowed.
10309 * </pre>
10310 *
10311 * <code>optional string doc_string = 6;</code>
10312 * @return The bytes for docString.
10313 */
10314 public com.google.protobuf.ByteString
10315 getDocStringBytes() {
10316 java.lang.Object ref = docString_;
10317 if (ref instanceof String) {
10318 com.google.protobuf.ByteString b =
10319 com.google.protobuf.ByteString.copyFromUtf8(
10320 (java.lang.String) ref);
10321 docString_ = b;
10322 return b;
10323 } else {
10324 return (com.google.protobuf.ByteString) ref;
10325 }
10326 }
10327 /**
10328 * <pre>
10329 * A human-readable documentation for this node. Markdown is allowed.
10330 * </pre>
10331 *
10332 * <code>optional string doc_string = 6;</code>
10333 * @param value The docString to set.
10334 * @return This builder for chaining.
10335 */
10336 public Builder setDocString(
10337 java.lang.String value) {
10338 if (value == null) { throw new NullPointerException(); }
10339 docString_ = value;
10340 bitField0_ |= 0x00000080;
10341 onChanged();
10342 return this;
10343 }
10344 /**
10345 * <pre>
10346 * A human-readable documentation for this node. Markdown is allowed.
10347 * </pre>
10348 *
10349 * <code>optional string doc_string = 6;</code>
10350 * @return This builder for chaining.
10351 */
10352 public Builder clearDocString() {
10353 docString_ = getDefaultInstance().getDocString();
10354 bitField0_ = (bitField0_ & ~0x00000080);
10355 onChanged();
10356 return this;
10357 }
10358 /**
10359 * <pre>
10360 * A human-readable documentation for this node. Markdown is allowed.
10361 * </pre>
10362 *
10363 * <code>optional string doc_string = 6;</code>
10364 * @param value The bytes for docString to set.
10365 * @return This builder for chaining.
10366 */
10367 public Builder setDocStringBytes(
10368 com.google.protobuf.ByteString value) {
10369 if (value == null) { throw new NullPointerException(); }
10370 docString_ = value;
10371 bitField0_ |= 0x00000080;
10372 onChanged();
10373 return this;
10374 }
10375
10376 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
10377 java.util.Collections.emptyList();
10378 private void ensureMetadataPropsIsMutable() {
10379 if (!((bitField0_ & 0x00000100) != 0)) {
10380 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
10381 bitField0_ |= 0x00000100;
10382 }
10383 }
10384
10385 private com.google.protobuf.RepeatedFieldBuilder<
10386 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
10387
10388 /**
10389 * <pre>
10390 * Named metadata values; keys should be distinct.
10391 * </pre>
10392 *
10393 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10394 */
10395 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
10396 if (metadataPropsBuilder_ == null) {
10397 return java.util.Collections.unmodifiableList(metadataProps_);
10398 } else {
10399 return metadataPropsBuilder_.getMessageList();
10400 }
10401 }
10402 /**
10403 * <pre>
10404 * Named metadata values; keys should be distinct.
10405 * </pre>
10406 *
10407 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10408 */
10409 public int getMetadataPropsCount() {
10410 if (metadataPropsBuilder_ == null) {
10411 return metadataProps_.size();
10412 } else {
10413 return metadataPropsBuilder_.getCount();
10414 }
10415 }
10416 /**
10417 * <pre>
10418 * Named metadata values; keys should be distinct.
10419 * </pre>
10420 *
10421 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10422 */
10423 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
10424 if (metadataPropsBuilder_ == null) {
10425 return metadataProps_.get(index);
10426 } else {
10427 return metadataPropsBuilder_.getMessage(index);
10428 }
10429 }
10430 /**
10431 * <pre>
10432 * Named metadata values; keys should be distinct.
10433 * </pre>
10434 *
10435 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10436 */
10437 public Builder setMetadataProps(
10438 int index, onnx.OnnxMl.StringStringEntryProto value) {
10439 if (metadataPropsBuilder_ == null) {
10440 if (value == null) {
10441 throw new NullPointerException();
10442 }
10443 ensureMetadataPropsIsMutable();
10444 metadataProps_.set(index, value);
10445 onChanged();
10446 } else {
10447 metadataPropsBuilder_.setMessage(index, value);
10448 }
10449 return this;
10450 }
10451 /**
10452 * <pre>
10453 * Named metadata values; keys should be distinct.
10454 * </pre>
10455 *
10456 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10457 */
10458 public Builder setMetadataProps(
10459 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
10460 if (metadataPropsBuilder_ == null) {
10461 ensureMetadataPropsIsMutable();
10462 metadataProps_.set(index, builderForValue.build());
10463 onChanged();
10464 } else {
10465 metadataPropsBuilder_.setMessage(index, builderForValue.build());
10466 }
10467 return this;
10468 }
10469 /**
10470 * <pre>
10471 * Named metadata values; keys should be distinct.
10472 * </pre>
10473 *
10474 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10475 */
10476 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
10477 if (metadataPropsBuilder_ == null) {
10478 if (value == null) {
10479 throw new NullPointerException();
10480 }
10481 ensureMetadataPropsIsMutable();
10482 metadataProps_.add(value);
10483 onChanged();
10484 } else {
10485 metadataPropsBuilder_.addMessage(value);
10486 }
10487 return this;
10488 }
10489 /**
10490 * <pre>
10491 * Named metadata values; keys should be distinct.
10492 * </pre>
10493 *
10494 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10495 */
10496 public Builder addMetadataProps(
10497 int index, onnx.OnnxMl.StringStringEntryProto value) {
10498 if (metadataPropsBuilder_ == null) {
10499 if (value == null) {
10500 throw new NullPointerException();
10501 }
10502 ensureMetadataPropsIsMutable();
10503 metadataProps_.add(index, value);
10504 onChanged();
10505 } else {
10506 metadataPropsBuilder_.addMessage(index, value);
10507 }
10508 return this;
10509 }
10510 /**
10511 * <pre>
10512 * Named metadata values; keys should be distinct.
10513 * </pre>
10514 *
10515 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10516 */
10517 public Builder addMetadataProps(
10518 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
10519 if (metadataPropsBuilder_ == null) {
10520 ensureMetadataPropsIsMutable();
10521 metadataProps_.add(builderForValue.build());
10522 onChanged();
10523 } else {
10524 metadataPropsBuilder_.addMessage(builderForValue.build());
10525 }
10526 return this;
10527 }
10528 /**
10529 * <pre>
10530 * Named metadata values; keys should be distinct.
10531 * </pre>
10532 *
10533 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10534 */
10535 public Builder addMetadataProps(
10536 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
10537 if (metadataPropsBuilder_ == null) {
10538 ensureMetadataPropsIsMutable();
10539 metadataProps_.add(index, builderForValue.build());
10540 onChanged();
10541 } else {
10542 metadataPropsBuilder_.addMessage(index, builderForValue.build());
10543 }
10544 return this;
10545 }
10546 /**
10547 * <pre>
10548 * Named metadata values; keys should be distinct.
10549 * </pre>
10550 *
10551 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10552 */
10553 public Builder addAllMetadataProps(
10554 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
10555 if (metadataPropsBuilder_ == null) {
10556 ensureMetadataPropsIsMutable();
10557 com.google.protobuf.AbstractMessageLite.Builder.addAll(
10558 values, metadataProps_);
10559 onChanged();
10560 } else {
10561 metadataPropsBuilder_.addAllMessages(values);
10562 }
10563 return this;
10564 }
10565 /**
10566 * <pre>
10567 * Named metadata values; keys should be distinct.
10568 * </pre>
10569 *
10570 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10571 */
10572 public Builder clearMetadataProps() {
10573 if (metadataPropsBuilder_ == null) {
10574 metadataProps_ = java.util.Collections.emptyList();
10575 bitField0_ = (bitField0_ & ~0x00000100);
10576 onChanged();
10577 } else {
10578 metadataPropsBuilder_.clear();
10579 }
10580 return this;
10581 }
10582 /**
10583 * <pre>
10584 * Named metadata values; keys should be distinct.
10585 * </pre>
10586 *
10587 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10588 */
10589 public Builder removeMetadataProps(int index) {
10590 if (metadataPropsBuilder_ == null) {
10591 ensureMetadataPropsIsMutable();
10592 metadataProps_.remove(index);
10593 onChanged();
10594 } else {
10595 metadataPropsBuilder_.remove(index);
10596 }
10597 return this;
10598 }
10599 /**
10600 * <pre>
10601 * Named metadata values; keys should be distinct.
10602 * </pre>
10603 *
10604 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10605 */
10606 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
10607 int index) {
10608 return getMetadataPropsFieldBuilder().getBuilder(index);
10609 }
10610 /**
10611 * <pre>
10612 * Named metadata values; keys should be distinct.
10613 * </pre>
10614 *
10615 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10616 */
10617 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
10618 int index) {
10619 if (metadataPropsBuilder_ == null) {
10620 return metadataProps_.get(index); } else {
10621 return metadataPropsBuilder_.getMessageOrBuilder(index);
10622 }
10623 }
10624 /**
10625 * <pre>
10626 * Named metadata values; keys should be distinct.
10627 * </pre>
10628 *
10629 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10630 */
10631 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
10632 getMetadataPropsOrBuilderList() {
10633 if (metadataPropsBuilder_ != null) {
10634 return metadataPropsBuilder_.getMessageOrBuilderList();
10635 } else {
10636 return java.util.Collections.unmodifiableList(metadataProps_);
10637 }
10638 }
10639 /**
10640 * <pre>
10641 * Named metadata values; keys should be distinct.
10642 * </pre>
10643 *
10644 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10645 */
10646 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
10647 return getMetadataPropsFieldBuilder().addBuilder(
10648 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
10649 }
10650 /**
10651 * <pre>
10652 * Named metadata values; keys should be distinct.
10653 * </pre>
10654 *
10655 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10656 */
10657 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
10658 int index) {
10659 return getMetadataPropsFieldBuilder().addBuilder(
10660 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
10661 }
10662 /**
10663 * <pre>
10664 * Named metadata values; keys should be distinct.
10665 * </pre>
10666 *
10667 * <code>repeated .onnx.StringStringEntryProto metadata_props = 9;</code>
10668 */
10669 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
10670 getMetadataPropsBuilderList() {
10671 return getMetadataPropsFieldBuilder().getBuilderList();
10672 }
10673 private com.google.protobuf.RepeatedFieldBuilder<
10674 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
10675 getMetadataPropsFieldBuilder() {
10676 if (metadataPropsBuilder_ == null) {
10677 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
10678 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
10679 metadataProps_,
10680 ((bitField0_ & 0x00000100) != 0),
10681 getParentForChildren(),
10682 isClean());
10683 metadataProps_ = null;
10684 }
10685 return metadataPropsBuilder_;
10686 }
10687
10688 // @@protoc_insertion_point(builder_scope:onnx.NodeProto)
10689 }
10690
10691 // @@protoc_insertion_point(class_scope:onnx.NodeProto)
10692 private static final onnx.OnnxMl.NodeProto DEFAULT_INSTANCE;
10693 static {
10694 DEFAULT_INSTANCE = new onnx.OnnxMl.NodeProto();
10695 }
10696
10697 public static onnx.OnnxMl.NodeProto getDefaultInstance() {
10698 return DEFAULT_INSTANCE;
10699 }
10700
10701 private static final com.google.protobuf.Parser<NodeProto>
10702 PARSER = new com.google.protobuf.AbstractParser<NodeProto>() {
10703 @java.lang.Override
10704 public NodeProto parsePartialFrom(
10705 com.google.protobuf.CodedInputStream input,
10706 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10707 throws com.google.protobuf.InvalidProtocolBufferException {
10708 Builder builder = newBuilder();
10709 try {
10710 builder.mergeFrom(input, extensionRegistry);
10711 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
10712 throw e.setUnfinishedMessage(builder.buildPartial());
10713 } catch (com.google.protobuf.UninitializedMessageException e) {
10714 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
10715 } catch (java.io.IOException e) {
10716 throw new com.google.protobuf.InvalidProtocolBufferException(e)
10717 .setUnfinishedMessage(builder.buildPartial());
10718 }
10719 return builder.buildPartial();
10720 }
10721 };
10722
10723 public static com.google.protobuf.Parser<NodeProto> parser() {
10724 return PARSER;
10725 }
10726
10727 @java.lang.Override
10728 public com.google.protobuf.Parser<NodeProto> getParserForType() {
10729 return PARSER;
10730 }
10731
10732 @java.lang.Override
10733 public onnx.OnnxMl.NodeProto getDefaultInstanceForType() {
10734 return DEFAULT_INSTANCE;
10735 }
10736
10737 }
10738
10739 public interface TrainingInfoProtoOrBuilder extends
10740 // @@protoc_insertion_point(interface_extends:onnx.TrainingInfoProto)
10741 com.google.protobuf.MessageOrBuilder {
10742
10743 /**
10744 * <pre>
10745 * This field describes a graph to compute the initial tensors
10746 * upon starting the training process. Initialization graph has no input
10747 * and can have multiple outputs. Usually, trainable tensors in neural
10748 * networks are randomly initialized. To achieve that, for each tensor,
10749 * the user can put a random number operator such as RandomNormal or
10750 * RandomUniform in TrainingInfoProto.initialization.node and assign its
10751 * random output to the specific tensor using "initialization_binding".
10752 * This graph can also set the initializers in "algorithm" in the same
10753 * TrainingInfoProto; a use case is resetting the number of training
10754 * iteration to zero.
10755 *
10756 * By default, this field is an empty graph and its evaluation does not
10757 * produce any output. Thus, no initializer would be changed by default.
10758 * </pre>
10759 *
10760 * <code>optional .onnx.GraphProto initialization = 1;</code>
10761 * @return Whether the initialization field is set.
10762 */
10763 boolean hasInitialization();
10764 /**
10765 * <pre>
10766 * This field describes a graph to compute the initial tensors
10767 * upon starting the training process. Initialization graph has no input
10768 * and can have multiple outputs. Usually, trainable tensors in neural
10769 * networks are randomly initialized. To achieve that, for each tensor,
10770 * the user can put a random number operator such as RandomNormal or
10771 * RandomUniform in TrainingInfoProto.initialization.node and assign its
10772 * random output to the specific tensor using "initialization_binding".
10773 * This graph can also set the initializers in "algorithm" in the same
10774 * TrainingInfoProto; a use case is resetting the number of training
10775 * iteration to zero.
10776 *
10777 * By default, this field is an empty graph and its evaluation does not
10778 * produce any output. Thus, no initializer would be changed by default.
10779 * </pre>
10780 *
10781 * <code>optional .onnx.GraphProto initialization = 1;</code>
10782 * @return The initialization.
10783 */
10784 onnx.OnnxMl.GraphProto getInitialization();
10785 /**
10786 * <pre>
10787 * This field describes a graph to compute the initial tensors
10788 * upon starting the training process. Initialization graph has no input
10789 * and can have multiple outputs. Usually, trainable tensors in neural
10790 * networks are randomly initialized. To achieve that, for each tensor,
10791 * the user can put a random number operator such as RandomNormal or
10792 * RandomUniform in TrainingInfoProto.initialization.node and assign its
10793 * random output to the specific tensor using "initialization_binding".
10794 * This graph can also set the initializers in "algorithm" in the same
10795 * TrainingInfoProto; a use case is resetting the number of training
10796 * iteration to zero.
10797 *
10798 * By default, this field is an empty graph and its evaluation does not
10799 * produce any output. Thus, no initializer would be changed by default.
10800 * </pre>
10801 *
10802 * <code>optional .onnx.GraphProto initialization = 1;</code>
10803 */
10804 onnx.OnnxMl.GraphProtoOrBuilder getInitializationOrBuilder();
10805
10806 /**
10807 * <pre>
10808 * This field represents a training algorithm step. Given required inputs,
10809 * it computes outputs to update initializers in its own or inference graph's
10810 * initializer lists. In general, this field contains loss node, gradient node,
10811 * optimizer node, increment of iteration count.
10812 *
10813 * An execution of the training algorithm step is performed by executing the
10814 * graph obtained by combining the inference graph (namely "ModelProto.graph")
10815 * and the "algorithm" graph. That is, the actual
10816 * input/initializer/output/node/value_info/sparse_initializer list of
10817 * the training graph is the concatenation of
10818 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
10819 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
10820 * in that order. This combined graph must satisfy the normal ONNX conditions.
10821 * Now, let's provide a visualization of graph combination for clarity.
10822 * Let the inference graph (i.e., "ModelProto.graph") be
10823 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
10824 * and the "algorithm" graph be
10825 * tensor_d -> Add -> tensor_e
10826 * The combination process results
10827 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
10828 *
10829 * Notice that an input of a node in the "algorithm" graph may reference the
10830 * output of a node in the inference graph (but not the other way round). Also, inference
10831 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
10832 * can always be run independently without training information.
10833 *
10834 * By default, this field is an empty graph and its evaluation does not
10835 * produce any output. Evaluating the default training step never
10836 * update any initializers.
10837 * </pre>
10838 *
10839 * <code>optional .onnx.GraphProto algorithm = 2;</code>
10840 * @return Whether the algorithm field is set.
10841 */
10842 boolean hasAlgorithm();
10843 /**
10844 * <pre>
10845 * This field represents a training algorithm step. Given required inputs,
10846 * it computes outputs to update initializers in its own or inference graph's
10847 * initializer lists. In general, this field contains loss node, gradient node,
10848 * optimizer node, increment of iteration count.
10849 *
10850 * An execution of the training algorithm step is performed by executing the
10851 * graph obtained by combining the inference graph (namely "ModelProto.graph")
10852 * and the "algorithm" graph. That is, the actual
10853 * input/initializer/output/node/value_info/sparse_initializer list of
10854 * the training graph is the concatenation of
10855 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
10856 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
10857 * in that order. This combined graph must satisfy the normal ONNX conditions.
10858 * Now, let's provide a visualization of graph combination for clarity.
10859 * Let the inference graph (i.e., "ModelProto.graph") be
10860 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
10861 * and the "algorithm" graph be
10862 * tensor_d -> Add -> tensor_e
10863 * The combination process results
10864 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
10865 *
10866 * Notice that an input of a node in the "algorithm" graph may reference the
10867 * output of a node in the inference graph (but not the other way round). Also, inference
10868 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
10869 * can always be run independently without training information.
10870 *
10871 * By default, this field is an empty graph and its evaluation does not
10872 * produce any output. Evaluating the default training step never
10873 * update any initializers.
10874 * </pre>
10875 *
10876 * <code>optional .onnx.GraphProto algorithm = 2;</code>
10877 * @return The algorithm.
10878 */
10879 onnx.OnnxMl.GraphProto getAlgorithm();
10880 /**
10881 * <pre>
10882 * This field represents a training algorithm step. Given required inputs,
10883 * it computes outputs to update initializers in its own or inference graph's
10884 * initializer lists. In general, this field contains loss node, gradient node,
10885 * optimizer node, increment of iteration count.
10886 *
10887 * An execution of the training algorithm step is performed by executing the
10888 * graph obtained by combining the inference graph (namely "ModelProto.graph")
10889 * and the "algorithm" graph. That is, the actual
10890 * input/initializer/output/node/value_info/sparse_initializer list of
10891 * the training graph is the concatenation of
10892 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
10893 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
10894 * in that order. This combined graph must satisfy the normal ONNX conditions.
10895 * Now, let's provide a visualization of graph combination for clarity.
10896 * Let the inference graph (i.e., "ModelProto.graph") be
10897 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
10898 * and the "algorithm" graph be
10899 * tensor_d -> Add -> tensor_e
10900 * The combination process results
10901 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
10902 *
10903 * Notice that an input of a node in the "algorithm" graph may reference the
10904 * output of a node in the inference graph (but not the other way round). Also, inference
10905 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
10906 * can always be run independently without training information.
10907 *
10908 * By default, this field is an empty graph and its evaluation does not
10909 * produce any output. Evaluating the default training step never
10910 * update any initializers.
10911 * </pre>
10912 *
10913 * <code>optional .onnx.GraphProto algorithm = 2;</code>
10914 */
10915 onnx.OnnxMl.GraphProtoOrBuilder getAlgorithmOrBuilder();
10916
10917 /**
10918 * <pre>
10919 * This field specifies the bindings from the outputs of "initialization" to
10920 * some initializers in "ModelProto.graph.initializer" and
10921 * the "algorithm.initializer" in the same TrainingInfoProto.
10922 * See "update_binding" below for details.
10923 *
10924 * By default, this field is empty and no initializer would be changed
10925 * by the execution of "initialization".
10926 * </pre>
10927 *
10928 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
10929 */
10930 java.util.List<onnx.OnnxMl.StringStringEntryProto>
10931 getInitializationBindingList();
10932 /**
10933 * <pre>
10934 * This field specifies the bindings from the outputs of "initialization" to
10935 * some initializers in "ModelProto.graph.initializer" and
10936 * the "algorithm.initializer" in the same TrainingInfoProto.
10937 * See "update_binding" below for details.
10938 *
10939 * By default, this field is empty and no initializer would be changed
10940 * by the execution of "initialization".
10941 * </pre>
10942 *
10943 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
10944 */
10945 onnx.OnnxMl.StringStringEntryProto getInitializationBinding(int index);
10946 /**
10947 * <pre>
10948 * This field specifies the bindings from the outputs of "initialization" to
10949 * some initializers in "ModelProto.graph.initializer" and
10950 * the "algorithm.initializer" in the same TrainingInfoProto.
10951 * See "update_binding" below for details.
10952 *
10953 * By default, this field is empty and no initializer would be changed
10954 * by the execution of "initialization".
10955 * </pre>
10956 *
10957 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
10958 */
10959 int getInitializationBindingCount();
10960 /**
10961 * <pre>
10962 * This field specifies the bindings from the outputs of "initialization" to
10963 * some initializers in "ModelProto.graph.initializer" and
10964 * the "algorithm.initializer" in the same TrainingInfoProto.
10965 * See "update_binding" below for details.
10966 *
10967 * By default, this field is empty and no initializer would be changed
10968 * by the execution of "initialization".
10969 * </pre>
10970 *
10971 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
10972 */
10973 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
10974 getInitializationBindingOrBuilderList();
10975 /**
10976 * <pre>
10977 * This field specifies the bindings from the outputs of "initialization" to
10978 * some initializers in "ModelProto.graph.initializer" and
10979 * the "algorithm.initializer" in the same TrainingInfoProto.
10980 * See "update_binding" below for details.
10981 *
10982 * By default, this field is empty and no initializer would be changed
10983 * by the execution of "initialization".
10984 * </pre>
10985 *
10986 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
10987 */
10988 onnx.OnnxMl.StringStringEntryProtoOrBuilder getInitializationBindingOrBuilder(
10989 int index);
10990
10991 /**
10992 * <pre>
10993 * Gradient-based training is usually an iterative procedure. In one gradient
10994 * descent iteration, we apply
10995 *
10996 * x = x - r * g
10997 *
10998 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
10999 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11000 * into the training graph, we split the update equation into
11001 *
11002 * y = x - r * g
11003 * x = y
11004 *
11005 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11006 * tell that "y" should be assigned to "x", the field "update_binding" may
11007 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11008 * and "y" (value of StringStringEntryProto).
11009 * For a neural network with multiple trainable (mutable) tensors, there can
11010 * be multiple key-value pairs in "update_binding".
11011 *
11012 * The initializers appears as keys in "update_binding" are considered
11013 * mutable variables. This implies some behaviors
11014 * as described below.
11015 *
11016 * 1. We have only unique keys in all "update_binding"s so that two
11017 * variables may not have the same name. This ensures that one
11018 * variable is assigned up to once.
11019 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11020 * "TrainingInfoProto.algorithm.initializer".
11021 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11022 * 4. Mutable variables are initialized to the value specified by the
11023 * corresponding initializer, and then potentially updated by
11024 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11025 *
11026 * This field usually contains names of trainable tensors
11027 * (in ModelProto.graph), optimizer states such as momentums in advanced
11028 * stochastic gradient methods (in TrainingInfoProto.graph),
11029 * and number of training iterations (in TrainingInfoProto.graph).
11030 *
11031 * By default, this field is empty and no initializer would be changed
11032 * by the execution of "algorithm".
11033 * </pre>
11034 *
11035 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11036 */
11037 java.util.List<onnx.OnnxMl.StringStringEntryProto>
11038 getUpdateBindingList();
11039 /**
11040 * <pre>
11041 * Gradient-based training is usually an iterative procedure. In one gradient
11042 * descent iteration, we apply
11043 *
11044 * x = x - r * g
11045 *
11046 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11047 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11048 * into the training graph, we split the update equation into
11049 *
11050 * y = x - r * g
11051 * x = y
11052 *
11053 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11054 * tell that "y" should be assigned to "x", the field "update_binding" may
11055 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11056 * and "y" (value of StringStringEntryProto).
11057 * For a neural network with multiple trainable (mutable) tensors, there can
11058 * be multiple key-value pairs in "update_binding".
11059 *
11060 * The initializers appears as keys in "update_binding" are considered
11061 * mutable variables. This implies some behaviors
11062 * as described below.
11063 *
11064 * 1. We have only unique keys in all "update_binding"s so that two
11065 * variables may not have the same name. This ensures that one
11066 * variable is assigned up to once.
11067 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11068 * "TrainingInfoProto.algorithm.initializer".
11069 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11070 * 4. Mutable variables are initialized to the value specified by the
11071 * corresponding initializer, and then potentially updated by
11072 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11073 *
11074 * This field usually contains names of trainable tensors
11075 * (in ModelProto.graph), optimizer states such as momentums in advanced
11076 * stochastic gradient methods (in TrainingInfoProto.graph),
11077 * and number of training iterations (in TrainingInfoProto.graph).
11078 *
11079 * By default, this field is empty and no initializer would be changed
11080 * by the execution of "algorithm".
11081 * </pre>
11082 *
11083 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11084 */
11085 onnx.OnnxMl.StringStringEntryProto getUpdateBinding(int index);
11086 /**
11087 * <pre>
11088 * Gradient-based training is usually an iterative procedure. In one gradient
11089 * descent iteration, we apply
11090 *
11091 * x = x - r * g
11092 *
11093 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11094 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11095 * into the training graph, we split the update equation into
11096 *
11097 * y = x - r * g
11098 * x = y
11099 *
11100 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11101 * tell that "y" should be assigned to "x", the field "update_binding" may
11102 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11103 * and "y" (value of StringStringEntryProto).
11104 * For a neural network with multiple trainable (mutable) tensors, there can
11105 * be multiple key-value pairs in "update_binding".
11106 *
11107 * The initializers appears as keys in "update_binding" are considered
11108 * mutable variables. This implies some behaviors
11109 * as described below.
11110 *
11111 * 1. We have only unique keys in all "update_binding"s so that two
11112 * variables may not have the same name. This ensures that one
11113 * variable is assigned up to once.
11114 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11115 * "TrainingInfoProto.algorithm.initializer".
11116 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11117 * 4. Mutable variables are initialized to the value specified by the
11118 * corresponding initializer, and then potentially updated by
11119 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11120 *
11121 * This field usually contains names of trainable tensors
11122 * (in ModelProto.graph), optimizer states such as momentums in advanced
11123 * stochastic gradient methods (in TrainingInfoProto.graph),
11124 * and number of training iterations (in TrainingInfoProto.graph).
11125 *
11126 * By default, this field is empty and no initializer would be changed
11127 * by the execution of "algorithm".
11128 * </pre>
11129 *
11130 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11131 */
11132 int getUpdateBindingCount();
11133 /**
11134 * <pre>
11135 * Gradient-based training is usually an iterative procedure. In one gradient
11136 * descent iteration, we apply
11137 *
11138 * x = x - r * g
11139 *
11140 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11141 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11142 * into the training graph, we split the update equation into
11143 *
11144 * y = x - r * g
11145 * x = y
11146 *
11147 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11148 * tell that "y" should be assigned to "x", the field "update_binding" may
11149 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11150 * and "y" (value of StringStringEntryProto).
11151 * For a neural network with multiple trainable (mutable) tensors, there can
11152 * be multiple key-value pairs in "update_binding".
11153 *
11154 * The initializers appears as keys in "update_binding" are considered
11155 * mutable variables. This implies some behaviors
11156 * as described below.
11157 *
11158 * 1. We have only unique keys in all "update_binding"s so that two
11159 * variables may not have the same name. This ensures that one
11160 * variable is assigned up to once.
11161 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11162 * "TrainingInfoProto.algorithm.initializer".
11163 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11164 * 4. Mutable variables are initialized to the value specified by the
11165 * corresponding initializer, and then potentially updated by
11166 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11167 *
11168 * This field usually contains names of trainable tensors
11169 * (in ModelProto.graph), optimizer states such as momentums in advanced
11170 * stochastic gradient methods (in TrainingInfoProto.graph),
11171 * and number of training iterations (in TrainingInfoProto.graph).
11172 *
11173 * By default, this field is empty and no initializer would be changed
11174 * by the execution of "algorithm".
11175 * </pre>
11176 *
11177 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11178 */
11179 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
11180 getUpdateBindingOrBuilderList();
11181 /**
11182 * <pre>
11183 * Gradient-based training is usually an iterative procedure. In one gradient
11184 * descent iteration, we apply
11185 *
11186 * x = x - r * g
11187 *
11188 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11189 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11190 * into the training graph, we split the update equation into
11191 *
11192 * y = x - r * g
11193 * x = y
11194 *
11195 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11196 * tell that "y" should be assigned to "x", the field "update_binding" may
11197 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11198 * and "y" (value of StringStringEntryProto).
11199 * For a neural network with multiple trainable (mutable) tensors, there can
11200 * be multiple key-value pairs in "update_binding".
11201 *
11202 * The initializers appears as keys in "update_binding" are considered
11203 * mutable variables. This implies some behaviors
11204 * as described below.
11205 *
11206 * 1. We have only unique keys in all "update_binding"s so that two
11207 * variables may not have the same name. This ensures that one
11208 * variable is assigned up to once.
11209 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11210 * "TrainingInfoProto.algorithm.initializer".
11211 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11212 * 4. Mutable variables are initialized to the value specified by the
11213 * corresponding initializer, and then potentially updated by
11214 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11215 *
11216 * This field usually contains names of trainable tensors
11217 * (in ModelProto.graph), optimizer states such as momentums in advanced
11218 * stochastic gradient methods (in TrainingInfoProto.graph),
11219 * and number of training iterations (in TrainingInfoProto.graph).
11220 *
11221 * By default, this field is empty and no initializer would be changed
11222 * by the execution of "algorithm".
11223 * </pre>
11224 *
11225 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11226 */
11227 onnx.OnnxMl.StringStringEntryProtoOrBuilder getUpdateBindingOrBuilder(
11228 int index);
11229 }
11230 /**
11231 * <pre>
11232 * Training information
11233 * TrainingInfoProto stores information for training a model.
11234 * In particular, this defines two functionalities: an initialization-step
11235 * and a training-algorithm-step. Initialization resets the model
11236 * back to its original state as if no training has been performed.
11237 * Training algorithm improves the model based on input data.
11238 *
11239 * The semantics of the initialization-step is that the initializers
11240 * in ModelProto.graph and in TrainingInfoProto.algorithm are first
11241 * initialized as specified by the initializers in the graph, and then
11242 * updated by the "initialization_binding" in every instance in
11243 * ModelProto.training_info.
11244 *
11245 * The field "algorithm" defines a computation graph which represents a
11246 * training algorithm's step. After the execution of a
11247 * TrainingInfoProto.algorithm, the initializers specified by "update_binding"
11248 * may be immediately updated. If the targeted training algorithm contains
11249 * consecutive update steps (such as block coordinate descent methods),
11250 * the user needs to create a TrainingInfoProto for each step.
11251 * </pre>
11252 *
11253 * Protobuf type {@code onnx.TrainingInfoProto}
11254 */
11255 public static final class TrainingInfoProto extends
11256 com.google.protobuf.GeneratedMessage implements
11257 // @@protoc_insertion_point(message_implements:onnx.TrainingInfoProto)
11258 TrainingInfoProtoOrBuilder {
11259 private static final long serialVersionUID = 0L;
11260 static {
11261 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
11262 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
11263 /* major= */ 4,
11264 /* minor= */ 29,
11265 /* patch= */ 3,
11266 /* suffix= */ "",
11267 TrainingInfoProto.class.getName());
11268 }
11269 // Use TrainingInfoProto.newBuilder() to construct.
11270 private TrainingInfoProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
11271 super(builder);
11272 }
11273 private TrainingInfoProto() {
11274 initializationBinding_ = java.util.Collections.emptyList();
11275 updateBinding_ = java.util.Collections.emptyList();
11276 }
11277
11278 public static final com.google.protobuf.Descriptors.Descriptor
11279 getDescriptor() {
11280 return onnx.OnnxMl.internal_static_onnx_TrainingInfoProto_descriptor;
11281 }
11282
11283 @java.lang.Override
11284 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
11285 internalGetFieldAccessorTable() {
11286 return onnx.OnnxMl.internal_static_onnx_TrainingInfoProto_fieldAccessorTable
11287 .ensureFieldAccessorsInitialized(
11288 onnx.OnnxMl.TrainingInfoProto.class, onnx.OnnxMl.TrainingInfoProto.Builder.class);
11289 }
11290
11291 private int bitField0_;
11292 public static final int INITIALIZATION_FIELD_NUMBER = 1;
11293 private onnx.OnnxMl.GraphProto initialization_;
11294 /**
11295 * <pre>
11296 * This field describes a graph to compute the initial tensors
11297 * upon starting the training process. Initialization graph has no input
11298 * and can have multiple outputs. Usually, trainable tensors in neural
11299 * networks are randomly initialized. To achieve that, for each tensor,
11300 * the user can put a random number operator such as RandomNormal or
11301 * RandomUniform in TrainingInfoProto.initialization.node and assign its
11302 * random output to the specific tensor using "initialization_binding".
11303 * This graph can also set the initializers in "algorithm" in the same
11304 * TrainingInfoProto; a use case is resetting the number of training
11305 * iteration to zero.
11306 *
11307 * By default, this field is an empty graph and its evaluation does not
11308 * produce any output. Thus, no initializer would be changed by default.
11309 * </pre>
11310 *
11311 * <code>optional .onnx.GraphProto initialization = 1;</code>
11312 * @return Whether the initialization field is set.
11313 */
11314 @java.lang.Override
11315 public boolean hasInitialization() {
11316 return ((bitField0_ & 0x00000001) != 0);
11317 }
11318 /**
11319 * <pre>
11320 * This field describes a graph to compute the initial tensors
11321 * upon starting the training process. Initialization graph has no input
11322 * and can have multiple outputs. Usually, trainable tensors in neural
11323 * networks are randomly initialized. To achieve that, for each tensor,
11324 * the user can put a random number operator such as RandomNormal or
11325 * RandomUniform in TrainingInfoProto.initialization.node and assign its
11326 * random output to the specific tensor using "initialization_binding".
11327 * This graph can also set the initializers in "algorithm" in the same
11328 * TrainingInfoProto; a use case is resetting the number of training
11329 * iteration to zero.
11330 *
11331 * By default, this field is an empty graph and its evaluation does not
11332 * produce any output. Thus, no initializer would be changed by default.
11333 * </pre>
11334 *
11335 * <code>optional .onnx.GraphProto initialization = 1;</code>
11336 * @return The initialization.
11337 */
11338 @java.lang.Override
11339 public onnx.OnnxMl.GraphProto getInitialization() {
11340 return initialization_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : initialization_;
11341 }
11342 /**
11343 * <pre>
11344 * This field describes a graph to compute the initial tensors
11345 * upon starting the training process. Initialization graph has no input
11346 * and can have multiple outputs. Usually, trainable tensors in neural
11347 * networks are randomly initialized. To achieve that, for each tensor,
11348 * the user can put a random number operator such as RandomNormal or
11349 * RandomUniform in TrainingInfoProto.initialization.node and assign its
11350 * random output to the specific tensor using "initialization_binding".
11351 * This graph can also set the initializers in "algorithm" in the same
11352 * TrainingInfoProto; a use case is resetting the number of training
11353 * iteration to zero.
11354 *
11355 * By default, this field is an empty graph and its evaluation does not
11356 * produce any output. Thus, no initializer would be changed by default.
11357 * </pre>
11358 *
11359 * <code>optional .onnx.GraphProto initialization = 1;</code>
11360 */
11361 @java.lang.Override
11362 public onnx.OnnxMl.GraphProtoOrBuilder getInitializationOrBuilder() {
11363 return initialization_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : initialization_;
11364 }
11365
11366 public static final int ALGORITHM_FIELD_NUMBER = 2;
11367 private onnx.OnnxMl.GraphProto algorithm_;
11368 /**
11369 * <pre>
11370 * This field represents a training algorithm step. Given required inputs,
11371 * it computes outputs to update initializers in its own or inference graph's
11372 * initializer lists. In general, this field contains loss node, gradient node,
11373 * optimizer node, increment of iteration count.
11374 *
11375 * An execution of the training algorithm step is performed by executing the
11376 * graph obtained by combining the inference graph (namely "ModelProto.graph")
11377 * and the "algorithm" graph. That is, the actual
11378 * input/initializer/output/node/value_info/sparse_initializer list of
11379 * the training graph is the concatenation of
11380 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
11381 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
11382 * in that order. This combined graph must satisfy the normal ONNX conditions.
11383 * Now, let's provide a visualization of graph combination for clarity.
11384 * Let the inference graph (i.e., "ModelProto.graph") be
11385 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
11386 * and the "algorithm" graph be
11387 * tensor_d -> Add -> tensor_e
11388 * The combination process results
11389 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
11390 *
11391 * Notice that an input of a node in the "algorithm" graph may reference the
11392 * output of a node in the inference graph (but not the other way round). Also, inference
11393 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
11394 * can always be run independently without training information.
11395 *
11396 * By default, this field is an empty graph and its evaluation does not
11397 * produce any output. Evaluating the default training step never
11398 * update any initializers.
11399 * </pre>
11400 *
11401 * <code>optional .onnx.GraphProto algorithm = 2;</code>
11402 * @return Whether the algorithm field is set.
11403 */
11404 @java.lang.Override
11405 public boolean hasAlgorithm() {
11406 return ((bitField0_ & 0x00000002) != 0);
11407 }
11408 /**
11409 * <pre>
11410 * This field represents a training algorithm step. Given required inputs,
11411 * it computes outputs to update initializers in its own or inference graph's
11412 * initializer lists. In general, this field contains loss node, gradient node,
11413 * optimizer node, increment of iteration count.
11414 *
11415 * An execution of the training algorithm step is performed by executing the
11416 * graph obtained by combining the inference graph (namely "ModelProto.graph")
11417 * and the "algorithm" graph. That is, the actual
11418 * input/initializer/output/node/value_info/sparse_initializer list of
11419 * the training graph is the concatenation of
11420 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
11421 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
11422 * in that order. This combined graph must satisfy the normal ONNX conditions.
11423 * Now, let's provide a visualization of graph combination for clarity.
11424 * Let the inference graph (i.e., "ModelProto.graph") be
11425 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
11426 * and the "algorithm" graph be
11427 * tensor_d -> Add -> tensor_e
11428 * The combination process results
11429 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
11430 *
11431 * Notice that an input of a node in the "algorithm" graph may reference the
11432 * output of a node in the inference graph (but not the other way round). Also, inference
11433 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
11434 * can always be run independently without training information.
11435 *
11436 * By default, this field is an empty graph and its evaluation does not
11437 * produce any output. Evaluating the default training step never
11438 * update any initializers.
11439 * </pre>
11440 *
11441 * <code>optional .onnx.GraphProto algorithm = 2;</code>
11442 * @return The algorithm.
11443 */
11444 @java.lang.Override
11445 public onnx.OnnxMl.GraphProto getAlgorithm() {
11446 return algorithm_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : algorithm_;
11447 }
11448 /**
11449 * <pre>
11450 * This field represents a training algorithm step. Given required inputs,
11451 * it computes outputs to update initializers in its own or inference graph's
11452 * initializer lists. In general, this field contains loss node, gradient node,
11453 * optimizer node, increment of iteration count.
11454 *
11455 * An execution of the training algorithm step is performed by executing the
11456 * graph obtained by combining the inference graph (namely "ModelProto.graph")
11457 * and the "algorithm" graph. That is, the actual
11458 * input/initializer/output/node/value_info/sparse_initializer list of
11459 * the training graph is the concatenation of
11460 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
11461 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
11462 * in that order. This combined graph must satisfy the normal ONNX conditions.
11463 * Now, let's provide a visualization of graph combination for clarity.
11464 * Let the inference graph (i.e., "ModelProto.graph") be
11465 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
11466 * and the "algorithm" graph be
11467 * tensor_d -> Add -> tensor_e
11468 * The combination process results
11469 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
11470 *
11471 * Notice that an input of a node in the "algorithm" graph may reference the
11472 * output of a node in the inference graph (but not the other way round). Also, inference
11473 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
11474 * can always be run independently without training information.
11475 *
11476 * By default, this field is an empty graph and its evaluation does not
11477 * produce any output. Evaluating the default training step never
11478 * update any initializers.
11479 * </pre>
11480 *
11481 * <code>optional .onnx.GraphProto algorithm = 2;</code>
11482 */
11483 @java.lang.Override
11484 public onnx.OnnxMl.GraphProtoOrBuilder getAlgorithmOrBuilder() {
11485 return algorithm_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : algorithm_;
11486 }
11487
11488 public static final int INITIALIZATION_BINDING_FIELD_NUMBER = 3;
11489 @SuppressWarnings("serial")
11490 private java.util.List<onnx.OnnxMl.StringStringEntryProto> initializationBinding_;
11491 /**
11492 * <pre>
11493 * This field specifies the bindings from the outputs of "initialization" to
11494 * some initializers in "ModelProto.graph.initializer" and
11495 * the "algorithm.initializer" in the same TrainingInfoProto.
11496 * See "update_binding" below for details.
11497 *
11498 * By default, this field is empty and no initializer would be changed
11499 * by the execution of "initialization".
11500 * </pre>
11501 *
11502 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
11503 */
11504 @java.lang.Override
11505 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getInitializationBindingList() {
11506 return initializationBinding_;
11507 }
11508 /**
11509 * <pre>
11510 * This field specifies the bindings from the outputs of "initialization" to
11511 * some initializers in "ModelProto.graph.initializer" and
11512 * the "algorithm.initializer" in the same TrainingInfoProto.
11513 * See "update_binding" below for details.
11514 *
11515 * By default, this field is empty and no initializer would be changed
11516 * by the execution of "initialization".
11517 * </pre>
11518 *
11519 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
11520 */
11521 @java.lang.Override
11522 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
11523 getInitializationBindingOrBuilderList() {
11524 return initializationBinding_;
11525 }
11526 /**
11527 * <pre>
11528 * This field specifies the bindings from the outputs of "initialization" to
11529 * some initializers in "ModelProto.graph.initializer" and
11530 * the "algorithm.initializer" in the same TrainingInfoProto.
11531 * See "update_binding" below for details.
11532 *
11533 * By default, this field is empty and no initializer would be changed
11534 * by the execution of "initialization".
11535 * </pre>
11536 *
11537 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
11538 */
11539 @java.lang.Override
11540 public int getInitializationBindingCount() {
11541 return initializationBinding_.size();
11542 }
11543 /**
11544 * <pre>
11545 * This field specifies the bindings from the outputs of "initialization" to
11546 * some initializers in "ModelProto.graph.initializer" and
11547 * the "algorithm.initializer" in the same TrainingInfoProto.
11548 * See "update_binding" below for details.
11549 *
11550 * By default, this field is empty and no initializer would be changed
11551 * by the execution of "initialization".
11552 * </pre>
11553 *
11554 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
11555 */
11556 @java.lang.Override
11557 public onnx.OnnxMl.StringStringEntryProto getInitializationBinding(int index) {
11558 return initializationBinding_.get(index);
11559 }
11560 /**
11561 * <pre>
11562 * This field specifies the bindings from the outputs of "initialization" to
11563 * some initializers in "ModelProto.graph.initializer" and
11564 * the "algorithm.initializer" in the same TrainingInfoProto.
11565 * See "update_binding" below for details.
11566 *
11567 * By default, this field is empty and no initializer would be changed
11568 * by the execution of "initialization".
11569 * </pre>
11570 *
11571 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
11572 */
11573 @java.lang.Override
11574 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getInitializationBindingOrBuilder(
11575 int index) {
11576 return initializationBinding_.get(index);
11577 }
11578
11579 public static final int UPDATE_BINDING_FIELD_NUMBER = 4;
11580 @SuppressWarnings("serial")
11581 private java.util.List<onnx.OnnxMl.StringStringEntryProto> updateBinding_;
11582 /**
11583 * <pre>
11584 * Gradient-based training is usually an iterative procedure. In one gradient
11585 * descent iteration, we apply
11586 *
11587 * x = x - r * g
11588 *
11589 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11590 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11591 * into the training graph, we split the update equation into
11592 *
11593 * y = x - r * g
11594 * x = y
11595 *
11596 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11597 * tell that "y" should be assigned to "x", the field "update_binding" may
11598 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11599 * and "y" (value of StringStringEntryProto).
11600 * For a neural network with multiple trainable (mutable) tensors, there can
11601 * be multiple key-value pairs in "update_binding".
11602 *
11603 * The initializers appears as keys in "update_binding" are considered
11604 * mutable variables. This implies some behaviors
11605 * as described below.
11606 *
11607 * 1. We have only unique keys in all "update_binding"s so that two
11608 * variables may not have the same name. This ensures that one
11609 * variable is assigned up to once.
11610 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11611 * "TrainingInfoProto.algorithm.initializer".
11612 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11613 * 4. Mutable variables are initialized to the value specified by the
11614 * corresponding initializer, and then potentially updated by
11615 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11616 *
11617 * This field usually contains names of trainable tensors
11618 * (in ModelProto.graph), optimizer states such as momentums in advanced
11619 * stochastic gradient methods (in TrainingInfoProto.graph),
11620 * and number of training iterations (in TrainingInfoProto.graph).
11621 *
11622 * By default, this field is empty and no initializer would be changed
11623 * by the execution of "algorithm".
11624 * </pre>
11625 *
11626 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11627 */
11628 @java.lang.Override
11629 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getUpdateBindingList() {
11630 return updateBinding_;
11631 }
11632 /**
11633 * <pre>
11634 * Gradient-based training is usually an iterative procedure. In one gradient
11635 * descent iteration, we apply
11636 *
11637 * x = x - r * g
11638 *
11639 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11640 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11641 * into the training graph, we split the update equation into
11642 *
11643 * y = x - r * g
11644 * x = y
11645 *
11646 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11647 * tell that "y" should be assigned to "x", the field "update_binding" may
11648 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11649 * and "y" (value of StringStringEntryProto).
11650 * For a neural network with multiple trainable (mutable) tensors, there can
11651 * be multiple key-value pairs in "update_binding".
11652 *
11653 * The initializers appears as keys in "update_binding" are considered
11654 * mutable variables. This implies some behaviors
11655 * as described below.
11656 *
11657 * 1. We have only unique keys in all "update_binding"s so that two
11658 * variables may not have the same name. This ensures that one
11659 * variable is assigned up to once.
11660 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11661 * "TrainingInfoProto.algorithm.initializer".
11662 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11663 * 4. Mutable variables are initialized to the value specified by the
11664 * corresponding initializer, and then potentially updated by
11665 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11666 *
11667 * This field usually contains names of trainable tensors
11668 * (in ModelProto.graph), optimizer states such as momentums in advanced
11669 * stochastic gradient methods (in TrainingInfoProto.graph),
11670 * and number of training iterations (in TrainingInfoProto.graph).
11671 *
11672 * By default, this field is empty and no initializer would be changed
11673 * by the execution of "algorithm".
11674 * </pre>
11675 *
11676 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11677 */
11678 @java.lang.Override
11679 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
11680 getUpdateBindingOrBuilderList() {
11681 return updateBinding_;
11682 }
11683 /**
11684 * <pre>
11685 * Gradient-based training is usually an iterative procedure. In one gradient
11686 * descent iteration, we apply
11687 *
11688 * x = x - r * g
11689 *
11690 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11691 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11692 * into the training graph, we split the update equation into
11693 *
11694 * y = x - r * g
11695 * x = y
11696 *
11697 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11698 * tell that "y" should be assigned to "x", the field "update_binding" may
11699 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11700 * and "y" (value of StringStringEntryProto).
11701 * For a neural network with multiple trainable (mutable) tensors, there can
11702 * be multiple key-value pairs in "update_binding".
11703 *
11704 * The initializers appears as keys in "update_binding" are considered
11705 * mutable variables. This implies some behaviors
11706 * as described below.
11707 *
11708 * 1. We have only unique keys in all "update_binding"s so that two
11709 * variables may not have the same name. This ensures that one
11710 * variable is assigned up to once.
11711 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11712 * "TrainingInfoProto.algorithm.initializer".
11713 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11714 * 4. Mutable variables are initialized to the value specified by the
11715 * corresponding initializer, and then potentially updated by
11716 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11717 *
11718 * This field usually contains names of trainable tensors
11719 * (in ModelProto.graph), optimizer states such as momentums in advanced
11720 * stochastic gradient methods (in TrainingInfoProto.graph),
11721 * and number of training iterations (in TrainingInfoProto.graph).
11722 *
11723 * By default, this field is empty and no initializer would be changed
11724 * by the execution of "algorithm".
11725 * </pre>
11726 *
11727 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11728 */
11729 @java.lang.Override
11730 public int getUpdateBindingCount() {
11731 return updateBinding_.size();
11732 }
11733 /**
11734 * <pre>
11735 * Gradient-based training is usually an iterative procedure. In one gradient
11736 * descent iteration, we apply
11737 *
11738 * x = x - r * g
11739 *
11740 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11741 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11742 * into the training graph, we split the update equation into
11743 *
11744 * y = x - r * g
11745 * x = y
11746 *
11747 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11748 * tell that "y" should be assigned to "x", the field "update_binding" may
11749 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11750 * and "y" (value of StringStringEntryProto).
11751 * For a neural network with multiple trainable (mutable) tensors, there can
11752 * be multiple key-value pairs in "update_binding".
11753 *
11754 * The initializers appears as keys in "update_binding" are considered
11755 * mutable variables. This implies some behaviors
11756 * as described below.
11757 *
11758 * 1. We have only unique keys in all "update_binding"s so that two
11759 * variables may not have the same name. This ensures that one
11760 * variable is assigned up to once.
11761 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11762 * "TrainingInfoProto.algorithm.initializer".
11763 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11764 * 4. Mutable variables are initialized to the value specified by the
11765 * corresponding initializer, and then potentially updated by
11766 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11767 *
11768 * This field usually contains names of trainable tensors
11769 * (in ModelProto.graph), optimizer states such as momentums in advanced
11770 * stochastic gradient methods (in TrainingInfoProto.graph),
11771 * and number of training iterations (in TrainingInfoProto.graph).
11772 *
11773 * By default, this field is empty and no initializer would be changed
11774 * by the execution of "algorithm".
11775 * </pre>
11776 *
11777 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11778 */
11779 @java.lang.Override
11780 public onnx.OnnxMl.StringStringEntryProto getUpdateBinding(int index) {
11781 return updateBinding_.get(index);
11782 }
11783 /**
11784 * <pre>
11785 * Gradient-based training is usually an iterative procedure. In one gradient
11786 * descent iteration, we apply
11787 *
11788 * x = x - r * g
11789 *
11790 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
11791 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
11792 * into the training graph, we split the update equation into
11793 *
11794 * y = x - r * g
11795 * x = y
11796 *
11797 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
11798 * tell that "y" should be assigned to "x", the field "update_binding" may
11799 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
11800 * and "y" (value of StringStringEntryProto).
11801 * For a neural network with multiple trainable (mutable) tensors, there can
11802 * be multiple key-value pairs in "update_binding".
11803 *
11804 * The initializers appears as keys in "update_binding" are considered
11805 * mutable variables. This implies some behaviors
11806 * as described below.
11807 *
11808 * 1. We have only unique keys in all "update_binding"s so that two
11809 * variables may not have the same name. This ensures that one
11810 * variable is assigned up to once.
11811 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
11812 * "TrainingInfoProto.algorithm.initializer".
11813 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
11814 * 4. Mutable variables are initialized to the value specified by the
11815 * corresponding initializer, and then potentially updated by
11816 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
11817 *
11818 * This field usually contains names of trainable tensors
11819 * (in ModelProto.graph), optimizer states such as momentums in advanced
11820 * stochastic gradient methods (in TrainingInfoProto.graph),
11821 * and number of training iterations (in TrainingInfoProto.graph).
11822 *
11823 * By default, this field is empty and no initializer would be changed
11824 * by the execution of "algorithm".
11825 * </pre>
11826 *
11827 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
11828 */
11829 @java.lang.Override
11830 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getUpdateBindingOrBuilder(
11831 int index) {
11832 return updateBinding_.get(index);
11833 }
11834
11835 private byte memoizedIsInitialized = -1;
11836 @java.lang.Override
11837 public final boolean isInitialized() {
11838 byte isInitialized = memoizedIsInitialized;
11839 if (isInitialized == 1) return true;
11840 if (isInitialized == 0) return false;
11841
11842 memoizedIsInitialized = 1;
11843 return true;
11844 }
11845
11846 @java.lang.Override
11847 public void writeTo(com.google.protobuf.CodedOutputStream output)
11848 throws java.io.IOException {
11849 if (((bitField0_ & 0x00000001) != 0)) {
11850 output.writeMessage(1, getInitialization());
11851 }
11852 if (((bitField0_ & 0x00000002) != 0)) {
11853 output.writeMessage(2, getAlgorithm());
11854 }
11855 for (int i = 0; i < initializationBinding_.size(); i++) {
11856 output.writeMessage(3, initializationBinding_.get(i));
11857 }
11858 for (int i = 0; i < updateBinding_.size(); i++) {
11859 output.writeMessage(4, updateBinding_.get(i));
11860 }
11861 getUnknownFields().writeTo(output);
11862 }
11863
11864 @java.lang.Override
11865 public int getSerializedSize() {
11866 int size = memoizedSize;
11867 if (size != -1) return size;
11868
11869 size = 0;
11870 if (((bitField0_ & 0x00000001) != 0)) {
11871 size += com.google.protobuf.CodedOutputStream
11872 .computeMessageSize(1, getInitialization());
11873 }
11874 if (((bitField0_ & 0x00000002) != 0)) {
11875 size += com.google.protobuf.CodedOutputStream
11876 .computeMessageSize(2, getAlgorithm());
11877 }
11878 for (int i = 0; i < initializationBinding_.size(); i++) {
11879 size += com.google.protobuf.CodedOutputStream
11880 .computeMessageSize(3, initializationBinding_.get(i));
11881 }
11882 for (int i = 0; i < updateBinding_.size(); i++) {
11883 size += com.google.protobuf.CodedOutputStream
11884 .computeMessageSize(4, updateBinding_.get(i));
11885 }
11886 size += getUnknownFields().getSerializedSize();
11887 memoizedSize = size;
11888 return size;
11889 }
11890
11891 @java.lang.Override
11892 public boolean equals(final java.lang.Object obj) {
11893 if (obj == this) {
11894 return true;
11895 }
11896 if (!(obj instanceof onnx.OnnxMl.TrainingInfoProto)) {
11897 return super.equals(obj);
11898 }
11899 onnx.OnnxMl.TrainingInfoProto other = (onnx.OnnxMl.TrainingInfoProto) obj;
11900
11901 if (hasInitialization() != other.hasInitialization()) return false;
11902 if (hasInitialization()) {
11903 if (!getInitialization()
11904 .equals(other.getInitialization())) return false;
11905 }
11906 if (hasAlgorithm() != other.hasAlgorithm()) return false;
11907 if (hasAlgorithm()) {
11908 if (!getAlgorithm()
11909 .equals(other.getAlgorithm())) return false;
11910 }
11911 if (!getInitializationBindingList()
11912 .equals(other.getInitializationBindingList())) return false;
11913 if (!getUpdateBindingList()
11914 .equals(other.getUpdateBindingList())) return false;
11915 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
11916 return true;
11917 }
11918
11919 @java.lang.Override
11920 public int hashCode() {
11921 if (memoizedHashCode != 0) {
11922 return memoizedHashCode;
11923 }
11924 int hash = 41;
11925 hash = (19 * hash) + getDescriptor().hashCode();
11926 if (hasInitialization()) {
11927 hash = (37 * hash) + INITIALIZATION_FIELD_NUMBER;
11928 hash = (53 * hash) + getInitialization().hashCode();
11929 }
11930 if (hasAlgorithm()) {
11931 hash = (37 * hash) + ALGORITHM_FIELD_NUMBER;
11932 hash = (53 * hash) + getAlgorithm().hashCode();
11933 }
11934 if (getInitializationBindingCount() > 0) {
11935 hash = (37 * hash) + INITIALIZATION_BINDING_FIELD_NUMBER;
11936 hash = (53 * hash) + getInitializationBindingList().hashCode();
11937 }
11938 if (getUpdateBindingCount() > 0) {
11939 hash = (37 * hash) + UPDATE_BINDING_FIELD_NUMBER;
11940 hash = (53 * hash) + getUpdateBindingList().hashCode();
11941 }
11942 hash = (29 * hash) + getUnknownFields().hashCode();
11943 memoizedHashCode = hash;
11944 return hash;
11945 }
11946
11947 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11948 java.nio.ByteBuffer data)
11949 throws com.google.protobuf.InvalidProtocolBufferException {
11950 return PARSER.parseFrom(data);
11951 }
11952 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11953 java.nio.ByteBuffer data,
11954 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11955 throws com.google.protobuf.InvalidProtocolBufferException {
11956 return PARSER.parseFrom(data, extensionRegistry);
11957 }
11958 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11959 com.google.protobuf.ByteString data)
11960 throws com.google.protobuf.InvalidProtocolBufferException {
11961 return PARSER.parseFrom(data);
11962 }
11963 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11964 com.google.protobuf.ByteString data,
11965 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11966 throws com.google.protobuf.InvalidProtocolBufferException {
11967 return PARSER.parseFrom(data, extensionRegistry);
11968 }
11969 public static onnx.OnnxMl.TrainingInfoProto parseFrom(byte[] data)
11970 throws com.google.protobuf.InvalidProtocolBufferException {
11971 return PARSER.parseFrom(data);
11972 }
11973 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11974 byte[] data,
11975 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11976 throws com.google.protobuf.InvalidProtocolBufferException {
11977 return PARSER.parseFrom(data, extensionRegistry);
11978 }
11979 public static onnx.OnnxMl.TrainingInfoProto parseFrom(java.io.InputStream input)
11980 throws java.io.IOException {
11981 return com.google.protobuf.GeneratedMessage
11982 .parseWithIOException(PARSER, input);
11983 }
11984 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
11985 java.io.InputStream input,
11986 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11987 throws java.io.IOException {
11988 return com.google.protobuf.GeneratedMessage
11989 .parseWithIOException(PARSER, input, extensionRegistry);
11990 }
11991
11992 public static onnx.OnnxMl.TrainingInfoProto parseDelimitedFrom(java.io.InputStream input)
11993 throws java.io.IOException {
11994 return com.google.protobuf.GeneratedMessage
11995 .parseDelimitedWithIOException(PARSER, input);
11996 }
11997
11998 public static onnx.OnnxMl.TrainingInfoProto parseDelimitedFrom(
11999 java.io.InputStream input,
12000 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12001 throws java.io.IOException {
12002 return com.google.protobuf.GeneratedMessage
12003 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
12004 }
12005 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
12006 com.google.protobuf.CodedInputStream input)
12007 throws java.io.IOException {
12008 return com.google.protobuf.GeneratedMessage
12009 .parseWithIOException(PARSER, input);
12010 }
12011 public static onnx.OnnxMl.TrainingInfoProto parseFrom(
12012 com.google.protobuf.CodedInputStream input,
12013 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12014 throws java.io.IOException {
12015 return com.google.protobuf.GeneratedMessage
12016 .parseWithIOException(PARSER, input, extensionRegistry);
12017 }
12018
12019 @java.lang.Override
12020 public Builder newBuilderForType() { return newBuilder(); }
12021 public static Builder newBuilder() {
12022 return DEFAULT_INSTANCE.toBuilder();
12023 }
12024 public static Builder newBuilder(onnx.OnnxMl.TrainingInfoProto prototype) {
12025 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
12026 }
12027 @java.lang.Override
12028 public Builder toBuilder() {
12029 return this == DEFAULT_INSTANCE
12030 ? new Builder() : new Builder().mergeFrom(this);
12031 }
12032
12033 @java.lang.Override
12034 protected Builder newBuilderForType(
12035 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
12036 Builder builder = new Builder(parent);
12037 return builder;
12038 }
12039 /**
12040 * <pre>
12041 * Training information
12042 * TrainingInfoProto stores information for training a model.
12043 * In particular, this defines two functionalities: an initialization-step
12044 * and a training-algorithm-step. Initialization resets the model
12045 * back to its original state as if no training has been performed.
12046 * Training algorithm improves the model based on input data.
12047 *
12048 * The semantics of the initialization-step is that the initializers
12049 * in ModelProto.graph and in TrainingInfoProto.algorithm are first
12050 * initialized as specified by the initializers in the graph, and then
12051 * updated by the "initialization_binding" in every instance in
12052 * ModelProto.training_info.
12053 *
12054 * The field "algorithm" defines a computation graph which represents a
12055 * training algorithm's step. After the execution of a
12056 * TrainingInfoProto.algorithm, the initializers specified by "update_binding"
12057 * may be immediately updated. If the targeted training algorithm contains
12058 * consecutive update steps (such as block coordinate descent methods),
12059 * the user needs to create a TrainingInfoProto for each step.
12060 * </pre>
12061 *
12062 * Protobuf type {@code onnx.TrainingInfoProto}
12063 */
12064 public static final class Builder extends
12065 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
12066 // @@protoc_insertion_point(builder_implements:onnx.TrainingInfoProto)
12067 onnx.OnnxMl.TrainingInfoProtoOrBuilder {
12068 public static final com.google.protobuf.Descriptors.Descriptor
12069 getDescriptor() {
12070 return onnx.OnnxMl.internal_static_onnx_TrainingInfoProto_descriptor;
12071 }
12072
12073 @java.lang.Override
12074 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
12075 internalGetFieldAccessorTable() {
12076 return onnx.OnnxMl.internal_static_onnx_TrainingInfoProto_fieldAccessorTable
12077 .ensureFieldAccessorsInitialized(
12078 onnx.OnnxMl.TrainingInfoProto.class, onnx.OnnxMl.TrainingInfoProto.Builder.class);
12079 }
12080
12081 // Construct using onnx.OnnxMl.TrainingInfoProto.newBuilder()
12082 private Builder() {
12083 maybeForceBuilderInitialization();
12084 }
12085
12086 private Builder(
12087 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
12088 super(parent);
12089 maybeForceBuilderInitialization();
12090 }
12091 private void maybeForceBuilderInitialization() {
12092 if (com.google.protobuf.GeneratedMessage
12093 .alwaysUseFieldBuilders) {
12094 getInitializationFieldBuilder();
12095 getAlgorithmFieldBuilder();
12096 getInitializationBindingFieldBuilder();
12097 getUpdateBindingFieldBuilder();
12098 }
12099 }
12100 @java.lang.Override
12101 public Builder clear() {
12102 super.clear();
12103 bitField0_ = 0;
12104 initialization_ = null;
12105 if (initializationBuilder_ != null) {
12106 initializationBuilder_.dispose();
12107 initializationBuilder_ = null;
12108 }
12109 algorithm_ = null;
12110 if (algorithmBuilder_ != null) {
12111 algorithmBuilder_.dispose();
12112 algorithmBuilder_ = null;
12113 }
12114 if (initializationBindingBuilder_ == null) {
12115 initializationBinding_ = java.util.Collections.emptyList();
12116 } else {
12117 initializationBinding_ = null;
12118 initializationBindingBuilder_.clear();
12119 }
12120 bitField0_ = (bitField0_ & ~0x00000004);
12121 if (updateBindingBuilder_ == null) {
12122 updateBinding_ = java.util.Collections.emptyList();
12123 } else {
12124 updateBinding_ = null;
12125 updateBindingBuilder_.clear();
12126 }
12127 bitField0_ = (bitField0_ & ~0x00000008);
12128 return this;
12129 }
12130
12131 @java.lang.Override
12132 public com.google.protobuf.Descriptors.Descriptor
12133 getDescriptorForType() {
12134 return onnx.OnnxMl.internal_static_onnx_TrainingInfoProto_descriptor;
12135 }
12136
12137 @java.lang.Override
12138 public onnx.OnnxMl.TrainingInfoProto getDefaultInstanceForType() {
12139 return onnx.OnnxMl.TrainingInfoProto.getDefaultInstance();
12140 }
12141
12142 @java.lang.Override
12143 public onnx.OnnxMl.TrainingInfoProto build() {
12144 onnx.OnnxMl.TrainingInfoProto result = buildPartial();
12145 if (!result.isInitialized()) {
12146 throw newUninitializedMessageException(result);
12147 }
12148 return result;
12149 }
12150
12151 @java.lang.Override
12152 public onnx.OnnxMl.TrainingInfoProto buildPartial() {
12153 onnx.OnnxMl.TrainingInfoProto result = new onnx.OnnxMl.TrainingInfoProto(this);
12154 buildPartialRepeatedFields(result);
12155 if (bitField0_ != 0) { buildPartial0(result); }
12156 onBuilt();
12157 return result;
12158 }
12159
12160 private void buildPartialRepeatedFields(onnx.OnnxMl.TrainingInfoProto result) {
12161 if (initializationBindingBuilder_ == null) {
12162 if (((bitField0_ & 0x00000004) != 0)) {
12163 initializationBinding_ = java.util.Collections.unmodifiableList(initializationBinding_);
12164 bitField0_ = (bitField0_ & ~0x00000004);
12165 }
12166 result.initializationBinding_ = initializationBinding_;
12167 } else {
12168 result.initializationBinding_ = initializationBindingBuilder_.build();
12169 }
12170 if (updateBindingBuilder_ == null) {
12171 if (((bitField0_ & 0x00000008) != 0)) {
12172 updateBinding_ = java.util.Collections.unmodifiableList(updateBinding_);
12173 bitField0_ = (bitField0_ & ~0x00000008);
12174 }
12175 result.updateBinding_ = updateBinding_;
12176 } else {
12177 result.updateBinding_ = updateBindingBuilder_.build();
12178 }
12179 }
12180
12181 private void buildPartial0(onnx.OnnxMl.TrainingInfoProto result) {
12182 int from_bitField0_ = bitField0_;
12183 int to_bitField0_ = 0;
12184 if (((from_bitField0_ & 0x00000001) != 0)) {
12185 result.initialization_ = initializationBuilder_ == null
12186 ? initialization_
12187 : initializationBuilder_.build();
12188 to_bitField0_ |= 0x00000001;
12189 }
12190 if (((from_bitField0_ & 0x00000002) != 0)) {
12191 result.algorithm_ = algorithmBuilder_ == null
12192 ? algorithm_
12193 : algorithmBuilder_.build();
12194 to_bitField0_ |= 0x00000002;
12195 }
12196 result.bitField0_ |= to_bitField0_;
12197 }
12198
12199 @java.lang.Override
12200 public Builder mergeFrom(com.google.protobuf.Message other) {
12201 if (other instanceof onnx.OnnxMl.TrainingInfoProto) {
12202 return mergeFrom((onnx.OnnxMl.TrainingInfoProto)other);
12203 } else {
12204 super.mergeFrom(other);
12205 return this;
12206 }
12207 }
12208
12209 public Builder mergeFrom(onnx.OnnxMl.TrainingInfoProto other) {
12210 if (other == onnx.OnnxMl.TrainingInfoProto.getDefaultInstance()) return this;
12211 if (other.hasInitialization()) {
12212 mergeInitialization(other.getInitialization());
12213 }
12214 if (other.hasAlgorithm()) {
12215 mergeAlgorithm(other.getAlgorithm());
12216 }
12217 if (initializationBindingBuilder_ == null) {
12218 if (!other.initializationBinding_.isEmpty()) {
12219 if (initializationBinding_.isEmpty()) {
12220 initializationBinding_ = other.initializationBinding_;
12221 bitField0_ = (bitField0_ & ~0x00000004);
12222 } else {
12223 ensureInitializationBindingIsMutable();
12224 initializationBinding_.addAll(other.initializationBinding_);
12225 }
12226 onChanged();
12227 }
12228 } else {
12229 if (!other.initializationBinding_.isEmpty()) {
12230 if (initializationBindingBuilder_.isEmpty()) {
12231 initializationBindingBuilder_.dispose();
12232 initializationBindingBuilder_ = null;
12233 initializationBinding_ = other.initializationBinding_;
12234 bitField0_ = (bitField0_ & ~0x00000004);
12235 initializationBindingBuilder_ =
12236 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
12237 getInitializationBindingFieldBuilder() : null;
12238 } else {
12239 initializationBindingBuilder_.addAllMessages(other.initializationBinding_);
12240 }
12241 }
12242 }
12243 if (updateBindingBuilder_ == null) {
12244 if (!other.updateBinding_.isEmpty()) {
12245 if (updateBinding_.isEmpty()) {
12246 updateBinding_ = other.updateBinding_;
12247 bitField0_ = (bitField0_ & ~0x00000008);
12248 } else {
12249 ensureUpdateBindingIsMutable();
12250 updateBinding_.addAll(other.updateBinding_);
12251 }
12252 onChanged();
12253 }
12254 } else {
12255 if (!other.updateBinding_.isEmpty()) {
12256 if (updateBindingBuilder_.isEmpty()) {
12257 updateBindingBuilder_.dispose();
12258 updateBindingBuilder_ = null;
12259 updateBinding_ = other.updateBinding_;
12260 bitField0_ = (bitField0_ & ~0x00000008);
12261 updateBindingBuilder_ =
12262 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
12263 getUpdateBindingFieldBuilder() : null;
12264 } else {
12265 updateBindingBuilder_.addAllMessages(other.updateBinding_);
12266 }
12267 }
12268 }
12269 this.mergeUnknownFields(other.getUnknownFields());
12270 onChanged();
12271 return this;
12272 }
12273
12274 @java.lang.Override
12275 public final boolean isInitialized() {
12276 return true;
12277 }
12278
12279 @java.lang.Override
12280 public Builder mergeFrom(
12281 com.google.protobuf.CodedInputStream input,
12282 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12283 throws java.io.IOException {
12284 if (extensionRegistry == null) {
12285 throw new java.lang.NullPointerException();
12286 }
12287 try {
12288 boolean done = false;
12289 while (!done) {
12290 int tag = input.readTag();
12291 switch (tag) {
12292 case 0:
12293 done = true;
12294 break;
12295 case 10: {
12296 input.readMessage(
12297 getInitializationFieldBuilder().getBuilder(),
12298 extensionRegistry);
12299 bitField0_ |= 0x00000001;
12300 break;
12301 } // case 10
12302 case 18: {
12303 input.readMessage(
12304 getAlgorithmFieldBuilder().getBuilder(),
12305 extensionRegistry);
12306 bitField0_ |= 0x00000002;
12307 break;
12308 } // case 18
12309 case 26: {
12310 onnx.OnnxMl.StringStringEntryProto m =
12311 input.readMessage(
12312 onnx.OnnxMl.StringStringEntryProto.parser(),
12313 extensionRegistry);
12314 if (initializationBindingBuilder_ == null) {
12315 ensureInitializationBindingIsMutable();
12316 initializationBinding_.add(m);
12317 } else {
12318 initializationBindingBuilder_.addMessage(m);
12319 }
12320 break;
12321 } // case 26
12322 case 34: {
12323 onnx.OnnxMl.StringStringEntryProto m =
12324 input.readMessage(
12325 onnx.OnnxMl.StringStringEntryProto.parser(),
12326 extensionRegistry);
12327 if (updateBindingBuilder_ == null) {
12328 ensureUpdateBindingIsMutable();
12329 updateBinding_.add(m);
12330 } else {
12331 updateBindingBuilder_.addMessage(m);
12332 }
12333 break;
12334 } // case 34
12335 default: {
12336 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
12337 done = true; // was an endgroup tag
12338 }
12339 break;
12340 } // default:
12341 } // switch (tag)
12342 } // while (!done)
12343 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
12344 throw e.unwrapIOException();
12345 } finally {
12346 onChanged();
12347 } // finally
12348 return this;
12349 }
12350 private int bitField0_;
12351
12352 private onnx.OnnxMl.GraphProto initialization_;
12353 private com.google.protobuf.SingleFieldBuilder<
12354 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder> initializationBuilder_;
12355 /**
12356 * <pre>
12357 * This field describes a graph to compute the initial tensors
12358 * upon starting the training process. Initialization graph has no input
12359 * and can have multiple outputs. Usually, trainable tensors in neural
12360 * networks are randomly initialized. To achieve that, for each tensor,
12361 * the user can put a random number operator such as RandomNormal or
12362 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12363 * random output to the specific tensor using "initialization_binding".
12364 * This graph can also set the initializers in "algorithm" in the same
12365 * TrainingInfoProto; a use case is resetting the number of training
12366 * iteration to zero.
12367 *
12368 * By default, this field is an empty graph and its evaluation does not
12369 * produce any output. Thus, no initializer would be changed by default.
12370 * </pre>
12371 *
12372 * <code>optional .onnx.GraphProto initialization = 1;</code>
12373 * @return Whether the initialization field is set.
12374 */
12375 public boolean hasInitialization() {
12376 return ((bitField0_ & 0x00000001) != 0);
12377 }
12378 /**
12379 * <pre>
12380 * This field describes a graph to compute the initial tensors
12381 * upon starting the training process. Initialization graph has no input
12382 * and can have multiple outputs. Usually, trainable tensors in neural
12383 * networks are randomly initialized. To achieve that, for each tensor,
12384 * the user can put a random number operator such as RandomNormal or
12385 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12386 * random output to the specific tensor using "initialization_binding".
12387 * This graph can also set the initializers in "algorithm" in the same
12388 * TrainingInfoProto; a use case is resetting the number of training
12389 * iteration to zero.
12390 *
12391 * By default, this field is an empty graph and its evaluation does not
12392 * produce any output. Thus, no initializer would be changed by default.
12393 * </pre>
12394 *
12395 * <code>optional .onnx.GraphProto initialization = 1;</code>
12396 * @return The initialization.
12397 */
12398 public onnx.OnnxMl.GraphProto getInitialization() {
12399 if (initializationBuilder_ == null) {
12400 return initialization_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : initialization_;
12401 } else {
12402 return initializationBuilder_.getMessage();
12403 }
12404 }
12405 /**
12406 * <pre>
12407 * This field describes a graph to compute the initial tensors
12408 * upon starting the training process. Initialization graph has no input
12409 * and can have multiple outputs. Usually, trainable tensors in neural
12410 * networks are randomly initialized. To achieve that, for each tensor,
12411 * the user can put a random number operator such as RandomNormal or
12412 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12413 * random output to the specific tensor using "initialization_binding".
12414 * This graph can also set the initializers in "algorithm" in the same
12415 * TrainingInfoProto; a use case is resetting the number of training
12416 * iteration to zero.
12417 *
12418 * By default, this field is an empty graph and its evaluation does not
12419 * produce any output. Thus, no initializer would be changed by default.
12420 * </pre>
12421 *
12422 * <code>optional .onnx.GraphProto initialization = 1;</code>
12423 */
12424 public Builder setInitialization(onnx.OnnxMl.GraphProto value) {
12425 if (initializationBuilder_ == null) {
12426 if (value == null) {
12427 throw new NullPointerException();
12428 }
12429 initialization_ = value;
12430 } else {
12431 initializationBuilder_.setMessage(value);
12432 }
12433 bitField0_ |= 0x00000001;
12434 onChanged();
12435 return this;
12436 }
12437 /**
12438 * <pre>
12439 * This field describes a graph to compute the initial tensors
12440 * upon starting the training process. Initialization graph has no input
12441 * and can have multiple outputs. Usually, trainable tensors in neural
12442 * networks are randomly initialized. To achieve that, for each tensor,
12443 * the user can put a random number operator such as RandomNormal or
12444 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12445 * random output to the specific tensor using "initialization_binding".
12446 * This graph can also set the initializers in "algorithm" in the same
12447 * TrainingInfoProto; a use case is resetting the number of training
12448 * iteration to zero.
12449 *
12450 * By default, this field is an empty graph and its evaluation does not
12451 * produce any output. Thus, no initializer would be changed by default.
12452 * </pre>
12453 *
12454 * <code>optional .onnx.GraphProto initialization = 1;</code>
12455 */
12456 public Builder setInitialization(
12457 onnx.OnnxMl.GraphProto.Builder builderForValue) {
12458 if (initializationBuilder_ == null) {
12459 initialization_ = builderForValue.build();
12460 } else {
12461 initializationBuilder_.setMessage(builderForValue.build());
12462 }
12463 bitField0_ |= 0x00000001;
12464 onChanged();
12465 return this;
12466 }
12467 /**
12468 * <pre>
12469 * This field describes a graph to compute the initial tensors
12470 * upon starting the training process. Initialization graph has no input
12471 * and can have multiple outputs. Usually, trainable tensors in neural
12472 * networks are randomly initialized. To achieve that, for each tensor,
12473 * the user can put a random number operator such as RandomNormal or
12474 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12475 * random output to the specific tensor using "initialization_binding".
12476 * This graph can also set the initializers in "algorithm" in the same
12477 * TrainingInfoProto; a use case is resetting the number of training
12478 * iteration to zero.
12479 *
12480 * By default, this field is an empty graph and its evaluation does not
12481 * produce any output. Thus, no initializer would be changed by default.
12482 * </pre>
12483 *
12484 * <code>optional .onnx.GraphProto initialization = 1;</code>
12485 */
12486 public Builder mergeInitialization(onnx.OnnxMl.GraphProto value) {
12487 if (initializationBuilder_ == null) {
12488 if (((bitField0_ & 0x00000001) != 0) &&
12489 initialization_ != null &&
12490 initialization_ != onnx.OnnxMl.GraphProto.getDefaultInstance()) {
12491 getInitializationBuilder().mergeFrom(value);
12492 } else {
12493 initialization_ = value;
12494 }
12495 } else {
12496 initializationBuilder_.mergeFrom(value);
12497 }
12498 if (initialization_ != null) {
12499 bitField0_ |= 0x00000001;
12500 onChanged();
12501 }
12502 return this;
12503 }
12504 /**
12505 * <pre>
12506 * This field describes a graph to compute the initial tensors
12507 * upon starting the training process. Initialization graph has no input
12508 * and can have multiple outputs. Usually, trainable tensors in neural
12509 * networks are randomly initialized. To achieve that, for each tensor,
12510 * the user can put a random number operator such as RandomNormal or
12511 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12512 * random output to the specific tensor using "initialization_binding".
12513 * This graph can also set the initializers in "algorithm" in the same
12514 * TrainingInfoProto; a use case is resetting the number of training
12515 * iteration to zero.
12516 *
12517 * By default, this field is an empty graph and its evaluation does not
12518 * produce any output. Thus, no initializer would be changed by default.
12519 * </pre>
12520 *
12521 * <code>optional .onnx.GraphProto initialization = 1;</code>
12522 */
12523 public Builder clearInitialization() {
12524 bitField0_ = (bitField0_ & ~0x00000001);
12525 initialization_ = null;
12526 if (initializationBuilder_ != null) {
12527 initializationBuilder_.dispose();
12528 initializationBuilder_ = null;
12529 }
12530 onChanged();
12531 return this;
12532 }
12533 /**
12534 * <pre>
12535 * This field describes a graph to compute the initial tensors
12536 * upon starting the training process. Initialization graph has no input
12537 * and can have multiple outputs. Usually, trainable tensors in neural
12538 * networks are randomly initialized. To achieve that, for each tensor,
12539 * the user can put a random number operator such as RandomNormal or
12540 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12541 * random output to the specific tensor using "initialization_binding".
12542 * This graph can also set the initializers in "algorithm" in the same
12543 * TrainingInfoProto; a use case is resetting the number of training
12544 * iteration to zero.
12545 *
12546 * By default, this field is an empty graph and its evaluation does not
12547 * produce any output. Thus, no initializer would be changed by default.
12548 * </pre>
12549 *
12550 * <code>optional .onnx.GraphProto initialization = 1;</code>
12551 */
12552 public onnx.OnnxMl.GraphProto.Builder getInitializationBuilder() {
12553 bitField0_ |= 0x00000001;
12554 onChanged();
12555 return getInitializationFieldBuilder().getBuilder();
12556 }
12557 /**
12558 * <pre>
12559 * This field describes a graph to compute the initial tensors
12560 * upon starting the training process. Initialization graph has no input
12561 * and can have multiple outputs. Usually, trainable tensors in neural
12562 * networks are randomly initialized. To achieve that, for each tensor,
12563 * the user can put a random number operator such as RandomNormal or
12564 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12565 * random output to the specific tensor using "initialization_binding".
12566 * This graph can also set the initializers in "algorithm" in the same
12567 * TrainingInfoProto; a use case is resetting the number of training
12568 * iteration to zero.
12569 *
12570 * By default, this field is an empty graph and its evaluation does not
12571 * produce any output. Thus, no initializer would be changed by default.
12572 * </pre>
12573 *
12574 * <code>optional .onnx.GraphProto initialization = 1;</code>
12575 */
12576 public onnx.OnnxMl.GraphProtoOrBuilder getInitializationOrBuilder() {
12577 if (initializationBuilder_ != null) {
12578 return initializationBuilder_.getMessageOrBuilder();
12579 } else {
12580 return initialization_ == null ?
12581 onnx.OnnxMl.GraphProto.getDefaultInstance() : initialization_;
12582 }
12583 }
12584 /**
12585 * <pre>
12586 * This field describes a graph to compute the initial tensors
12587 * upon starting the training process. Initialization graph has no input
12588 * and can have multiple outputs. Usually, trainable tensors in neural
12589 * networks are randomly initialized. To achieve that, for each tensor,
12590 * the user can put a random number operator such as RandomNormal or
12591 * RandomUniform in TrainingInfoProto.initialization.node and assign its
12592 * random output to the specific tensor using "initialization_binding".
12593 * This graph can also set the initializers in "algorithm" in the same
12594 * TrainingInfoProto; a use case is resetting the number of training
12595 * iteration to zero.
12596 *
12597 * By default, this field is an empty graph and its evaluation does not
12598 * produce any output. Thus, no initializer would be changed by default.
12599 * </pre>
12600 *
12601 * <code>optional .onnx.GraphProto initialization = 1;</code>
12602 */
12603 private com.google.protobuf.SingleFieldBuilder<
12604 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>
12605 getInitializationFieldBuilder() {
12606 if (initializationBuilder_ == null) {
12607 initializationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
12608 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>(
12609 getInitialization(),
12610 getParentForChildren(),
12611 isClean());
12612 initialization_ = null;
12613 }
12614 return initializationBuilder_;
12615 }
12616
12617 private onnx.OnnxMl.GraphProto algorithm_;
12618 private com.google.protobuf.SingleFieldBuilder<
12619 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder> algorithmBuilder_;
12620 /**
12621 * <pre>
12622 * This field represents a training algorithm step. Given required inputs,
12623 * it computes outputs to update initializers in its own or inference graph's
12624 * initializer lists. In general, this field contains loss node, gradient node,
12625 * optimizer node, increment of iteration count.
12626 *
12627 * An execution of the training algorithm step is performed by executing the
12628 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12629 * and the "algorithm" graph. That is, the actual
12630 * input/initializer/output/node/value_info/sparse_initializer list of
12631 * the training graph is the concatenation of
12632 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12633 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12634 * in that order. This combined graph must satisfy the normal ONNX conditions.
12635 * Now, let's provide a visualization of graph combination for clarity.
12636 * Let the inference graph (i.e., "ModelProto.graph") be
12637 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12638 * and the "algorithm" graph be
12639 * tensor_d -> Add -> tensor_e
12640 * The combination process results
12641 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12642 *
12643 * Notice that an input of a node in the "algorithm" graph may reference the
12644 * output of a node in the inference graph (but not the other way round). Also, inference
12645 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12646 * can always be run independently without training information.
12647 *
12648 * By default, this field is an empty graph and its evaluation does not
12649 * produce any output. Evaluating the default training step never
12650 * update any initializers.
12651 * </pre>
12652 *
12653 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12654 * @return Whether the algorithm field is set.
12655 */
12656 public boolean hasAlgorithm() {
12657 return ((bitField0_ & 0x00000002) != 0);
12658 }
12659 /**
12660 * <pre>
12661 * This field represents a training algorithm step. Given required inputs,
12662 * it computes outputs to update initializers in its own or inference graph's
12663 * initializer lists. In general, this field contains loss node, gradient node,
12664 * optimizer node, increment of iteration count.
12665 *
12666 * An execution of the training algorithm step is performed by executing the
12667 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12668 * and the "algorithm" graph. That is, the actual
12669 * input/initializer/output/node/value_info/sparse_initializer list of
12670 * the training graph is the concatenation of
12671 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12672 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12673 * in that order. This combined graph must satisfy the normal ONNX conditions.
12674 * Now, let's provide a visualization of graph combination for clarity.
12675 * Let the inference graph (i.e., "ModelProto.graph") be
12676 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12677 * and the "algorithm" graph be
12678 * tensor_d -> Add -> tensor_e
12679 * The combination process results
12680 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12681 *
12682 * Notice that an input of a node in the "algorithm" graph may reference the
12683 * output of a node in the inference graph (but not the other way round). Also, inference
12684 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12685 * can always be run independently without training information.
12686 *
12687 * By default, this field is an empty graph and its evaluation does not
12688 * produce any output. Evaluating the default training step never
12689 * update any initializers.
12690 * </pre>
12691 *
12692 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12693 * @return The algorithm.
12694 */
12695 public onnx.OnnxMl.GraphProto getAlgorithm() {
12696 if (algorithmBuilder_ == null) {
12697 return algorithm_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : algorithm_;
12698 } else {
12699 return algorithmBuilder_.getMessage();
12700 }
12701 }
12702 /**
12703 * <pre>
12704 * This field represents a training algorithm step. Given required inputs,
12705 * it computes outputs to update initializers in its own or inference graph's
12706 * initializer lists. In general, this field contains loss node, gradient node,
12707 * optimizer node, increment of iteration count.
12708 *
12709 * An execution of the training algorithm step is performed by executing the
12710 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12711 * and the "algorithm" graph. That is, the actual
12712 * input/initializer/output/node/value_info/sparse_initializer list of
12713 * the training graph is the concatenation of
12714 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12715 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12716 * in that order. This combined graph must satisfy the normal ONNX conditions.
12717 * Now, let's provide a visualization of graph combination for clarity.
12718 * Let the inference graph (i.e., "ModelProto.graph") be
12719 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12720 * and the "algorithm" graph be
12721 * tensor_d -> Add -> tensor_e
12722 * The combination process results
12723 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12724 *
12725 * Notice that an input of a node in the "algorithm" graph may reference the
12726 * output of a node in the inference graph (but not the other way round). Also, inference
12727 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12728 * can always be run independently without training information.
12729 *
12730 * By default, this field is an empty graph and its evaluation does not
12731 * produce any output. Evaluating the default training step never
12732 * update any initializers.
12733 * </pre>
12734 *
12735 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12736 */
12737 public Builder setAlgorithm(onnx.OnnxMl.GraphProto value) {
12738 if (algorithmBuilder_ == null) {
12739 if (value == null) {
12740 throw new NullPointerException();
12741 }
12742 algorithm_ = value;
12743 } else {
12744 algorithmBuilder_.setMessage(value);
12745 }
12746 bitField0_ |= 0x00000002;
12747 onChanged();
12748 return this;
12749 }
12750 /**
12751 * <pre>
12752 * This field represents a training algorithm step. Given required inputs,
12753 * it computes outputs to update initializers in its own or inference graph's
12754 * initializer lists. In general, this field contains loss node, gradient node,
12755 * optimizer node, increment of iteration count.
12756 *
12757 * An execution of the training algorithm step is performed by executing the
12758 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12759 * and the "algorithm" graph. That is, the actual
12760 * input/initializer/output/node/value_info/sparse_initializer list of
12761 * the training graph is the concatenation of
12762 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12763 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12764 * in that order. This combined graph must satisfy the normal ONNX conditions.
12765 * Now, let's provide a visualization of graph combination for clarity.
12766 * Let the inference graph (i.e., "ModelProto.graph") be
12767 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12768 * and the "algorithm" graph be
12769 * tensor_d -> Add -> tensor_e
12770 * The combination process results
12771 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12772 *
12773 * Notice that an input of a node in the "algorithm" graph may reference the
12774 * output of a node in the inference graph (but not the other way round). Also, inference
12775 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12776 * can always be run independently without training information.
12777 *
12778 * By default, this field is an empty graph and its evaluation does not
12779 * produce any output. Evaluating the default training step never
12780 * update any initializers.
12781 * </pre>
12782 *
12783 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12784 */
12785 public Builder setAlgorithm(
12786 onnx.OnnxMl.GraphProto.Builder builderForValue) {
12787 if (algorithmBuilder_ == null) {
12788 algorithm_ = builderForValue.build();
12789 } else {
12790 algorithmBuilder_.setMessage(builderForValue.build());
12791 }
12792 bitField0_ |= 0x00000002;
12793 onChanged();
12794 return this;
12795 }
12796 /**
12797 * <pre>
12798 * This field represents a training algorithm step. Given required inputs,
12799 * it computes outputs to update initializers in its own or inference graph's
12800 * initializer lists. In general, this field contains loss node, gradient node,
12801 * optimizer node, increment of iteration count.
12802 *
12803 * An execution of the training algorithm step is performed by executing the
12804 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12805 * and the "algorithm" graph. That is, the actual
12806 * input/initializer/output/node/value_info/sparse_initializer list of
12807 * the training graph is the concatenation of
12808 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12809 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12810 * in that order. This combined graph must satisfy the normal ONNX conditions.
12811 * Now, let's provide a visualization of graph combination for clarity.
12812 * Let the inference graph (i.e., "ModelProto.graph") be
12813 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12814 * and the "algorithm" graph be
12815 * tensor_d -> Add -> tensor_e
12816 * The combination process results
12817 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12818 *
12819 * Notice that an input of a node in the "algorithm" graph may reference the
12820 * output of a node in the inference graph (but not the other way round). Also, inference
12821 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12822 * can always be run independently without training information.
12823 *
12824 * By default, this field is an empty graph and its evaluation does not
12825 * produce any output. Evaluating the default training step never
12826 * update any initializers.
12827 * </pre>
12828 *
12829 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12830 */
12831 public Builder mergeAlgorithm(onnx.OnnxMl.GraphProto value) {
12832 if (algorithmBuilder_ == null) {
12833 if (((bitField0_ & 0x00000002) != 0) &&
12834 algorithm_ != null &&
12835 algorithm_ != onnx.OnnxMl.GraphProto.getDefaultInstance()) {
12836 getAlgorithmBuilder().mergeFrom(value);
12837 } else {
12838 algorithm_ = value;
12839 }
12840 } else {
12841 algorithmBuilder_.mergeFrom(value);
12842 }
12843 if (algorithm_ != null) {
12844 bitField0_ |= 0x00000002;
12845 onChanged();
12846 }
12847 return this;
12848 }
12849 /**
12850 * <pre>
12851 * This field represents a training algorithm step. Given required inputs,
12852 * it computes outputs to update initializers in its own or inference graph's
12853 * initializer lists. In general, this field contains loss node, gradient node,
12854 * optimizer node, increment of iteration count.
12855 *
12856 * An execution of the training algorithm step is performed by executing the
12857 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12858 * and the "algorithm" graph. That is, the actual
12859 * input/initializer/output/node/value_info/sparse_initializer list of
12860 * the training graph is the concatenation of
12861 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12862 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12863 * in that order. This combined graph must satisfy the normal ONNX conditions.
12864 * Now, let's provide a visualization of graph combination for clarity.
12865 * Let the inference graph (i.e., "ModelProto.graph") be
12866 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12867 * and the "algorithm" graph be
12868 * tensor_d -> Add -> tensor_e
12869 * The combination process results
12870 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12871 *
12872 * Notice that an input of a node in the "algorithm" graph may reference the
12873 * output of a node in the inference graph (but not the other way round). Also, inference
12874 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12875 * can always be run independently without training information.
12876 *
12877 * By default, this field is an empty graph and its evaluation does not
12878 * produce any output. Evaluating the default training step never
12879 * update any initializers.
12880 * </pre>
12881 *
12882 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12883 */
12884 public Builder clearAlgorithm() {
12885 bitField0_ = (bitField0_ & ~0x00000002);
12886 algorithm_ = null;
12887 if (algorithmBuilder_ != null) {
12888 algorithmBuilder_.dispose();
12889 algorithmBuilder_ = null;
12890 }
12891 onChanged();
12892 return this;
12893 }
12894 /**
12895 * <pre>
12896 * This field represents a training algorithm step. Given required inputs,
12897 * it computes outputs to update initializers in its own or inference graph's
12898 * initializer lists. In general, this field contains loss node, gradient node,
12899 * optimizer node, increment of iteration count.
12900 *
12901 * An execution of the training algorithm step is performed by executing the
12902 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12903 * and the "algorithm" graph. That is, the actual
12904 * input/initializer/output/node/value_info/sparse_initializer list of
12905 * the training graph is the concatenation of
12906 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12907 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12908 * in that order. This combined graph must satisfy the normal ONNX conditions.
12909 * Now, let's provide a visualization of graph combination for clarity.
12910 * Let the inference graph (i.e., "ModelProto.graph") be
12911 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12912 * and the "algorithm" graph be
12913 * tensor_d -> Add -> tensor_e
12914 * The combination process results
12915 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12916 *
12917 * Notice that an input of a node in the "algorithm" graph may reference the
12918 * output of a node in the inference graph (but not the other way round). Also, inference
12919 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12920 * can always be run independently without training information.
12921 *
12922 * By default, this field is an empty graph and its evaluation does not
12923 * produce any output. Evaluating the default training step never
12924 * update any initializers.
12925 * </pre>
12926 *
12927 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12928 */
12929 public onnx.OnnxMl.GraphProto.Builder getAlgorithmBuilder() {
12930 bitField0_ |= 0x00000002;
12931 onChanged();
12932 return getAlgorithmFieldBuilder().getBuilder();
12933 }
12934 /**
12935 * <pre>
12936 * This field represents a training algorithm step. Given required inputs,
12937 * it computes outputs to update initializers in its own or inference graph's
12938 * initializer lists. In general, this field contains loss node, gradient node,
12939 * optimizer node, increment of iteration count.
12940 *
12941 * An execution of the training algorithm step is performed by executing the
12942 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12943 * and the "algorithm" graph. That is, the actual
12944 * input/initializer/output/node/value_info/sparse_initializer list of
12945 * the training graph is the concatenation of
12946 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12947 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12948 * in that order. This combined graph must satisfy the normal ONNX conditions.
12949 * Now, let's provide a visualization of graph combination for clarity.
12950 * Let the inference graph (i.e., "ModelProto.graph") be
12951 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12952 * and the "algorithm" graph be
12953 * tensor_d -> Add -> tensor_e
12954 * The combination process results
12955 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12956 *
12957 * Notice that an input of a node in the "algorithm" graph may reference the
12958 * output of a node in the inference graph (but not the other way round). Also, inference
12959 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
12960 * can always be run independently without training information.
12961 *
12962 * By default, this field is an empty graph and its evaluation does not
12963 * produce any output. Evaluating the default training step never
12964 * update any initializers.
12965 * </pre>
12966 *
12967 * <code>optional .onnx.GraphProto algorithm = 2;</code>
12968 */
12969 public onnx.OnnxMl.GraphProtoOrBuilder getAlgorithmOrBuilder() {
12970 if (algorithmBuilder_ != null) {
12971 return algorithmBuilder_.getMessageOrBuilder();
12972 } else {
12973 return algorithm_ == null ?
12974 onnx.OnnxMl.GraphProto.getDefaultInstance() : algorithm_;
12975 }
12976 }
12977 /**
12978 * <pre>
12979 * This field represents a training algorithm step. Given required inputs,
12980 * it computes outputs to update initializers in its own or inference graph's
12981 * initializer lists. In general, this field contains loss node, gradient node,
12982 * optimizer node, increment of iteration count.
12983 *
12984 * An execution of the training algorithm step is performed by executing the
12985 * graph obtained by combining the inference graph (namely "ModelProto.graph")
12986 * and the "algorithm" graph. That is, the actual
12987 * input/initializer/output/node/value_info/sparse_initializer list of
12988 * the training graph is the concatenation of
12989 * "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer"
12990 * and "algorithm.input/initializer/output/node/value_info/sparse_initializer"
12991 * in that order. This combined graph must satisfy the normal ONNX conditions.
12992 * Now, let's provide a visualization of graph combination for clarity.
12993 * Let the inference graph (i.e., "ModelProto.graph") be
12994 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d
12995 * and the "algorithm" graph be
12996 * tensor_d -> Add -> tensor_e
12997 * The combination process results
12998 * tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e
12999 *
13000 * Notice that an input of a node in the "algorithm" graph may reference the
13001 * output of a node in the inference graph (but not the other way round). Also, inference
13002 * node cannot reference inputs of "algorithm". With these restrictions, inference graph
13003 * can always be run independently without training information.
13004 *
13005 * By default, this field is an empty graph and its evaluation does not
13006 * produce any output. Evaluating the default training step never
13007 * update any initializers.
13008 * </pre>
13009 *
13010 * <code>optional .onnx.GraphProto algorithm = 2;</code>
13011 */
13012 private com.google.protobuf.SingleFieldBuilder<
13013 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>
13014 getAlgorithmFieldBuilder() {
13015 if (algorithmBuilder_ == null) {
13016 algorithmBuilder_ = new com.google.protobuf.SingleFieldBuilder<
13017 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>(
13018 getAlgorithm(),
13019 getParentForChildren(),
13020 isClean());
13021 algorithm_ = null;
13022 }
13023 return algorithmBuilder_;
13024 }
13025
13026 private java.util.List<onnx.OnnxMl.StringStringEntryProto> initializationBinding_ =
13027 java.util.Collections.emptyList();
13028 private void ensureInitializationBindingIsMutable() {
13029 if (!((bitField0_ & 0x00000004) != 0)) {
13030 initializationBinding_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(initializationBinding_);
13031 bitField0_ |= 0x00000004;
13032 }
13033 }
13034
13035 private com.google.protobuf.RepeatedFieldBuilder<
13036 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> initializationBindingBuilder_;
13037
13038 /**
13039 * <pre>
13040 * This field specifies the bindings from the outputs of "initialization" to
13041 * some initializers in "ModelProto.graph.initializer" and
13042 * the "algorithm.initializer" in the same TrainingInfoProto.
13043 * See "update_binding" below for details.
13044 *
13045 * By default, this field is empty and no initializer would be changed
13046 * by the execution of "initialization".
13047 * </pre>
13048 *
13049 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13050 */
13051 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getInitializationBindingList() {
13052 if (initializationBindingBuilder_ == null) {
13053 return java.util.Collections.unmodifiableList(initializationBinding_);
13054 } else {
13055 return initializationBindingBuilder_.getMessageList();
13056 }
13057 }
13058 /**
13059 * <pre>
13060 * This field specifies the bindings from the outputs of "initialization" to
13061 * some initializers in "ModelProto.graph.initializer" and
13062 * the "algorithm.initializer" in the same TrainingInfoProto.
13063 * See "update_binding" below for details.
13064 *
13065 * By default, this field is empty and no initializer would be changed
13066 * by the execution of "initialization".
13067 * </pre>
13068 *
13069 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13070 */
13071 public int getInitializationBindingCount() {
13072 if (initializationBindingBuilder_ == null) {
13073 return initializationBinding_.size();
13074 } else {
13075 return initializationBindingBuilder_.getCount();
13076 }
13077 }
13078 /**
13079 * <pre>
13080 * This field specifies the bindings from the outputs of "initialization" to
13081 * some initializers in "ModelProto.graph.initializer" and
13082 * the "algorithm.initializer" in the same TrainingInfoProto.
13083 * See "update_binding" below for details.
13084 *
13085 * By default, this field is empty and no initializer would be changed
13086 * by the execution of "initialization".
13087 * </pre>
13088 *
13089 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13090 */
13091 public onnx.OnnxMl.StringStringEntryProto getInitializationBinding(int index) {
13092 if (initializationBindingBuilder_ == null) {
13093 return initializationBinding_.get(index);
13094 } else {
13095 return initializationBindingBuilder_.getMessage(index);
13096 }
13097 }
13098 /**
13099 * <pre>
13100 * This field specifies the bindings from the outputs of "initialization" to
13101 * some initializers in "ModelProto.graph.initializer" and
13102 * the "algorithm.initializer" in the same TrainingInfoProto.
13103 * See "update_binding" below for details.
13104 *
13105 * By default, this field is empty and no initializer would be changed
13106 * by the execution of "initialization".
13107 * </pre>
13108 *
13109 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13110 */
13111 public Builder setInitializationBinding(
13112 int index, onnx.OnnxMl.StringStringEntryProto value) {
13113 if (initializationBindingBuilder_ == null) {
13114 if (value == null) {
13115 throw new NullPointerException();
13116 }
13117 ensureInitializationBindingIsMutable();
13118 initializationBinding_.set(index, value);
13119 onChanged();
13120 } else {
13121 initializationBindingBuilder_.setMessage(index, value);
13122 }
13123 return this;
13124 }
13125 /**
13126 * <pre>
13127 * This field specifies the bindings from the outputs of "initialization" to
13128 * some initializers in "ModelProto.graph.initializer" and
13129 * the "algorithm.initializer" in the same TrainingInfoProto.
13130 * See "update_binding" below for details.
13131 *
13132 * By default, this field is empty and no initializer would be changed
13133 * by the execution of "initialization".
13134 * </pre>
13135 *
13136 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13137 */
13138 public Builder setInitializationBinding(
13139 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13140 if (initializationBindingBuilder_ == null) {
13141 ensureInitializationBindingIsMutable();
13142 initializationBinding_.set(index, builderForValue.build());
13143 onChanged();
13144 } else {
13145 initializationBindingBuilder_.setMessage(index, builderForValue.build());
13146 }
13147 return this;
13148 }
13149 /**
13150 * <pre>
13151 * This field specifies the bindings from the outputs of "initialization" to
13152 * some initializers in "ModelProto.graph.initializer" and
13153 * the "algorithm.initializer" in the same TrainingInfoProto.
13154 * See "update_binding" below for details.
13155 *
13156 * By default, this field is empty and no initializer would be changed
13157 * by the execution of "initialization".
13158 * </pre>
13159 *
13160 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13161 */
13162 public Builder addInitializationBinding(onnx.OnnxMl.StringStringEntryProto value) {
13163 if (initializationBindingBuilder_ == null) {
13164 if (value == null) {
13165 throw new NullPointerException();
13166 }
13167 ensureInitializationBindingIsMutable();
13168 initializationBinding_.add(value);
13169 onChanged();
13170 } else {
13171 initializationBindingBuilder_.addMessage(value);
13172 }
13173 return this;
13174 }
13175 /**
13176 * <pre>
13177 * This field specifies the bindings from the outputs of "initialization" to
13178 * some initializers in "ModelProto.graph.initializer" and
13179 * the "algorithm.initializer" in the same TrainingInfoProto.
13180 * See "update_binding" below for details.
13181 *
13182 * By default, this field is empty and no initializer would be changed
13183 * by the execution of "initialization".
13184 * </pre>
13185 *
13186 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13187 */
13188 public Builder addInitializationBinding(
13189 int index, onnx.OnnxMl.StringStringEntryProto value) {
13190 if (initializationBindingBuilder_ == null) {
13191 if (value == null) {
13192 throw new NullPointerException();
13193 }
13194 ensureInitializationBindingIsMutable();
13195 initializationBinding_.add(index, value);
13196 onChanged();
13197 } else {
13198 initializationBindingBuilder_.addMessage(index, value);
13199 }
13200 return this;
13201 }
13202 /**
13203 * <pre>
13204 * This field specifies the bindings from the outputs of "initialization" to
13205 * some initializers in "ModelProto.graph.initializer" and
13206 * the "algorithm.initializer" in the same TrainingInfoProto.
13207 * See "update_binding" below for details.
13208 *
13209 * By default, this field is empty and no initializer would be changed
13210 * by the execution of "initialization".
13211 * </pre>
13212 *
13213 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13214 */
13215 public Builder addInitializationBinding(
13216 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13217 if (initializationBindingBuilder_ == null) {
13218 ensureInitializationBindingIsMutable();
13219 initializationBinding_.add(builderForValue.build());
13220 onChanged();
13221 } else {
13222 initializationBindingBuilder_.addMessage(builderForValue.build());
13223 }
13224 return this;
13225 }
13226 /**
13227 * <pre>
13228 * This field specifies the bindings from the outputs of "initialization" to
13229 * some initializers in "ModelProto.graph.initializer" and
13230 * the "algorithm.initializer" in the same TrainingInfoProto.
13231 * See "update_binding" below for details.
13232 *
13233 * By default, this field is empty and no initializer would be changed
13234 * by the execution of "initialization".
13235 * </pre>
13236 *
13237 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13238 */
13239 public Builder addInitializationBinding(
13240 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13241 if (initializationBindingBuilder_ == null) {
13242 ensureInitializationBindingIsMutable();
13243 initializationBinding_.add(index, builderForValue.build());
13244 onChanged();
13245 } else {
13246 initializationBindingBuilder_.addMessage(index, builderForValue.build());
13247 }
13248 return this;
13249 }
13250 /**
13251 * <pre>
13252 * This field specifies the bindings from the outputs of "initialization" to
13253 * some initializers in "ModelProto.graph.initializer" and
13254 * the "algorithm.initializer" in the same TrainingInfoProto.
13255 * See "update_binding" below for details.
13256 *
13257 * By default, this field is empty and no initializer would be changed
13258 * by the execution of "initialization".
13259 * </pre>
13260 *
13261 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13262 */
13263 public Builder addAllInitializationBinding(
13264 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
13265 if (initializationBindingBuilder_ == null) {
13266 ensureInitializationBindingIsMutable();
13267 com.google.protobuf.AbstractMessageLite.Builder.addAll(
13268 values, initializationBinding_);
13269 onChanged();
13270 } else {
13271 initializationBindingBuilder_.addAllMessages(values);
13272 }
13273 return this;
13274 }
13275 /**
13276 * <pre>
13277 * This field specifies the bindings from the outputs of "initialization" to
13278 * some initializers in "ModelProto.graph.initializer" and
13279 * the "algorithm.initializer" in the same TrainingInfoProto.
13280 * See "update_binding" below for details.
13281 *
13282 * By default, this field is empty and no initializer would be changed
13283 * by the execution of "initialization".
13284 * </pre>
13285 *
13286 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13287 */
13288 public Builder clearInitializationBinding() {
13289 if (initializationBindingBuilder_ == null) {
13290 initializationBinding_ = java.util.Collections.emptyList();
13291 bitField0_ = (bitField0_ & ~0x00000004);
13292 onChanged();
13293 } else {
13294 initializationBindingBuilder_.clear();
13295 }
13296 return this;
13297 }
13298 /**
13299 * <pre>
13300 * This field specifies the bindings from the outputs of "initialization" to
13301 * some initializers in "ModelProto.graph.initializer" and
13302 * the "algorithm.initializer" in the same TrainingInfoProto.
13303 * See "update_binding" below for details.
13304 *
13305 * By default, this field is empty and no initializer would be changed
13306 * by the execution of "initialization".
13307 * </pre>
13308 *
13309 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13310 */
13311 public Builder removeInitializationBinding(int index) {
13312 if (initializationBindingBuilder_ == null) {
13313 ensureInitializationBindingIsMutable();
13314 initializationBinding_.remove(index);
13315 onChanged();
13316 } else {
13317 initializationBindingBuilder_.remove(index);
13318 }
13319 return this;
13320 }
13321 /**
13322 * <pre>
13323 * This field specifies the bindings from the outputs of "initialization" to
13324 * some initializers in "ModelProto.graph.initializer" and
13325 * the "algorithm.initializer" in the same TrainingInfoProto.
13326 * See "update_binding" below for details.
13327 *
13328 * By default, this field is empty and no initializer would be changed
13329 * by the execution of "initialization".
13330 * </pre>
13331 *
13332 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13333 */
13334 public onnx.OnnxMl.StringStringEntryProto.Builder getInitializationBindingBuilder(
13335 int index) {
13336 return getInitializationBindingFieldBuilder().getBuilder(index);
13337 }
13338 /**
13339 * <pre>
13340 * This field specifies the bindings from the outputs of "initialization" to
13341 * some initializers in "ModelProto.graph.initializer" and
13342 * the "algorithm.initializer" in the same TrainingInfoProto.
13343 * See "update_binding" below for details.
13344 *
13345 * By default, this field is empty and no initializer would be changed
13346 * by the execution of "initialization".
13347 * </pre>
13348 *
13349 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13350 */
13351 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getInitializationBindingOrBuilder(
13352 int index) {
13353 if (initializationBindingBuilder_ == null) {
13354 return initializationBinding_.get(index); } else {
13355 return initializationBindingBuilder_.getMessageOrBuilder(index);
13356 }
13357 }
13358 /**
13359 * <pre>
13360 * This field specifies the bindings from the outputs of "initialization" to
13361 * some initializers in "ModelProto.graph.initializer" and
13362 * the "algorithm.initializer" in the same TrainingInfoProto.
13363 * See "update_binding" below for details.
13364 *
13365 * By default, this field is empty and no initializer would be changed
13366 * by the execution of "initialization".
13367 * </pre>
13368 *
13369 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13370 */
13371 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
13372 getInitializationBindingOrBuilderList() {
13373 if (initializationBindingBuilder_ != null) {
13374 return initializationBindingBuilder_.getMessageOrBuilderList();
13375 } else {
13376 return java.util.Collections.unmodifiableList(initializationBinding_);
13377 }
13378 }
13379 /**
13380 * <pre>
13381 * This field specifies the bindings from the outputs of "initialization" to
13382 * some initializers in "ModelProto.graph.initializer" and
13383 * the "algorithm.initializer" in the same TrainingInfoProto.
13384 * See "update_binding" below for details.
13385 *
13386 * By default, this field is empty and no initializer would be changed
13387 * by the execution of "initialization".
13388 * </pre>
13389 *
13390 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13391 */
13392 public onnx.OnnxMl.StringStringEntryProto.Builder addInitializationBindingBuilder() {
13393 return getInitializationBindingFieldBuilder().addBuilder(
13394 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
13395 }
13396 /**
13397 * <pre>
13398 * This field specifies the bindings from the outputs of "initialization" to
13399 * some initializers in "ModelProto.graph.initializer" and
13400 * the "algorithm.initializer" in the same TrainingInfoProto.
13401 * See "update_binding" below for details.
13402 *
13403 * By default, this field is empty and no initializer would be changed
13404 * by the execution of "initialization".
13405 * </pre>
13406 *
13407 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13408 */
13409 public onnx.OnnxMl.StringStringEntryProto.Builder addInitializationBindingBuilder(
13410 int index) {
13411 return getInitializationBindingFieldBuilder().addBuilder(
13412 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
13413 }
13414 /**
13415 * <pre>
13416 * This field specifies the bindings from the outputs of "initialization" to
13417 * some initializers in "ModelProto.graph.initializer" and
13418 * the "algorithm.initializer" in the same TrainingInfoProto.
13419 * See "update_binding" below for details.
13420 *
13421 * By default, this field is empty and no initializer would be changed
13422 * by the execution of "initialization".
13423 * </pre>
13424 *
13425 * <code>repeated .onnx.StringStringEntryProto initialization_binding = 3;</code>
13426 */
13427 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
13428 getInitializationBindingBuilderList() {
13429 return getInitializationBindingFieldBuilder().getBuilderList();
13430 }
13431 private com.google.protobuf.RepeatedFieldBuilder<
13432 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
13433 getInitializationBindingFieldBuilder() {
13434 if (initializationBindingBuilder_ == null) {
13435 initializationBindingBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
13436 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
13437 initializationBinding_,
13438 ((bitField0_ & 0x00000004) != 0),
13439 getParentForChildren(),
13440 isClean());
13441 initializationBinding_ = null;
13442 }
13443 return initializationBindingBuilder_;
13444 }
13445
13446 private java.util.List<onnx.OnnxMl.StringStringEntryProto> updateBinding_ =
13447 java.util.Collections.emptyList();
13448 private void ensureUpdateBindingIsMutable() {
13449 if (!((bitField0_ & 0x00000008) != 0)) {
13450 updateBinding_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(updateBinding_);
13451 bitField0_ |= 0x00000008;
13452 }
13453 }
13454
13455 private com.google.protobuf.RepeatedFieldBuilder<
13456 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> updateBindingBuilder_;
13457
13458 /**
13459 * <pre>
13460 * Gradient-based training is usually an iterative procedure. In one gradient
13461 * descent iteration, we apply
13462 *
13463 * x = x - r * g
13464 *
13465 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13466 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13467 * into the training graph, we split the update equation into
13468 *
13469 * y = x - r * g
13470 * x = y
13471 *
13472 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13473 * tell that "y" should be assigned to "x", the field "update_binding" may
13474 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13475 * and "y" (value of StringStringEntryProto).
13476 * For a neural network with multiple trainable (mutable) tensors, there can
13477 * be multiple key-value pairs in "update_binding".
13478 *
13479 * The initializers appears as keys in "update_binding" are considered
13480 * mutable variables. This implies some behaviors
13481 * as described below.
13482 *
13483 * 1. We have only unique keys in all "update_binding"s so that two
13484 * variables may not have the same name. This ensures that one
13485 * variable is assigned up to once.
13486 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13487 * "TrainingInfoProto.algorithm.initializer".
13488 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13489 * 4. Mutable variables are initialized to the value specified by the
13490 * corresponding initializer, and then potentially updated by
13491 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13492 *
13493 * This field usually contains names of trainable tensors
13494 * (in ModelProto.graph), optimizer states such as momentums in advanced
13495 * stochastic gradient methods (in TrainingInfoProto.graph),
13496 * and number of training iterations (in TrainingInfoProto.graph).
13497 *
13498 * By default, this field is empty and no initializer would be changed
13499 * by the execution of "algorithm".
13500 * </pre>
13501 *
13502 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13503 */
13504 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getUpdateBindingList() {
13505 if (updateBindingBuilder_ == null) {
13506 return java.util.Collections.unmodifiableList(updateBinding_);
13507 } else {
13508 return updateBindingBuilder_.getMessageList();
13509 }
13510 }
13511 /**
13512 * <pre>
13513 * Gradient-based training is usually an iterative procedure. In one gradient
13514 * descent iteration, we apply
13515 *
13516 * x = x - r * g
13517 *
13518 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13519 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13520 * into the training graph, we split the update equation into
13521 *
13522 * y = x - r * g
13523 * x = y
13524 *
13525 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13526 * tell that "y" should be assigned to "x", the field "update_binding" may
13527 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13528 * and "y" (value of StringStringEntryProto).
13529 * For a neural network with multiple trainable (mutable) tensors, there can
13530 * be multiple key-value pairs in "update_binding".
13531 *
13532 * The initializers appears as keys in "update_binding" are considered
13533 * mutable variables. This implies some behaviors
13534 * as described below.
13535 *
13536 * 1. We have only unique keys in all "update_binding"s so that two
13537 * variables may not have the same name. This ensures that one
13538 * variable is assigned up to once.
13539 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13540 * "TrainingInfoProto.algorithm.initializer".
13541 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13542 * 4. Mutable variables are initialized to the value specified by the
13543 * corresponding initializer, and then potentially updated by
13544 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13545 *
13546 * This field usually contains names of trainable tensors
13547 * (in ModelProto.graph), optimizer states such as momentums in advanced
13548 * stochastic gradient methods (in TrainingInfoProto.graph),
13549 * and number of training iterations (in TrainingInfoProto.graph).
13550 *
13551 * By default, this field is empty and no initializer would be changed
13552 * by the execution of "algorithm".
13553 * </pre>
13554 *
13555 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13556 */
13557 public int getUpdateBindingCount() {
13558 if (updateBindingBuilder_ == null) {
13559 return updateBinding_.size();
13560 } else {
13561 return updateBindingBuilder_.getCount();
13562 }
13563 }
13564 /**
13565 * <pre>
13566 * Gradient-based training is usually an iterative procedure. In one gradient
13567 * descent iteration, we apply
13568 *
13569 * x = x - r * g
13570 *
13571 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13572 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13573 * into the training graph, we split the update equation into
13574 *
13575 * y = x - r * g
13576 * x = y
13577 *
13578 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13579 * tell that "y" should be assigned to "x", the field "update_binding" may
13580 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13581 * and "y" (value of StringStringEntryProto).
13582 * For a neural network with multiple trainable (mutable) tensors, there can
13583 * be multiple key-value pairs in "update_binding".
13584 *
13585 * The initializers appears as keys in "update_binding" are considered
13586 * mutable variables. This implies some behaviors
13587 * as described below.
13588 *
13589 * 1. We have only unique keys in all "update_binding"s so that two
13590 * variables may not have the same name. This ensures that one
13591 * variable is assigned up to once.
13592 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13593 * "TrainingInfoProto.algorithm.initializer".
13594 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13595 * 4. Mutable variables are initialized to the value specified by the
13596 * corresponding initializer, and then potentially updated by
13597 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13598 *
13599 * This field usually contains names of trainable tensors
13600 * (in ModelProto.graph), optimizer states such as momentums in advanced
13601 * stochastic gradient methods (in TrainingInfoProto.graph),
13602 * and number of training iterations (in TrainingInfoProto.graph).
13603 *
13604 * By default, this field is empty and no initializer would be changed
13605 * by the execution of "algorithm".
13606 * </pre>
13607 *
13608 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13609 */
13610 public onnx.OnnxMl.StringStringEntryProto getUpdateBinding(int index) {
13611 if (updateBindingBuilder_ == null) {
13612 return updateBinding_.get(index);
13613 } else {
13614 return updateBindingBuilder_.getMessage(index);
13615 }
13616 }
13617 /**
13618 * <pre>
13619 * Gradient-based training is usually an iterative procedure. In one gradient
13620 * descent iteration, we apply
13621 *
13622 * x = x - r * g
13623 *
13624 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13625 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13626 * into the training graph, we split the update equation into
13627 *
13628 * y = x - r * g
13629 * x = y
13630 *
13631 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13632 * tell that "y" should be assigned to "x", the field "update_binding" may
13633 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13634 * and "y" (value of StringStringEntryProto).
13635 * For a neural network with multiple trainable (mutable) tensors, there can
13636 * be multiple key-value pairs in "update_binding".
13637 *
13638 * The initializers appears as keys in "update_binding" are considered
13639 * mutable variables. This implies some behaviors
13640 * as described below.
13641 *
13642 * 1. We have only unique keys in all "update_binding"s so that two
13643 * variables may not have the same name. This ensures that one
13644 * variable is assigned up to once.
13645 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13646 * "TrainingInfoProto.algorithm.initializer".
13647 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13648 * 4. Mutable variables are initialized to the value specified by the
13649 * corresponding initializer, and then potentially updated by
13650 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13651 *
13652 * This field usually contains names of trainable tensors
13653 * (in ModelProto.graph), optimizer states such as momentums in advanced
13654 * stochastic gradient methods (in TrainingInfoProto.graph),
13655 * and number of training iterations (in TrainingInfoProto.graph).
13656 *
13657 * By default, this field is empty and no initializer would be changed
13658 * by the execution of "algorithm".
13659 * </pre>
13660 *
13661 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13662 */
13663 public Builder setUpdateBinding(
13664 int index, onnx.OnnxMl.StringStringEntryProto value) {
13665 if (updateBindingBuilder_ == null) {
13666 if (value == null) {
13667 throw new NullPointerException();
13668 }
13669 ensureUpdateBindingIsMutable();
13670 updateBinding_.set(index, value);
13671 onChanged();
13672 } else {
13673 updateBindingBuilder_.setMessage(index, value);
13674 }
13675 return this;
13676 }
13677 /**
13678 * <pre>
13679 * Gradient-based training is usually an iterative procedure. In one gradient
13680 * descent iteration, we apply
13681 *
13682 * x = x - r * g
13683 *
13684 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13685 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13686 * into the training graph, we split the update equation into
13687 *
13688 * y = x - r * g
13689 * x = y
13690 *
13691 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13692 * tell that "y" should be assigned to "x", the field "update_binding" may
13693 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13694 * and "y" (value of StringStringEntryProto).
13695 * For a neural network with multiple trainable (mutable) tensors, there can
13696 * be multiple key-value pairs in "update_binding".
13697 *
13698 * The initializers appears as keys in "update_binding" are considered
13699 * mutable variables. This implies some behaviors
13700 * as described below.
13701 *
13702 * 1. We have only unique keys in all "update_binding"s so that two
13703 * variables may not have the same name. This ensures that one
13704 * variable is assigned up to once.
13705 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13706 * "TrainingInfoProto.algorithm.initializer".
13707 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13708 * 4. Mutable variables are initialized to the value specified by the
13709 * corresponding initializer, and then potentially updated by
13710 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13711 *
13712 * This field usually contains names of trainable tensors
13713 * (in ModelProto.graph), optimizer states such as momentums in advanced
13714 * stochastic gradient methods (in TrainingInfoProto.graph),
13715 * and number of training iterations (in TrainingInfoProto.graph).
13716 *
13717 * By default, this field is empty and no initializer would be changed
13718 * by the execution of "algorithm".
13719 * </pre>
13720 *
13721 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13722 */
13723 public Builder setUpdateBinding(
13724 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13725 if (updateBindingBuilder_ == null) {
13726 ensureUpdateBindingIsMutable();
13727 updateBinding_.set(index, builderForValue.build());
13728 onChanged();
13729 } else {
13730 updateBindingBuilder_.setMessage(index, builderForValue.build());
13731 }
13732 return this;
13733 }
13734 /**
13735 * <pre>
13736 * Gradient-based training is usually an iterative procedure. In one gradient
13737 * descent iteration, we apply
13738 *
13739 * x = x - r * g
13740 *
13741 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13742 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13743 * into the training graph, we split the update equation into
13744 *
13745 * y = x - r * g
13746 * x = y
13747 *
13748 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13749 * tell that "y" should be assigned to "x", the field "update_binding" may
13750 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13751 * and "y" (value of StringStringEntryProto).
13752 * For a neural network with multiple trainable (mutable) tensors, there can
13753 * be multiple key-value pairs in "update_binding".
13754 *
13755 * The initializers appears as keys in "update_binding" are considered
13756 * mutable variables. This implies some behaviors
13757 * as described below.
13758 *
13759 * 1. We have only unique keys in all "update_binding"s so that two
13760 * variables may not have the same name. This ensures that one
13761 * variable is assigned up to once.
13762 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13763 * "TrainingInfoProto.algorithm.initializer".
13764 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13765 * 4. Mutable variables are initialized to the value specified by the
13766 * corresponding initializer, and then potentially updated by
13767 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13768 *
13769 * This field usually contains names of trainable tensors
13770 * (in ModelProto.graph), optimizer states such as momentums in advanced
13771 * stochastic gradient methods (in TrainingInfoProto.graph),
13772 * and number of training iterations (in TrainingInfoProto.graph).
13773 *
13774 * By default, this field is empty and no initializer would be changed
13775 * by the execution of "algorithm".
13776 * </pre>
13777 *
13778 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13779 */
13780 public Builder addUpdateBinding(onnx.OnnxMl.StringStringEntryProto value) {
13781 if (updateBindingBuilder_ == null) {
13782 if (value == null) {
13783 throw new NullPointerException();
13784 }
13785 ensureUpdateBindingIsMutable();
13786 updateBinding_.add(value);
13787 onChanged();
13788 } else {
13789 updateBindingBuilder_.addMessage(value);
13790 }
13791 return this;
13792 }
13793 /**
13794 * <pre>
13795 * Gradient-based training is usually an iterative procedure. In one gradient
13796 * descent iteration, we apply
13797 *
13798 * x = x - r * g
13799 *
13800 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13801 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13802 * into the training graph, we split the update equation into
13803 *
13804 * y = x - r * g
13805 * x = y
13806 *
13807 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13808 * tell that "y" should be assigned to "x", the field "update_binding" may
13809 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13810 * and "y" (value of StringStringEntryProto).
13811 * For a neural network with multiple trainable (mutable) tensors, there can
13812 * be multiple key-value pairs in "update_binding".
13813 *
13814 * The initializers appears as keys in "update_binding" are considered
13815 * mutable variables. This implies some behaviors
13816 * as described below.
13817 *
13818 * 1. We have only unique keys in all "update_binding"s so that two
13819 * variables may not have the same name. This ensures that one
13820 * variable is assigned up to once.
13821 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13822 * "TrainingInfoProto.algorithm.initializer".
13823 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13824 * 4. Mutable variables are initialized to the value specified by the
13825 * corresponding initializer, and then potentially updated by
13826 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13827 *
13828 * This field usually contains names of trainable tensors
13829 * (in ModelProto.graph), optimizer states such as momentums in advanced
13830 * stochastic gradient methods (in TrainingInfoProto.graph),
13831 * and number of training iterations (in TrainingInfoProto.graph).
13832 *
13833 * By default, this field is empty and no initializer would be changed
13834 * by the execution of "algorithm".
13835 * </pre>
13836 *
13837 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13838 */
13839 public Builder addUpdateBinding(
13840 int index, onnx.OnnxMl.StringStringEntryProto value) {
13841 if (updateBindingBuilder_ == null) {
13842 if (value == null) {
13843 throw new NullPointerException();
13844 }
13845 ensureUpdateBindingIsMutable();
13846 updateBinding_.add(index, value);
13847 onChanged();
13848 } else {
13849 updateBindingBuilder_.addMessage(index, value);
13850 }
13851 return this;
13852 }
13853 /**
13854 * <pre>
13855 * Gradient-based training is usually an iterative procedure. In one gradient
13856 * descent iteration, we apply
13857 *
13858 * x = x - r * g
13859 *
13860 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13861 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13862 * into the training graph, we split the update equation into
13863 *
13864 * y = x - r * g
13865 * x = y
13866 *
13867 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13868 * tell that "y" should be assigned to "x", the field "update_binding" may
13869 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13870 * and "y" (value of StringStringEntryProto).
13871 * For a neural network with multiple trainable (mutable) tensors, there can
13872 * be multiple key-value pairs in "update_binding".
13873 *
13874 * The initializers appears as keys in "update_binding" are considered
13875 * mutable variables. This implies some behaviors
13876 * as described below.
13877 *
13878 * 1. We have only unique keys in all "update_binding"s so that two
13879 * variables may not have the same name. This ensures that one
13880 * variable is assigned up to once.
13881 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13882 * "TrainingInfoProto.algorithm.initializer".
13883 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13884 * 4. Mutable variables are initialized to the value specified by the
13885 * corresponding initializer, and then potentially updated by
13886 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13887 *
13888 * This field usually contains names of trainable tensors
13889 * (in ModelProto.graph), optimizer states such as momentums in advanced
13890 * stochastic gradient methods (in TrainingInfoProto.graph),
13891 * and number of training iterations (in TrainingInfoProto.graph).
13892 *
13893 * By default, this field is empty and no initializer would be changed
13894 * by the execution of "algorithm".
13895 * </pre>
13896 *
13897 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13898 */
13899 public Builder addUpdateBinding(
13900 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13901 if (updateBindingBuilder_ == null) {
13902 ensureUpdateBindingIsMutable();
13903 updateBinding_.add(builderForValue.build());
13904 onChanged();
13905 } else {
13906 updateBindingBuilder_.addMessage(builderForValue.build());
13907 }
13908 return this;
13909 }
13910 /**
13911 * <pre>
13912 * Gradient-based training is usually an iterative procedure. In one gradient
13913 * descent iteration, we apply
13914 *
13915 * x = x - r * g
13916 *
13917 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13918 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13919 * into the training graph, we split the update equation into
13920 *
13921 * y = x - r * g
13922 * x = y
13923 *
13924 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13925 * tell that "y" should be assigned to "x", the field "update_binding" may
13926 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13927 * and "y" (value of StringStringEntryProto).
13928 * For a neural network with multiple trainable (mutable) tensors, there can
13929 * be multiple key-value pairs in "update_binding".
13930 *
13931 * The initializers appears as keys in "update_binding" are considered
13932 * mutable variables. This implies some behaviors
13933 * as described below.
13934 *
13935 * 1. We have only unique keys in all "update_binding"s so that two
13936 * variables may not have the same name. This ensures that one
13937 * variable is assigned up to once.
13938 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13939 * "TrainingInfoProto.algorithm.initializer".
13940 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13941 * 4. Mutable variables are initialized to the value specified by the
13942 * corresponding initializer, and then potentially updated by
13943 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
13944 *
13945 * This field usually contains names of trainable tensors
13946 * (in ModelProto.graph), optimizer states such as momentums in advanced
13947 * stochastic gradient methods (in TrainingInfoProto.graph),
13948 * and number of training iterations (in TrainingInfoProto.graph).
13949 *
13950 * By default, this field is empty and no initializer would be changed
13951 * by the execution of "algorithm".
13952 * </pre>
13953 *
13954 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
13955 */
13956 public Builder addUpdateBinding(
13957 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
13958 if (updateBindingBuilder_ == null) {
13959 ensureUpdateBindingIsMutable();
13960 updateBinding_.add(index, builderForValue.build());
13961 onChanged();
13962 } else {
13963 updateBindingBuilder_.addMessage(index, builderForValue.build());
13964 }
13965 return this;
13966 }
13967 /**
13968 * <pre>
13969 * Gradient-based training is usually an iterative procedure. In one gradient
13970 * descent iteration, we apply
13971 *
13972 * x = x - r * g
13973 *
13974 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
13975 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
13976 * into the training graph, we split the update equation into
13977 *
13978 * y = x - r * g
13979 * x = y
13980 *
13981 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
13982 * tell that "y" should be assigned to "x", the field "update_binding" may
13983 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
13984 * and "y" (value of StringStringEntryProto).
13985 * For a neural network with multiple trainable (mutable) tensors, there can
13986 * be multiple key-value pairs in "update_binding".
13987 *
13988 * The initializers appears as keys in "update_binding" are considered
13989 * mutable variables. This implies some behaviors
13990 * as described below.
13991 *
13992 * 1. We have only unique keys in all "update_binding"s so that two
13993 * variables may not have the same name. This ensures that one
13994 * variable is assigned up to once.
13995 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
13996 * "TrainingInfoProto.algorithm.initializer".
13997 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
13998 * 4. Mutable variables are initialized to the value specified by the
13999 * corresponding initializer, and then potentially updated by
14000 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14001 *
14002 * This field usually contains names of trainable tensors
14003 * (in ModelProto.graph), optimizer states such as momentums in advanced
14004 * stochastic gradient methods (in TrainingInfoProto.graph),
14005 * and number of training iterations (in TrainingInfoProto.graph).
14006 *
14007 * By default, this field is empty and no initializer would be changed
14008 * by the execution of "algorithm".
14009 * </pre>
14010 *
14011 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14012 */
14013 public Builder addAllUpdateBinding(
14014 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
14015 if (updateBindingBuilder_ == null) {
14016 ensureUpdateBindingIsMutable();
14017 com.google.protobuf.AbstractMessageLite.Builder.addAll(
14018 values, updateBinding_);
14019 onChanged();
14020 } else {
14021 updateBindingBuilder_.addAllMessages(values);
14022 }
14023 return this;
14024 }
14025 /**
14026 * <pre>
14027 * Gradient-based training is usually an iterative procedure. In one gradient
14028 * descent iteration, we apply
14029 *
14030 * x = x - r * g
14031 *
14032 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14033 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14034 * into the training graph, we split the update equation into
14035 *
14036 * y = x - r * g
14037 * x = y
14038 *
14039 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14040 * tell that "y" should be assigned to "x", the field "update_binding" may
14041 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14042 * and "y" (value of StringStringEntryProto).
14043 * For a neural network with multiple trainable (mutable) tensors, there can
14044 * be multiple key-value pairs in "update_binding".
14045 *
14046 * The initializers appears as keys in "update_binding" are considered
14047 * mutable variables. This implies some behaviors
14048 * as described below.
14049 *
14050 * 1. We have only unique keys in all "update_binding"s so that two
14051 * variables may not have the same name. This ensures that one
14052 * variable is assigned up to once.
14053 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14054 * "TrainingInfoProto.algorithm.initializer".
14055 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14056 * 4. Mutable variables are initialized to the value specified by the
14057 * corresponding initializer, and then potentially updated by
14058 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14059 *
14060 * This field usually contains names of trainable tensors
14061 * (in ModelProto.graph), optimizer states such as momentums in advanced
14062 * stochastic gradient methods (in TrainingInfoProto.graph),
14063 * and number of training iterations (in TrainingInfoProto.graph).
14064 *
14065 * By default, this field is empty and no initializer would be changed
14066 * by the execution of "algorithm".
14067 * </pre>
14068 *
14069 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14070 */
14071 public Builder clearUpdateBinding() {
14072 if (updateBindingBuilder_ == null) {
14073 updateBinding_ = java.util.Collections.emptyList();
14074 bitField0_ = (bitField0_ & ~0x00000008);
14075 onChanged();
14076 } else {
14077 updateBindingBuilder_.clear();
14078 }
14079 return this;
14080 }
14081 /**
14082 * <pre>
14083 * Gradient-based training is usually an iterative procedure. In one gradient
14084 * descent iteration, we apply
14085 *
14086 * x = x - r * g
14087 *
14088 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14089 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14090 * into the training graph, we split the update equation into
14091 *
14092 * y = x - r * g
14093 * x = y
14094 *
14095 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14096 * tell that "y" should be assigned to "x", the field "update_binding" may
14097 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14098 * and "y" (value of StringStringEntryProto).
14099 * For a neural network with multiple trainable (mutable) tensors, there can
14100 * be multiple key-value pairs in "update_binding".
14101 *
14102 * The initializers appears as keys in "update_binding" are considered
14103 * mutable variables. This implies some behaviors
14104 * as described below.
14105 *
14106 * 1. We have only unique keys in all "update_binding"s so that two
14107 * variables may not have the same name. This ensures that one
14108 * variable is assigned up to once.
14109 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14110 * "TrainingInfoProto.algorithm.initializer".
14111 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14112 * 4. Mutable variables are initialized to the value specified by the
14113 * corresponding initializer, and then potentially updated by
14114 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14115 *
14116 * This field usually contains names of trainable tensors
14117 * (in ModelProto.graph), optimizer states such as momentums in advanced
14118 * stochastic gradient methods (in TrainingInfoProto.graph),
14119 * and number of training iterations (in TrainingInfoProto.graph).
14120 *
14121 * By default, this field is empty and no initializer would be changed
14122 * by the execution of "algorithm".
14123 * </pre>
14124 *
14125 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14126 */
14127 public Builder removeUpdateBinding(int index) {
14128 if (updateBindingBuilder_ == null) {
14129 ensureUpdateBindingIsMutable();
14130 updateBinding_.remove(index);
14131 onChanged();
14132 } else {
14133 updateBindingBuilder_.remove(index);
14134 }
14135 return this;
14136 }
14137 /**
14138 * <pre>
14139 * Gradient-based training is usually an iterative procedure. In one gradient
14140 * descent iteration, we apply
14141 *
14142 * x = x - r * g
14143 *
14144 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14145 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14146 * into the training graph, we split the update equation into
14147 *
14148 * y = x - r * g
14149 * x = y
14150 *
14151 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14152 * tell that "y" should be assigned to "x", the field "update_binding" may
14153 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14154 * and "y" (value of StringStringEntryProto).
14155 * For a neural network with multiple trainable (mutable) tensors, there can
14156 * be multiple key-value pairs in "update_binding".
14157 *
14158 * The initializers appears as keys in "update_binding" are considered
14159 * mutable variables. This implies some behaviors
14160 * as described below.
14161 *
14162 * 1. We have only unique keys in all "update_binding"s so that two
14163 * variables may not have the same name. This ensures that one
14164 * variable is assigned up to once.
14165 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14166 * "TrainingInfoProto.algorithm.initializer".
14167 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14168 * 4. Mutable variables are initialized to the value specified by the
14169 * corresponding initializer, and then potentially updated by
14170 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14171 *
14172 * This field usually contains names of trainable tensors
14173 * (in ModelProto.graph), optimizer states such as momentums in advanced
14174 * stochastic gradient methods (in TrainingInfoProto.graph),
14175 * and number of training iterations (in TrainingInfoProto.graph).
14176 *
14177 * By default, this field is empty and no initializer would be changed
14178 * by the execution of "algorithm".
14179 * </pre>
14180 *
14181 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14182 */
14183 public onnx.OnnxMl.StringStringEntryProto.Builder getUpdateBindingBuilder(
14184 int index) {
14185 return getUpdateBindingFieldBuilder().getBuilder(index);
14186 }
14187 /**
14188 * <pre>
14189 * Gradient-based training is usually an iterative procedure. In one gradient
14190 * descent iteration, we apply
14191 *
14192 * x = x - r * g
14193 *
14194 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14195 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14196 * into the training graph, we split the update equation into
14197 *
14198 * y = x - r * g
14199 * x = y
14200 *
14201 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14202 * tell that "y" should be assigned to "x", the field "update_binding" may
14203 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14204 * and "y" (value of StringStringEntryProto).
14205 * For a neural network with multiple trainable (mutable) tensors, there can
14206 * be multiple key-value pairs in "update_binding".
14207 *
14208 * The initializers appears as keys in "update_binding" are considered
14209 * mutable variables. This implies some behaviors
14210 * as described below.
14211 *
14212 * 1. We have only unique keys in all "update_binding"s so that two
14213 * variables may not have the same name. This ensures that one
14214 * variable is assigned up to once.
14215 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14216 * "TrainingInfoProto.algorithm.initializer".
14217 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14218 * 4. Mutable variables are initialized to the value specified by the
14219 * corresponding initializer, and then potentially updated by
14220 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14221 *
14222 * This field usually contains names of trainable tensors
14223 * (in ModelProto.graph), optimizer states such as momentums in advanced
14224 * stochastic gradient methods (in TrainingInfoProto.graph),
14225 * and number of training iterations (in TrainingInfoProto.graph).
14226 *
14227 * By default, this field is empty and no initializer would be changed
14228 * by the execution of "algorithm".
14229 * </pre>
14230 *
14231 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14232 */
14233 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getUpdateBindingOrBuilder(
14234 int index) {
14235 if (updateBindingBuilder_ == null) {
14236 return updateBinding_.get(index); } else {
14237 return updateBindingBuilder_.getMessageOrBuilder(index);
14238 }
14239 }
14240 /**
14241 * <pre>
14242 * Gradient-based training is usually an iterative procedure. In one gradient
14243 * descent iteration, we apply
14244 *
14245 * x = x - r * g
14246 *
14247 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14248 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14249 * into the training graph, we split the update equation into
14250 *
14251 * y = x - r * g
14252 * x = y
14253 *
14254 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14255 * tell that "y" should be assigned to "x", the field "update_binding" may
14256 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14257 * and "y" (value of StringStringEntryProto).
14258 * For a neural network with multiple trainable (mutable) tensors, there can
14259 * be multiple key-value pairs in "update_binding".
14260 *
14261 * The initializers appears as keys in "update_binding" are considered
14262 * mutable variables. This implies some behaviors
14263 * as described below.
14264 *
14265 * 1. We have only unique keys in all "update_binding"s so that two
14266 * variables may not have the same name. This ensures that one
14267 * variable is assigned up to once.
14268 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14269 * "TrainingInfoProto.algorithm.initializer".
14270 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14271 * 4. Mutable variables are initialized to the value specified by the
14272 * corresponding initializer, and then potentially updated by
14273 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14274 *
14275 * This field usually contains names of trainable tensors
14276 * (in ModelProto.graph), optimizer states such as momentums in advanced
14277 * stochastic gradient methods (in TrainingInfoProto.graph),
14278 * and number of training iterations (in TrainingInfoProto.graph).
14279 *
14280 * By default, this field is empty and no initializer would be changed
14281 * by the execution of "algorithm".
14282 * </pre>
14283 *
14284 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14285 */
14286 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
14287 getUpdateBindingOrBuilderList() {
14288 if (updateBindingBuilder_ != null) {
14289 return updateBindingBuilder_.getMessageOrBuilderList();
14290 } else {
14291 return java.util.Collections.unmodifiableList(updateBinding_);
14292 }
14293 }
14294 /**
14295 * <pre>
14296 * Gradient-based training is usually an iterative procedure. In one gradient
14297 * descent iteration, we apply
14298 *
14299 * x = x - r * g
14300 *
14301 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14302 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14303 * into the training graph, we split the update equation into
14304 *
14305 * y = x - r * g
14306 * x = y
14307 *
14308 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14309 * tell that "y" should be assigned to "x", the field "update_binding" may
14310 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14311 * and "y" (value of StringStringEntryProto).
14312 * For a neural network with multiple trainable (mutable) tensors, there can
14313 * be multiple key-value pairs in "update_binding".
14314 *
14315 * The initializers appears as keys in "update_binding" are considered
14316 * mutable variables. This implies some behaviors
14317 * as described below.
14318 *
14319 * 1. We have only unique keys in all "update_binding"s so that two
14320 * variables may not have the same name. This ensures that one
14321 * variable is assigned up to once.
14322 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14323 * "TrainingInfoProto.algorithm.initializer".
14324 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14325 * 4. Mutable variables are initialized to the value specified by the
14326 * corresponding initializer, and then potentially updated by
14327 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14328 *
14329 * This field usually contains names of trainable tensors
14330 * (in ModelProto.graph), optimizer states such as momentums in advanced
14331 * stochastic gradient methods (in TrainingInfoProto.graph),
14332 * and number of training iterations (in TrainingInfoProto.graph).
14333 *
14334 * By default, this field is empty and no initializer would be changed
14335 * by the execution of "algorithm".
14336 * </pre>
14337 *
14338 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14339 */
14340 public onnx.OnnxMl.StringStringEntryProto.Builder addUpdateBindingBuilder() {
14341 return getUpdateBindingFieldBuilder().addBuilder(
14342 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
14343 }
14344 /**
14345 * <pre>
14346 * Gradient-based training is usually an iterative procedure. In one gradient
14347 * descent iteration, we apply
14348 *
14349 * x = x - r * g
14350 *
14351 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14352 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14353 * into the training graph, we split the update equation into
14354 *
14355 * y = x - r * g
14356 * x = y
14357 *
14358 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14359 * tell that "y" should be assigned to "x", the field "update_binding" may
14360 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14361 * and "y" (value of StringStringEntryProto).
14362 * For a neural network with multiple trainable (mutable) tensors, there can
14363 * be multiple key-value pairs in "update_binding".
14364 *
14365 * The initializers appears as keys in "update_binding" are considered
14366 * mutable variables. This implies some behaviors
14367 * as described below.
14368 *
14369 * 1. We have only unique keys in all "update_binding"s so that two
14370 * variables may not have the same name. This ensures that one
14371 * variable is assigned up to once.
14372 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14373 * "TrainingInfoProto.algorithm.initializer".
14374 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14375 * 4. Mutable variables are initialized to the value specified by the
14376 * corresponding initializer, and then potentially updated by
14377 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14378 *
14379 * This field usually contains names of trainable tensors
14380 * (in ModelProto.graph), optimizer states such as momentums in advanced
14381 * stochastic gradient methods (in TrainingInfoProto.graph),
14382 * and number of training iterations (in TrainingInfoProto.graph).
14383 *
14384 * By default, this field is empty and no initializer would be changed
14385 * by the execution of "algorithm".
14386 * </pre>
14387 *
14388 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14389 */
14390 public onnx.OnnxMl.StringStringEntryProto.Builder addUpdateBindingBuilder(
14391 int index) {
14392 return getUpdateBindingFieldBuilder().addBuilder(
14393 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
14394 }
14395 /**
14396 * <pre>
14397 * Gradient-based training is usually an iterative procedure. In one gradient
14398 * descent iteration, we apply
14399 *
14400 * x = x - r * g
14401 *
14402 * where "x" is the optimized tensor, "r" stands for learning rate, and "g" is
14403 * gradient of "x" with respect to a chosen loss. To avoid adding assignments
14404 * into the training graph, we split the update equation into
14405 *
14406 * y = x - r * g
14407 * x = y
14408 *
14409 * The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To
14410 * tell that "y" should be assigned to "x", the field "update_binding" may
14411 * contain a key-value pair of strings, "x" (key of StringStringEntryProto)
14412 * and "y" (value of StringStringEntryProto).
14413 * For a neural network with multiple trainable (mutable) tensors, there can
14414 * be multiple key-value pairs in "update_binding".
14415 *
14416 * The initializers appears as keys in "update_binding" are considered
14417 * mutable variables. This implies some behaviors
14418 * as described below.
14419 *
14420 * 1. We have only unique keys in all "update_binding"s so that two
14421 * variables may not have the same name. This ensures that one
14422 * variable is assigned up to once.
14423 * 2. The keys must appear in names of "ModelProto.graph.initializer" or
14424 * "TrainingInfoProto.algorithm.initializer".
14425 * 3. The values must be output names of "algorithm" or "ModelProto.graph.output".
14426 * 4. Mutable variables are initialized to the value specified by the
14427 * corresponding initializer, and then potentially updated by
14428 * "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s.
14429 *
14430 * This field usually contains names of trainable tensors
14431 * (in ModelProto.graph), optimizer states such as momentums in advanced
14432 * stochastic gradient methods (in TrainingInfoProto.graph),
14433 * and number of training iterations (in TrainingInfoProto.graph).
14434 *
14435 * By default, this field is empty and no initializer would be changed
14436 * by the execution of "algorithm".
14437 * </pre>
14438 *
14439 * <code>repeated .onnx.StringStringEntryProto update_binding = 4;</code>
14440 */
14441 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
14442 getUpdateBindingBuilderList() {
14443 return getUpdateBindingFieldBuilder().getBuilderList();
14444 }
14445 private com.google.protobuf.RepeatedFieldBuilder<
14446 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
14447 getUpdateBindingFieldBuilder() {
14448 if (updateBindingBuilder_ == null) {
14449 updateBindingBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
14450 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
14451 updateBinding_,
14452 ((bitField0_ & 0x00000008) != 0),
14453 getParentForChildren(),
14454 isClean());
14455 updateBinding_ = null;
14456 }
14457 return updateBindingBuilder_;
14458 }
14459
14460 // @@protoc_insertion_point(builder_scope:onnx.TrainingInfoProto)
14461 }
14462
14463 // @@protoc_insertion_point(class_scope:onnx.TrainingInfoProto)
14464 private static final onnx.OnnxMl.TrainingInfoProto DEFAULT_INSTANCE;
14465 static {
14466 DEFAULT_INSTANCE = new onnx.OnnxMl.TrainingInfoProto();
14467 }
14468
14469 public static onnx.OnnxMl.TrainingInfoProto getDefaultInstance() {
14470 return DEFAULT_INSTANCE;
14471 }
14472
14473 private static final com.google.protobuf.Parser<TrainingInfoProto>
14474 PARSER = new com.google.protobuf.AbstractParser<TrainingInfoProto>() {
14475 @java.lang.Override
14476 public TrainingInfoProto parsePartialFrom(
14477 com.google.protobuf.CodedInputStream input,
14478 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14479 throws com.google.protobuf.InvalidProtocolBufferException {
14480 Builder builder = newBuilder();
14481 try {
14482 builder.mergeFrom(input, extensionRegistry);
14483 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
14484 throw e.setUnfinishedMessage(builder.buildPartial());
14485 } catch (com.google.protobuf.UninitializedMessageException e) {
14486 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
14487 } catch (java.io.IOException e) {
14488 throw new com.google.protobuf.InvalidProtocolBufferException(e)
14489 .setUnfinishedMessage(builder.buildPartial());
14490 }
14491 return builder.buildPartial();
14492 }
14493 };
14494
14495 public static com.google.protobuf.Parser<TrainingInfoProto> parser() {
14496 return PARSER;
14497 }
14498
14499 @java.lang.Override
14500 public com.google.protobuf.Parser<TrainingInfoProto> getParserForType() {
14501 return PARSER;
14502 }
14503
14504 @java.lang.Override
14505 public onnx.OnnxMl.TrainingInfoProto getDefaultInstanceForType() {
14506 return DEFAULT_INSTANCE;
14507 }
14508
14509 }
14510
14511 public interface ModelProtoOrBuilder extends
14512 // @@protoc_insertion_point(interface_extends:onnx.ModelProto)
14513 com.google.protobuf.MessageOrBuilder {
14514
14515 /**
14516 * <pre>
14517 * The version of the IR this model targets. See Version enum above.
14518 * This field MUST be present.
14519 * </pre>
14520 *
14521 * <code>optional int64 ir_version = 1;</code>
14522 * @return Whether the irVersion field is set.
14523 */
14524 boolean hasIrVersion();
14525 /**
14526 * <pre>
14527 * The version of the IR this model targets. See Version enum above.
14528 * This field MUST be present.
14529 * </pre>
14530 *
14531 * <code>optional int64 ir_version = 1;</code>
14532 * @return The irVersion.
14533 */
14534 long getIrVersion();
14535
14536 /**
14537 * <pre>
14538 * The OperatorSets this model relies on.
14539 * All ModelProtos MUST have at least one entry that
14540 * specifies which version of the ONNX OperatorSet is
14541 * being imported.
14542 *
14543 * All nodes in the ModelProto's graph will bind against the operator
14544 * with the same-domain/same-op_type operator with the HIGHEST version
14545 * in the referenced operator sets.
14546 * </pre>
14547 *
14548 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
14549 */
14550 java.util.List<onnx.OnnxMl.OperatorSetIdProto>
14551 getOpsetImportList();
14552 /**
14553 * <pre>
14554 * The OperatorSets this model relies on.
14555 * All ModelProtos MUST have at least one entry that
14556 * specifies which version of the ONNX OperatorSet is
14557 * being imported.
14558 *
14559 * All nodes in the ModelProto's graph will bind against the operator
14560 * with the same-domain/same-op_type operator with the HIGHEST version
14561 * in the referenced operator sets.
14562 * </pre>
14563 *
14564 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
14565 */
14566 onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index);
14567 /**
14568 * <pre>
14569 * The OperatorSets this model relies on.
14570 * All ModelProtos MUST have at least one entry that
14571 * specifies which version of the ONNX OperatorSet is
14572 * being imported.
14573 *
14574 * All nodes in the ModelProto's graph will bind against the operator
14575 * with the same-domain/same-op_type operator with the HIGHEST version
14576 * in the referenced operator sets.
14577 * </pre>
14578 *
14579 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
14580 */
14581 int getOpsetImportCount();
14582 /**
14583 * <pre>
14584 * The OperatorSets this model relies on.
14585 * All ModelProtos MUST have at least one entry that
14586 * specifies which version of the ONNX OperatorSet is
14587 * being imported.
14588 *
14589 * All nodes in the ModelProto's graph will bind against the operator
14590 * with the same-domain/same-op_type operator with the HIGHEST version
14591 * in the referenced operator sets.
14592 * </pre>
14593 *
14594 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
14595 */
14596 java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
14597 getOpsetImportOrBuilderList();
14598 /**
14599 * <pre>
14600 * The OperatorSets this model relies on.
14601 * All ModelProtos MUST have at least one entry that
14602 * specifies which version of the ONNX OperatorSet is
14603 * being imported.
14604 *
14605 * All nodes in the ModelProto's graph will bind against the operator
14606 * with the same-domain/same-op_type operator with the HIGHEST version
14607 * in the referenced operator sets.
14608 * </pre>
14609 *
14610 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
14611 */
14612 onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
14613 int index);
14614
14615 /**
14616 * <pre>
14617 * The name of the framework or tool used to generate this model.
14618 * This field SHOULD be present to indicate which implementation/tool/framework
14619 * emitted the model.
14620 * </pre>
14621 *
14622 * <code>optional string producer_name = 2;</code>
14623 * @return Whether the producerName field is set.
14624 */
14625 boolean hasProducerName();
14626 /**
14627 * <pre>
14628 * The name of the framework or tool used to generate this model.
14629 * This field SHOULD be present to indicate which implementation/tool/framework
14630 * emitted the model.
14631 * </pre>
14632 *
14633 * <code>optional string producer_name = 2;</code>
14634 * @return The producerName.
14635 */
14636 java.lang.String getProducerName();
14637 /**
14638 * <pre>
14639 * The name of the framework or tool used to generate this model.
14640 * This field SHOULD be present to indicate which implementation/tool/framework
14641 * emitted the model.
14642 * </pre>
14643 *
14644 * <code>optional string producer_name = 2;</code>
14645 * @return The bytes for producerName.
14646 */
14647 com.google.protobuf.ByteString
14648 getProducerNameBytes();
14649
14650 /**
14651 * <pre>
14652 * The version of the framework or tool used to generate this model.
14653 * This field SHOULD be present to indicate which implementation/tool/framework
14654 * emitted the model.
14655 * </pre>
14656 *
14657 * <code>optional string producer_version = 3;</code>
14658 * @return Whether the producerVersion field is set.
14659 */
14660 boolean hasProducerVersion();
14661 /**
14662 * <pre>
14663 * The version of the framework or tool used to generate this model.
14664 * This field SHOULD be present to indicate which implementation/tool/framework
14665 * emitted the model.
14666 * </pre>
14667 *
14668 * <code>optional string producer_version = 3;</code>
14669 * @return The producerVersion.
14670 */
14671 java.lang.String getProducerVersion();
14672 /**
14673 * <pre>
14674 * The version of the framework or tool used to generate this model.
14675 * This field SHOULD be present to indicate which implementation/tool/framework
14676 * emitted the model.
14677 * </pre>
14678 *
14679 * <code>optional string producer_version = 3;</code>
14680 * @return The bytes for producerVersion.
14681 */
14682 com.google.protobuf.ByteString
14683 getProducerVersionBytes();
14684
14685 /**
14686 * <pre>
14687 * Domain name of the model.
14688 * We use reverse domain names as name space indicators. For example:
14689 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
14690 *
14691 * Together with `model_version` and GraphProto.name, this forms the unique identity of
14692 * the graph.
14693 * </pre>
14694 *
14695 * <code>optional string domain = 4;</code>
14696 * @return Whether the domain field is set.
14697 */
14698 boolean hasDomain();
14699 /**
14700 * <pre>
14701 * Domain name of the model.
14702 * We use reverse domain names as name space indicators. For example:
14703 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
14704 *
14705 * Together with `model_version` and GraphProto.name, this forms the unique identity of
14706 * the graph.
14707 * </pre>
14708 *
14709 * <code>optional string domain = 4;</code>
14710 * @return The domain.
14711 */
14712 java.lang.String getDomain();
14713 /**
14714 * <pre>
14715 * Domain name of the model.
14716 * We use reverse domain names as name space indicators. For example:
14717 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
14718 *
14719 * Together with `model_version` and GraphProto.name, this forms the unique identity of
14720 * the graph.
14721 * </pre>
14722 *
14723 * <code>optional string domain = 4;</code>
14724 * @return The bytes for domain.
14725 */
14726 com.google.protobuf.ByteString
14727 getDomainBytes();
14728
14729 /**
14730 * <pre>
14731 * The version of the graph encoded. See Version enum below.
14732 * </pre>
14733 *
14734 * <code>optional int64 model_version = 5;</code>
14735 * @return Whether the modelVersion field is set.
14736 */
14737 boolean hasModelVersion();
14738 /**
14739 * <pre>
14740 * The version of the graph encoded. See Version enum below.
14741 * </pre>
14742 *
14743 * <code>optional int64 model_version = 5;</code>
14744 * @return The modelVersion.
14745 */
14746 long getModelVersion();
14747
14748 /**
14749 * <pre>
14750 * A human-readable documentation for this model. Markdown is allowed.
14751 * </pre>
14752 *
14753 * <code>optional string doc_string = 6;</code>
14754 * @return Whether the docString field is set.
14755 */
14756 boolean hasDocString();
14757 /**
14758 * <pre>
14759 * A human-readable documentation for this model. Markdown is allowed.
14760 * </pre>
14761 *
14762 * <code>optional string doc_string = 6;</code>
14763 * @return The docString.
14764 */
14765 java.lang.String getDocString();
14766 /**
14767 * <pre>
14768 * A human-readable documentation for this model. Markdown is allowed.
14769 * </pre>
14770 *
14771 * <code>optional string doc_string = 6;</code>
14772 * @return The bytes for docString.
14773 */
14774 com.google.protobuf.ByteString
14775 getDocStringBytes();
14776
14777 /**
14778 * <pre>
14779 * The parameterized graph that is evaluated to execute the model.
14780 * </pre>
14781 *
14782 * <code>optional .onnx.GraphProto graph = 7;</code>
14783 * @return Whether the graph field is set.
14784 */
14785 boolean hasGraph();
14786 /**
14787 * <pre>
14788 * The parameterized graph that is evaluated to execute the model.
14789 * </pre>
14790 *
14791 * <code>optional .onnx.GraphProto graph = 7;</code>
14792 * @return The graph.
14793 */
14794 onnx.OnnxMl.GraphProto getGraph();
14795 /**
14796 * <pre>
14797 * The parameterized graph that is evaluated to execute the model.
14798 * </pre>
14799 *
14800 * <code>optional .onnx.GraphProto graph = 7;</code>
14801 */
14802 onnx.OnnxMl.GraphProtoOrBuilder getGraphOrBuilder();
14803
14804 /**
14805 * <pre>
14806 * Named metadata values; keys should be distinct.
14807 * </pre>
14808 *
14809 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
14810 */
14811 java.util.List<onnx.OnnxMl.StringStringEntryProto>
14812 getMetadataPropsList();
14813 /**
14814 * <pre>
14815 * Named metadata values; keys should be distinct.
14816 * </pre>
14817 *
14818 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
14819 */
14820 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
14821 /**
14822 * <pre>
14823 * Named metadata values; keys should be distinct.
14824 * </pre>
14825 *
14826 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
14827 */
14828 int getMetadataPropsCount();
14829 /**
14830 * <pre>
14831 * Named metadata values; keys should be distinct.
14832 * </pre>
14833 *
14834 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
14835 */
14836 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
14837 getMetadataPropsOrBuilderList();
14838 /**
14839 * <pre>
14840 * Named metadata values; keys should be distinct.
14841 * </pre>
14842 *
14843 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
14844 */
14845 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
14846 int index);
14847
14848 /**
14849 * <pre>
14850 * Training-specific information. Sequentially executing all stored
14851 * `TrainingInfoProto.algorithm`s and assigning their outputs following
14852 * the corresponding `TrainingInfoProto.update_binding`s is one training
14853 * iteration. Similarly, to initialize the model
14854 * (as if training hasn't happened), the user should sequentially execute
14855 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
14856 * using `TrainingInfoProto.initialization_binding`s.
14857 *
14858 * If this field is empty, the training behavior of the model is undefined.
14859 * </pre>
14860 *
14861 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
14862 */
14863 java.util.List<onnx.OnnxMl.TrainingInfoProto>
14864 getTrainingInfoList();
14865 /**
14866 * <pre>
14867 * Training-specific information. Sequentially executing all stored
14868 * `TrainingInfoProto.algorithm`s and assigning their outputs following
14869 * the corresponding `TrainingInfoProto.update_binding`s is one training
14870 * iteration. Similarly, to initialize the model
14871 * (as if training hasn't happened), the user should sequentially execute
14872 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
14873 * using `TrainingInfoProto.initialization_binding`s.
14874 *
14875 * If this field is empty, the training behavior of the model is undefined.
14876 * </pre>
14877 *
14878 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
14879 */
14880 onnx.OnnxMl.TrainingInfoProto getTrainingInfo(int index);
14881 /**
14882 * <pre>
14883 * Training-specific information. Sequentially executing all stored
14884 * `TrainingInfoProto.algorithm`s and assigning their outputs following
14885 * the corresponding `TrainingInfoProto.update_binding`s is one training
14886 * iteration. Similarly, to initialize the model
14887 * (as if training hasn't happened), the user should sequentially execute
14888 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
14889 * using `TrainingInfoProto.initialization_binding`s.
14890 *
14891 * If this field is empty, the training behavior of the model is undefined.
14892 * </pre>
14893 *
14894 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
14895 */
14896 int getTrainingInfoCount();
14897 /**
14898 * <pre>
14899 * Training-specific information. Sequentially executing all stored
14900 * `TrainingInfoProto.algorithm`s and assigning their outputs following
14901 * the corresponding `TrainingInfoProto.update_binding`s is one training
14902 * iteration. Similarly, to initialize the model
14903 * (as if training hasn't happened), the user should sequentially execute
14904 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
14905 * using `TrainingInfoProto.initialization_binding`s.
14906 *
14907 * If this field is empty, the training behavior of the model is undefined.
14908 * </pre>
14909 *
14910 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
14911 */
14912 java.util.List<? extends onnx.OnnxMl.TrainingInfoProtoOrBuilder>
14913 getTrainingInfoOrBuilderList();
14914 /**
14915 * <pre>
14916 * Training-specific information. Sequentially executing all stored
14917 * `TrainingInfoProto.algorithm`s and assigning their outputs following
14918 * the corresponding `TrainingInfoProto.update_binding`s is one training
14919 * iteration. Similarly, to initialize the model
14920 * (as if training hasn't happened), the user should sequentially execute
14921 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
14922 * using `TrainingInfoProto.initialization_binding`s.
14923 *
14924 * If this field is empty, the training behavior of the model is undefined.
14925 * </pre>
14926 *
14927 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
14928 */
14929 onnx.OnnxMl.TrainingInfoProtoOrBuilder getTrainingInfoOrBuilder(
14930 int index);
14931
14932 /**
14933 * <pre>
14934 * A list of function protos local to the model.
14935 *
14936 * The (domain, name, overload) tuple must be unique across the function protos in this list.
14937 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
14938 * or standard operator sets are given higher priotity or this is treated as error) is defined by
14939 * the runtimes.
14940 *
14941 * The operator sets imported by FunctionProto should be compatible with the ones
14942 * imported by ModelProto and other model local FunctionProtos.
14943 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
14944 * or by 2 FunctionProtos then versions for the operator set may be different but,
14945 * the operator schema returned for op_type, domain, version combination
14946 * for both the versions should be same for every node in the function body.
14947 *
14948 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
14949 * is not allowed.
14950 * </pre>
14951 *
14952 * <code>repeated .onnx.FunctionProto functions = 25;</code>
14953 */
14954 java.util.List<onnx.OnnxMl.FunctionProto>
14955 getFunctionsList();
14956 /**
14957 * <pre>
14958 * A list of function protos local to the model.
14959 *
14960 * The (domain, name, overload) tuple must be unique across the function protos in this list.
14961 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
14962 * or standard operator sets are given higher priotity or this is treated as error) is defined by
14963 * the runtimes.
14964 *
14965 * The operator sets imported by FunctionProto should be compatible with the ones
14966 * imported by ModelProto and other model local FunctionProtos.
14967 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
14968 * or by 2 FunctionProtos then versions for the operator set may be different but,
14969 * the operator schema returned for op_type, domain, version combination
14970 * for both the versions should be same for every node in the function body.
14971 *
14972 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
14973 * is not allowed.
14974 * </pre>
14975 *
14976 * <code>repeated .onnx.FunctionProto functions = 25;</code>
14977 */
14978 onnx.OnnxMl.FunctionProto getFunctions(int index);
14979 /**
14980 * <pre>
14981 * A list of function protos local to the model.
14982 *
14983 * The (domain, name, overload) tuple must be unique across the function protos in this list.
14984 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
14985 * or standard operator sets are given higher priotity or this is treated as error) is defined by
14986 * the runtimes.
14987 *
14988 * The operator sets imported by FunctionProto should be compatible with the ones
14989 * imported by ModelProto and other model local FunctionProtos.
14990 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
14991 * or by 2 FunctionProtos then versions for the operator set may be different but,
14992 * the operator schema returned for op_type, domain, version combination
14993 * for both the versions should be same for every node in the function body.
14994 *
14995 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
14996 * is not allowed.
14997 * </pre>
14998 *
14999 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15000 */
15001 int getFunctionsCount();
15002 /**
15003 * <pre>
15004 * A list of function protos local to the model.
15005 *
15006 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15007 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15008 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15009 * the runtimes.
15010 *
15011 * The operator sets imported by FunctionProto should be compatible with the ones
15012 * imported by ModelProto and other model local FunctionProtos.
15013 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15014 * or by 2 FunctionProtos then versions for the operator set may be different but,
15015 * the operator schema returned for op_type, domain, version combination
15016 * for both the versions should be same for every node in the function body.
15017 *
15018 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15019 * is not allowed.
15020 * </pre>
15021 *
15022 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15023 */
15024 java.util.List<? extends onnx.OnnxMl.FunctionProtoOrBuilder>
15025 getFunctionsOrBuilderList();
15026 /**
15027 * <pre>
15028 * A list of function protos local to the model.
15029 *
15030 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15031 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15032 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15033 * the runtimes.
15034 *
15035 * The operator sets imported by FunctionProto should be compatible with the ones
15036 * imported by ModelProto and other model local FunctionProtos.
15037 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15038 * or by 2 FunctionProtos then versions for the operator set may be different but,
15039 * the operator schema returned for op_type, domain, version combination
15040 * for both the versions should be same for every node in the function body.
15041 *
15042 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15043 * is not allowed.
15044 * </pre>
15045 *
15046 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15047 */
15048 onnx.OnnxMl.FunctionProtoOrBuilder getFunctionsOrBuilder(
15049 int index);
15050 }
15051 /**
15052 * <pre>
15053 * Models
15054 *
15055 * ModelProto is a top-level file/container format for bundling a ML model and
15056 * associating its computation graph with metadata.
15057 *
15058 * The semantics of the model are described by the associated GraphProto's.
15059 * </pre>
15060 *
15061 * Protobuf type {@code onnx.ModelProto}
15062 */
15063 public static final class ModelProto extends
15064 com.google.protobuf.GeneratedMessage implements
15065 // @@protoc_insertion_point(message_implements:onnx.ModelProto)
15066 ModelProtoOrBuilder {
15067 private static final long serialVersionUID = 0L;
15068 static {
15069 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
15070 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
15071 /* major= */ 4,
15072 /* minor= */ 29,
15073 /* patch= */ 3,
15074 /* suffix= */ "",
15075 ModelProto.class.getName());
15076 }
15077 // Use ModelProto.newBuilder() to construct.
15078 private ModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
15079 super(builder);
15080 }
15081 private ModelProto() {
15082 opsetImport_ = java.util.Collections.emptyList();
15083 producerName_ = "";
15084 producerVersion_ = "";
15085 domain_ = "";
15086 docString_ = "";
15087 metadataProps_ = java.util.Collections.emptyList();
15088 trainingInfo_ = java.util.Collections.emptyList();
15089 functions_ = java.util.Collections.emptyList();
15090 }
15091
15092 public static final com.google.protobuf.Descriptors.Descriptor
15093 getDescriptor() {
15094 return onnx.OnnxMl.internal_static_onnx_ModelProto_descriptor;
15095 }
15096
15097 @java.lang.Override
15098 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
15099 internalGetFieldAccessorTable() {
15100 return onnx.OnnxMl.internal_static_onnx_ModelProto_fieldAccessorTable
15101 .ensureFieldAccessorsInitialized(
15102 onnx.OnnxMl.ModelProto.class, onnx.OnnxMl.ModelProto.Builder.class);
15103 }
15104
15105 private int bitField0_;
15106 public static final int IR_VERSION_FIELD_NUMBER = 1;
15107 private long irVersion_ = 0L;
15108 /**
15109 * <pre>
15110 * The version of the IR this model targets. See Version enum above.
15111 * This field MUST be present.
15112 * </pre>
15113 *
15114 * <code>optional int64 ir_version = 1;</code>
15115 * @return Whether the irVersion field is set.
15116 */
15117 @java.lang.Override
15118 public boolean hasIrVersion() {
15119 return ((bitField0_ & 0x00000001) != 0);
15120 }
15121 /**
15122 * <pre>
15123 * The version of the IR this model targets. See Version enum above.
15124 * This field MUST be present.
15125 * </pre>
15126 *
15127 * <code>optional int64 ir_version = 1;</code>
15128 * @return The irVersion.
15129 */
15130 @java.lang.Override
15131 public long getIrVersion() {
15132 return irVersion_;
15133 }
15134
15135 public static final int OPSET_IMPORT_FIELD_NUMBER = 8;
15136 @SuppressWarnings("serial")
15137 private java.util.List<onnx.OnnxMl.OperatorSetIdProto> opsetImport_;
15138 /**
15139 * <pre>
15140 * The OperatorSets this model relies on.
15141 * All ModelProtos MUST have at least one entry that
15142 * specifies which version of the ONNX OperatorSet is
15143 * being imported.
15144 *
15145 * All nodes in the ModelProto's graph will bind against the operator
15146 * with the same-domain/same-op_type operator with the HIGHEST version
15147 * in the referenced operator sets.
15148 * </pre>
15149 *
15150 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
15151 */
15152 @java.lang.Override
15153 public java.util.List<onnx.OnnxMl.OperatorSetIdProto> getOpsetImportList() {
15154 return opsetImport_;
15155 }
15156 /**
15157 * <pre>
15158 * The OperatorSets this model relies on.
15159 * All ModelProtos MUST have at least one entry that
15160 * specifies which version of the ONNX OperatorSet is
15161 * being imported.
15162 *
15163 * All nodes in the ModelProto's graph will bind against the operator
15164 * with the same-domain/same-op_type operator with the HIGHEST version
15165 * in the referenced operator sets.
15166 * </pre>
15167 *
15168 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
15169 */
15170 @java.lang.Override
15171 public java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
15172 getOpsetImportOrBuilderList() {
15173 return opsetImport_;
15174 }
15175 /**
15176 * <pre>
15177 * The OperatorSets this model relies on.
15178 * All ModelProtos MUST have at least one entry that
15179 * specifies which version of the ONNX OperatorSet is
15180 * being imported.
15181 *
15182 * All nodes in the ModelProto's graph will bind against the operator
15183 * with the same-domain/same-op_type operator with the HIGHEST version
15184 * in the referenced operator sets.
15185 * </pre>
15186 *
15187 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
15188 */
15189 @java.lang.Override
15190 public int getOpsetImportCount() {
15191 return opsetImport_.size();
15192 }
15193 /**
15194 * <pre>
15195 * The OperatorSets this model relies on.
15196 * All ModelProtos MUST have at least one entry that
15197 * specifies which version of the ONNX OperatorSet is
15198 * being imported.
15199 *
15200 * All nodes in the ModelProto's graph will bind against the operator
15201 * with the same-domain/same-op_type operator with the HIGHEST version
15202 * in the referenced operator sets.
15203 * </pre>
15204 *
15205 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
15206 */
15207 @java.lang.Override
15208 public onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index) {
15209 return opsetImport_.get(index);
15210 }
15211 /**
15212 * <pre>
15213 * The OperatorSets this model relies on.
15214 * All ModelProtos MUST have at least one entry that
15215 * specifies which version of the ONNX OperatorSet is
15216 * being imported.
15217 *
15218 * All nodes in the ModelProto's graph will bind against the operator
15219 * with the same-domain/same-op_type operator with the HIGHEST version
15220 * in the referenced operator sets.
15221 * </pre>
15222 *
15223 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
15224 */
15225 @java.lang.Override
15226 public onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
15227 int index) {
15228 return opsetImport_.get(index);
15229 }
15230
15231 public static final int PRODUCER_NAME_FIELD_NUMBER = 2;
15232 @SuppressWarnings("serial")
15233 private volatile java.lang.Object producerName_ = "";
15234 /**
15235 * <pre>
15236 * The name of the framework or tool used to generate this model.
15237 * This field SHOULD be present to indicate which implementation/tool/framework
15238 * emitted the model.
15239 * </pre>
15240 *
15241 * <code>optional string producer_name = 2;</code>
15242 * @return Whether the producerName field is set.
15243 */
15244 @java.lang.Override
15245 public boolean hasProducerName() {
15246 return ((bitField0_ & 0x00000002) != 0);
15247 }
15248 /**
15249 * <pre>
15250 * The name of the framework or tool used to generate this model.
15251 * This field SHOULD be present to indicate which implementation/tool/framework
15252 * emitted the model.
15253 * </pre>
15254 *
15255 * <code>optional string producer_name = 2;</code>
15256 * @return The producerName.
15257 */
15258 @java.lang.Override
15259 public java.lang.String getProducerName() {
15260 java.lang.Object ref = producerName_;
15261 if (ref instanceof java.lang.String) {
15262 return (java.lang.String) ref;
15263 } else {
15264 com.google.protobuf.ByteString bs =
15265 (com.google.protobuf.ByteString) ref;
15266 java.lang.String s = bs.toStringUtf8();
15267 if (bs.isValidUtf8()) {
15268 producerName_ = s;
15269 }
15270 return s;
15271 }
15272 }
15273 /**
15274 * <pre>
15275 * The name of the framework or tool used to generate this model.
15276 * This field SHOULD be present to indicate which implementation/tool/framework
15277 * emitted the model.
15278 * </pre>
15279 *
15280 * <code>optional string producer_name = 2;</code>
15281 * @return The bytes for producerName.
15282 */
15283 @java.lang.Override
15284 public com.google.protobuf.ByteString
15285 getProducerNameBytes() {
15286 java.lang.Object ref = producerName_;
15287 if (ref instanceof java.lang.String) {
15288 com.google.protobuf.ByteString b =
15289 com.google.protobuf.ByteString.copyFromUtf8(
15290 (java.lang.String) ref);
15291 producerName_ = b;
15292 return b;
15293 } else {
15294 return (com.google.protobuf.ByteString) ref;
15295 }
15296 }
15297
15298 public static final int PRODUCER_VERSION_FIELD_NUMBER = 3;
15299 @SuppressWarnings("serial")
15300 private volatile java.lang.Object producerVersion_ = "";
15301 /**
15302 * <pre>
15303 * The version of the framework or tool used to generate this model.
15304 * This field SHOULD be present to indicate which implementation/tool/framework
15305 * emitted the model.
15306 * </pre>
15307 *
15308 * <code>optional string producer_version = 3;</code>
15309 * @return Whether the producerVersion field is set.
15310 */
15311 @java.lang.Override
15312 public boolean hasProducerVersion() {
15313 return ((bitField0_ & 0x00000004) != 0);
15314 }
15315 /**
15316 * <pre>
15317 * The version of the framework or tool used to generate this model.
15318 * This field SHOULD be present to indicate which implementation/tool/framework
15319 * emitted the model.
15320 * </pre>
15321 *
15322 * <code>optional string producer_version = 3;</code>
15323 * @return The producerVersion.
15324 */
15325 @java.lang.Override
15326 public java.lang.String getProducerVersion() {
15327 java.lang.Object ref = producerVersion_;
15328 if (ref instanceof java.lang.String) {
15329 return (java.lang.String) ref;
15330 } else {
15331 com.google.protobuf.ByteString bs =
15332 (com.google.protobuf.ByteString) ref;
15333 java.lang.String s = bs.toStringUtf8();
15334 if (bs.isValidUtf8()) {
15335 producerVersion_ = s;
15336 }
15337 return s;
15338 }
15339 }
15340 /**
15341 * <pre>
15342 * The version of the framework or tool used to generate this model.
15343 * This field SHOULD be present to indicate which implementation/tool/framework
15344 * emitted the model.
15345 * </pre>
15346 *
15347 * <code>optional string producer_version = 3;</code>
15348 * @return The bytes for producerVersion.
15349 */
15350 @java.lang.Override
15351 public com.google.protobuf.ByteString
15352 getProducerVersionBytes() {
15353 java.lang.Object ref = producerVersion_;
15354 if (ref instanceof java.lang.String) {
15355 com.google.protobuf.ByteString b =
15356 com.google.protobuf.ByteString.copyFromUtf8(
15357 (java.lang.String) ref);
15358 producerVersion_ = b;
15359 return b;
15360 } else {
15361 return (com.google.protobuf.ByteString) ref;
15362 }
15363 }
15364
15365 public static final int DOMAIN_FIELD_NUMBER = 4;
15366 @SuppressWarnings("serial")
15367 private volatile java.lang.Object domain_ = "";
15368 /**
15369 * <pre>
15370 * Domain name of the model.
15371 * We use reverse domain names as name space indicators. For example:
15372 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
15373 *
15374 * Together with `model_version` and GraphProto.name, this forms the unique identity of
15375 * the graph.
15376 * </pre>
15377 *
15378 * <code>optional string domain = 4;</code>
15379 * @return Whether the domain field is set.
15380 */
15381 @java.lang.Override
15382 public boolean hasDomain() {
15383 return ((bitField0_ & 0x00000008) != 0);
15384 }
15385 /**
15386 * <pre>
15387 * Domain name of the model.
15388 * We use reverse domain names as name space indicators. For example:
15389 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
15390 *
15391 * Together with `model_version` and GraphProto.name, this forms the unique identity of
15392 * the graph.
15393 * </pre>
15394 *
15395 * <code>optional string domain = 4;</code>
15396 * @return The domain.
15397 */
15398 @java.lang.Override
15399 public java.lang.String getDomain() {
15400 java.lang.Object ref = domain_;
15401 if (ref instanceof java.lang.String) {
15402 return (java.lang.String) ref;
15403 } else {
15404 com.google.protobuf.ByteString bs =
15405 (com.google.protobuf.ByteString) ref;
15406 java.lang.String s = bs.toStringUtf8();
15407 if (bs.isValidUtf8()) {
15408 domain_ = s;
15409 }
15410 return s;
15411 }
15412 }
15413 /**
15414 * <pre>
15415 * Domain name of the model.
15416 * We use reverse domain names as name space indicators. For example:
15417 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
15418 *
15419 * Together with `model_version` and GraphProto.name, this forms the unique identity of
15420 * the graph.
15421 * </pre>
15422 *
15423 * <code>optional string domain = 4;</code>
15424 * @return The bytes for domain.
15425 */
15426 @java.lang.Override
15427 public com.google.protobuf.ByteString
15428 getDomainBytes() {
15429 java.lang.Object ref = domain_;
15430 if (ref instanceof java.lang.String) {
15431 com.google.protobuf.ByteString b =
15432 com.google.protobuf.ByteString.copyFromUtf8(
15433 (java.lang.String) ref);
15434 domain_ = b;
15435 return b;
15436 } else {
15437 return (com.google.protobuf.ByteString) ref;
15438 }
15439 }
15440
15441 public static final int MODEL_VERSION_FIELD_NUMBER = 5;
15442 private long modelVersion_ = 0L;
15443 /**
15444 * <pre>
15445 * The version of the graph encoded. See Version enum below.
15446 * </pre>
15447 *
15448 * <code>optional int64 model_version = 5;</code>
15449 * @return Whether the modelVersion field is set.
15450 */
15451 @java.lang.Override
15452 public boolean hasModelVersion() {
15453 return ((bitField0_ & 0x00000010) != 0);
15454 }
15455 /**
15456 * <pre>
15457 * The version of the graph encoded. See Version enum below.
15458 * </pre>
15459 *
15460 * <code>optional int64 model_version = 5;</code>
15461 * @return The modelVersion.
15462 */
15463 @java.lang.Override
15464 public long getModelVersion() {
15465 return modelVersion_;
15466 }
15467
15468 public static final int DOC_STRING_FIELD_NUMBER = 6;
15469 @SuppressWarnings("serial")
15470 private volatile java.lang.Object docString_ = "";
15471 /**
15472 * <pre>
15473 * A human-readable documentation for this model. Markdown is allowed.
15474 * </pre>
15475 *
15476 * <code>optional string doc_string = 6;</code>
15477 * @return Whether the docString field is set.
15478 */
15479 @java.lang.Override
15480 public boolean hasDocString() {
15481 return ((bitField0_ & 0x00000020) != 0);
15482 }
15483 /**
15484 * <pre>
15485 * A human-readable documentation for this model. Markdown is allowed.
15486 * </pre>
15487 *
15488 * <code>optional string doc_string = 6;</code>
15489 * @return The docString.
15490 */
15491 @java.lang.Override
15492 public java.lang.String getDocString() {
15493 java.lang.Object ref = docString_;
15494 if (ref instanceof java.lang.String) {
15495 return (java.lang.String) ref;
15496 } else {
15497 com.google.protobuf.ByteString bs =
15498 (com.google.protobuf.ByteString) ref;
15499 java.lang.String s = bs.toStringUtf8();
15500 if (bs.isValidUtf8()) {
15501 docString_ = s;
15502 }
15503 return s;
15504 }
15505 }
15506 /**
15507 * <pre>
15508 * A human-readable documentation for this model. Markdown is allowed.
15509 * </pre>
15510 *
15511 * <code>optional string doc_string = 6;</code>
15512 * @return The bytes for docString.
15513 */
15514 @java.lang.Override
15515 public com.google.protobuf.ByteString
15516 getDocStringBytes() {
15517 java.lang.Object ref = docString_;
15518 if (ref instanceof java.lang.String) {
15519 com.google.protobuf.ByteString b =
15520 com.google.protobuf.ByteString.copyFromUtf8(
15521 (java.lang.String) ref);
15522 docString_ = b;
15523 return b;
15524 } else {
15525 return (com.google.protobuf.ByteString) ref;
15526 }
15527 }
15528
15529 public static final int GRAPH_FIELD_NUMBER = 7;
15530 private onnx.OnnxMl.GraphProto graph_;
15531 /**
15532 * <pre>
15533 * The parameterized graph that is evaluated to execute the model.
15534 * </pre>
15535 *
15536 * <code>optional .onnx.GraphProto graph = 7;</code>
15537 * @return Whether the graph field is set.
15538 */
15539 @java.lang.Override
15540 public boolean hasGraph() {
15541 return ((bitField0_ & 0x00000040) != 0);
15542 }
15543 /**
15544 * <pre>
15545 * The parameterized graph that is evaluated to execute the model.
15546 * </pre>
15547 *
15548 * <code>optional .onnx.GraphProto graph = 7;</code>
15549 * @return The graph.
15550 */
15551 @java.lang.Override
15552 public onnx.OnnxMl.GraphProto getGraph() {
15553 return graph_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : graph_;
15554 }
15555 /**
15556 * <pre>
15557 * The parameterized graph that is evaluated to execute the model.
15558 * </pre>
15559 *
15560 * <code>optional .onnx.GraphProto graph = 7;</code>
15561 */
15562 @java.lang.Override
15563 public onnx.OnnxMl.GraphProtoOrBuilder getGraphOrBuilder() {
15564 return graph_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : graph_;
15565 }
15566
15567 public static final int METADATA_PROPS_FIELD_NUMBER = 14;
15568 @SuppressWarnings("serial")
15569 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
15570 /**
15571 * <pre>
15572 * Named metadata values; keys should be distinct.
15573 * </pre>
15574 *
15575 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
15576 */
15577 @java.lang.Override
15578 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
15579 return metadataProps_;
15580 }
15581 /**
15582 * <pre>
15583 * Named metadata values; keys should be distinct.
15584 * </pre>
15585 *
15586 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
15587 */
15588 @java.lang.Override
15589 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
15590 getMetadataPropsOrBuilderList() {
15591 return metadataProps_;
15592 }
15593 /**
15594 * <pre>
15595 * Named metadata values; keys should be distinct.
15596 * </pre>
15597 *
15598 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
15599 */
15600 @java.lang.Override
15601 public int getMetadataPropsCount() {
15602 return metadataProps_.size();
15603 }
15604 /**
15605 * <pre>
15606 * Named metadata values; keys should be distinct.
15607 * </pre>
15608 *
15609 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
15610 */
15611 @java.lang.Override
15612 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
15613 return metadataProps_.get(index);
15614 }
15615 /**
15616 * <pre>
15617 * Named metadata values; keys should be distinct.
15618 * </pre>
15619 *
15620 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
15621 */
15622 @java.lang.Override
15623 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
15624 int index) {
15625 return metadataProps_.get(index);
15626 }
15627
15628 public static final int TRAINING_INFO_FIELD_NUMBER = 20;
15629 @SuppressWarnings("serial")
15630 private java.util.List<onnx.OnnxMl.TrainingInfoProto> trainingInfo_;
15631 /**
15632 * <pre>
15633 * Training-specific information. Sequentially executing all stored
15634 * `TrainingInfoProto.algorithm`s and assigning their outputs following
15635 * the corresponding `TrainingInfoProto.update_binding`s is one training
15636 * iteration. Similarly, to initialize the model
15637 * (as if training hasn't happened), the user should sequentially execute
15638 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
15639 * using `TrainingInfoProto.initialization_binding`s.
15640 *
15641 * If this field is empty, the training behavior of the model is undefined.
15642 * </pre>
15643 *
15644 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
15645 */
15646 @java.lang.Override
15647 public java.util.List<onnx.OnnxMl.TrainingInfoProto> getTrainingInfoList() {
15648 return trainingInfo_;
15649 }
15650 /**
15651 * <pre>
15652 * Training-specific information. Sequentially executing all stored
15653 * `TrainingInfoProto.algorithm`s and assigning their outputs following
15654 * the corresponding `TrainingInfoProto.update_binding`s is one training
15655 * iteration. Similarly, to initialize the model
15656 * (as if training hasn't happened), the user should sequentially execute
15657 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
15658 * using `TrainingInfoProto.initialization_binding`s.
15659 *
15660 * If this field is empty, the training behavior of the model is undefined.
15661 * </pre>
15662 *
15663 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
15664 */
15665 @java.lang.Override
15666 public java.util.List<? extends onnx.OnnxMl.TrainingInfoProtoOrBuilder>
15667 getTrainingInfoOrBuilderList() {
15668 return trainingInfo_;
15669 }
15670 /**
15671 * <pre>
15672 * Training-specific information. Sequentially executing all stored
15673 * `TrainingInfoProto.algorithm`s and assigning their outputs following
15674 * the corresponding `TrainingInfoProto.update_binding`s is one training
15675 * iteration. Similarly, to initialize the model
15676 * (as if training hasn't happened), the user should sequentially execute
15677 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
15678 * using `TrainingInfoProto.initialization_binding`s.
15679 *
15680 * If this field is empty, the training behavior of the model is undefined.
15681 * </pre>
15682 *
15683 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
15684 */
15685 @java.lang.Override
15686 public int getTrainingInfoCount() {
15687 return trainingInfo_.size();
15688 }
15689 /**
15690 * <pre>
15691 * Training-specific information. Sequentially executing all stored
15692 * `TrainingInfoProto.algorithm`s and assigning their outputs following
15693 * the corresponding `TrainingInfoProto.update_binding`s is one training
15694 * iteration. Similarly, to initialize the model
15695 * (as if training hasn't happened), the user should sequentially execute
15696 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
15697 * using `TrainingInfoProto.initialization_binding`s.
15698 *
15699 * If this field is empty, the training behavior of the model is undefined.
15700 * </pre>
15701 *
15702 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
15703 */
15704 @java.lang.Override
15705 public onnx.OnnxMl.TrainingInfoProto getTrainingInfo(int index) {
15706 return trainingInfo_.get(index);
15707 }
15708 /**
15709 * <pre>
15710 * Training-specific information. Sequentially executing all stored
15711 * `TrainingInfoProto.algorithm`s and assigning their outputs following
15712 * the corresponding `TrainingInfoProto.update_binding`s is one training
15713 * iteration. Similarly, to initialize the model
15714 * (as if training hasn't happened), the user should sequentially execute
15715 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
15716 * using `TrainingInfoProto.initialization_binding`s.
15717 *
15718 * If this field is empty, the training behavior of the model is undefined.
15719 * </pre>
15720 *
15721 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
15722 */
15723 @java.lang.Override
15724 public onnx.OnnxMl.TrainingInfoProtoOrBuilder getTrainingInfoOrBuilder(
15725 int index) {
15726 return trainingInfo_.get(index);
15727 }
15728
15729 public static final int FUNCTIONS_FIELD_NUMBER = 25;
15730 @SuppressWarnings("serial")
15731 private java.util.List<onnx.OnnxMl.FunctionProto> functions_;
15732 /**
15733 * <pre>
15734 * A list of function protos local to the model.
15735 *
15736 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15737 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15738 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15739 * the runtimes.
15740 *
15741 * The operator sets imported by FunctionProto should be compatible with the ones
15742 * imported by ModelProto and other model local FunctionProtos.
15743 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15744 * or by 2 FunctionProtos then versions for the operator set may be different but,
15745 * the operator schema returned for op_type, domain, version combination
15746 * for both the versions should be same for every node in the function body.
15747 *
15748 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15749 * is not allowed.
15750 * </pre>
15751 *
15752 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15753 */
15754 @java.lang.Override
15755 public java.util.List<onnx.OnnxMl.FunctionProto> getFunctionsList() {
15756 return functions_;
15757 }
15758 /**
15759 * <pre>
15760 * A list of function protos local to the model.
15761 *
15762 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15763 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15764 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15765 * the runtimes.
15766 *
15767 * The operator sets imported by FunctionProto should be compatible with the ones
15768 * imported by ModelProto and other model local FunctionProtos.
15769 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15770 * or by 2 FunctionProtos then versions for the operator set may be different but,
15771 * the operator schema returned for op_type, domain, version combination
15772 * for both the versions should be same for every node in the function body.
15773 *
15774 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15775 * is not allowed.
15776 * </pre>
15777 *
15778 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15779 */
15780 @java.lang.Override
15781 public java.util.List<? extends onnx.OnnxMl.FunctionProtoOrBuilder>
15782 getFunctionsOrBuilderList() {
15783 return functions_;
15784 }
15785 /**
15786 * <pre>
15787 * A list of function protos local to the model.
15788 *
15789 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15790 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15791 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15792 * the runtimes.
15793 *
15794 * The operator sets imported by FunctionProto should be compatible with the ones
15795 * imported by ModelProto and other model local FunctionProtos.
15796 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15797 * or by 2 FunctionProtos then versions for the operator set may be different but,
15798 * the operator schema returned for op_type, domain, version combination
15799 * for both the versions should be same for every node in the function body.
15800 *
15801 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15802 * is not allowed.
15803 * </pre>
15804 *
15805 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15806 */
15807 @java.lang.Override
15808 public int getFunctionsCount() {
15809 return functions_.size();
15810 }
15811 /**
15812 * <pre>
15813 * A list of function protos local to the model.
15814 *
15815 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15816 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15817 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15818 * the runtimes.
15819 *
15820 * The operator sets imported by FunctionProto should be compatible with the ones
15821 * imported by ModelProto and other model local FunctionProtos.
15822 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15823 * or by 2 FunctionProtos then versions for the operator set may be different but,
15824 * the operator schema returned for op_type, domain, version combination
15825 * for both the versions should be same for every node in the function body.
15826 *
15827 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15828 * is not allowed.
15829 * </pre>
15830 *
15831 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15832 */
15833 @java.lang.Override
15834 public onnx.OnnxMl.FunctionProto getFunctions(int index) {
15835 return functions_.get(index);
15836 }
15837 /**
15838 * <pre>
15839 * A list of function protos local to the model.
15840 *
15841 * The (domain, name, overload) tuple must be unique across the function protos in this list.
15842 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
15843 * or standard operator sets are given higher priotity or this is treated as error) is defined by
15844 * the runtimes.
15845 *
15846 * The operator sets imported by FunctionProto should be compatible with the ones
15847 * imported by ModelProto and other model local FunctionProtos.
15848 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
15849 * or by 2 FunctionProtos then versions for the operator set may be different but,
15850 * the operator schema returned for op_type, domain, version combination
15851 * for both the versions should be same for every node in the function body.
15852 *
15853 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
15854 * is not allowed.
15855 * </pre>
15856 *
15857 * <code>repeated .onnx.FunctionProto functions = 25;</code>
15858 */
15859 @java.lang.Override
15860 public onnx.OnnxMl.FunctionProtoOrBuilder getFunctionsOrBuilder(
15861 int index) {
15862 return functions_.get(index);
15863 }
15864
15865 private byte memoizedIsInitialized = -1;
15866 @java.lang.Override
15867 public final boolean isInitialized() {
15868 byte isInitialized = memoizedIsInitialized;
15869 if (isInitialized == 1) return true;
15870 if (isInitialized == 0) return false;
15871
15872 memoizedIsInitialized = 1;
15873 return true;
15874 }
15875
15876 @java.lang.Override
15877 public void writeTo(com.google.protobuf.CodedOutputStream output)
15878 throws java.io.IOException {
15879 if (((bitField0_ & 0x00000001) != 0)) {
15880 output.writeInt64(1, irVersion_);
15881 }
15882 if (((bitField0_ & 0x00000002) != 0)) {
15883 com.google.protobuf.GeneratedMessage.writeString(output, 2, producerName_);
15884 }
15885 if (((bitField0_ & 0x00000004) != 0)) {
15886 com.google.protobuf.GeneratedMessage.writeString(output, 3, producerVersion_);
15887 }
15888 if (((bitField0_ & 0x00000008) != 0)) {
15889 com.google.protobuf.GeneratedMessage.writeString(output, 4, domain_);
15890 }
15891 if (((bitField0_ & 0x00000010) != 0)) {
15892 output.writeInt64(5, modelVersion_);
15893 }
15894 if (((bitField0_ & 0x00000020) != 0)) {
15895 com.google.protobuf.GeneratedMessage.writeString(output, 6, docString_);
15896 }
15897 if (((bitField0_ & 0x00000040) != 0)) {
15898 output.writeMessage(7, getGraph());
15899 }
15900 for (int i = 0; i < opsetImport_.size(); i++) {
15901 output.writeMessage(8, opsetImport_.get(i));
15902 }
15903 for (int i = 0; i < metadataProps_.size(); i++) {
15904 output.writeMessage(14, metadataProps_.get(i));
15905 }
15906 for (int i = 0; i < trainingInfo_.size(); i++) {
15907 output.writeMessage(20, trainingInfo_.get(i));
15908 }
15909 for (int i = 0; i < functions_.size(); i++) {
15910 output.writeMessage(25, functions_.get(i));
15911 }
15912 getUnknownFields().writeTo(output);
15913 }
15914
15915 @java.lang.Override
15916 public int getSerializedSize() {
15917 int size = memoizedSize;
15918 if (size != -1) return size;
15919
15920 size = 0;
15921 if (((bitField0_ & 0x00000001) != 0)) {
15922 size += com.google.protobuf.CodedOutputStream
15923 .computeInt64Size(1, irVersion_);
15924 }
15925 if (((bitField0_ & 0x00000002) != 0)) {
15926 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, producerName_);
15927 }
15928 if (((bitField0_ & 0x00000004) != 0)) {
15929 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, producerVersion_);
15930 }
15931 if (((bitField0_ & 0x00000008) != 0)) {
15932 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, domain_);
15933 }
15934 if (((bitField0_ & 0x00000010) != 0)) {
15935 size += com.google.protobuf.CodedOutputStream
15936 .computeInt64Size(5, modelVersion_);
15937 }
15938 if (((bitField0_ & 0x00000020) != 0)) {
15939 size += com.google.protobuf.GeneratedMessage.computeStringSize(6, docString_);
15940 }
15941 if (((bitField0_ & 0x00000040) != 0)) {
15942 size += com.google.protobuf.CodedOutputStream
15943 .computeMessageSize(7, getGraph());
15944 }
15945 for (int i = 0; i < opsetImport_.size(); i++) {
15946 size += com.google.protobuf.CodedOutputStream
15947 .computeMessageSize(8, opsetImport_.get(i));
15948 }
15949 for (int i = 0; i < metadataProps_.size(); i++) {
15950 size += com.google.protobuf.CodedOutputStream
15951 .computeMessageSize(14, metadataProps_.get(i));
15952 }
15953 for (int i = 0; i < trainingInfo_.size(); i++) {
15954 size += com.google.protobuf.CodedOutputStream
15955 .computeMessageSize(20, trainingInfo_.get(i));
15956 }
15957 for (int i = 0; i < functions_.size(); i++) {
15958 size += com.google.protobuf.CodedOutputStream
15959 .computeMessageSize(25, functions_.get(i));
15960 }
15961 size += getUnknownFields().getSerializedSize();
15962 memoizedSize = size;
15963 return size;
15964 }
15965
15966 @java.lang.Override
15967 public boolean equals(final java.lang.Object obj) {
15968 if (obj == this) {
15969 return true;
15970 }
15971 if (!(obj instanceof onnx.OnnxMl.ModelProto)) {
15972 return super.equals(obj);
15973 }
15974 onnx.OnnxMl.ModelProto other = (onnx.OnnxMl.ModelProto) obj;
15975
15976 if (hasIrVersion() != other.hasIrVersion()) return false;
15977 if (hasIrVersion()) {
15978 if (getIrVersion()
15979 != other.getIrVersion()) return false;
15980 }
15981 if (!getOpsetImportList()
15982 .equals(other.getOpsetImportList())) return false;
15983 if (hasProducerName() != other.hasProducerName()) return false;
15984 if (hasProducerName()) {
15985 if (!getProducerName()
15986 .equals(other.getProducerName())) return false;
15987 }
15988 if (hasProducerVersion() != other.hasProducerVersion()) return false;
15989 if (hasProducerVersion()) {
15990 if (!getProducerVersion()
15991 .equals(other.getProducerVersion())) return false;
15992 }
15993 if (hasDomain() != other.hasDomain()) return false;
15994 if (hasDomain()) {
15995 if (!getDomain()
15996 .equals(other.getDomain())) return false;
15997 }
15998 if (hasModelVersion() != other.hasModelVersion()) return false;
15999 if (hasModelVersion()) {
16000 if (getModelVersion()
16001 != other.getModelVersion()) return false;
16002 }
16003 if (hasDocString() != other.hasDocString()) return false;
16004 if (hasDocString()) {
16005 if (!getDocString()
16006 .equals(other.getDocString())) return false;
16007 }
16008 if (hasGraph() != other.hasGraph()) return false;
16009 if (hasGraph()) {
16010 if (!getGraph()
16011 .equals(other.getGraph())) return false;
16012 }
16013 if (!getMetadataPropsList()
16014 .equals(other.getMetadataPropsList())) return false;
16015 if (!getTrainingInfoList()
16016 .equals(other.getTrainingInfoList())) return false;
16017 if (!getFunctionsList()
16018 .equals(other.getFunctionsList())) return false;
16019 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
16020 return true;
16021 }
16022
16023 @java.lang.Override
16024 public int hashCode() {
16025 if (memoizedHashCode != 0) {
16026 return memoizedHashCode;
16027 }
16028 int hash = 41;
16029 hash = (19 * hash) + getDescriptor().hashCode();
16030 if (hasIrVersion()) {
16031 hash = (37 * hash) + IR_VERSION_FIELD_NUMBER;
16032 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
16033 getIrVersion());
16034 }
16035 if (getOpsetImportCount() > 0) {
16036 hash = (37 * hash) + OPSET_IMPORT_FIELD_NUMBER;
16037 hash = (53 * hash) + getOpsetImportList().hashCode();
16038 }
16039 if (hasProducerName()) {
16040 hash = (37 * hash) + PRODUCER_NAME_FIELD_NUMBER;
16041 hash = (53 * hash) + getProducerName().hashCode();
16042 }
16043 if (hasProducerVersion()) {
16044 hash = (37 * hash) + PRODUCER_VERSION_FIELD_NUMBER;
16045 hash = (53 * hash) + getProducerVersion().hashCode();
16046 }
16047 if (hasDomain()) {
16048 hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
16049 hash = (53 * hash) + getDomain().hashCode();
16050 }
16051 if (hasModelVersion()) {
16052 hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER;
16053 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
16054 getModelVersion());
16055 }
16056 if (hasDocString()) {
16057 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
16058 hash = (53 * hash) + getDocString().hashCode();
16059 }
16060 if (hasGraph()) {
16061 hash = (37 * hash) + GRAPH_FIELD_NUMBER;
16062 hash = (53 * hash) + getGraph().hashCode();
16063 }
16064 if (getMetadataPropsCount() > 0) {
16065 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
16066 hash = (53 * hash) + getMetadataPropsList().hashCode();
16067 }
16068 if (getTrainingInfoCount() > 0) {
16069 hash = (37 * hash) + TRAINING_INFO_FIELD_NUMBER;
16070 hash = (53 * hash) + getTrainingInfoList().hashCode();
16071 }
16072 if (getFunctionsCount() > 0) {
16073 hash = (37 * hash) + FUNCTIONS_FIELD_NUMBER;
16074 hash = (53 * hash) + getFunctionsList().hashCode();
16075 }
16076 hash = (29 * hash) + getUnknownFields().hashCode();
16077 memoizedHashCode = hash;
16078 return hash;
16079 }
16080
16081 public static onnx.OnnxMl.ModelProto parseFrom(
16082 java.nio.ByteBuffer data)
16083 throws com.google.protobuf.InvalidProtocolBufferException {
16084 return PARSER.parseFrom(data);
16085 }
16086 public static onnx.OnnxMl.ModelProto parseFrom(
16087 java.nio.ByteBuffer data,
16088 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16089 throws com.google.protobuf.InvalidProtocolBufferException {
16090 return PARSER.parseFrom(data, extensionRegistry);
16091 }
16092 public static onnx.OnnxMl.ModelProto parseFrom(
16093 com.google.protobuf.ByteString data)
16094 throws com.google.protobuf.InvalidProtocolBufferException {
16095 return PARSER.parseFrom(data);
16096 }
16097 public static onnx.OnnxMl.ModelProto parseFrom(
16098 com.google.protobuf.ByteString data,
16099 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16100 throws com.google.protobuf.InvalidProtocolBufferException {
16101 return PARSER.parseFrom(data, extensionRegistry);
16102 }
16103 public static onnx.OnnxMl.ModelProto parseFrom(byte[] data)
16104 throws com.google.protobuf.InvalidProtocolBufferException {
16105 return PARSER.parseFrom(data);
16106 }
16107 public static onnx.OnnxMl.ModelProto parseFrom(
16108 byte[] data,
16109 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16110 throws com.google.protobuf.InvalidProtocolBufferException {
16111 return PARSER.parseFrom(data, extensionRegistry);
16112 }
16113 public static onnx.OnnxMl.ModelProto parseFrom(java.io.InputStream input)
16114 throws java.io.IOException {
16115 return com.google.protobuf.GeneratedMessage
16116 .parseWithIOException(PARSER, input);
16117 }
16118 public static onnx.OnnxMl.ModelProto parseFrom(
16119 java.io.InputStream input,
16120 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16121 throws java.io.IOException {
16122 return com.google.protobuf.GeneratedMessage
16123 .parseWithIOException(PARSER, input, extensionRegistry);
16124 }
16125
16126 public static onnx.OnnxMl.ModelProto parseDelimitedFrom(java.io.InputStream input)
16127 throws java.io.IOException {
16128 return com.google.protobuf.GeneratedMessage
16129 .parseDelimitedWithIOException(PARSER, input);
16130 }
16131
16132 public static onnx.OnnxMl.ModelProto parseDelimitedFrom(
16133 java.io.InputStream input,
16134 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16135 throws java.io.IOException {
16136 return com.google.protobuf.GeneratedMessage
16137 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
16138 }
16139 public static onnx.OnnxMl.ModelProto parseFrom(
16140 com.google.protobuf.CodedInputStream input)
16141 throws java.io.IOException {
16142 return com.google.protobuf.GeneratedMessage
16143 .parseWithIOException(PARSER, input);
16144 }
16145 public static onnx.OnnxMl.ModelProto parseFrom(
16146 com.google.protobuf.CodedInputStream input,
16147 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16148 throws java.io.IOException {
16149 return com.google.protobuf.GeneratedMessage
16150 .parseWithIOException(PARSER, input, extensionRegistry);
16151 }
16152
16153 @java.lang.Override
16154 public Builder newBuilderForType() { return newBuilder(); }
16155 public static Builder newBuilder() {
16156 return DEFAULT_INSTANCE.toBuilder();
16157 }
16158 public static Builder newBuilder(onnx.OnnxMl.ModelProto prototype) {
16159 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
16160 }
16161 @java.lang.Override
16162 public Builder toBuilder() {
16163 return this == DEFAULT_INSTANCE
16164 ? new Builder() : new Builder().mergeFrom(this);
16165 }
16166
16167 @java.lang.Override
16168 protected Builder newBuilderForType(
16169 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
16170 Builder builder = new Builder(parent);
16171 return builder;
16172 }
16173 /**
16174 * <pre>
16175 * Models
16176 *
16177 * ModelProto is a top-level file/container format for bundling a ML model and
16178 * associating its computation graph with metadata.
16179 *
16180 * The semantics of the model are described by the associated GraphProto's.
16181 * </pre>
16182 *
16183 * Protobuf type {@code onnx.ModelProto}
16184 */
16185 public static final class Builder extends
16186 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
16187 // @@protoc_insertion_point(builder_implements:onnx.ModelProto)
16188 onnx.OnnxMl.ModelProtoOrBuilder {
16189 public static final com.google.protobuf.Descriptors.Descriptor
16190 getDescriptor() {
16191 return onnx.OnnxMl.internal_static_onnx_ModelProto_descriptor;
16192 }
16193
16194 @java.lang.Override
16195 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
16196 internalGetFieldAccessorTable() {
16197 return onnx.OnnxMl.internal_static_onnx_ModelProto_fieldAccessorTable
16198 .ensureFieldAccessorsInitialized(
16199 onnx.OnnxMl.ModelProto.class, onnx.OnnxMl.ModelProto.Builder.class);
16200 }
16201
16202 // Construct using onnx.OnnxMl.ModelProto.newBuilder()
16203 private Builder() {
16204 maybeForceBuilderInitialization();
16205 }
16206
16207 private Builder(
16208 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
16209 super(parent);
16210 maybeForceBuilderInitialization();
16211 }
16212 private void maybeForceBuilderInitialization() {
16213 if (com.google.protobuf.GeneratedMessage
16214 .alwaysUseFieldBuilders) {
16215 getOpsetImportFieldBuilder();
16216 getGraphFieldBuilder();
16217 getMetadataPropsFieldBuilder();
16218 getTrainingInfoFieldBuilder();
16219 getFunctionsFieldBuilder();
16220 }
16221 }
16222 @java.lang.Override
16223 public Builder clear() {
16224 super.clear();
16225 bitField0_ = 0;
16226 irVersion_ = 0L;
16227 if (opsetImportBuilder_ == null) {
16228 opsetImport_ = java.util.Collections.emptyList();
16229 } else {
16230 opsetImport_ = null;
16231 opsetImportBuilder_.clear();
16232 }
16233 bitField0_ = (bitField0_ & ~0x00000002);
16234 producerName_ = "";
16235 producerVersion_ = "";
16236 domain_ = "";
16237 modelVersion_ = 0L;
16238 docString_ = "";
16239 graph_ = null;
16240 if (graphBuilder_ != null) {
16241 graphBuilder_.dispose();
16242 graphBuilder_ = null;
16243 }
16244 if (metadataPropsBuilder_ == null) {
16245 metadataProps_ = java.util.Collections.emptyList();
16246 } else {
16247 metadataProps_ = null;
16248 metadataPropsBuilder_.clear();
16249 }
16250 bitField0_ = (bitField0_ & ~0x00000100);
16251 if (trainingInfoBuilder_ == null) {
16252 trainingInfo_ = java.util.Collections.emptyList();
16253 } else {
16254 trainingInfo_ = null;
16255 trainingInfoBuilder_.clear();
16256 }
16257 bitField0_ = (bitField0_ & ~0x00000200);
16258 if (functionsBuilder_ == null) {
16259 functions_ = java.util.Collections.emptyList();
16260 } else {
16261 functions_ = null;
16262 functionsBuilder_.clear();
16263 }
16264 bitField0_ = (bitField0_ & ~0x00000400);
16265 return this;
16266 }
16267
16268 @java.lang.Override
16269 public com.google.protobuf.Descriptors.Descriptor
16270 getDescriptorForType() {
16271 return onnx.OnnxMl.internal_static_onnx_ModelProto_descriptor;
16272 }
16273
16274 @java.lang.Override
16275 public onnx.OnnxMl.ModelProto getDefaultInstanceForType() {
16276 return onnx.OnnxMl.ModelProto.getDefaultInstance();
16277 }
16278
16279 @java.lang.Override
16280 public onnx.OnnxMl.ModelProto build() {
16281 onnx.OnnxMl.ModelProto result = buildPartial();
16282 if (!result.isInitialized()) {
16283 throw newUninitializedMessageException(result);
16284 }
16285 return result;
16286 }
16287
16288 @java.lang.Override
16289 public onnx.OnnxMl.ModelProto buildPartial() {
16290 onnx.OnnxMl.ModelProto result = new onnx.OnnxMl.ModelProto(this);
16291 buildPartialRepeatedFields(result);
16292 if (bitField0_ != 0) { buildPartial0(result); }
16293 onBuilt();
16294 return result;
16295 }
16296
16297 private void buildPartialRepeatedFields(onnx.OnnxMl.ModelProto result) {
16298 if (opsetImportBuilder_ == null) {
16299 if (((bitField0_ & 0x00000002) != 0)) {
16300 opsetImport_ = java.util.Collections.unmodifiableList(opsetImport_);
16301 bitField0_ = (bitField0_ & ~0x00000002);
16302 }
16303 result.opsetImport_ = opsetImport_;
16304 } else {
16305 result.opsetImport_ = opsetImportBuilder_.build();
16306 }
16307 if (metadataPropsBuilder_ == null) {
16308 if (((bitField0_ & 0x00000100) != 0)) {
16309 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
16310 bitField0_ = (bitField0_ & ~0x00000100);
16311 }
16312 result.metadataProps_ = metadataProps_;
16313 } else {
16314 result.metadataProps_ = metadataPropsBuilder_.build();
16315 }
16316 if (trainingInfoBuilder_ == null) {
16317 if (((bitField0_ & 0x00000200) != 0)) {
16318 trainingInfo_ = java.util.Collections.unmodifiableList(trainingInfo_);
16319 bitField0_ = (bitField0_ & ~0x00000200);
16320 }
16321 result.trainingInfo_ = trainingInfo_;
16322 } else {
16323 result.trainingInfo_ = trainingInfoBuilder_.build();
16324 }
16325 if (functionsBuilder_ == null) {
16326 if (((bitField0_ & 0x00000400) != 0)) {
16327 functions_ = java.util.Collections.unmodifiableList(functions_);
16328 bitField0_ = (bitField0_ & ~0x00000400);
16329 }
16330 result.functions_ = functions_;
16331 } else {
16332 result.functions_ = functionsBuilder_.build();
16333 }
16334 }
16335
16336 private void buildPartial0(onnx.OnnxMl.ModelProto result) {
16337 int from_bitField0_ = bitField0_;
16338 int to_bitField0_ = 0;
16339 if (((from_bitField0_ & 0x00000001) != 0)) {
16340 result.irVersion_ = irVersion_;
16341 to_bitField0_ |= 0x00000001;
16342 }
16343 if (((from_bitField0_ & 0x00000004) != 0)) {
16344 result.producerName_ = producerName_;
16345 to_bitField0_ |= 0x00000002;
16346 }
16347 if (((from_bitField0_ & 0x00000008) != 0)) {
16348 result.producerVersion_ = producerVersion_;
16349 to_bitField0_ |= 0x00000004;
16350 }
16351 if (((from_bitField0_ & 0x00000010) != 0)) {
16352 result.domain_ = domain_;
16353 to_bitField0_ |= 0x00000008;
16354 }
16355 if (((from_bitField0_ & 0x00000020) != 0)) {
16356 result.modelVersion_ = modelVersion_;
16357 to_bitField0_ |= 0x00000010;
16358 }
16359 if (((from_bitField0_ & 0x00000040) != 0)) {
16360 result.docString_ = docString_;
16361 to_bitField0_ |= 0x00000020;
16362 }
16363 if (((from_bitField0_ & 0x00000080) != 0)) {
16364 result.graph_ = graphBuilder_ == null
16365 ? graph_
16366 : graphBuilder_.build();
16367 to_bitField0_ |= 0x00000040;
16368 }
16369 result.bitField0_ |= to_bitField0_;
16370 }
16371
16372 @java.lang.Override
16373 public Builder mergeFrom(com.google.protobuf.Message other) {
16374 if (other instanceof onnx.OnnxMl.ModelProto) {
16375 return mergeFrom((onnx.OnnxMl.ModelProto)other);
16376 } else {
16377 super.mergeFrom(other);
16378 return this;
16379 }
16380 }
16381
16382 public Builder mergeFrom(onnx.OnnxMl.ModelProto other) {
16383 if (other == onnx.OnnxMl.ModelProto.getDefaultInstance()) return this;
16384 if (other.hasIrVersion()) {
16385 setIrVersion(other.getIrVersion());
16386 }
16387 if (opsetImportBuilder_ == null) {
16388 if (!other.opsetImport_.isEmpty()) {
16389 if (opsetImport_.isEmpty()) {
16390 opsetImport_ = other.opsetImport_;
16391 bitField0_ = (bitField0_ & ~0x00000002);
16392 } else {
16393 ensureOpsetImportIsMutable();
16394 opsetImport_.addAll(other.opsetImport_);
16395 }
16396 onChanged();
16397 }
16398 } else {
16399 if (!other.opsetImport_.isEmpty()) {
16400 if (opsetImportBuilder_.isEmpty()) {
16401 opsetImportBuilder_.dispose();
16402 opsetImportBuilder_ = null;
16403 opsetImport_ = other.opsetImport_;
16404 bitField0_ = (bitField0_ & ~0x00000002);
16405 opsetImportBuilder_ =
16406 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
16407 getOpsetImportFieldBuilder() : null;
16408 } else {
16409 opsetImportBuilder_.addAllMessages(other.opsetImport_);
16410 }
16411 }
16412 }
16413 if (other.hasProducerName()) {
16414 producerName_ = other.producerName_;
16415 bitField0_ |= 0x00000004;
16416 onChanged();
16417 }
16418 if (other.hasProducerVersion()) {
16419 producerVersion_ = other.producerVersion_;
16420 bitField0_ |= 0x00000008;
16421 onChanged();
16422 }
16423 if (other.hasDomain()) {
16424 domain_ = other.domain_;
16425 bitField0_ |= 0x00000010;
16426 onChanged();
16427 }
16428 if (other.hasModelVersion()) {
16429 setModelVersion(other.getModelVersion());
16430 }
16431 if (other.hasDocString()) {
16432 docString_ = other.docString_;
16433 bitField0_ |= 0x00000040;
16434 onChanged();
16435 }
16436 if (other.hasGraph()) {
16437 mergeGraph(other.getGraph());
16438 }
16439 if (metadataPropsBuilder_ == null) {
16440 if (!other.metadataProps_.isEmpty()) {
16441 if (metadataProps_.isEmpty()) {
16442 metadataProps_ = other.metadataProps_;
16443 bitField0_ = (bitField0_ & ~0x00000100);
16444 } else {
16445 ensureMetadataPropsIsMutable();
16446 metadataProps_.addAll(other.metadataProps_);
16447 }
16448 onChanged();
16449 }
16450 } else {
16451 if (!other.metadataProps_.isEmpty()) {
16452 if (metadataPropsBuilder_.isEmpty()) {
16453 metadataPropsBuilder_.dispose();
16454 metadataPropsBuilder_ = null;
16455 metadataProps_ = other.metadataProps_;
16456 bitField0_ = (bitField0_ & ~0x00000100);
16457 metadataPropsBuilder_ =
16458 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
16459 getMetadataPropsFieldBuilder() : null;
16460 } else {
16461 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
16462 }
16463 }
16464 }
16465 if (trainingInfoBuilder_ == null) {
16466 if (!other.trainingInfo_.isEmpty()) {
16467 if (trainingInfo_.isEmpty()) {
16468 trainingInfo_ = other.trainingInfo_;
16469 bitField0_ = (bitField0_ & ~0x00000200);
16470 } else {
16471 ensureTrainingInfoIsMutable();
16472 trainingInfo_.addAll(other.trainingInfo_);
16473 }
16474 onChanged();
16475 }
16476 } else {
16477 if (!other.trainingInfo_.isEmpty()) {
16478 if (trainingInfoBuilder_.isEmpty()) {
16479 trainingInfoBuilder_.dispose();
16480 trainingInfoBuilder_ = null;
16481 trainingInfo_ = other.trainingInfo_;
16482 bitField0_ = (bitField0_ & ~0x00000200);
16483 trainingInfoBuilder_ =
16484 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
16485 getTrainingInfoFieldBuilder() : null;
16486 } else {
16487 trainingInfoBuilder_.addAllMessages(other.trainingInfo_);
16488 }
16489 }
16490 }
16491 if (functionsBuilder_ == null) {
16492 if (!other.functions_.isEmpty()) {
16493 if (functions_.isEmpty()) {
16494 functions_ = other.functions_;
16495 bitField0_ = (bitField0_ & ~0x00000400);
16496 } else {
16497 ensureFunctionsIsMutable();
16498 functions_.addAll(other.functions_);
16499 }
16500 onChanged();
16501 }
16502 } else {
16503 if (!other.functions_.isEmpty()) {
16504 if (functionsBuilder_.isEmpty()) {
16505 functionsBuilder_.dispose();
16506 functionsBuilder_ = null;
16507 functions_ = other.functions_;
16508 bitField0_ = (bitField0_ & ~0x00000400);
16509 functionsBuilder_ =
16510 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
16511 getFunctionsFieldBuilder() : null;
16512 } else {
16513 functionsBuilder_.addAllMessages(other.functions_);
16514 }
16515 }
16516 }
16517 this.mergeUnknownFields(other.getUnknownFields());
16518 onChanged();
16519 return this;
16520 }
16521
16522 @java.lang.Override
16523 public final boolean isInitialized() {
16524 return true;
16525 }
16526
16527 @java.lang.Override
16528 public Builder mergeFrom(
16529 com.google.protobuf.CodedInputStream input,
16530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16531 throws java.io.IOException {
16532 if (extensionRegistry == null) {
16533 throw new java.lang.NullPointerException();
16534 }
16535 try {
16536 boolean done = false;
16537 while (!done) {
16538 int tag = input.readTag();
16539 switch (tag) {
16540 case 0:
16541 done = true;
16542 break;
16543 case 8: {
16544 irVersion_ = input.readInt64();
16545 bitField0_ |= 0x00000001;
16546 break;
16547 } // case 8
16548 case 18: {
16549 producerName_ = input.readBytes();
16550 bitField0_ |= 0x00000004;
16551 break;
16552 } // case 18
16553 case 26: {
16554 producerVersion_ = input.readBytes();
16555 bitField0_ |= 0x00000008;
16556 break;
16557 } // case 26
16558 case 34: {
16559 domain_ = input.readBytes();
16560 bitField0_ |= 0x00000010;
16561 break;
16562 } // case 34
16563 case 40: {
16564 modelVersion_ = input.readInt64();
16565 bitField0_ |= 0x00000020;
16566 break;
16567 } // case 40
16568 case 50: {
16569 docString_ = input.readBytes();
16570 bitField0_ |= 0x00000040;
16571 break;
16572 } // case 50
16573 case 58: {
16574 input.readMessage(
16575 getGraphFieldBuilder().getBuilder(),
16576 extensionRegistry);
16577 bitField0_ |= 0x00000080;
16578 break;
16579 } // case 58
16580 case 66: {
16581 onnx.OnnxMl.OperatorSetIdProto m =
16582 input.readMessage(
16583 onnx.OnnxMl.OperatorSetIdProto.parser(),
16584 extensionRegistry);
16585 if (opsetImportBuilder_ == null) {
16586 ensureOpsetImportIsMutable();
16587 opsetImport_.add(m);
16588 } else {
16589 opsetImportBuilder_.addMessage(m);
16590 }
16591 break;
16592 } // case 66
16593 case 114: {
16594 onnx.OnnxMl.StringStringEntryProto m =
16595 input.readMessage(
16596 onnx.OnnxMl.StringStringEntryProto.parser(),
16597 extensionRegistry);
16598 if (metadataPropsBuilder_ == null) {
16599 ensureMetadataPropsIsMutable();
16600 metadataProps_.add(m);
16601 } else {
16602 metadataPropsBuilder_.addMessage(m);
16603 }
16604 break;
16605 } // case 114
16606 case 162: {
16607 onnx.OnnxMl.TrainingInfoProto m =
16608 input.readMessage(
16609 onnx.OnnxMl.TrainingInfoProto.parser(),
16610 extensionRegistry);
16611 if (trainingInfoBuilder_ == null) {
16612 ensureTrainingInfoIsMutable();
16613 trainingInfo_.add(m);
16614 } else {
16615 trainingInfoBuilder_.addMessage(m);
16616 }
16617 break;
16618 } // case 162
16619 case 202: {
16620 onnx.OnnxMl.FunctionProto m =
16621 input.readMessage(
16622 onnx.OnnxMl.FunctionProto.parser(),
16623 extensionRegistry);
16624 if (functionsBuilder_ == null) {
16625 ensureFunctionsIsMutable();
16626 functions_.add(m);
16627 } else {
16628 functionsBuilder_.addMessage(m);
16629 }
16630 break;
16631 } // case 202
16632 default: {
16633 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
16634 done = true; // was an endgroup tag
16635 }
16636 break;
16637 } // default:
16638 } // switch (tag)
16639 } // while (!done)
16640 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
16641 throw e.unwrapIOException();
16642 } finally {
16643 onChanged();
16644 } // finally
16645 return this;
16646 }
16647 private int bitField0_;
16648
16649 private long irVersion_ ;
16650 /**
16651 * <pre>
16652 * The version of the IR this model targets. See Version enum above.
16653 * This field MUST be present.
16654 * </pre>
16655 *
16656 * <code>optional int64 ir_version = 1;</code>
16657 * @return Whether the irVersion field is set.
16658 */
16659 @java.lang.Override
16660 public boolean hasIrVersion() {
16661 return ((bitField0_ & 0x00000001) != 0);
16662 }
16663 /**
16664 * <pre>
16665 * The version of the IR this model targets. See Version enum above.
16666 * This field MUST be present.
16667 * </pre>
16668 *
16669 * <code>optional int64 ir_version = 1;</code>
16670 * @return The irVersion.
16671 */
16672 @java.lang.Override
16673 public long getIrVersion() {
16674 return irVersion_;
16675 }
16676 /**
16677 * <pre>
16678 * The version of the IR this model targets. See Version enum above.
16679 * This field MUST be present.
16680 * </pre>
16681 *
16682 * <code>optional int64 ir_version = 1;</code>
16683 * @param value The irVersion to set.
16684 * @return This builder for chaining.
16685 */
16686 public Builder setIrVersion(long value) {
16687
16688 irVersion_ = value;
16689 bitField0_ |= 0x00000001;
16690 onChanged();
16691 return this;
16692 }
16693 /**
16694 * <pre>
16695 * The version of the IR this model targets. See Version enum above.
16696 * This field MUST be present.
16697 * </pre>
16698 *
16699 * <code>optional int64 ir_version = 1;</code>
16700 * @return This builder for chaining.
16701 */
16702 public Builder clearIrVersion() {
16703 bitField0_ = (bitField0_ & ~0x00000001);
16704 irVersion_ = 0L;
16705 onChanged();
16706 return this;
16707 }
16708
16709 private java.util.List<onnx.OnnxMl.OperatorSetIdProto> opsetImport_ =
16710 java.util.Collections.emptyList();
16711 private void ensureOpsetImportIsMutable() {
16712 if (!((bitField0_ & 0x00000002) != 0)) {
16713 opsetImport_ = new java.util.ArrayList<onnx.OnnxMl.OperatorSetIdProto>(opsetImport_);
16714 bitField0_ |= 0x00000002;
16715 }
16716 }
16717
16718 private com.google.protobuf.RepeatedFieldBuilder<
16719 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder> opsetImportBuilder_;
16720
16721 /**
16722 * <pre>
16723 * The OperatorSets this model relies on.
16724 * All ModelProtos MUST have at least one entry that
16725 * specifies which version of the ONNX OperatorSet is
16726 * being imported.
16727 *
16728 * All nodes in the ModelProto's graph will bind against the operator
16729 * with the same-domain/same-op_type operator with the HIGHEST version
16730 * in the referenced operator sets.
16731 * </pre>
16732 *
16733 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16734 */
16735 public java.util.List<onnx.OnnxMl.OperatorSetIdProto> getOpsetImportList() {
16736 if (opsetImportBuilder_ == null) {
16737 return java.util.Collections.unmodifiableList(opsetImport_);
16738 } else {
16739 return opsetImportBuilder_.getMessageList();
16740 }
16741 }
16742 /**
16743 * <pre>
16744 * The OperatorSets this model relies on.
16745 * All ModelProtos MUST have at least one entry that
16746 * specifies which version of the ONNX OperatorSet is
16747 * being imported.
16748 *
16749 * All nodes in the ModelProto's graph will bind against the operator
16750 * with the same-domain/same-op_type operator with the HIGHEST version
16751 * in the referenced operator sets.
16752 * </pre>
16753 *
16754 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16755 */
16756 public int getOpsetImportCount() {
16757 if (opsetImportBuilder_ == null) {
16758 return opsetImport_.size();
16759 } else {
16760 return opsetImportBuilder_.getCount();
16761 }
16762 }
16763 /**
16764 * <pre>
16765 * The OperatorSets this model relies on.
16766 * All ModelProtos MUST have at least one entry that
16767 * specifies which version of the ONNX OperatorSet is
16768 * being imported.
16769 *
16770 * All nodes in the ModelProto's graph will bind against the operator
16771 * with the same-domain/same-op_type operator with the HIGHEST version
16772 * in the referenced operator sets.
16773 * </pre>
16774 *
16775 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16776 */
16777 public onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index) {
16778 if (opsetImportBuilder_ == null) {
16779 return opsetImport_.get(index);
16780 } else {
16781 return opsetImportBuilder_.getMessage(index);
16782 }
16783 }
16784 /**
16785 * <pre>
16786 * The OperatorSets this model relies on.
16787 * All ModelProtos MUST have at least one entry that
16788 * specifies which version of the ONNX OperatorSet is
16789 * being imported.
16790 *
16791 * All nodes in the ModelProto's graph will bind against the operator
16792 * with the same-domain/same-op_type operator with the HIGHEST version
16793 * in the referenced operator sets.
16794 * </pre>
16795 *
16796 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16797 */
16798 public Builder setOpsetImport(
16799 int index, onnx.OnnxMl.OperatorSetIdProto value) {
16800 if (opsetImportBuilder_ == null) {
16801 if (value == null) {
16802 throw new NullPointerException();
16803 }
16804 ensureOpsetImportIsMutable();
16805 opsetImport_.set(index, value);
16806 onChanged();
16807 } else {
16808 opsetImportBuilder_.setMessage(index, value);
16809 }
16810 return this;
16811 }
16812 /**
16813 * <pre>
16814 * The OperatorSets this model relies on.
16815 * All ModelProtos MUST have at least one entry that
16816 * specifies which version of the ONNX OperatorSet is
16817 * being imported.
16818 *
16819 * All nodes in the ModelProto's graph will bind against the operator
16820 * with the same-domain/same-op_type operator with the HIGHEST version
16821 * in the referenced operator sets.
16822 * </pre>
16823 *
16824 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16825 */
16826 public Builder setOpsetImport(
16827 int index, onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
16828 if (opsetImportBuilder_ == null) {
16829 ensureOpsetImportIsMutable();
16830 opsetImport_.set(index, builderForValue.build());
16831 onChanged();
16832 } else {
16833 opsetImportBuilder_.setMessage(index, builderForValue.build());
16834 }
16835 return this;
16836 }
16837 /**
16838 * <pre>
16839 * The OperatorSets this model relies on.
16840 * All ModelProtos MUST have at least one entry that
16841 * specifies which version of the ONNX OperatorSet is
16842 * being imported.
16843 *
16844 * All nodes in the ModelProto's graph will bind against the operator
16845 * with the same-domain/same-op_type operator with the HIGHEST version
16846 * in the referenced operator sets.
16847 * </pre>
16848 *
16849 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16850 */
16851 public Builder addOpsetImport(onnx.OnnxMl.OperatorSetIdProto value) {
16852 if (opsetImportBuilder_ == null) {
16853 if (value == null) {
16854 throw new NullPointerException();
16855 }
16856 ensureOpsetImportIsMutable();
16857 opsetImport_.add(value);
16858 onChanged();
16859 } else {
16860 opsetImportBuilder_.addMessage(value);
16861 }
16862 return this;
16863 }
16864 /**
16865 * <pre>
16866 * The OperatorSets this model relies on.
16867 * All ModelProtos MUST have at least one entry that
16868 * specifies which version of the ONNX OperatorSet is
16869 * being imported.
16870 *
16871 * All nodes in the ModelProto's graph will bind against the operator
16872 * with the same-domain/same-op_type operator with the HIGHEST version
16873 * in the referenced operator sets.
16874 * </pre>
16875 *
16876 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16877 */
16878 public Builder addOpsetImport(
16879 int index, onnx.OnnxMl.OperatorSetIdProto value) {
16880 if (opsetImportBuilder_ == null) {
16881 if (value == null) {
16882 throw new NullPointerException();
16883 }
16884 ensureOpsetImportIsMutable();
16885 opsetImport_.add(index, value);
16886 onChanged();
16887 } else {
16888 opsetImportBuilder_.addMessage(index, value);
16889 }
16890 return this;
16891 }
16892 /**
16893 * <pre>
16894 * The OperatorSets this model relies on.
16895 * All ModelProtos MUST have at least one entry that
16896 * specifies which version of the ONNX OperatorSet is
16897 * being imported.
16898 *
16899 * All nodes in the ModelProto's graph will bind against the operator
16900 * with the same-domain/same-op_type operator with the HIGHEST version
16901 * in the referenced operator sets.
16902 * </pre>
16903 *
16904 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16905 */
16906 public Builder addOpsetImport(
16907 onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
16908 if (opsetImportBuilder_ == null) {
16909 ensureOpsetImportIsMutable();
16910 opsetImport_.add(builderForValue.build());
16911 onChanged();
16912 } else {
16913 opsetImportBuilder_.addMessage(builderForValue.build());
16914 }
16915 return this;
16916 }
16917 /**
16918 * <pre>
16919 * The OperatorSets this model relies on.
16920 * All ModelProtos MUST have at least one entry that
16921 * specifies which version of the ONNX OperatorSet is
16922 * being imported.
16923 *
16924 * All nodes in the ModelProto's graph will bind against the operator
16925 * with the same-domain/same-op_type operator with the HIGHEST version
16926 * in the referenced operator sets.
16927 * </pre>
16928 *
16929 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16930 */
16931 public Builder addOpsetImport(
16932 int index, onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
16933 if (opsetImportBuilder_ == null) {
16934 ensureOpsetImportIsMutable();
16935 opsetImport_.add(index, builderForValue.build());
16936 onChanged();
16937 } else {
16938 opsetImportBuilder_.addMessage(index, builderForValue.build());
16939 }
16940 return this;
16941 }
16942 /**
16943 * <pre>
16944 * The OperatorSets this model relies on.
16945 * All ModelProtos MUST have at least one entry that
16946 * specifies which version of the ONNX OperatorSet is
16947 * being imported.
16948 *
16949 * All nodes in the ModelProto's graph will bind against the operator
16950 * with the same-domain/same-op_type operator with the HIGHEST version
16951 * in the referenced operator sets.
16952 * </pre>
16953 *
16954 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16955 */
16956 public Builder addAllOpsetImport(
16957 java.lang.Iterable<? extends onnx.OnnxMl.OperatorSetIdProto> values) {
16958 if (opsetImportBuilder_ == null) {
16959 ensureOpsetImportIsMutable();
16960 com.google.protobuf.AbstractMessageLite.Builder.addAll(
16961 values, opsetImport_);
16962 onChanged();
16963 } else {
16964 opsetImportBuilder_.addAllMessages(values);
16965 }
16966 return this;
16967 }
16968 /**
16969 * <pre>
16970 * The OperatorSets this model relies on.
16971 * All ModelProtos MUST have at least one entry that
16972 * specifies which version of the ONNX OperatorSet is
16973 * being imported.
16974 *
16975 * All nodes in the ModelProto's graph will bind against the operator
16976 * with the same-domain/same-op_type operator with the HIGHEST version
16977 * in the referenced operator sets.
16978 * </pre>
16979 *
16980 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
16981 */
16982 public Builder clearOpsetImport() {
16983 if (opsetImportBuilder_ == null) {
16984 opsetImport_ = java.util.Collections.emptyList();
16985 bitField0_ = (bitField0_ & ~0x00000002);
16986 onChanged();
16987 } else {
16988 opsetImportBuilder_.clear();
16989 }
16990 return this;
16991 }
16992 /**
16993 * <pre>
16994 * The OperatorSets this model relies on.
16995 * All ModelProtos MUST have at least one entry that
16996 * specifies which version of the ONNX OperatorSet is
16997 * being imported.
16998 *
16999 * All nodes in the ModelProto's graph will bind against the operator
17000 * with the same-domain/same-op_type operator with the HIGHEST version
17001 * in the referenced operator sets.
17002 * </pre>
17003 *
17004 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17005 */
17006 public Builder removeOpsetImport(int index) {
17007 if (opsetImportBuilder_ == null) {
17008 ensureOpsetImportIsMutable();
17009 opsetImport_.remove(index);
17010 onChanged();
17011 } else {
17012 opsetImportBuilder_.remove(index);
17013 }
17014 return this;
17015 }
17016 /**
17017 * <pre>
17018 * The OperatorSets this model relies on.
17019 * All ModelProtos MUST have at least one entry that
17020 * specifies which version of the ONNX OperatorSet is
17021 * being imported.
17022 *
17023 * All nodes in the ModelProto's graph will bind against the operator
17024 * with the same-domain/same-op_type operator with the HIGHEST version
17025 * in the referenced operator sets.
17026 * </pre>
17027 *
17028 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17029 */
17030 public onnx.OnnxMl.OperatorSetIdProto.Builder getOpsetImportBuilder(
17031 int index) {
17032 return getOpsetImportFieldBuilder().getBuilder(index);
17033 }
17034 /**
17035 * <pre>
17036 * The OperatorSets this model relies on.
17037 * All ModelProtos MUST have at least one entry that
17038 * specifies which version of the ONNX OperatorSet is
17039 * being imported.
17040 *
17041 * All nodes in the ModelProto's graph will bind against the operator
17042 * with the same-domain/same-op_type operator with the HIGHEST version
17043 * in the referenced operator sets.
17044 * </pre>
17045 *
17046 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17047 */
17048 public onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
17049 int index) {
17050 if (opsetImportBuilder_ == null) {
17051 return opsetImport_.get(index); } else {
17052 return opsetImportBuilder_.getMessageOrBuilder(index);
17053 }
17054 }
17055 /**
17056 * <pre>
17057 * The OperatorSets this model relies on.
17058 * All ModelProtos MUST have at least one entry that
17059 * specifies which version of the ONNX OperatorSet is
17060 * being imported.
17061 *
17062 * All nodes in the ModelProto's graph will bind against the operator
17063 * with the same-domain/same-op_type operator with the HIGHEST version
17064 * in the referenced operator sets.
17065 * </pre>
17066 *
17067 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17068 */
17069 public java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
17070 getOpsetImportOrBuilderList() {
17071 if (opsetImportBuilder_ != null) {
17072 return opsetImportBuilder_.getMessageOrBuilderList();
17073 } else {
17074 return java.util.Collections.unmodifiableList(opsetImport_);
17075 }
17076 }
17077 /**
17078 * <pre>
17079 * The OperatorSets this model relies on.
17080 * All ModelProtos MUST have at least one entry that
17081 * specifies which version of the ONNX OperatorSet is
17082 * being imported.
17083 *
17084 * All nodes in the ModelProto's graph will bind against the operator
17085 * with the same-domain/same-op_type operator with the HIGHEST version
17086 * in the referenced operator sets.
17087 * </pre>
17088 *
17089 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17090 */
17091 public onnx.OnnxMl.OperatorSetIdProto.Builder addOpsetImportBuilder() {
17092 return getOpsetImportFieldBuilder().addBuilder(
17093 onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance());
17094 }
17095 /**
17096 * <pre>
17097 * The OperatorSets this model relies on.
17098 * All ModelProtos MUST have at least one entry that
17099 * specifies which version of the ONNX OperatorSet is
17100 * being imported.
17101 *
17102 * All nodes in the ModelProto's graph will bind against the operator
17103 * with the same-domain/same-op_type operator with the HIGHEST version
17104 * in the referenced operator sets.
17105 * </pre>
17106 *
17107 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17108 */
17109 public onnx.OnnxMl.OperatorSetIdProto.Builder addOpsetImportBuilder(
17110 int index) {
17111 return getOpsetImportFieldBuilder().addBuilder(
17112 index, onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance());
17113 }
17114 /**
17115 * <pre>
17116 * The OperatorSets this model relies on.
17117 * All ModelProtos MUST have at least one entry that
17118 * specifies which version of the ONNX OperatorSet is
17119 * being imported.
17120 *
17121 * All nodes in the ModelProto's graph will bind against the operator
17122 * with the same-domain/same-op_type operator with the HIGHEST version
17123 * in the referenced operator sets.
17124 * </pre>
17125 *
17126 * <code>repeated .onnx.OperatorSetIdProto opset_import = 8;</code>
17127 */
17128 public java.util.List<onnx.OnnxMl.OperatorSetIdProto.Builder>
17129 getOpsetImportBuilderList() {
17130 return getOpsetImportFieldBuilder().getBuilderList();
17131 }
17132 private com.google.protobuf.RepeatedFieldBuilder<
17133 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
17134 getOpsetImportFieldBuilder() {
17135 if (opsetImportBuilder_ == null) {
17136 opsetImportBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
17137 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder>(
17138 opsetImport_,
17139 ((bitField0_ & 0x00000002) != 0),
17140 getParentForChildren(),
17141 isClean());
17142 opsetImport_ = null;
17143 }
17144 return opsetImportBuilder_;
17145 }
17146
17147 private java.lang.Object producerName_ = "";
17148 /**
17149 * <pre>
17150 * The name of the framework or tool used to generate this model.
17151 * This field SHOULD be present to indicate which implementation/tool/framework
17152 * emitted the model.
17153 * </pre>
17154 *
17155 * <code>optional string producer_name = 2;</code>
17156 * @return Whether the producerName field is set.
17157 */
17158 public boolean hasProducerName() {
17159 return ((bitField0_ & 0x00000004) != 0);
17160 }
17161 /**
17162 * <pre>
17163 * The name of the framework or tool used to generate this model.
17164 * This field SHOULD be present to indicate which implementation/tool/framework
17165 * emitted the model.
17166 * </pre>
17167 *
17168 * <code>optional string producer_name = 2;</code>
17169 * @return The producerName.
17170 */
17171 public java.lang.String getProducerName() {
17172 java.lang.Object ref = producerName_;
17173 if (!(ref instanceof java.lang.String)) {
17174 com.google.protobuf.ByteString bs =
17175 (com.google.protobuf.ByteString) ref;
17176 java.lang.String s = bs.toStringUtf8();
17177 if (bs.isValidUtf8()) {
17178 producerName_ = s;
17179 }
17180 return s;
17181 } else {
17182 return (java.lang.String) ref;
17183 }
17184 }
17185 /**
17186 * <pre>
17187 * The name of the framework or tool used to generate this model.
17188 * This field SHOULD be present to indicate which implementation/tool/framework
17189 * emitted the model.
17190 * </pre>
17191 *
17192 * <code>optional string producer_name = 2;</code>
17193 * @return The bytes for producerName.
17194 */
17195 public com.google.protobuf.ByteString
17196 getProducerNameBytes() {
17197 java.lang.Object ref = producerName_;
17198 if (ref instanceof String) {
17199 com.google.protobuf.ByteString b =
17200 com.google.protobuf.ByteString.copyFromUtf8(
17201 (java.lang.String) ref);
17202 producerName_ = b;
17203 return b;
17204 } else {
17205 return (com.google.protobuf.ByteString) ref;
17206 }
17207 }
17208 /**
17209 * <pre>
17210 * The name of the framework or tool used to generate this model.
17211 * This field SHOULD be present to indicate which implementation/tool/framework
17212 * emitted the model.
17213 * </pre>
17214 *
17215 * <code>optional string producer_name = 2;</code>
17216 * @param value The producerName to set.
17217 * @return This builder for chaining.
17218 */
17219 public Builder setProducerName(
17220 java.lang.String value) {
17221 if (value == null) { throw new NullPointerException(); }
17222 producerName_ = value;
17223 bitField0_ |= 0x00000004;
17224 onChanged();
17225 return this;
17226 }
17227 /**
17228 * <pre>
17229 * The name of the framework or tool used to generate this model.
17230 * This field SHOULD be present to indicate which implementation/tool/framework
17231 * emitted the model.
17232 * </pre>
17233 *
17234 * <code>optional string producer_name = 2;</code>
17235 * @return This builder for chaining.
17236 */
17237 public Builder clearProducerName() {
17238 producerName_ = getDefaultInstance().getProducerName();
17239 bitField0_ = (bitField0_ & ~0x00000004);
17240 onChanged();
17241 return this;
17242 }
17243 /**
17244 * <pre>
17245 * The name of the framework or tool used to generate this model.
17246 * This field SHOULD be present to indicate which implementation/tool/framework
17247 * emitted the model.
17248 * </pre>
17249 *
17250 * <code>optional string producer_name = 2;</code>
17251 * @param value The bytes for producerName to set.
17252 * @return This builder for chaining.
17253 */
17254 public Builder setProducerNameBytes(
17255 com.google.protobuf.ByteString value) {
17256 if (value == null) { throw new NullPointerException(); }
17257 producerName_ = value;
17258 bitField0_ |= 0x00000004;
17259 onChanged();
17260 return this;
17261 }
17262
17263 private java.lang.Object producerVersion_ = "";
17264 /**
17265 * <pre>
17266 * The version of the framework or tool used to generate this model.
17267 * This field SHOULD be present to indicate which implementation/tool/framework
17268 * emitted the model.
17269 * </pre>
17270 *
17271 * <code>optional string producer_version = 3;</code>
17272 * @return Whether the producerVersion field is set.
17273 */
17274 public boolean hasProducerVersion() {
17275 return ((bitField0_ & 0x00000008) != 0);
17276 }
17277 /**
17278 * <pre>
17279 * The version of the framework or tool used to generate this model.
17280 * This field SHOULD be present to indicate which implementation/tool/framework
17281 * emitted the model.
17282 * </pre>
17283 *
17284 * <code>optional string producer_version = 3;</code>
17285 * @return The producerVersion.
17286 */
17287 public java.lang.String getProducerVersion() {
17288 java.lang.Object ref = producerVersion_;
17289 if (!(ref instanceof java.lang.String)) {
17290 com.google.protobuf.ByteString bs =
17291 (com.google.protobuf.ByteString) ref;
17292 java.lang.String s = bs.toStringUtf8();
17293 if (bs.isValidUtf8()) {
17294 producerVersion_ = s;
17295 }
17296 return s;
17297 } else {
17298 return (java.lang.String) ref;
17299 }
17300 }
17301 /**
17302 * <pre>
17303 * The version of the framework or tool used to generate this model.
17304 * This field SHOULD be present to indicate which implementation/tool/framework
17305 * emitted the model.
17306 * </pre>
17307 *
17308 * <code>optional string producer_version = 3;</code>
17309 * @return The bytes for producerVersion.
17310 */
17311 public com.google.protobuf.ByteString
17312 getProducerVersionBytes() {
17313 java.lang.Object ref = producerVersion_;
17314 if (ref instanceof String) {
17315 com.google.protobuf.ByteString b =
17316 com.google.protobuf.ByteString.copyFromUtf8(
17317 (java.lang.String) ref);
17318 producerVersion_ = b;
17319 return b;
17320 } else {
17321 return (com.google.protobuf.ByteString) ref;
17322 }
17323 }
17324 /**
17325 * <pre>
17326 * The version of the framework or tool used to generate this model.
17327 * This field SHOULD be present to indicate which implementation/tool/framework
17328 * emitted the model.
17329 * </pre>
17330 *
17331 * <code>optional string producer_version = 3;</code>
17332 * @param value The producerVersion to set.
17333 * @return This builder for chaining.
17334 */
17335 public Builder setProducerVersion(
17336 java.lang.String value) {
17337 if (value == null) { throw new NullPointerException(); }
17338 producerVersion_ = value;
17339 bitField0_ |= 0x00000008;
17340 onChanged();
17341 return this;
17342 }
17343 /**
17344 * <pre>
17345 * The version of the framework or tool used to generate this model.
17346 * This field SHOULD be present to indicate which implementation/tool/framework
17347 * emitted the model.
17348 * </pre>
17349 *
17350 * <code>optional string producer_version = 3;</code>
17351 * @return This builder for chaining.
17352 */
17353 public Builder clearProducerVersion() {
17354 producerVersion_ = getDefaultInstance().getProducerVersion();
17355 bitField0_ = (bitField0_ & ~0x00000008);
17356 onChanged();
17357 return this;
17358 }
17359 /**
17360 * <pre>
17361 * The version of the framework or tool used to generate this model.
17362 * This field SHOULD be present to indicate which implementation/tool/framework
17363 * emitted the model.
17364 * </pre>
17365 *
17366 * <code>optional string producer_version = 3;</code>
17367 * @param value The bytes for producerVersion to set.
17368 * @return This builder for chaining.
17369 */
17370 public Builder setProducerVersionBytes(
17371 com.google.protobuf.ByteString value) {
17372 if (value == null) { throw new NullPointerException(); }
17373 producerVersion_ = value;
17374 bitField0_ |= 0x00000008;
17375 onChanged();
17376 return this;
17377 }
17378
17379 private java.lang.Object domain_ = "";
17380 /**
17381 * <pre>
17382 * Domain name of the model.
17383 * We use reverse domain names as name space indicators. For example:
17384 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17385 *
17386 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17387 * the graph.
17388 * </pre>
17389 *
17390 * <code>optional string domain = 4;</code>
17391 * @return Whether the domain field is set.
17392 */
17393 public boolean hasDomain() {
17394 return ((bitField0_ & 0x00000010) != 0);
17395 }
17396 /**
17397 * <pre>
17398 * Domain name of the model.
17399 * We use reverse domain names as name space indicators. For example:
17400 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17401 *
17402 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17403 * the graph.
17404 * </pre>
17405 *
17406 * <code>optional string domain = 4;</code>
17407 * @return The domain.
17408 */
17409 public java.lang.String getDomain() {
17410 java.lang.Object ref = domain_;
17411 if (!(ref instanceof java.lang.String)) {
17412 com.google.protobuf.ByteString bs =
17413 (com.google.protobuf.ByteString) ref;
17414 java.lang.String s = bs.toStringUtf8();
17415 if (bs.isValidUtf8()) {
17416 domain_ = s;
17417 }
17418 return s;
17419 } else {
17420 return (java.lang.String) ref;
17421 }
17422 }
17423 /**
17424 * <pre>
17425 * Domain name of the model.
17426 * We use reverse domain names as name space indicators. For example:
17427 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17428 *
17429 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17430 * the graph.
17431 * </pre>
17432 *
17433 * <code>optional string domain = 4;</code>
17434 * @return The bytes for domain.
17435 */
17436 public com.google.protobuf.ByteString
17437 getDomainBytes() {
17438 java.lang.Object ref = domain_;
17439 if (ref instanceof String) {
17440 com.google.protobuf.ByteString b =
17441 com.google.protobuf.ByteString.copyFromUtf8(
17442 (java.lang.String) ref);
17443 domain_ = b;
17444 return b;
17445 } else {
17446 return (com.google.protobuf.ByteString) ref;
17447 }
17448 }
17449 /**
17450 * <pre>
17451 * Domain name of the model.
17452 * We use reverse domain names as name space indicators. For example:
17453 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17454 *
17455 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17456 * the graph.
17457 * </pre>
17458 *
17459 * <code>optional string domain = 4;</code>
17460 * @param value The domain to set.
17461 * @return This builder for chaining.
17462 */
17463 public Builder setDomain(
17464 java.lang.String value) {
17465 if (value == null) { throw new NullPointerException(); }
17466 domain_ = value;
17467 bitField0_ |= 0x00000010;
17468 onChanged();
17469 return this;
17470 }
17471 /**
17472 * <pre>
17473 * Domain name of the model.
17474 * We use reverse domain names as name space indicators. For example:
17475 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17476 *
17477 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17478 * the graph.
17479 * </pre>
17480 *
17481 * <code>optional string domain = 4;</code>
17482 * @return This builder for chaining.
17483 */
17484 public Builder clearDomain() {
17485 domain_ = getDefaultInstance().getDomain();
17486 bitField0_ = (bitField0_ & ~0x00000010);
17487 onChanged();
17488 return this;
17489 }
17490 /**
17491 * <pre>
17492 * Domain name of the model.
17493 * We use reverse domain names as name space indicators. For example:
17494 * `com.facebook.fair` or `com.microsoft.cognitiveservices`
17495 *
17496 * Together with `model_version` and GraphProto.name, this forms the unique identity of
17497 * the graph.
17498 * </pre>
17499 *
17500 * <code>optional string domain = 4;</code>
17501 * @param value The bytes for domain to set.
17502 * @return This builder for chaining.
17503 */
17504 public Builder setDomainBytes(
17505 com.google.protobuf.ByteString value) {
17506 if (value == null) { throw new NullPointerException(); }
17507 domain_ = value;
17508 bitField0_ |= 0x00000010;
17509 onChanged();
17510 return this;
17511 }
17512
17513 private long modelVersion_ ;
17514 /**
17515 * <pre>
17516 * The version of the graph encoded. See Version enum below.
17517 * </pre>
17518 *
17519 * <code>optional int64 model_version = 5;</code>
17520 * @return Whether the modelVersion field is set.
17521 */
17522 @java.lang.Override
17523 public boolean hasModelVersion() {
17524 return ((bitField0_ & 0x00000020) != 0);
17525 }
17526 /**
17527 * <pre>
17528 * The version of the graph encoded. See Version enum below.
17529 * </pre>
17530 *
17531 * <code>optional int64 model_version = 5;</code>
17532 * @return The modelVersion.
17533 */
17534 @java.lang.Override
17535 public long getModelVersion() {
17536 return modelVersion_;
17537 }
17538 /**
17539 * <pre>
17540 * The version of the graph encoded. See Version enum below.
17541 * </pre>
17542 *
17543 * <code>optional int64 model_version = 5;</code>
17544 * @param value The modelVersion to set.
17545 * @return This builder for chaining.
17546 */
17547 public Builder setModelVersion(long value) {
17548
17549 modelVersion_ = value;
17550 bitField0_ |= 0x00000020;
17551 onChanged();
17552 return this;
17553 }
17554 /**
17555 * <pre>
17556 * The version of the graph encoded. See Version enum below.
17557 * </pre>
17558 *
17559 * <code>optional int64 model_version = 5;</code>
17560 * @return This builder for chaining.
17561 */
17562 public Builder clearModelVersion() {
17563 bitField0_ = (bitField0_ & ~0x00000020);
17564 modelVersion_ = 0L;
17565 onChanged();
17566 return this;
17567 }
17568
17569 private java.lang.Object docString_ = "";
17570 /**
17571 * <pre>
17572 * A human-readable documentation for this model. Markdown is allowed.
17573 * </pre>
17574 *
17575 * <code>optional string doc_string = 6;</code>
17576 * @return Whether the docString field is set.
17577 */
17578 public boolean hasDocString() {
17579 return ((bitField0_ & 0x00000040) != 0);
17580 }
17581 /**
17582 * <pre>
17583 * A human-readable documentation for this model. Markdown is allowed.
17584 * </pre>
17585 *
17586 * <code>optional string doc_string = 6;</code>
17587 * @return The docString.
17588 */
17589 public java.lang.String getDocString() {
17590 java.lang.Object ref = docString_;
17591 if (!(ref instanceof java.lang.String)) {
17592 com.google.protobuf.ByteString bs =
17593 (com.google.protobuf.ByteString) ref;
17594 java.lang.String s = bs.toStringUtf8();
17595 if (bs.isValidUtf8()) {
17596 docString_ = s;
17597 }
17598 return s;
17599 } else {
17600 return (java.lang.String) ref;
17601 }
17602 }
17603 /**
17604 * <pre>
17605 * A human-readable documentation for this model. Markdown is allowed.
17606 * </pre>
17607 *
17608 * <code>optional string doc_string = 6;</code>
17609 * @return The bytes for docString.
17610 */
17611 public com.google.protobuf.ByteString
17612 getDocStringBytes() {
17613 java.lang.Object ref = docString_;
17614 if (ref instanceof String) {
17615 com.google.protobuf.ByteString b =
17616 com.google.protobuf.ByteString.copyFromUtf8(
17617 (java.lang.String) ref);
17618 docString_ = b;
17619 return b;
17620 } else {
17621 return (com.google.protobuf.ByteString) ref;
17622 }
17623 }
17624 /**
17625 * <pre>
17626 * A human-readable documentation for this model. Markdown is allowed.
17627 * </pre>
17628 *
17629 * <code>optional string doc_string = 6;</code>
17630 * @param value The docString to set.
17631 * @return This builder for chaining.
17632 */
17633 public Builder setDocString(
17634 java.lang.String value) {
17635 if (value == null) { throw new NullPointerException(); }
17636 docString_ = value;
17637 bitField0_ |= 0x00000040;
17638 onChanged();
17639 return this;
17640 }
17641 /**
17642 * <pre>
17643 * A human-readable documentation for this model. Markdown is allowed.
17644 * </pre>
17645 *
17646 * <code>optional string doc_string = 6;</code>
17647 * @return This builder for chaining.
17648 */
17649 public Builder clearDocString() {
17650 docString_ = getDefaultInstance().getDocString();
17651 bitField0_ = (bitField0_ & ~0x00000040);
17652 onChanged();
17653 return this;
17654 }
17655 /**
17656 * <pre>
17657 * A human-readable documentation for this model. Markdown is allowed.
17658 * </pre>
17659 *
17660 * <code>optional string doc_string = 6;</code>
17661 * @param value The bytes for docString to set.
17662 * @return This builder for chaining.
17663 */
17664 public Builder setDocStringBytes(
17665 com.google.protobuf.ByteString value) {
17666 if (value == null) { throw new NullPointerException(); }
17667 docString_ = value;
17668 bitField0_ |= 0x00000040;
17669 onChanged();
17670 return this;
17671 }
17672
17673 private onnx.OnnxMl.GraphProto graph_;
17674 private com.google.protobuf.SingleFieldBuilder<
17675 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder> graphBuilder_;
17676 /**
17677 * <pre>
17678 * The parameterized graph that is evaluated to execute the model.
17679 * </pre>
17680 *
17681 * <code>optional .onnx.GraphProto graph = 7;</code>
17682 * @return Whether the graph field is set.
17683 */
17684 public boolean hasGraph() {
17685 return ((bitField0_ & 0x00000080) != 0);
17686 }
17687 /**
17688 * <pre>
17689 * The parameterized graph that is evaluated to execute the model.
17690 * </pre>
17691 *
17692 * <code>optional .onnx.GraphProto graph = 7;</code>
17693 * @return The graph.
17694 */
17695 public onnx.OnnxMl.GraphProto getGraph() {
17696 if (graphBuilder_ == null) {
17697 return graph_ == null ? onnx.OnnxMl.GraphProto.getDefaultInstance() : graph_;
17698 } else {
17699 return graphBuilder_.getMessage();
17700 }
17701 }
17702 /**
17703 * <pre>
17704 * The parameterized graph that is evaluated to execute the model.
17705 * </pre>
17706 *
17707 * <code>optional .onnx.GraphProto graph = 7;</code>
17708 */
17709 public Builder setGraph(onnx.OnnxMl.GraphProto value) {
17710 if (graphBuilder_ == null) {
17711 if (value == null) {
17712 throw new NullPointerException();
17713 }
17714 graph_ = value;
17715 } else {
17716 graphBuilder_.setMessage(value);
17717 }
17718 bitField0_ |= 0x00000080;
17719 onChanged();
17720 return this;
17721 }
17722 /**
17723 * <pre>
17724 * The parameterized graph that is evaluated to execute the model.
17725 * </pre>
17726 *
17727 * <code>optional .onnx.GraphProto graph = 7;</code>
17728 */
17729 public Builder setGraph(
17730 onnx.OnnxMl.GraphProto.Builder builderForValue) {
17731 if (graphBuilder_ == null) {
17732 graph_ = builderForValue.build();
17733 } else {
17734 graphBuilder_.setMessage(builderForValue.build());
17735 }
17736 bitField0_ |= 0x00000080;
17737 onChanged();
17738 return this;
17739 }
17740 /**
17741 * <pre>
17742 * The parameterized graph that is evaluated to execute the model.
17743 * </pre>
17744 *
17745 * <code>optional .onnx.GraphProto graph = 7;</code>
17746 */
17747 public Builder mergeGraph(onnx.OnnxMl.GraphProto value) {
17748 if (graphBuilder_ == null) {
17749 if (((bitField0_ & 0x00000080) != 0) &&
17750 graph_ != null &&
17751 graph_ != onnx.OnnxMl.GraphProto.getDefaultInstance()) {
17752 getGraphBuilder().mergeFrom(value);
17753 } else {
17754 graph_ = value;
17755 }
17756 } else {
17757 graphBuilder_.mergeFrom(value);
17758 }
17759 if (graph_ != null) {
17760 bitField0_ |= 0x00000080;
17761 onChanged();
17762 }
17763 return this;
17764 }
17765 /**
17766 * <pre>
17767 * The parameterized graph that is evaluated to execute the model.
17768 * </pre>
17769 *
17770 * <code>optional .onnx.GraphProto graph = 7;</code>
17771 */
17772 public Builder clearGraph() {
17773 bitField0_ = (bitField0_ & ~0x00000080);
17774 graph_ = null;
17775 if (graphBuilder_ != null) {
17776 graphBuilder_.dispose();
17777 graphBuilder_ = null;
17778 }
17779 onChanged();
17780 return this;
17781 }
17782 /**
17783 * <pre>
17784 * The parameterized graph that is evaluated to execute the model.
17785 * </pre>
17786 *
17787 * <code>optional .onnx.GraphProto graph = 7;</code>
17788 */
17789 public onnx.OnnxMl.GraphProto.Builder getGraphBuilder() {
17790 bitField0_ |= 0x00000080;
17791 onChanged();
17792 return getGraphFieldBuilder().getBuilder();
17793 }
17794 /**
17795 * <pre>
17796 * The parameterized graph that is evaluated to execute the model.
17797 * </pre>
17798 *
17799 * <code>optional .onnx.GraphProto graph = 7;</code>
17800 */
17801 public onnx.OnnxMl.GraphProtoOrBuilder getGraphOrBuilder() {
17802 if (graphBuilder_ != null) {
17803 return graphBuilder_.getMessageOrBuilder();
17804 } else {
17805 return graph_ == null ?
17806 onnx.OnnxMl.GraphProto.getDefaultInstance() : graph_;
17807 }
17808 }
17809 /**
17810 * <pre>
17811 * The parameterized graph that is evaluated to execute the model.
17812 * </pre>
17813 *
17814 * <code>optional .onnx.GraphProto graph = 7;</code>
17815 */
17816 private com.google.protobuf.SingleFieldBuilder<
17817 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>
17818 getGraphFieldBuilder() {
17819 if (graphBuilder_ == null) {
17820 graphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
17821 onnx.OnnxMl.GraphProto, onnx.OnnxMl.GraphProto.Builder, onnx.OnnxMl.GraphProtoOrBuilder>(
17822 getGraph(),
17823 getParentForChildren(),
17824 isClean());
17825 graph_ = null;
17826 }
17827 return graphBuilder_;
17828 }
17829
17830 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
17831 java.util.Collections.emptyList();
17832 private void ensureMetadataPropsIsMutable() {
17833 if (!((bitField0_ & 0x00000100) != 0)) {
17834 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
17835 bitField0_ |= 0x00000100;
17836 }
17837 }
17838
17839 private com.google.protobuf.RepeatedFieldBuilder<
17840 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
17841
17842 /**
17843 * <pre>
17844 * Named metadata values; keys should be distinct.
17845 * </pre>
17846 *
17847 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17848 */
17849 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
17850 if (metadataPropsBuilder_ == null) {
17851 return java.util.Collections.unmodifiableList(metadataProps_);
17852 } else {
17853 return metadataPropsBuilder_.getMessageList();
17854 }
17855 }
17856 /**
17857 * <pre>
17858 * Named metadata values; keys should be distinct.
17859 * </pre>
17860 *
17861 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17862 */
17863 public int getMetadataPropsCount() {
17864 if (metadataPropsBuilder_ == null) {
17865 return metadataProps_.size();
17866 } else {
17867 return metadataPropsBuilder_.getCount();
17868 }
17869 }
17870 /**
17871 * <pre>
17872 * Named metadata values; keys should be distinct.
17873 * </pre>
17874 *
17875 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17876 */
17877 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
17878 if (metadataPropsBuilder_ == null) {
17879 return metadataProps_.get(index);
17880 } else {
17881 return metadataPropsBuilder_.getMessage(index);
17882 }
17883 }
17884 /**
17885 * <pre>
17886 * Named metadata values; keys should be distinct.
17887 * </pre>
17888 *
17889 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17890 */
17891 public Builder setMetadataProps(
17892 int index, onnx.OnnxMl.StringStringEntryProto value) {
17893 if (metadataPropsBuilder_ == null) {
17894 if (value == null) {
17895 throw new NullPointerException();
17896 }
17897 ensureMetadataPropsIsMutable();
17898 metadataProps_.set(index, value);
17899 onChanged();
17900 } else {
17901 metadataPropsBuilder_.setMessage(index, value);
17902 }
17903 return this;
17904 }
17905 /**
17906 * <pre>
17907 * Named metadata values; keys should be distinct.
17908 * </pre>
17909 *
17910 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17911 */
17912 public Builder setMetadataProps(
17913 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
17914 if (metadataPropsBuilder_ == null) {
17915 ensureMetadataPropsIsMutable();
17916 metadataProps_.set(index, builderForValue.build());
17917 onChanged();
17918 } else {
17919 metadataPropsBuilder_.setMessage(index, builderForValue.build());
17920 }
17921 return this;
17922 }
17923 /**
17924 * <pre>
17925 * Named metadata values; keys should be distinct.
17926 * </pre>
17927 *
17928 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17929 */
17930 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
17931 if (metadataPropsBuilder_ == null) {
17932 if (value == null) {
17933 throw new NullPointerException();
17934 }
17935 ensureMetadataPropsIsMutable();
17936 metadataProps_.add(value);
17937 onChanged();
17938 } else {
17939 metadataPropsBuilder_.addMessage(value);
17940 }
17941 return this;
17942 }
17943 /**
17944 * <pre>
17945 * Named metadata values; keys should be distinct.
17946 * </pre>
17947 *
17948 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17949 */
17950 public Builder addMetadataProps(
17951 int index, onnx.OnnxMl.StringStringEntryProto value) {
17952 if (metadataPropsBuilder_ == null) {
17953 if (value == null) {
17954 throw new NullPointerException();
17955 }
17956 ensureMetadataPropsIsMutable();
17957 metadataProps_.add(index, value);
17958 onChanged();
17959 } else {
17960 metadataPropsBuilder_.addMessage(index, value);
17961 }
17962 return this;
17963 }
17964 /**
17965 * <pre>
17966 * Named metadata values; keys should be distinct.
17967 * </pre>
17968 *
17969 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17970 */
17971 public Builder addMetadataProps(
17972 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
17973 if (metadataPropsBuilder_ == null) {
17974 ensureMetadataPropsIsMutable();
17975 metadataProps_.add(builderForValue.build());
17976 onChanged();
17977 } else {
17978 metadataPropsBuilder_.addMessage(builderForValue.build());
17979 }
17980 return this;
17981 }
17982 /**
17983 * <pre>
17984 * Named metadata values; keys should be distinct.
17985 * </pre>
17986 *
17987 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
17988 */
17989 public Builder addMetadataProps(
17990 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
17991 if (metadataPropsBuilder_ == null) {
17992 ensureMetadataPropsIsMutable();
17993 metadataProps_.add(index, builderForValue.build());
17994 onChanged();
17995 } else {
17996 metadataPropsBuilder_.addMessage(index, builderForValue.build());
17997 }
17998 return this;
17999 }
18000 /**
18001 * <pre>
18002 * Named metadata values; keys should be distinct.
18003 * </pre>
18004 *
18005 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18006 */
18007 public Builder addAllMetadataProps(
18008 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
18009 if (metadataPropsBuilder_ == null) {
18010 ensureMetadataPropsIsMutable();
18011 com.google.protobuf.AbstractMessageLite.Builder.addAll(
18012 values, metadataProps_);
18013 onChanged();
18014 } else {
18015 metadataPropsBuilder_.addAllMessages(values);
18016 }
18017 return this;
18018 }
18019 /**
18020 * <pre>
18021 * Named metadata values; keys should be distinct.
18022 * </pre>
18023 *
18024 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18025 */
18026 public Builder clearMetadataProps() {
18027 if (metadataPropsBuilder_ == null) {
18028 metadataProps_ = java.util.Collections.emptyList();
18029 bitField0_ = (bitField0_ & ~0x00000100);
18030 onChanged();
18031 } else {
18032 metadataPropsBuilder_.clear();
18033 }
18034 return this;
18035 }
18036 /**
18037 * <pre>
18038 * Named metadata values; keys should be distinct.
18039 * </pre>
18040 *
18041 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18042 */
18043 public Builder removeMetadataProps(int index) {
18044 if (metadataPropsBuilder_ == null) {
18045 ensureMetadataPropsIsMutable();
18046 metadataProps_.remove(index);
18047 onChanged();
18048 } else {
18049 metadataPropsBuilder_.remove(index);
18050 }
18051 return this;
18052 }
18053 /**
18054 * <pre>
18055 * Named metadata values; keys should be distinct.
18056 * </pre>
18057 *
18058 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18059 */
18060 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
18061 int index) {
18062 return getMetadataPropsFieldBuilder().getBuilder(index);
18063 }
18064 /**
18065 * <pre>
18066 * Named metadata values; keys should be distinct.
18067 * </pre>
18068 *
18069 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18070 */
18071 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
18072 int index) {
18073 if (metadataPropsBuilder_ == null) {
18074 return metadataProps_.get(index); } else {
18075 return metadataPropsBuilder_.getMessageOrBuilder(index);
18076 }
18077 }
18078 /**
18079 * <pre>
18080 * Named metadata values; keys should be distinct.
18081 * </pre>
18082 *
18083 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18084 */
18085 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
18086 getMetadataPropsOrBuilderList() {
18087 if (metadataPropsBuilder_ != null) {
18088 return metadataPropsBuilder_.getMessageOrBuilderList();
18089 } else {
18090 return java.util.Collections.unmodifiableList(metadataProps_);
18091 }
18092 }
18093 /**
18094 * <pre>
18095 * Named metadata values; keys should be distinct.
18096 * </pre>
18097 *
18098 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18099 */
18100 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
18101 return getMetadataPropsFieldBuilder().addBuilder(
18102 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
18103 }
18104 /**
18105 * <pre>
18106 * Named metadata values; keys should be distinct.
18107 * </pre>
18108 *
18109 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18110 */
18111 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
18112 int index) {
18113 return getMetadataPropsFieldBuilder().addBuilder(
18114 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
18115 }
18116 /**
18117 * <pre>
18118 * Named metadata values; keys should be distinct.
18119 * </pre>
18120 *
18121 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
18122 */
18123 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
18124 getMetadataPropsBuilderList() {
18125 return getMetadataPropsFieldBuilder().getBuilderList();
18126 }
18127 private com.google.protobuf.RepeatedFieldBuilder<
18128 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
18129 getMetadataPropsFieldBuilder() {
18130 if (metadataPropsBuilder_ == null) {
18131 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
18132 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
18133 metadataProps_,
18134 ((bitField0_ & 0x00000100) != 0),
18135 getParentForChildren(),
18136 isClean());
18137 metadataProps_ = null;
18138 }
18139 return metadataPropsBuilder_;
18140 }
18141
18142 private java.util.List<onnx.OnnxMl.TrainingInfoProto> trainingInfo_ =
18143 java.util.Collections.emptyList();
18144 private void ensureTrainingInfoIsMutable() {
18145 if (!((bitField0_ & 0x00000200) != 0)) {
18146 trainingInfo_ = new java.util.ArrayList<onnx.OnnxMl.TrainingInfoProto>(trainingInfo_);
18147 bitField0_ |= 0x00000200;
18148 }
18149 }
18150
18151 private com.google.protobuf.RepeatedFieldBuilder<
18152 onnx.OnnxMl.TrainingInfoProto, onnx.OnnxMl.TrainingInfoProto.Builder, onnx.OnnxMl.TrainingInfoProtoOrBuilder> trainingInfoBuilder_;
18153
18154 /**
18155 * <pre>
18156 * Training-specific information. Sequentially executing all stored
18157 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18158 * the corresponding `TrainingInfoProto.update_binding`s is one training
18159 * iteration. Similarly, to initialize the model
18160 * (as if training hasn't happened), the user should sequentially execute
18161 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18162 * using `TrainingInfoProto.initialization_binding`s.
18163 *
18164 * If this field is empty, the training behavior of the model is undefined.
18165 * </pre>
18166 *
18167 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18168 */
18169 public java.util.List<onnx.OnnxMl.TrainingInfoProto> getTrainingInfoList() {
18170 if (trainingInfoBuilder_ == null) {
18171 return java.util.Collections.unmodifiableList(trainingInfo_);
18172 } else {
18173 return trainingInfoBuilder_.getMessageList();
18174 }
18175 }
18176 /**
18177 * <pre>
18178 * Training-specific information. Sequentially executing all stored
18179 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18180 * the corresponding `TrainingInfoProto.update_binding`s is one training
18181 * iteration. Similarly, to initialize the model
18182 * (as if training hasn't happened), the user should sequentially execute
18183 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18184 * using `TrainingInfoProto.initialization_binding`s.
18185 *
18186 * If this field is empty, the training behavior of the model is undefined.
18187 * </pre>
18188 *
18189 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18190 */
18191 public int getTrainingInfoCount() {
18192 if (trainingInfoBuilder_ == null) {
18193 return trainingInfo_.size();
18194 } else {
18195 return trainingInfoBuilder_.getCount();
18196 }
18197 }
18198 /**
18199 * <pre>
18200 * Training-specific information. Sequentially executing all stored
18201 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18202 * the corresponding `TrainingInfoProto.update_binding`s is one training
18203 * iteration. Similarly, to initialize the model
18204 * (as if training hasn't happened), the user should sequentially execute
18205 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18206 * using `TrainingInfoProto.initialization_binding`s.
18207 *
18208 * If this field is empty, the training behavior of the model is undefined.
18209 * </pre>
18210 *
18211 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18212 */
18213 public onnx.OnnxMl.TrainingInfoProto getTrainingInfo(int index) {
18214 if (trainingInfoBuilder_ == null) {
18215 return trainingInfo_.get(index);
18216 } else {
18217 return trainingInfoBuilder_.getMessage(index);
18218 }
18219 }
18220 /**
18221 * <pre>
18222 * Training-specific information. Sequentially executing all stored
18223 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18224 * the corresponding `TrainingInfoProto.update_binding`s is one training
18225 * iteration. Similarly, to initialize the model
18226 * (as if training hasn't happened), the user should sequentially execute
18227 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18228 * using `TrainingInfoProto.initialization_binding`s.
18229 *
18230 * If this field is empty, the training behavior of the model is undefined.
18231 * </pre>
18232 *
18233 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18234 */
18235 public Builder setTrainingInfo(
18236 int index, onnx.OnnxMl.TrainingInfoProto value) {
18237 if (trainingInfoBuilder_ == null) {
18238 if (value == null) {
18239 throw new NullPointerException();
18240 }
18241 ensureTrainingInfoIsMutable();
18242 trainingInfo_.set(index, value);
18243 onChanged();
18244 } else {
18245 trainingInfoBuilder_.setMessage(index, value);
18246 }
18247 return this;
18248 }
18249 /**
18250 * <pre>
18251 * Training-specific information. Sequentially executing all stored
18252 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18253 * the corresponding `TrainingInfoProto.update_binding`s is one training
18254 * iteration. Similarly, to initialize the model
18255 * (as if training hasn't happened), the user should sequentially execute
18256 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18257 * using `TrainingInfoProto.initialization_binding`s.
18258 *
18259 * If this field is empty, the training behavior of the model is undefined.
18260 * </pre>
18261 *
18262 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18263 */
18264 public Builder setTrainingInfo(
18265 int index, onnx.OnnxMl.TrainingInfoProto.Builder builderForValue) {
18266 if (trainingInfoBuilder_ == null) {
18267 ensureTrainingInfoIsMutable();
18268 trainingInfo_.set(index, builderForValue.build());
18269 onChanged();
18270 } else {
18271 trainingInfoBuilder_.setMessage(index, builderForValue.build());
18272 }
18273 return this;
18274 }
18275 /**
18276 * <pre>
18277 * Training-specific information. Sequentially executing all stored
18278 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18279 * the corresponding `TrainingInfoProto.update_binding`s is one training
18280 * iteration. Similarly, to initialize the model
18281 * (as if training hasn't happened), the user should sequentially execute
18282 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18283 * using `TrainingInfoProto.initialization_binding`s.
18284 *
18285 * If this field is empty, the training behavior of the model is undefined.
18286 * </pre>
18287 *
18288 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18289 */
18290 public Builder addTrainingInfo(onnx.OnnxMl.TrainingInfoProto value) {
18291 if (trainingInfoBuilder_ == null) {
18292 if (value == null) {
18293 throw new NullPointerException();
18294 }
18295 ensureTrainingInfoIsMutable();
18296 trainingInfo_.add(value);
18297 onChanged();
18298 } else {
18299 trainingInfoBuilder_.addMessage(value);
18300 }
18301 return this;
18302 }
18303 /**
18304 * <pre>
18305 * Training-specific information. Sequentially executing all stored
18306 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18307 * the corresponding `TrainingInfoProto.update_binding`s is one training
18308 * iteration. Similarly, to initialize the model
18309 * (as if training hasn't happened), the user should sequentially execute
18310 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18311 * using `TrainingInfoProto.initialization_binding`s.
18312 *
18313 * If this field is empty, the training behavior of the model is undefined.
18314 * </pre>
18315 *
18316 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18317 */
18318 public Builder addTrainingInfo(
18319 int index, onnx.OnnxMl.TrainingInfoProto value) {
18320 if (trainingInfoBuilder_ == null) {
18321 if (value == null) {
18322 throw new NullPointerException();
18323 }
18324 ensureTrainingInfoIsMutable();
18325 trainingInfo_.add(index, value);
18326 onChanged();
18327 } else {
18328 trainingInfoBuilder_.addMessage(index, value);
18329 }
18330 return this;
18331 }
18332 /**
18333 * <pre>
18334 * Training-specific information. Sequentially executing all stored
18335 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18336 * the corresponding `TrainingInfoProto.update_binding`s is one training
18337 * iteration. Similarly, to initialize the model
18338 * (as if training hasn't happened), the user should sequentially execute
18339 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18340 * using `TrainingInfoProto.initialization_binding`s.
18341 *
18342 * If this field is empty, the training behavior of the model is undefined.
18343 * </pre>
18344 *
18345 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18346 */
18347 public Builder addTrainingInfo(
18348 onnx.OnnxMl.TrainingInfoProto.Builder builderForValue) {
18349 if (trainingInfoBuilder_ == null) {
18350 ensureTrainingInfoIsMutable();
18351 trainingInfo_.add(builderForValue.build());
18352 onChanged();
18353 } else {
18354 trainingInfoBuilder_.addMessage(builderForValue.build());
18355 }
18356 return this;
18357 }
18358 /**
18359 * <pre>
18360 * Training-specific information. Sequentially executing all stored
18361 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18362 * the corresponding `TrainingInfoProto.update_binding`s is one training
18363 * iteration. Similarly, to initialize the model
18364 * (as if training hasn't happened), the user should sequentially execute
18365 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18366 * using `TrainingInfoProto.initialization_binding`s.
18367 *
18368 * If this field is empty, the training behavior of the model is undefined.
18369 * </pre>
18370 *
18371 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18372 */
18373 public Builder addTrainingInfo(
18374 int index, onnx.OnnxMl.TrainingInfoProto.Builder builderForValue) {
18375 if (trainingInfoBuilder_ == null) {
18376 ensureTrainingInfoIsMutable();
18377 trainingInfo_.add(index, builderForValue.build());
18378 onChanged();
18379 } else {
18380 trainingInfoBuilder_.addMessage(index, builderForValue.build());
18381 }
18382 return this;
18383 }
18384 /**
18385 * <pre>
18386 * Training-specific information. Sequentially executing all stored
18387 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18388 * the corresponding `TrainingInfoProto.update_binding`s is one training
18389 * iteration. Similarly, to initialize the model
18390 * (as if training hasn't happened), the user should sequentially execute
18391 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18392 * using `TrainingInfoProto.initialization_binding`s.
18393 *
18394 * If this field is empty, the training behavior of the model is undefined.
18395 * </pre>
18396 *
18397 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18398 */
18399 public Builder addAllTrainingInfo(
18400 java.lang.Iterable<? extends onnx.OnnxMl.TrainingInfoProto> values) {
18401 if (trainingInfoBuilder_ == null) {
18402 ensureTrainingInfoIsMutable();
18403 com.google.protobuf.AbstractMessageLite.Builder.addAll(
18404 values, trainingInfo_);
18405 onChanged();
18406 } else {
18407 trainingInfoBuilder_.addAllMessages(values);
18408 }
18409 return this;
18410 }
18411 /**
18412 * <pre>
18413 * Training-specific information. Sequentially executing all stored
18414 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18415 * the corresponding `TrainingInfoProto.update_binding`s is one training
18416 * iteration. Similarly, to initialize the model
18417 * (as if training hasn't happened), the user should sequentially execute
18418 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18419 * using `TrainingInfoProto.initialization_binding`s.
18420 *
18421 * If this field is empty, the training behavior of the model is undefined.
18422 * </pre>
18423 *
18424 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18425 */
18426 public Builder clearTrainingInfo() {
18427 if (trainingInfoBuilder_ == null) {
18428 trainingInfo_ = java.util.Collections.emptyList();
18429 bitField0_ = (bitField0_ & ~0x00000200);
18430 onChanged();
18431 } else {
18432 trainingInfoBuilder_.clear();
18433 }
18434 return this;
18435 }
18436 /**
18437 * <pre>
18438 * Training-specific information. Sequentially executing all stored
18439 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18440 * the corresponding `TrainingInfoProto.update_binding`s is one training
18441 * iteration. Similarly, to initialize the model
18442 * (as if training hasn't happened), the user should sequentially execute
18443 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18444 * using `TrainingInfoProto.initialization_binding`s.
18445 *
18446 * If this field is empty, the training behavior of the model is undefined.
18447 * </pre>
18448 *
18449 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18450 */
18451 public Builder removeTrainingInfo(int index) {
18452 if (trainingInfoBuilder_ == null) {
18453 ensureTrainingInfoIsMutable();
18454 trainingInfo_.remove(index);
18455 onChanged();
18456 } else {
18457 trainingInfoBuilder_.remove(index);
18458 }
18459 return this;
18460 }
18461 /**
18462 * <pre>
18463 * Training-specific information. Sequentially executing all stored
18464 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18465 * the corresponding `TrainingInfoProto.update_binding`s is one training
18466 * iteration. Similarly, to initialize the model
18467 * (as if training hasn't happened), the user should sequentially execute
18468 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18469 * using `TrainingInfoProto.initialization_binding`s.
18470 *
18471 * If this field is empty, the training behavior of the model is undefined.
18472 * </pre>
18473 *
18474 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18475 */
18476 public onnx.OnnxMl.TrainingInfoProto.Builder getTrainingInfoBuilder(
18477 int index) {
18478 return getTrainingInfoFieldBuilder().getBuilder(index);
18479 }
18480 /**
18481 * <pre>
18482 * Training-specific information. Sequentially executing all stored
18483 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18484 * the corresponding `TrainingInfoProto.update_binding`s is one training
18485 * iteration. Similarly, to initialize the model
18486 * (as if training hasn't happened), the user should sequentially execute
18487 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18488 * using `TrainingInfoProto.initialization_binding`s.
18489 *
18490 * If this field is empty, the training behavior of the model is undefined.
18491 * </pre>
18492 *
18493 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18494 */
18495 public onnx.OnnxMl.TrainingInfoProtoOrBuilder getTrainingInfoOrBuilder(
18496 int index) {
18497 if (trainingInfoBuilder_ == null) {
18498 return trainingInfo_.get(index); } else {
18499 return trainingInfoBuilder_.getMessageOrBuilder(index);
18500 }
18501 }
18502 /**
18503 * <pre>
18504 * Training-specific information. Sequentially executing all stored
18505 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18506 * the corresponding `TrainingInfoProto.update_binding`s is one training
18507 * iteration. Similarly, to initialize the model
18508 * (as if training hasn't happened), the user should sequentially execute
18509 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18510 * using `TrainingInfoProto.initialization_binding`s.
18511 *
18512 * If this field is empty, the training behavior of the model is undefined.
18513 * </pre>
18514 *
18515 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18516 */
18517 public java.util.List<? extends onnx.OnnxMl.TrainingInfoProtoOrBuilder>
18518 getTrainingInfoOrBuilderList() {
18519 if (trainingInfoBuilder_ != null) {
18520 return trainingInfoBuilder_.getMessageOrBuilderList();
18521 } else {
18522 return java.util.Collections.unmodifiableList(trainingInfo_);
18523 }
18524 }
18525 /**
18526 * <pre>
18527 * Training-specific information. Sequentially executing all stored
18528 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18529 * the corresponding `TrainingInfoProto.update_binding`s is one training
18530 * iteration. Similarly, to initialize the model
18531 * (as if training hasn't happened), the user should sequentially execute
18532 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18533 * using `TrainingInfoProto.initialization_binding`s.
18534 *
18535 * If this field is empty, the training behavior of the model is undefined.
18536 * </pre>
18537 *
18538 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18539 */
18540 public onnx.OnnxMl.TrainingInfoProto.Builder addTrainingInfoBuilder() {
18541 return getTrainingInfoFieldBuilder().addBuilder(
18542 onnx.OnnxMl.TrainingInfoProto.getDefaultInstance());
18543 }
18544 /**
18545 * <pre>
18546 * Training-specific information. Sequentially executing all stored
18547 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18548 * the corresponding `TrainingInfoProto.update_binding`s is one training
18549 * iteration. Similarly, to initialize the model
18550 * (as if training hasn't happened), the user should sequentially execute
18551 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18552 * using `TrainingInfoProto.initialization_binding`s.
18553 *
18554 * If this field is empty, the training behavior of the model is undefined.
18555 * </pre>
18556 *
18557 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18558 */
18559 public onnx.OnnxMl.TrainingInfoProto.Builder addTrainingInfoBuilder(
18560 int index) {
18561 return getTrainingInfoFieldBuilder().addBuilder(
18562 index, onnx.OnnxMl.TrainingInfoProto.getDefaultInstance());
18563 }
18564 /**
18565 * <pre>
18566 * Training-specific information. Sequentially executing all stored
18567 * `TrainingInfoProto.algorithm`s and assigning their outputs following
18568 * the corresponding `TrainingInfoProto.update_binding`s is one training
18569 * iteration. Similarly, to initialize the model
18570 * (as if training hasn't happened), the user should sequentially execute
18571 * all stored `TrainingInfoProto.initialization`s and assigns their outputs
18572 * using `TrainingInfoProto.initialization_binding`s.
18573 *
18574 * If this field is empty, the training behavior of the model is undefined.
18575 * </pre>
18576 *
18577 * <code>repeated .onnx.TrainingInfoProto training_info = 20;</code>
18578 */
18579 public java.util.List<onnx.OnnxMl.TrainingInfoProto.Builder>
18580 getTrainingInfoBuilderList() {
18581 return getTrainingInfoFieldBuilder().getBuilderList();
18582 }
18583 private com.google.protobuf.RepeatedFieldBuilder<
18584 onnx.OnnxMl.TrainingInfoProto, onnx.OnnxMl.TrainingInfoProto.Builder, onnx.OnnxMl.TrainingInfoProtoOrBuilder>
18585 getTrainingInfoFieldBuilder() {
18586 if (trainingInfoBuilder_ == null) {
18587 trainingInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
18588 onnx.OnnxMl.TrainingInfoProto, onnx.OnnxMl.TrainingInfoProto.Builder, onnx.OnnxMl.TrainingInfoProtoOrBuilder>(
18589 trainingInfo_,
18590 ((bitField0_ & 0x00000200) != 0),
18591 getParentForChildren(),
18592 isClean());
18593 trainingInfo_ = null;
18594 }
18595 return trainingInfoBuilder_;
18596 }
18597
18598 private java.util.List<onnx.OnnxMl.FunctionProto> functions_ =
18599 java.util.Collections.emptyList();
18600 private void ensureFunctionsIsMutable() {
18601 if (!((bitField0_ & 0x00000400) != 0)) {
18602 functions_ = new java.util.ArrayList<onnx.OnnxMl.FunctionProto>(functions_);
18603 bitField0_ |= 0x00000400;
18604 }
18605 }
18606
18607 private com.google.protobuf.RepeatedFieldBuilder<
18608 onnx.OnnxMl.FunctionProto, onnx.OnnxMl.FunctionProto.Builder, onnx.OnnxMl.FunctionProtoOrBuilder> functionsBuilder_;
18609
18610 /**
18611 * <pre>
18612 * A list of function protos local to the model.
18613 *
18614 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18615 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18616 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18617 * the runtimes.
18618 *
18619 * The operator sets imported by FunctionProto should be compatible with the ones
18620 * imported by ModelProto and other model local FunctionProtos.
18621 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18622 * or by 2 FunctionProtos then versions for the operator set may be different but,
18623 * the operator schema returned for op_type, domain, version combination
18624 * for both the versions should be same for every node in the function body.
18625 *
18626 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18627 * is not allowed.
18628 * </pre>
18629 *
18630 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18631 */
18632 public java.util.List<onnx.OnnxMl.FunctionProto> getFunctionsList() {
18633 if (functionsBuilder_ == null) {
18634 return java.util.Collections.unmodifiableList(functions_);
18635 } else {
18636 return functionsBuilder_.getMessageList();
18637 }
18638 }
18639 /**
18640 * <pre>
18641 * A list of function protos local to the model.
18642 *
18643 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18644 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18645 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18646 * the runtimes.
18647 *
18648 * The operator sets imported by FunctionProto should be compatible with the ones
18649 * imported by ModelProto and other model local FunctionProtos.
18650 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18651 * or by 2 FunctionProtos then versions for the operator set may be different but,
18652 * the operator schema returned for op_type, domain, version combination
18653 * for both the versions should be same for every node in the function body.
18654 *
18655 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18656 * is not allowed.
18657 * </pre>
18658 *
18659 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18660 */
18661 public int getFunctionsCount() {
18662 if (functionsBuilder_ == null) {
18663 return functions_.size();
18664 } else {
18665 return functionsBuilder_.getCount();
18666 }
18667 }
18668 /**
18669 * <pre>
18670 * A list of function protos local to the model.
18671 *
18672 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18673 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18674 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18675 * the runtimes.
18676 *
18677 * The operator sets imported by FunctionProto should be compatible with the ones
18678 * imported by ModelProto and other model local FunctionProtos.
18679 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18680 * or by 2 FunctionProtos then versions for the operator set may be different but,
18681 * the operator schema returned for op_type, domain, version combination
18682 * for both the versions should be same for every node in the function body.
18683 *
18684 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18685 * is not allowed.
18686 * </pre>
18687 *
18688 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18689 */
18690 public onnx.OnnxMl.FunctionProto getFunctions(int index) {
18691 if (functionsBuilder_ == null) {
18692 return functions_.get(index);
18693 } else {
18694 return functionsBuilder_.getMessage(index);
18695 }
18696 }
18697 /**
18698 * <pre>
18699 * A list of function protos local to the model.
18700 *
18701 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18702 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18703 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18704 * the runtimes.
18705 *
18706 * The operator sets imported by FunctionProto should be compatible with the ones
18707 * imported by ModelProto and other model local FunctionProtos.
18708 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18709 * or by 2 FunctionProtos then versions for the operator set may be different but,
18710 * the operator schema returned for op_type, domain, version combination
18711 * for both the versions should be same for every node in the function body.
18712 *
18713 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18714 * is not allowed.
18715 * </pre>
18716 *
18717 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18718 */
18719 public Builder setFunctions(
18720 int index, onnx.OnnxMl.FunctionProto value) {
18721 if (functionsBuilder_ == null) {
18722 if (value == null) {
18723 throw new NullPointerException();
18724 }
18725 ensureFunctionsIsMutable();
18726 functions_.set(index, value);
18727 onChanged();
18728 } else {
18729 functionsBuilder_.setMessage(index, value);
18730 }
18731 return this;
18732 }
18733 /**
18734 * <pre>
18735 * A list of function protos local to the model.
18736 *
18737 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18738 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18739 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18740 * the runtimes.
18741 *
18742 * The operator sets imported by FunctionProto should be compatible with the ones
18743 * imported by ModelProto and other model local FunctionProtos.
18744 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18745 * or by 2 FunctionProtos then versions for the operator set may be different but,
18746 * the operator schema returned for op_type, domain, version combination
18747 * for both the versions should be same for every node in the function body.
18748 *
18749 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18750 * is not allowed.
18751 * </pre>
18752 *
18753 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18754 */
18755 public Builder setFunctions(
18756 int index, onnx.OnnxMl.FunctionProto.Builder builderForValue) {
18757 if (functionsBuilder_ == null) {
18758 ensureFunctionsIsMutable();
18759 functions_.set(index, builderForValue.build());
18760 onChanged();
18761 } else {
18762 functionsBuilder_.setMessage(index, builderForValue.build());
18763 }
18764 return this;
18765 }
18766 /**
18767 * <pre>
18768 * A list of function protos local to the model.
18769 *
18770 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18771 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18772 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18773 * the runtimes.
18774 *
18775 * The operator sets imported by FunctionProto should be compatible with the ones
18776 * imported by ModelProto and other model local FunctionProtos.
18777 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18778 * or by 2 FunctionProtos then versions for the operator set may be different but,
18779 * the operator schema returned for op_type, domain, version combination
18780 * for both the versions should be same for every node in the function body.
18781 *
18782 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18783 * is not allowed.
18784 * </pre>
18785 *
18786 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18787 */
18788 public Builder addFunctions(onnx.OnnxMl.FunctionProto value) {
18789 if (functionsBuilder_ == null) {
18790 if (value == null) {
18791 throw new NullPointerException();
18792 }
18793 ensureFunctionsIsMutable();
18794 functions_.add(value);
18795 onChanged();
18796 } else {
18797 functionsBuilder_.addMessage(value);
18798 }
18799 return this;
18800 }
18801 /**
18802 * <pre>
18803 * A list of function protos local to the model.
18804 *
18805 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18806 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18807 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18808 * the runtimes.
18809 *
18810 * The operator sets imported by FunctionProto should be compatible with the ones
18811 * imported by ModelProto and other model local FunctionProtos.
18812 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18813 * or by 2 FunctionProtos then versions for the operator set may be different but,
18814 * the operator schema returned for op_type, domain, version combination
18815 * for both the versions should be same for every node in the function body.
18816 *
18817 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18818 * is not allowed.
18819 * </pre>
18820 *
18821 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18822 */
18823 public Builder addFunctions(
18824 int index, onnx.OnnxMl.FunctionProto value) {
18825 if (functionsBuilder_ == null) {
18826 if (value == null) {
18827 throw new NullPointerException();
18828 }
18829 ensureFunctionsIsMutable();
18830 functions_.add(index, value);
18831 onChanged();
18832 } else {
18833 functionsBuilder_.addMessage(index, value);
18834 }
18835 return this;
18836 }
18837 /**
18838 * <pre>
18839 * A list of function protos local to the model.
18840 *
18841 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18842 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18843 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18844 * the runtimes.
18845 *
18846 * The operator sets imported by FunctionProto should be compatible with the ones
18847 * imported by ModelProto and other model local FunctionProtos.
18848 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18849 * or by 2 FunctionProtos then versions for the operator set may be different but,
18850 * the operator schema returned for op_type, domain, version combination
18851 * for both the versions should be same for every node in the function body.
18852 *
18853 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18854 * is not allowed.
18855 * </pre>
18856 *
18857 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18858 */
18859 public Builder addFunctions(
18860 onnx.OnnxMl.FunctionProto.Builder builderForValue) {
18861 if (functionsBuilder_ == null) {
18862 ensureFunctionsIsMutable();
18863 functions_.add(builderForValue.build());
18864 onChanged();
18865 } else {
18866 functionsBuilder_.addMessage(builderForValue.build());
18867 }
18868 return this;
18869 }
18870 /**
18871 * <pre>
18872 * A list of function protos local to the model.
18873 *
18874 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18875 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18876 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18877 * the runtimes.
18878 *
18879 * The operator sets imported by FunctionProto should be compatible with the ones
18880 * imported by ModelProto and other model local FunctionProtos.
18881 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18882 * or by 2 FunctionProtos then versions for the operator set may be different but,
18883 * the operator schema returned for op_type, domain, version combination
18884 * for both the versions should be same for every node in the function body.
18885 *
18886 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18887 * is not allowed.
18888 * </pre>
18889 *
18890 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18891 */
18892 public Builder addFunctions(
18893 int index, onnx.OnnxMl.FunctionProto.Builder builderForValue) {
18894 if (functionsBuilder_ == null) {
18895 ensureFunctionsIsMutable();
18896 functions_.add(index, builderForValue.build());
18897 onChanged();
18898 } else {
18899 functionsBuilder_.addMessage(index, builderForValue.build());
18900 }
18901 return this;
18902 }
18903 /**
18904 * <pre>
18905 * A list of function protos local to the model.
18906 *
18907 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18908 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18909 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18910 * the runtimes.
18911 *
18912 * The operator sets imported by FunctionProto should be compatible with the ones
18913 * imported by ModelProto and other model local FunctionProtos.
18914 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18915 * or by 2 FunctionProtos then versions for the operator set may be different but,
18916 * the operator schema returned for op_type, domain, version combination
18917 * for both the versions should be same for every node in the function body.
18918 *
18919 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18920 * is not allowed.
18921 * </pre>
18922 *
18923 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18924 */
18925 public Builder addAllFunctions(
18926 java.lang.Iterable<? extends onnx.OnnxMl.FunctionProto> values) {
18927 if (functionsBuilder_ == null) {
18928 ensureFunctionsIsMutable();
18929 com.google.protobuf.AbstractMessageLite.Builder.addAll(
18930 values, functions_);
18931 onChanged();
18932 } else {
18933 functionsBuilder_.addAllMessages(values);
18934 }
18935 return this;
18936 }
18937 /**
18938 * <pre>
18939 * A list of function protos local to the model.
18940 *
18941 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18942 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18943 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18944 * the runtimes.
18945 *
18946 * The operator sets imported by FunctionProto should be compatible with the ones
18947 * imported by ModelProto and other model local FunctionProtos.
18948 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18949 * or by 2 FunctionProtos then versions for the operator set may be different but,
18950 * the operator schema returned for op_type, domain, version combination
18951 * for both the versions should be same for every node in the function body.
18952 *
18953 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18954 * is not allowed.
18955 * </pre>
18956 *
18957 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18958 */
18959 public Builder clearFunctions() {
18960 if (functionsBuilder_ == null) {
18961 functions_ = java.util.Collections.emptyList();
18962 bitField0_ = (bitField0_ & ~0x00000400);
18963 onChanged();
18964 } else {
18965 functionsBuilder_.clear();
18966 }
18967 return this;
18968 }
18969 /**
18970 * <pre>
18971 * A list of function protos local to the model.
18972 *
18973 * The (domain, name, overload) tuple must be unique across the function protos in this list.
18974 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
18975 * or standard operator sets are given higher priotity or this is treated as error) is defined by
18976 * the runtimes.
18977 *
18978 * The operator sets imported by FunctionProto should be compatible with the ones
18979 * imported by ModelProto and other model local FunctionProtos.
18980 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
18981 * or by 2 FunctionProtos then versions for the operator set may be different but,
18982 * the operator schema returned for op_type, domain, version combination
18983 * for both the versions should be same for every node in the function body.
18984 *
18985 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
18986 * is not allowed.
18987 * </pre>
18988 *
18989 * <code>repeated .onnx.FunctionProto functions = 25;</code>
18990 */
18991 public Builder removeFunctions(int index) {
18992 if (functionsBuilder_ == null) {
18993 ensureFunctionsIsMutable();
18994 functions_.remove(index);
18995 onChanged();
18996 } else {
18997 functionsBuilder_.remove(index);
18998 }
18999 return this;
19000 }
19001 /**
19002 * <pre>
19003 * A list of function protos local to the model.
19004 *
19005 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19006 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19007 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19008 * the runtimes.
19009 *
19010 * The operator sets imported by FunctionProto should be compatible with the ones
19011 * imported by ModelProto and other model local FunctionProtos.
19012 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19013 * or by 2 FunctionProtos then versions for the operator set may be different but,
19014 * the operator schema returned for op_type, domain, version combination
19015 * for both the versions should be same for every node in the function body.
19016 *
19017 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19018 * is not allowed.
19019 * </pre>
19020 *
19021 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19022 */
19023 public onnx.OnnxMl.FunctionProto.Builder getFunctionsBuilder(
19024 int index) {
19025 return getFunctionsFieldBuilder().getBuilder(index);
19026 }
19027 /**
19028 * <pre>
19029 * A list of function protos local to the model.
19030 *
19031 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19032 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19033 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19034 * the runtimes.
19035 *
19036 * The operator sets imported by FunctionProto should be compatible with the ones
19037 * imported by ModelProto and other model local FunctionProtos.
19038 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19039 * or by 2 FunctionProtos then versions for the operator set may be different but,
19040 * the operator schema returned for op_type, domain, version combination
19041 * for both the versions should be same for every node in the function body.
19042 *
19043 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19044 * is not allowed.
19045 * </pre>
19046 *
19047 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19048 */
19049 public onnx.OnnxMl.FunctionProtoOrBuilder getFunctionsOrBuilder(
19050 int index) {
19051 if (functionsBuilder_ == null) {
19052 return functions_.get(index); } else {
19053 return functionsBuilder_.getMessageOrBuilder(index);
19054 }
19055 }
19056 /**
19057 * <pre>
19058 * A list of function protos local to the model.
19059 *
19060 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19061 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19062 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19063 * the runtimes.
19064 *
19065 * The operator sets imported by FunctionProto should be compatible with the ones
19066 * imported by ModelProto and other model local FunctionProtos.
19067 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19068 * or by 2 FunctionProtos then versions for the operator set may be different but,
19069 * the operator schema returned for op_type, domain, version combination
19070 * for both the versions should be same for every node in the function body.
19071 *
19072 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19073 * is not allowed.
19074 * </pre>
19075 *
19076 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19077 */
19078 public java.util.List<? extends onnx.OnnxMl.FunctionProtoOrBuilder>
19079 getFunctionsOrBuilderList() {
19080 if (functionsBuilder_ != null) {
19081 return functionsBuilder_.getMessageOrBuilderList();
19082 } else {
19083 return java.util.Collections.unmodifiableList(functions_);
19084 }
19085 }
19086 /**
19087 * <pre>
19088 * A list of function protos local to the model.
19089 *
19090 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19091 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19092 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19093 * the runtimes.
19094 *
19095 * The operator sets imported by FunctionProto should be compatible with the ones
19096 * imported by ModelProto and other model local FunctionProtos.
19097 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19098 * or by 2 FunctionProtos then versions for the operator set may be different but,
19099 * the operator schema returned for op_type, domain, version combination
19100 * for both the versions should be same for every node in the function body.
19101 *
19102 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19103 * is not allowed.
19104 * </pre>
19105 *
19106 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19107 */
19108 public onnx.OnnxMl.FunctionProto.Builder addFunctionsBuilder() {
19109 return getFunctionsFieldBuilder().addBuilder(
19110 onnx.OnnxMl.FunctionProto.getDefaultInstance());
19111 }
19112 /**
19113 * <pre>
19114 * A list of function protos local to the model.
19115 *
19116 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19117 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19118 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19119 * the runtimes.
19120 *
19121 * The operator sets imported by FunctionProto should be compatible with the ones
19122 * imported by ModelProto and other model local FunctionProtos.
19123 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19124 * or by 2 FunctionProtos then versions for the operator set may be different but,
19125 * the operator schema returned for op_type, domain, version combination
19126 * for both the versions should be same for every node in the function body.
19127 *
19128 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19129 * is not allowed.
19130 * </pre>
19131 *
19132 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19133 */
19134 public onnx.OnnxMl.FunctionProto.Builder addFunctionsBuilder(
19135 int index) {
19136 return getFunctionsFieldBuilder().addBuilder(
19137 index, onnx.OnnxMl.FunctionProto.getDefaultInstance());
19138 }
19139 /**
19140 * <pre>
19141 * A list of function protos local to the model.
19142 *
19143 * The (domain, name, overload) tuple must be unique across the function protos in this list.
19144 * In case of any conflicts the behavior (whether the model local functions are given higher priority,
19145 * or standard operator sets are given higher priotity or this is treated as error) is defined by
19146 * the runtimes.
19147 *
19148 * The operator sets imported by FunctionProto should be compatible with the ones
19149 * imported by ModelProto and other model local FunctionProtos.
19150 * Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto
19151 * or by 2 FunctionProtos then versions for the operator set may be different but,
19152 * the operator schema returned for op_type, domain, version combination
19153 * for both the versions should be same for every node in the function body.
19154 *
19155 * One FunctionProto can reference other FunctionProto in the model, however, recursive reference
19156 * is not allowed.
19157 * </pre>
19158 *
19159 * <code>repeated .onnx.FunctionProto functions = 25;</code>
19160 */
19161 public java.util.List<onnx.OnnxMl.FunctionProto.Builder>
19162 getFunctionsBuilderList() {
19163 return getFunctionsFieldBuilder().getBuilderList();
19164 }
19165 private com.google.protobuf.RepeatedFieldBuilder<
19166 onnx.OnnxMl.FunctionProto, onnx.OnnxMl.FunctionProto.Builder, onnx.OnnxMl.FunctionProtoOrBuilder>
19167 getFunctionsFieldBuilder() {
19168 if (functionsBuilder_ == null) {
19169 functionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
19170 onnx.OnnxMl.FunctionProto, onnx.OnnxMl.FunctionProto.Builder, onnx.OnnxMl.FunctionProtoOrBuilder>(
19171 functions_,
19172 ((bitField0_ & 0x00000400) != 0),
19173 getParentForChildren(),
19174 isClean());
19175 functions_ = null;
19176 }
19177 return functionsBuilder_;
19178 }
19179
19180 // @@protoc_insertion_point(builder_scope:onnx.ModelProto)
19181 }
19182
19183 // @@protoc_insertion_point(class_scope:onnx.ModelProto)
19184 private static final onnx.OnnxMl.ModelProto DEFAULT_INSTANCE;
19185 static {
19186 DEFAULT_INSTANCE = new onnx.OnnxMl.ModelProto();
19187 }
19188
19189 public static onnx.OnnxMl.ModelProto getDefaultInstance() {
19190 return DEFAULT_INSTANCE;
19191 }
19192
19193 private static final com.google.protobuf.Parser<ModelProto>
19194 PARSER = new com.google.protobuf.AbstractParser<ModelProto>() {
19195 @java.lang.Override
19196 public ModelProto parsePartialFrom(
19197 com.google.protobuf.CodedInputStream input,
19198 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19199 throws com.google.protobuf.InvalidProtocolBufferException {
19200 Builder builder = newBuilder();
19201 try {
19202 builder.mergeFrom(input, extensionRegistry);
19203 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
19204 throw e.setUnfinishedMessage(builder.buildPartial());
19205 } catch (com.google.protobuf.UninitializedMessageException e) {
19206 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
19207 } catch (java.io.IOException e) {
19208 throw new com.google.protobuf.InvalidProtocolBufferException(e)
19209 .setUnfinishedMessage(builder.buildPartial());
19210 }
19211 return builder.buildPartial();
19212 }
19213 };
19214
19215 public static com.google.protobuf.Parser<ModelProto> parser() {
19216 return PARSER;
19217 }
19218
19219 @java.lang.Override
19220 public com.google.protobuf.Parser<ModelProto> getParserForType() {
19221 return PARSER;
19222 }
19223
19224 @java.lang.Override
19225 public onnx.OnnxMl.ModelProto getDefaultInstanceForType() {
19226 return DEFAULT_INSTANCE;
19227 }
19228
19229 }
19230
19231 public interface StringStringEntryProtoOrBuilder extends
19232 // @@protoc_insertion_point(interface_extends:onnx.StringStringEntryProto)
19233 com.google.protobuf.MessageOrBuilder {
19234
19235 /**
19236 * <code>optional string key = 1;</code>
19237 * @return Whether the key field is set.
19238 */
19239 boolean hasKey();
19240 /**
19241 * <code>optional string key = 1;</code>
19242 * @return The key.
19243 */
19244 java.lang.String getKey();
19245 /**
19246 * <code>optional string key = 1;</code>
19247 * @return The bytes for key.
19248 */
19249 com.google.protobuf.ByteString
19250 getKeyBytes();
19251
19252 /**
19253 * <code>optional string value = 2;</code>
19254 * @return Whether the value field is set.
19255 */
19256 boolean hasValue();
19257 /**
19258 * <code>optional string value = 2;</code>
19259 * @return The value.
19260 */
19261 java.lang.String getValue();
19262 /**
19263 * <code>optional string value = 2;</code>
19264 * @return The bytes for value.
19265 */
19266 com.google.protobuf.ByteString
19267 getValueBytes();
19268 }
19269 /**
19270 * <pre>
19271 * StringStringEntryProto follows the pattern for cross-proto-version maps.
19272 * See https://developers.google.com/protocol-buffers/docs/proto3#maps
19273 * </pre>
19274 *
19275 * Protobuf type {@code onnx.StringStringEntryProto}
19276 */
19277 public static final class StringStringEntryProto extends
19278 com.google.protobuf.GeneratedMessage implements
19279 // @@protoc_insertion_point(message_implements:onnx.StringStringEntryProto)
19280 StringStringEntryProtoOrBuilder {
19281 private static final long serialVersionUID = 0L;
19282 static {
19283 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
19284 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
19285 /* major= */ 4,
19286 /* minor= */ 29,
19287 /* patch= */ 3,
19288 /* suffix= */ "",
19289 StringStringEntryProto.class.getName());
19290 }
19291 // Use StringStringEntryProto.newBuilder() to construct.
19292 private StringStringEntryProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
19293 super(builder);
19294 }
19295 private StringStringEntryProto() {
19296 key_ = "";
19297 value_ = "";
19298 }
19299
19300 public static final com.google.protobuf.Descriptors.Descriptor
19301 getDescriptor() {
19302 return onnx.OnnxMl.internal_static_onnx_StringStringEntryProto_descriptor;
19303 }
19304
19305 @java.lang.Override
19306 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
19307 internalGetFieldAccessorTable() {
19308 return onnx.OnnxMl.internal_static_onnx_StringStringEntryProto_fieldAccessorTable
19309 .ensureFieldAccessorsInitialized(
19310 onnx.OnnxMl.StringStringEntryProto.class, onnx.OnnxMl.StringStringEntryProto.Builder.class);
19311 }
19312
19313 private int bitField0_;
19314 public static final int KEY_FIELD_NUMBER = 1;
19315 @SuppressWarnings("serial")
19316 private volatile java.lang.Object key_ = "";
19317 /**
19318 * <code>optional string key = 1;</code>
19319 * @return Whether the key field is set.
19320 */
19321 @java.lang.Override
19322 public boolean hasKey() {
19323 return ((bitField0_ & 0x00000001) != 0);
19324 }
19325 /**
19326 * <code>optional string key = 1;</code>
19327 * @return The key.
19328 */
19329 @java.lang.Override
19330 public java.lang.String getKey() {
19331 java.lang.Object ref = key_;
19332 if (ref instanceof java.lang.String) {
19333 return (java.lang.String) ref;
19334 } else {
19335 com.google.protobuf.ByteString bs =
19336 (com.google.protobuf.ByteString) ref;
19337 java.lang.String s = bs.toStringUtf8();
19338 if (bs.isValidUtf8()) {
19339 key_ = s;
19340 }
19341 return s;
19342 }
19343 }
19344 /**
19345 * <code>optional string key = 1;</code>
19346 * @return The bytes for key.
19347 */
19348 @java.lang.Override
19349 public com.google.protobuf.ByteString
19350 getKeyBytes() {
19351 java.lang.Object ref = key_;
19352 if (ref instanceof java.lang.String) {
19353 com.google.protobuf.ByteString b =
19354 com.google.protobuf.ByteString.copyFromUtf8(
19355 (java.lang.String) ref);
19356 key_ = b;
19357 return b;
19358 } else {
19359 return (com.google.protobuf.ByteString) ref;
19360 }
19361 }
19362
19363 public static final int VALUE_FIELD_NUMBER = 2;
19364 @SuppressWarnings("serial")
19365 private volatile java.lang.Object value_ = "";
19366 /**
19367 * <code>optional string value = 2;</code>
19368 * @return Whether the value field is set.
19369 */
19370 @java.lang.Override
19371 public boolean hasValue() {
19372 return ((bitField0_ & 0x00000002) != 0);
19373 }
19374 /**
19375 * <code>optional string value = 2;</code>
19376 * @return The value.
19377 */
19378 @java.lang.Override
19379 public java.lang.String getValue() {
19380 java.lang.Object ref = value_;
19381 if (ref instanceof java.lang.String) {
19382 return (java.lang.String) ref;
19383 } else {
19384 com.google.protobuf.ByteString bs =
19385 (com.google.protobuf.ByteString) ref;
19386 java.lang.String s = bs.toStringUtf8();
19387 if (bs.isValidUtf8()) {
19388 value_ = s;
19389 }
19390 return s;
19391 }
19392 }
19393 /**
19394 * <code>optional string value = 2;</code>
19395 * @return The bytes for value.
19396 */
19397 @java.lang.Override
19398 public com.google.protobuf.ByteString
19399 getValueBytes() {
19400 java.lang.Object ref = value_;
19401 if (ref instanceof java.lang.String) {
19402 com.google.protobuf.ByteString b =
19403 com.google.protobuf.ByteString.copyFromUtf8(
19404 (java.lang.String) ref);
19405 value_ = b;
19406 return b;
19407 } else {
19408 return (com.google.protobuf.ByteString) ref;
19409 }
19410 }
19411
19412 private byte memoizedIsInitialized = -1;
19413 @java.lang.Override
19414 public final boolean isInitialized() {
19415 byte isInitialized = memoizedIsInitialized;
19416 if (isInitialized == 1) return true;
19417 if (isInitialized == 0) return false;
19418
19419 memoizedIsInitialized = 1;
19420 return true;
19421 }
19422
19423 @java.lang.Override
19424 public void writeTo(com.google.protobuf.CodedOutputStream output)
19425 throws java.io.IOException {
19426 if (((bitField0_ & 0x00000001) != 0)) {
19427 com.google.protobuf.GeneratedMessage.writeString(output, 1, key_);
19428 }
19429 if (((bitField0_ & 0x00000002) != 0)) {
19430 com.google.protobuf.GeneratedMessage.writeString(output, 2, value_);
19431 }
19432 getUnknownFields().writeTo(output);
19433 }
19434
19435 @java.lang.Override
19436 public int getSerializedSize() {
19437 int size = memoizedSize;
19438 if (size != -1) return size;
19439
19440 size = 0;
19441 if (((bitField0_ & 0x00000001) != 0)) {
19442 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_);
19443 }
19444 if (((bitField0_ & 0x00000002) != 0)) {
19445 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_);
19446 }
19447 size += getUnknownFields().getSerializedSize();
19448 memoizedSize = size;
19449 return size;
19450 }
19451
19452 @java.lang.Override
19453 public boolean equals(final java.lang.Object obj) {
19454 if (obj == this) {
19455 return true;
19456 }
19457 if (!(obj instanceof onnx.OnnxMl.StringStringEntryProto)) {
19458 return super.equals(obj);
19459 }
19460 onnx.OnnxMl.StringStringEntryProto other = (onnx.OnnxMl.StringStringEntryProto) obj;
19461
19462 if (hasKey() != other.hasKey()) return false;
19463 if (hasKey()) {
19464 if (!getKey()
19465 .equals(other.getKey())) return false;
19466 }
19467 if (hasValue() != other.hasValue()) return false;
19468 if (hasValue()) {
19469 if (!getValue()
19470 .equals(other.getValue())) return false;
19471 }
19472 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
19473 return true;
19474 }
19475
19476 @java.lang.Override
19477 public int hashCode() {
19478 if (memoizedHashCode != 0) {
19479 return memoizedHashCode;
19480 }
19481 int hash = 41;
19482 hash = (19 * hash) + getDescriptor().hashCode();
19483 if (hasKey()) {
19484 hash = (37 * hash) + KEY_FIELD_NUMBER;
19485 hash = (53 * hash) + getKey().hashCode();
19486 }
19487 if (hasValue()) {
19488 hash = (37 * hash) + VALUE_FIELD_NUMBER;
19489 hash = (53 * hash) + getValue().hashCode();
19490 }
19491 hash = (29 * hash) + getUnknownFields().hashCode();
19492 memoizedHashCode = hash;
19493 return hash;
19494 }
19495
19496 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19497 java.nio.ByteBuffer data)
19498 throws com.google.protobuf.InvalidProtocolBufferException {
19499 return PARSER.parseFrom(data);
19500 }
19501 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19502 java.nio.ByteBuffer data,
19503 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19504 throws com.google.protobuf.InvalidProtocolBufferException {
19505 return PARSER.parseFrom(data, extensionRegistry);
19506 }
19507 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19508 com.google.protobuf.ByteString data)
19509 throws com.google.protobuf.InvalidProtocolBufferException {
19510 return PARSER.parseFrom(data);
19511 }
19512 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19513 com.google.protobuf.ByteString data,
19514 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19515 throws com.google.protobuf.InvalidProtocolBufferException {
19516 return PARSER.parseFrom(data, extensionRegistry);
19517 }
19518 public static onnx.OnnxMl.StringStringEntryProto parseFrom(byte[] data)
19519 throws com.google.protobuf.InvalidProtocolBufferException {
19520 return PARSER.parseFrom(data);
19521 }
19522 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19523 byte[] data,
19524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19525 throws com.google.protobuf.InvalidProtocolBufferException {
19526 return PARSER.parseFrom(data, extensionRegistry);
19527 }
19528 public static onnx.OnnxMl.StringStringEntryProto parseFrom(java.io.InputStream input)
19529 throws java.io.IOException {
19530 return com.google.protobuf.GeneratedMessage
19531 .parseWithIOException(PARSER, input);
19532 }
19533 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19534 java.io.InputStream input,
19535 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19536 throws java.io.IOException {
19537 return com.google.protobuf.GeneratedMessage
19538 .parseWithIOException(PARSER, input, extensionRegistry);
19539 }
19540
19541 public static onnx.OnnxMl.StringStringEntryProto parseDelimitedFrom(java.io.InputStream input)
19542 throws java.io.IOException {
19543 return com.google.protobuf.GeneratedMessage
19544 .parseDelimitedWithIOException(PARSER, input);
19545 }
19546
19547 public static onnx.OnnxMl.StringStringEntryProto parseDelimitedFrom(
19548 java.io.InputStream input,
19549 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19550 throws java.io.IOException {
19551 return com.google.protobuf.GeneratedMessage
19552 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
19553 }
19554 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19555 com.google.protobuf.CodedInputStream input)
19556 throws java.io.IOException {
19557 return com.google.protobuf.GeneratedMessage
19558 .parseWithIOException(PARSER, input);
19559 }
19560 public static onnx.OnnxMl.StringStringEntryProto parseFrom(
19561 com.google.protobuf.CodedInputStream input,
19562 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19563 throws java.io.IOException {
19564 return com.google.protobuf.GeneratedMessage
19565 .parseWithIOException(PARSER, input, extensionRegistry);
19566 }
19567
19568 @java.lang.Override
19569 public Builder newBuilderForType() { return newBuilder(); }
19570 public static Builder newBuilder() {
19571 return DEFAULT_INSTANCE.toBuilder();
19572 }
19573 public static Builder newBuilder(onnx.OnnxMl.StringStringEntryProto prototype) {
19574 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
19575 }
19576 @java.lang.Override
19577 public Builder toBuilder() {
19578 return this == DEFAULT_INSTANCE
19579 ? new Builder() : new Builder().mergeFrom(this);
19580 }
19581
19582 @java.lang.Override
19583 protected Builder newBuilderForType(
19584 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
19585 Builder builder = new Builder(parent);
19586 return builder;
19587 }
19588 /**
19589 * <pre>
19590 * StringStringEntryProto follows the pattern for cross-proto-version maps.
19591 * See https://developers.google.com/protocol-buffers/docs/proto3#maps
19592 * </pre>
19593 *
19594 * Protobuf type {@code onnx.StringStringEntryProto}
19595 */
19596 public static final class Builder extends
19597 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
19598 // @@protoc_insertion_point(builder_implements:onnx.StringStringEntryProto)
19599 onnx.OnnxMl.StringStringEntryProtoOrBuilder {
19600 public static final com.google.protobuf.Descriptors.Descriptor
19601 getDescriptor() {
19602 return onnx.OnnxMl.internal_static_onnx_StringStringEntryProto_descriptor;
19603 }
19604
19605 @java.lang.Override
19606 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
19607 internalGetFieldAccessorTable() {
19608 return onnx.OnnxMl.internal_static_onnx_StringStringEntryProto_fieldAccessorTable
19609 .ensureFieldAccessorsInitialized(
19610 onnx.OnnxMl.StringStringEntryProto.class, onnx.OnnxMl.StringStringEntryProto.Builder.class);
19611 }
19612
19613 // Construct using onnx.OnnxMl.StringStringEntryProto.newBuilder()
19614 private Builder() {
19615
19616 }
19617
19618 private Builder(
19619 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
19620 super(parent);
19621
19622 }
19623 @java.lang.Override
19624 public Builder clear() {
19625 super.clear();
19626 bitField0_ = 0;
19627 key_ = "";
19628 value_ = "";
19629 return this;
19630 }
19631
19632 @java.lang.Override
19633 public com.google.protobuf.Descriptors.Descriptor
19634 getDescriptorForType() {
19635 return onnx.OnnxMl.internal_static_onnx_StringStringEntryProto_descriptor;
19636 }
19637
19638 @java.lang.Override
19639 public onnx.OnnxMl.StringStringEntryProto getDefaultInstanceForType() {
19640 return onnx.OnnxMl.StringStringEntryProto.getDefaultInstance();
19641 }
19642
19643 @java.lang.Override
19644 public onnx.OnnxMl.StringStringEntryProto build() {
19645 onnx.OnnxMl.StringStringEntryProto result = buildPartial();
19646 if (!result.isInitialized()) {
19647 throw newUninitializedMessageException(result);
19648 }
19649 return result;
19650 }
19651
19652 @java.lang.Override
19653 public onnx.OnnxMl.StringStringEntryProto buildPartial() {
19654 onnx.OnnxMl.StringStringEntryProto result = new onnx.OnnxMl.StringStringEntryProto(this);
19655 if (bitField0_ != 0) { buildPartial0(result); }
19656 onBuilt();
19657 return result;
19658 }
19659
19660 private void buildPartial0(onnx.OnnxMl.StringStringEntryProto result) {
19661 int from_bitField0_ = bitField0_;
19662 int to_bitField0_ = 0;
19663 if (((from_bitField0_ & 0x00000001) != 0)) {
19664 result.key_ = key_;
19665 to_bitField0_ |= 0x00000001;
19666 }
19667 if (((from_bitField0_ & 0x00000002) != 0)) {
19668 result.value_ = value_;
19669 to_bitField0_ |= 0x00000002;
19670 }
19671 result.bitField0_ |= to_bitField0_;
19672 }
19673
19674 @java.lang.Override
19675 public Builder mergeFrom(com.google.protobuf.Message other) {
19676 if (other instanceof onnx.OnnxMl.StringStringEntryProto) {
19677 return mergeFrom((onnx.OnnxMl.StringStringEntryProto)other);
19678 } else {
19679 super.mergeFrom(other);
19680 return this;
19681 }
19682 }
19683
19684 public Builder mergeFrom(onnx.OnnxMl.StringStringEntryProto other) {
19685 if (other == onnx.OnnxMl.StringStringEntryProto.getDefaultInstance()) return this;
19686 if (other.hasKey()) {
19687 key_ = other.key_;
19688 bitField0_ |= 0x00000001;
19689 onChanged();
19690 }
19691 if (other.hasValue()) {
19692 value_ = other.value_;
19693 bitField0_ |= 0x00000002;
19694 onChanged();
19695 }
19696 this.mergeUnknownFields(other.getUnknownFields());
19697 onChanged();
19698 return this;
19699 }
19700
19701 @java.lang.Override
19702 public final boolean isInitialized() {
19703 return true;
19704 }
19705
19706 @java.lang.Override
19707 public Builder mergeFrom(
19708 com.google.protobuf.CodedInputStream input,
19709 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19710 throws java.io.IOException {
19711 if (extensionRegistry == null) {
19712 throw new java.lang.NullPointerException();
19713 }
19714 try {
19715 boolean done = false;
19716 while (!done) {
19717 int tag = input.readTag();
19718 switch (tag) {
19719 case 0:
19720 done = true;
19721 break;
19722 case 10: {
19723 key_ = input.readBytes();
19724 bitField0_ |= 0x00000001;
19725 break;
19726 } // case 10
19727 case 18: {
19728 value_ = input.readBytes();
19729 bitField0_ |= 0x00000002;
19730 break;
19731 } // case 18
19732 default: {
19733 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
19734 done = true; // was an endgroup tag
19735 }
19736 break;
19737 } // default:
19738 } // switch (tag)
19739 } // while (!done)
19740 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
19741 throw e.unwrapIOException();
19742 } finally {
19743 onChanged();
19744 } // finally
19745 return this;
19746 }
19747 private int bitField0_;
19748
19749 private java.lang.Object key_ = "";
19750 /**
19751 * <code>optional string key = 1;</code>
19752 * @return Whether the key field is set.
19753 */
19754 public boolean hasKey() {
19755 return ((bitField0_ & 0x00000001) != 0);
19756 }
19757 /**
19758 * <code>optional string key = 1;</code>
19759 * @return The key.
19760 */
19761 public java.lang.String getKey() {
19762 java.lang.Object ref = key_;
19763 if (!(ref instanceof java.lang.String)) {
19764 com.google.protobuf.ByteString bs =
19765 (com.google.protobuf.ByteString) ref;
19766 java.lang.String s = bs.toStringUtf8();
19767 if (bs.isValidUtf8()) {
19768 key_ = s;
19769 }
19770 return s;
19771 } else {
19772 return (java.lang.String) ref;
19773 }
19774 }
19775 /**
19776 * <code>optional string key = 1;</code>
19777 * @return The bytes for key.
19778 */
19779 public com.google.protobuf.ByteString
19780 getKeyBytes() {
19781 java.lang.Object ref = key_;
19782 if (ref instanceof String) {
19783 com.google.protobuf.ByteString b =
19784 com.google.protobuf.ByteString.copyFromUtf8(
19785 (java.lang.String) ref);
19786 key_ = b;
19787 return b;
19788 } else {
19789 return (com.google.protobuf.ByteString) ref;
19790 }
19791 }
19792 /**
19793 * <code>optional string key = 1;</code>
19794 * @param value The key to set.
19795 * @return This builder for chaining.
19796 */
19797 public Builder setKey(
19798 java.lang.String value) {
19799 if (value == null) { throw new NullPointerException(); }
19800 key_ = value;
19801 bitField0_ |= 0x00000001;
19802 onChanged();
19803 return this;
19804 }
19805 /**
19806 * <code>optional string key = 1;</code>
19807 * @return This builder for chaining.
19808 */
19809 public Builder clearKey() {
19810 key_ = getDefaultInstance().getKey();
19811 bitField0_ = (bitField0_ & ~0x00000001);
19812 onChanged();
19813 return this;
19814 }
19815 /**
19816 * <code>optional string key = 1;</code>
19817 * @param value The bytes for key to set.
19818 * @return This builder for chaining.
19819 */
19820 public Builder setKeyBytes(
19821 com.google.protobuf.ByteString value) {
19822 if (value == null) { throw new NullPointerException(); }
19823 key_ = value;
19824 bitField0_ |= 0x00000001;
19825 onChanged();
19826 return this;
19827 }
19828
19829 private java.lang.Object value_ = "";
19830 /**
19831 * <code>optional string value = 2;</code>
19832 * @return Whether the value field is set.
19833 */
19834 public boolean hasValue() {
19835 return ((bitField0_ & 0x00000002) != 0);
19836 }
19837 /**
19838 * <code>optional string value = 2;</code>
19839 * @return The value.
19840 */
19841 public java.lang.String getValue() {
19842 java.lang.Object ref = value_;
19843 if (!(ref instanceof java.lang.String)) {
19844 com.google.protobuf.ByteString bs =
19845 (com.google.protobuf.ByteString) ref;
19846 java.lang.String s = bs.toStringUtf8();
19847 if (bs.isValidUtf8()) {
19848 value_ = s;
19849 }
19850 return s;
19851 } else {
19852 return (java.lang.String) ref;
19853 }
19854 }
19855 /**
19856 * <code>optional string value = 2;</code>
19857 * @return The bytes for value.
19858 */
19859 public com.google.protobuf.ByteString
19860 getValueBytes() {
19861 java.lang.Object ref = value_;
19862 if (ref instanceof String) {
19863 com.google.protobuf.ByteString b =
19864 com.google.protobuf.ByteString.copyFromUtf8(
19865 (java.lang.String) ref);
19866 value_ = b;
19867 return b;
19868 } else {
19869 return (com.google.protobuf.ByteString) ref;
19870 }
19871 }
19872 /**
19873 * <code>optional string value = 2;</code>
19874 * @param value The value to set.
19875 * @return This builder for chaining.
19876 */
19877 public Builder setValue(
19878 java.lang.String value) {
19879 if (value == null) { throw new NullPointerException(); }
19880 value_ = value;
19881 bitField0_ |= 0x00000002;
19882 onChanged();
19883 return this;
19884 }
19885 /**
19886 * <code>optional string value = 2;</code>
19887 * @return This builder for chaining.
19888 */
19889 public Builder clearValue() {
19890 value_ = getDefaultInstance().getValue();
19891 bitField0_ = (bitField0_ & ~0x00000002);
19892 onChanged();
19893 return this;
19894 }
19895 /**
19896 * <code>optional string value = 2;</code>
19897 * @param value The bytes for value to set.
19898 * @return This builder for chaining.
19899 */
19900 public Builder setValueBytes(
19901 com.google.protobuf.ByteString value) {
19902 if (value == null) { throw new NullPointerException(); }
19903 value_ = value;
19904 bitField0_ |= 0x00000002;
19905 onChanged();
19906 return this;
19907 }
19908
19909 // @@protoc_insertion_point(builder_scope:onnx.StringStringEntryProto)
19910 }
19911
19912 // @@protoc_insertion_point(class_scope:onnx.StringStringEntryProto)
19913 private static final onnx.OnnxMl.StringStringEntryProto DEFAULT_INSTANCE;
19914 static {
19915 DEFAULT_INSTANCE = new onnx.OnnxMl.StringStringEntryProto();
19916 }
19917
19918 public static onnx.OnnxMl.StringStringEntryProto getDefaultInstance() {
19919 return DEFAULT_INSTANCE;
19920 }
19921
19922 private static final com.google.protobuf.Parser<StringStringEntryProto>
19923 PARSER = new com.google.protobuf.AbstractParser<StringStringEntryProto>() {
19924 @java.lang.Override
19925 public StringStringEntryProto parsePartialFrom(
19926 com.google.protobuf.CodedInputStream input,
19927 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19928 throws com.google.protobuf.InvalidProtocolBufferException {
19929 Builder builder = newBuilder();
19930 try {
19931 builder.mergeFrom(input, extensionRegistry);
19932 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
19933 throw e.setUnfinishedMessage(builder.buildPartial());
19934 } catch (com.google.protobuf.UninitializedMessageException e) {
19935 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
19936 } catch (java.io.IOException e) {
19937 throw new com.google.protobuf.InvalidProtocolBufferException(e)
19938 .setUnfinishedMessage(builder.buildPartial());
19939 }
19940 return builder.buildPartial();
19941 }
19942 };
19943
19944 public static com.google.protobuf.Parser<StringStringEntryProto> parser() {
19945 return PARSER;
19946 }
19947
19948 @java.lang.Override
19949 public com.google.protobuf.Parser<StringStringEntryProto> getParserForType() {
19950 return PARSER;
19951 }
19952
19953 @java.lang.Override
19954 public onnx.OnnxMl.StringStringEntryProto getDefaultInstanceForType() {
19955 return DEFAULT_INSTANCE;
19956 }
19957
19958 }
19959
19960 public interface TensorAnnotationOrBuilder extends
19961 // @@protoc_insertion_point(interface_extends:onnx.TensorAnnotation)
19962 com.google.protobuf.MessageOrBuilder {
19963
19964 /**
19965 * <code>optional string tensor_name = 1;</code>
19966 * @return Whether the tensorName field is set.
19967 */
19968 boolean hasTensorName();
19969 /**
19970 * <code>optional string tensor_name = 1;</code>
19971 * @return The tensorName.
19972 */
19973 java.lang.String getTensorName();
19974 /**
19975 * <code>optional string tensor_name = 1;</code>
19976 * @return The bytes for tensorName.
19977 */
19978 com.google.protobuf.ByteString
19979 getTensorNameBytes();
19980
19981 /**
19982 * <pre>
19983 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
19984 * The keys used in the mapping below must be pre-defined in ONNX spec.
19985 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
19986 * quantization parameter keys.
19987 * </pre>
19988 *
19989 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
19990 */
19991 java.util.List<onnx.OnnxMl.StringStringEntryProto>
19992 getQuantParameterTensorNamesList();
19993 /**
19994 * <pre>
19995 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
19996 * The keys used in the mapping below must be pre-defined in ONNX spec.
19997 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
19998 * quantization parameter keys.
19999 * </pre>
20000 *
20001 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20002 */
20003 onnx.OnnxMl.StringStringEntryProto getQuantParameterTensorNames(int index);
20004 /**
20005 * <pre>
20006 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20007 * The keys used in the mapping below must be pre-defined in ONNX spec.
20008 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20009 * quantization parameter keys.
20010 * </pre>
20011 *
20012 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20013 */
20014 int getQuantParameterTensorNamesCount();
20015 /**
20016 * <pre>
20017 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20018 * The keys used in the mapping below must be pre-defined in ONNX spec.
20019 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20020 * quantization parameter keys.
20021 * </pre>
20022 *
20023 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20024 */
20025 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
20026 getQuantParameterTensorNamesOrBuilderList();
20027 /**
20028 * <pre>
20029 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20030 * The keys used in the mapping below must be pre-defined in ONNX spec.
20031 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20032 * quantization parameter keys.
20033 * </pre>
20034 *
20035 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20036 */
20037 onnx.OnnxMl.StringStringEntryProtoOrBuilder getQuantParameterTensorNamesOrBuilder(
20038 int index);
20039 }
20040 /**
20041 * Protobuf type {@code onnx.TensorAnnotation}
20042 */
20043 public static final class TensorAnnotation extends
20044 com.google.protobuf.GeneratedMessage implements
20045 // @@protoc_insertion_point(message_implements:onnx.TensorAnnotation)
20046 TensorAnnotationOrBuilder {
20047 private static final long serialVersionUID = 0L;
20048 static {
20049 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
20050 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
20051 /* major= */ 4,
20052 /* minor= */ 29,
20053 /* patch= */ 3,
20054 /* suffix= */ "",
20055 TensorAnnotation.class.getName());
20056 }
20057 // Use TensorAnnotation.newBuilder() to construct.
20058 private TensorAnnotation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
20059 super(builder);
20060 }
20061 private TensorAnnotation() {
20062 tensorName_ = "";
20063 quantParameterTensorNames_ = java.util.Collections.emptyList();
20064 }
20065
20066 public static final com.google.protobuf.Descriptors.Descriptor
20067 getDescriptor() {
20068 return onnx.OnnxMl.internal_static_onnx_TensorAnnotation_descriptor;
20069 }
20070
20071 @java.lang.Override
20072 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
20073 internalGetFieldAccessorTable() {
20074 return onnx.OnnxMl.internal_static_onnx_TensorAnnotation_fieldAccessorTable
20075 .ensureFieldAccessorsInitialized(
20076 onnx.OnnxMl.TensorAnnotation.class, onnx.OnnxMl.TensorAnnotation.Builder.class);
20077 }
20078
20079 private int bitField0_;
20080 public static final int TENSOR_NAME_FIELD_NUMBER = 1;
20081 @SuppressWarnings("serial")
20082 private volatile java.lang.Object tensorName_ = "";
20083 /**
20084 * <code>optional string tensor_name = 1;</code>
20085 * @return Whether the tensorName field is set.
20086 */
20087 @java.lang.Override
20088 public boolean hasTensorName() {
20089 return ((bitField0_ & 0x00000001) != 0);
20090 }
20091 /**
20092 * <code>optional string tensor_name = 1;</code>
20093 * @return The tensorName.
20094 */
20095 @java.lang.Override
20096 public java.lang.String getTensorName() {
20097 java.lang.Object ref = tensorName_;
20098 if (ref instanceof java.lang.String) {
20099 return (java.lang.String) ref;
20100 } else {
20101 com.google.protobuf.ByteString bs =
20102 (com.google.protobuf.ByteString) ref;
20103 java.lang.String s = bs.toStringUtf8();
20104 if (bs.isValidUtf8()) {
20105 tensorName_ = s;
20106 }
20107 return s;
20108 }
20109 }
20110 /**
20111 * <code>optional string tensor_name = 1;</code>
20112 * @return The bytes for tensorName.
20113 */
20114 @java.lang.Override
20115 public com.google.protobuf.ByteString
20116 getTensorNameBytes() {
20117 java.lang.Object ref = tensorName_;
20118 if (ref instanceof java.lang.String) {
20119 com.google.protobuf.ByteString b =
20120 com.google.protobuf.ByteString.copyFromUtf8(
20121 (java.lang.String) ref);
20122 tensorName_ = b;
20123 return b;
20124 } else {
20125 return (com.google.protobuf.ByteString) ref;
20126 }
20127 }
20128
20129 public static final int QUANT_PARAMETER_TENSOR_NAMES_FIELD_NUMBER = 2;
20130 @SuppressWarnings("serial")
20131 private java.util.List<onnx.OnnxMl.StringStringEntryProto> quantParameterTensorNames_;
20132 /**
20133 * <pre>
20134 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20135 * The keys used in the mapping below must be pre-defined in ONNX spec.
20136 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20137 * quantization parameter keys.
20138 * </pre>
20139 *
20140 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20141 */
20142 @java.lang.Override
20143 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getQuantParameterTensorNamesList() {
20144 return quantParameterTensorNames_;
20145 }
20146 /**
20147 * <pre>
20148 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20149 * The keys used in the mapping below must be pre-defined in ONNX spec.
20150 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20151 * quantization parameter keys.
20152 * </pre>
20153 *
20154 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20155 */
20156 @java.lang.Override
20157 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
20158 getQuantParameterTensorNamesOrBuilderList() {
20159 return quantParameterTensorNames_;
20160 }
20161 /**
20162 * <pre>
20163 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20164 * The keys used in the mapping below must be pre-defined in ONNX spec.
20165 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20166 * quantization parameter keys.
20167 * </pre>
20168 *
20169 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20170 */
20171 @java.lang.Override
20172 public int getQuantParameterTensorNamesCount() {
20173 return quantParameterTensorNames_.size();
20174 }
20175 /**
20176 * <pre>
20177 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20178 * The keys used in the mapping below must be pre-defined in ONNX spec.
20179 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20180 * quantization parameter keys.
20181 * </pre>
20182 *
20183 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20184 */
20185 @java.lang.Override
20186 public onnx.OnnxMl.StringStringEntryProto getQuantParameterTensorNames(int index) {
20187 return quantParameterTensorNames_.get(index);
20188 }
20189 /**
20190 * <pre>
20191 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20192 * The keys used in the mapping below must be pre-defined in ONNX spec.
20193 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20194 * quantization parameter keys.
20195 * </pre>
20196 *
20197 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20198 */
20199 @java.lang.Override
20200 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getQuantParameterTensorNamesOrBuilder(
20201 int index) {
20202 return quantParameterTensorNames_.get(index);
20203 }
20204
20205 private byte memoizedIsInitialized = -1;
20206 @java.lang.Override
20207 public final boolean isInitialized() {
20208 byte isInitialized = memoizedIsInitialized;
20209 if (isInitialized == 1) return true;
20210 if (isInitialized == 0) return false;
20211
20212 memoizedIsInitialized = 1;
20213 return true;
20214 }
20215
20216 @java.lang.Override
20217 public void writeTo(com.google.protobuf.CodedOutputStream output)
20218 throws java.io.IOException {
20219 if (((bitField0_ & 0x00000001) != 0)) {
20220 com.google.protobuf.GeneratedMessage.writeString(output, 1, tensorName_);
20221 }
20222 for (int i = 0; i < quantParameterTensorNames_.size(); i++) {
20223 output.writeMessage(2, quantParameterTensorNames_.get(i));
20224 }
20225 getUnknownFields().writeTo(output);
20226 }
20227
20228 @java.lang.Override
20229 public int getSerializedSize() {
20230 int size = memoizedSize;
20231 if (size != -1) return size;
20232
20233 size = 0;
20234 if (((bitField0_ & 0x00000001) != 0)) {
20235 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tensorName_);
20236 }
20237 for (int i = 0; i < quantParameterTensorNames_.size(); i++) {
20238 size += com.google.protobuf.CodedOutputStream
20239 .computeMessageSize(2, quantParameterTensorNames_.get(i));
20240 }
20241 size += getUnknownFields().getSerializedSize();
20242 memoizedSize = size;
20243 return size;
20244 }
20245
20246 @java.lang.Override
20247 public boolean equals(final java.lang.Object obj) {
20248 if (obj == this) {
20249 return true;
20250 }
20251 if (!(obj instanceof onnx.OnnxMl.TensorAnnotation)) {
20252 return super.equals(obj);
20253 }
20254 onnx.OnnxMl.TensorAnnotation other = (onnx.OnnxMl.TensorAnnotation) obj;
20255
20256 if (hasTensorName() != other.hasTensorName()) return false;
20257 if (hasTensorName()) {
20258 if (!getTensorName()
20259 .equals(other.getTensorName())) return false;
20260 }
20261 if (!getQuantParameterTensorNamesList()
20262 .equals(other.getQuantParameterTensorNamesList())) return false;
20263 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
20264 return true;
20265 }
20266
20267 @java.lang.Override
20268 public int hashCode() {
20269 if (memoizedHashCode != 0) {
20270 return memoizedHashCode;
20271 }
20272 int hash = 41;
20273 hash = (19 * hash) + getDescriptor().hashCode();
20274 if (hasTensorName()) {
20275 hash = (37 * hash) + TENSOR_NAME_FIELD_NUMBER;
20276 hash = (53 * hash) + getTensorName().hashCode();
20277 }
20278 if (getQuantParameterTensorNamesCount() > 0) {
20279 hash = (37 * hash) + QUANT_PARAMETER_TENSOR_NAMES_FIELD_NUMBER;
20280 hash = (53 * hash) + getQuantParameterTensorNamesList().hashCode();
20281 }
20282 hash = (29 * hash) + getUnknownFields().hashCode();
20283 memoizedHashCode = hash;
20284 return hash;
20285 }
20286
20287 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20288 java.nio.ByteBuffer data)
20289 throws com.google.protobuf.InvalidProtocolBufferException {
20290 return PARSER.parseFrom(data);
20291 }
20292 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20293 java.nio.ByteBuffer data,
20294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20295 throws com.google.protobuf.InvalidProtocolBufferException {
20296 return PARSER.parseFrom(data, extensionRegistry);
20297 }
20298 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20299 com.google.protobuf.ByteString data)
20300 throws com.google.protobuf.InvalidProtocolBufferException {
20301 return PARSER.parseFrom(data);
20302 }
20303 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20304 com.google.protobuf.ByteString data,
20305 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20306 throws com.google.protobuf.InvalidProtocolBufferException {
20307 return PARSER.parseFrom(data, extensionRegistry);
20308 }
20309 public static onnx.OnnxMl.TensorAnnotation parseFrom(byte[] data)
20310 throws com.google.protobuf.InvalidProtocolBufferException {
20311 return PARSER.parseFrom(data);
20312 }
20313 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20314 byte[] data,
20315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20316 throws com.google.protobuf.InvalidProtocolBufferException {
20317 return PARSER.parseFrom(data, extensionRegistry);
20318 }
20319 public static onnx.OnnxMl.TensorAnnotation parseFrom(java.io.InputStream input)
20320 throws java.io.IOException {
20321 return com.google.protobuf.GeneratedMessage
20322 .parseWithIOException(PARSER, input);
20323 }
20324 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20325 java.io.InputStream input,
20326 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20327 throws java.io.IOException {
20328 return com.google.protobuf.GeneratedMessage
20329 .parseWithIOException(PARSER, input, extensionRegistry);
20330 }
20331
20332 public static onnx.OnnxMl.TensorAnnotation parseDelimitedFrom(java.io.InputStream input)
20333 throws java.io.IOException {
20334 return com.google.protobuf.GeneratedMessage
20335 .parseDelimitedWithIOException(PARSER, input);
20336 }
20337
20338 public static onnx.OnnxMl.TensorAnnotation parseDelimitedFrom(
20339 java.io.InputStream input,
20340 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20341 throws java.io.IOException {
20342 return com.google.protobuf.GeneratedMessage
20343 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
20344 }
20345 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20346 com.google.protobuf.CodedInputStream input)
20347 throws java.io.IOException {
20348 return com.google.protobuf.GeneratedMessage
20349 .parseWithIOException(PARSER, input);
20350 }
20351 public static onnx.OnnxMl.TensorAnnotation parseFrom(
20352 com.google.protobuf.CodedInputStream input,
20353 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20354 throws java.io.IOException {
20355 return com.google.protobuf.GeneratedMessage
20356 .parseWithIOException(PARSER, input, extensionRegistry);
20357 }
20358
20359 @java.lang.Override
20360 public Builder newBuilderForType() { return newBuilder(); }
20361 public static Builder newBuilder() {
20362 return DEFAULT_INSTANCE.toBuilder();
20363 }
20364 public static Builder newBuilder(onnx.OnnxMl.TensorAnnotation prototype) {
20365 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
20366 }
20367 @java.lang.Override
20368 public Builder toBuilder() {
20369 return this == DEFAULT_INSTANCE
20370 ? new Builder() : new Builder().mergeFrom(this);
20371 }
20372
20373 @java.lang.Override
20374 protected Builder newBuilderForType(
20375 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
20376 Builder builder = new Builder(parent);
20377 return builder;
20378 }
20379 /**
20380 * Protobuf type {@code onnx.TensorAnnotation}
20381 */
20382 public static final class Builder extends
20383 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
20384 // @@protoc_insertion_point(builder_implements:onnx.TensorAnnotation)
20385 onnx.OnnxMl.TensorAnnotationOrBuilder {
20386 public static final com.google.protobuf.Descriptors.Descriptor
20387 getDescriptor() {
20388 return onnx.OnnxMl.internal_static_onnx_TensorAnnotation_descriptor;
20389 }
20390
20391 @java.lang.Override
20392 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
20393 internalGetFieldAccessorTable() {
20394 return onnx.OnnxMl.internal_static_onnx_TensorAnnotation_fieldAccessorTable
20395 .ensureFieldAccessorsInitialized(
20396 onnx.OnnxMl.TensorAnnotation.class, onnx.OnnxMl.TensorAnnotation.Builder.class);
20397 }
20398
20399 // Construct using onnx.OnnxMl.TensorAnnotation.newBuilder()
20400 private Builder() {
20401
20402 }
20403
20404 private Builder(
20405 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
20406 super(parent);
20407
20408 }
20409 @java.lang.Override
20410 public Builder clear() {
20411 super.clear();
20412 bitField0_ = 0;
20413 tensorName_ = "";
20414 if (quantParameterTensorNamesBuilder_ == null) {
20415 quantParameterTensorNames_ = java.util.Collections.emptyList();
20416 } else {
20417 quantParameterTensorNames_ = null;
20418 quantParameterTensorNamesBuilder_.clear();
20419 }
20420 bitField0_ = (bitField0_ & ~0x00000002);
20421 return this;
20422 }
20423
20424 @java.lang.Override
20425 public com.google.protobuf.Descriptors.Descriptor
20426 getDescriptorForType() {
20427 return onnx.OnnxMl.internal_static_onnx_TensorAnnotation_descriptor;
20428 }
20429
20430 @java.lang.Override
20431 public onnx.OnnxMl.TensorAnnotation getDefaultInstanceForType() {
20432 return onnx.OnnxMl.TensorAnnotation.getDefaultInstance();
20433 }
20434
20435 @java.lang.Override
20436 public onnx.OnnxMl.TensorAnnotation build() {
20437 onnx.OnnxMl.TensorAnnotation result = buildPartial();
20438 if (!result.isInitialized()) {
20439 throw newUninitializedMessageException(result);
20440 }
20441 return result;
20442 }
20443
20444 @java.lang.Override
20445 public onnx.OnnxMl.TensorAnnotation buildPartial() {
20446 onnx.OnnxMl.TensorAnnotation result = new onnx.OnnxMl.TensorAnnotation(this);
20447 buildPartialRepeatedFields(result);
20448 if (bitField0_ != 0) { buildPartial0(result); }
20449 onBuilt();
20450 return result;
20451 }
20452
20453 private void buildPartialRepeatedFields(onnx.OnnxMl.TensorAnnotation result) {
20454 if (quantParameterTensorNamesBuilder_ == null) {
20455 if (((bitField0_ & 0x00000002) != 0)) {
20456 quantParameterTensorNames_ = java.util.Collections.unmodifiableList(quantParameterTensorNames_);
20457 bitField0_ = (bitField0_ & ~0x00000002);
20458 }
20459 result.quantParameterTensorNames_ = quantParameterTensorNames_;
20460 } else {
20461 result.quantParameterTensorNames_ = quantParameterTensorNamesBuilder_.build();
20462 }
20463 }
20464
20465 private void buildPartial0(onnx.OnnxMl.TensorAnnotation result) {
20466 int from_bitField0_ = bitField0_;
20467 int to_bitField0_ = 0;
20468 if (((from_bitField0_ & 0x00000001) != 0)) {
20469 result.tensorName_ = tensorName_;
20470 to_bitField0_ |= 0x00000001;
20471 }
20472 result.bitField0_ |= to_bitField0_;
20473 }
20474
20475 @java.lang.Override
20476 public Builder mergeFrom(com.google.protobuf.Message other) {
20477 if (other instanceof onnx.OnnxMl.TensorAnnotation) {
20478 return mergeFrom((onnx.OnnxMl.TensorAnnotation)other);
20479 } else {
20480 super.mergeFrom(other);
20481 return this;
20482 }
20483 }
20484
20485 public Builder mergeFrom(onnx.OnnxMl.TensorAnnotation other) {
20486 if (other == onnx.OnnxMl.TensorAnnotation.getDefaultInstance()) return this;
20487 if (other.hasTensorName()) {
20488 tensorName_ = other.tensorName_;
20489 bitField0_ |= 0x00000001;
20490 onChanged();
20491 }
20492 if (quantParameterTensorNamesBuilder_ == null) {
20493 if (!other.quantParameterTensorNames_.isEmpty()) {
20494 if (quantParameterTensorNames_.isEmpty()) {
20495 quantParameterTensorNames_ = other.quantParameterTensorNames_;
20496 bitField0_ = (bitField0_ & ~0x00000002);
20497 } else {
20498 ensureQuantParameterTensorNamesIsMutable();
20499 quantParameterTensorNames_.addAll(other.quantParameterTensorNames_);
20500 }
20501 onChanged();
20502 }
20503 } else {
20504 if (!other.quantParameterTensorNames_.isEmpty()) {
20505 if (quantParameterTensorNamesBuilder_.isEmpty()) {
20506 quantParameterTensorNamesBuilder_.dispose();
20507 quantParameterTensorNamesBuilder_ = null;
20508 quantParameterTensorNames_ = other.quantParameterTensorNames_;
20509 bitField0_ = (bitField0_ & ~0x00000002);
20510 quantParameterTensorNamesBuilder_ =
20511 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
20512 getQuantParameterTensorNamesFieldBuilder() : null;
20513 } else {
20514 quantParameterTensorNamesBuilder_.addAllMessages(other.quantParameterTensorNames_);
20515 }
20516 }
20517 }
20518 this.mergeUnknownFields(other.getUnknownFields());
20519 onChanged();
20520 return this;
20521 }
20522
20523 @java.lang.Override
20524 public final boolean isInitialized() {
20525 return true;
20526 }
20527
20528 @java.lang.Override
20529 public Builder mergeFrom(
20530 com.google.protobuf.CodedInputStream input,
20531 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
20532 throws java.io.IOException {
20533 if (extensionRegistry == null) {
20534 throw new java.lang.NullPointerException();
20535 }
20536 try {
20537 boolean done = false;
20538 while (!done) {
20539 int tag = input.readTag();
20540 switch (tag) {
20541 case 0:
20542 done = true;
20543 break;
20544 case 10: {
20545 tensorName_ = input.readBytes();
20546 bitField0_ |= 0x00000001;
20547 break;
20548 } // case 10
20549 case 18: {
20550 onnx.OnnxMl.StringStringEntryProto m =
20551 input.readMessage(
20552 onnx.OnnxMl.StringStringEntryProto.parser(),
20553 extensionRegistry);
20554 if (quantParameterTensorNamesBuilder_ == null) {
20555 ensureQuantParameterTensorNamesIsMutable();
20556 quantParameterTensorNames_.add(m);
20557 } else {
20558 quantParameterTensorNamesBuilder_.addMessage(m);
20559 }
20560 break;
20561 } // case 18
20562 default: {
20563 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
20564 done = true; // was an endgroup tag
20565 }
20566 break;
20567 } // default:
20568 } // switch (tag)
20569 } // while (!done)
20570 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
20571 throw e.unwrapIOException();
20572 } finally {
20573 onChanged();
20574 } // finally
20575 return this;
20576 }
20577 private int bitField0_;
20578
20579 private java.lang.Object tensorName_ = "";
20580 /**
20581 * <code>optional string tensor_name = 1;</code>
20582 * @return Whether the tensorName field is set.
20583 */
20584 public boolean hasTensorName() {
20585 return ((bitField0_ & 0x00000001) != 0);
20586 }
20587 /**
20588 * <code>optional string tensor_name = 1;</code>
20589 * @return The tensorName.
20590 */
20591 public java.lang.String getTensorName() {
20592 java.lang.Object ref = tensorName_;
20593 if (!(ref instanceof java.lang.String)) {
20594 com.google.protobuf.ByteString bs =
20595 (com.google.protobuf.ByteString) ref;
20596 java.lang.String s = bs.toStringUtf8();
20597 if (bs.isValidUtf8()) {
20598 tensorName_ = s;
20599 }
20600 return s;
20601 } else {
20602 return (java.lang.String) ref;
20603 }
20604 }
20605 /**
20606 * <code>optional string tensor_name = 1;</code>
20607 * @return The bytes for tensorName.
20608 */
20609 public com.google.protobuf.ByteString
20610 getTensorNameBytes() {
20611 java.lang.Object ref = tensorName_;
20612 if (ref instanceof String) {
20613 com.google.protobuf.ByteString b =
20614 com.google.protobuf.ByteString.copyFromUtf8(
20615 (java.lang.String) ref);
20616 tensorName_ = b;
20617 return b;
20618 } else {
20619 return (com.google.protobuf.ByteString) ref;
20620 }
20621 }
20622 /**
20623 * <code>optional string tensor_name = 1;</code>
20624 * @param value The tensorName to set.
20625 * @return This builder for chaining.
20626 */
20627 public Builder setTensorName(
20628 java.lang.String value) {
20629 if (value == null) { throw new NullPointerException(); }
20630 tensorName_ = value;
20631 bitField0_ |= 0x00000001;
20632 onChanged();
20633 return this;
20634 }
20635 /**
20636 * <code>optional string tensor_name = 1;</code>
20637 * @return This builder for chaining.
20638 */
20639 public Builder clearTensorName() {
20640 tensorName_ = getDefaultInstance().getTensorName();
20641 bitField0_ = (bitField0_ & ~0x00000001);
20642 onChanged();
20643 return this;
20644 }
20645 /**
20646 * <code>optional string tensor_name = 1;</code>
20647 * @param value The bytes for tensorName to set.
20648 * @return This builder for chaining.
20649 */
20650 public Builder setTensorNameBytes(
20651 com.google.protobuf.ByteString value) {
20652 if (value == null) { throw new NullPointerException(); }
20653 tensorName_ = value;
20654 bitField0_ |= 0x00000001;
20655 onChanged();
20656 return this;
20657 }
20658
20659 private java.util.List<onnx.OnnxMl.StringStringEntryProto> quantParameterTensorNames_ =
20660 java.util.Collections.emptyList();
20661 private void ensureQuantParameterTensorNamesIsMutable() {
20662 if (!((bitField0_ & 0x00000002) != 0)) {
20663 quantParameterTensorNames_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(quantParameterTensorNames_);
20664 bitField0_ |= 0x00000002;
20665 }
20666 }
20667
20668 private com.google.protobuf.RepeatedFieldBuilder<
20669 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> quantParameterTensorNamesBuilder_;
20670
20671 /**
20672 * <pre>
20673 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20674 * The keys used in the mapping below must be pre-defined in ONNX spec.
20675 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20676 * quantization parameter keys.
20677 * </pre>
20678 *
20679 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20680 */
20681 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getQuantParameterTensorNamesList() {
20682 if (quantParameterTensorNamesBuilder_ == null) {
20683 return java.util.Collections.unmodifiableList(quantParameterTensorNames_);
20684 } else {
20685 return quantParameterTensorNamesBuilder_.getMessageList();
20686 }
20687 }
20688 /**
20689 * <pre>
20690 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20691 * The keys used in the mapping below must be pre-defined in ONNX spec.
20692 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20693 * quantization parameter keys.
20694 * </pre>
20695 *
20696 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20697 */
20698 public int getQuantParameterTensorNamesCount() {
20699 if (quantParameterTensorNamesBuilder_ == null) {
20700 return quantParameterTensorNames_.size();
20701 } else {
20702 return quantParameterTensorNamesBuilder_.getCount();
20703 }
20704 }
20705 /**
20706 * <pre>
20707 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20708 * The keys used in the mapping below must be pre-defined in ONNX spec.
20709 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20710 * quantization parameter keys.
20711 * </pre>
20712 *
20713 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20714 */
20715 public onnx.OnnxMl.StringStringEntryProto getQuantParameterTensorNames(int index) {
20716 if (quantParameterTensorNamesBuilder_ == null) {
20717 return quantParameterTensorNames_.get(index);
20718 } else {
20719 return quantParameterTensorNamesBuilder_.getMessage(index);
20720 }
20721 }
20722 /**
20723 * <pre>
20724 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20725 * The keys used in the mapping below must be pre-defined in ONNX spec.
20726 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20727 * quantization parameter keys.
20728 * </pre>
20729 *
20730 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20731 */
20732 public Builder setQuantParameterTensorNames(
20733 int index, onnx.OnnxMl.StringStringEntryProto value) {
20734 if (quantParameterTensorNamesBuilder_ == null) {
20735 if (value == null) {
20736 throw new NullPointerException();
20737 }
20738 ensureQuantParameterTensorNamesIsMutable();
20739 quantParameterTensorNames_.set(index, value);
20740 onChanged();
20741 } else {
20742 quantParameterTensorNamesBuilder_.setMessage(index, value);
20743 }
20744 return this;
20745 }
20746 /**
20747 * <pre>
20748 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20749 * The keys used in the mapping below must be pre-defined in ONNX spec.
20750 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20751 * quantization parameter keys.
20752 * </pre>
20753 *
20754 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20755 */
20756 public Builder setQuantParameterTensorNames(
20757 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
20758 if (quantParameterTensorNamesBuilder_ == null) {
20759 ensureQuantParameterTensorNamesIsMutable();
20760 quantParameterTensorNames_.set(index, builderForValue.build());
20761 onChanged();
20762 } else {
20763 quantParameterTensorNamesBuilder_.setMessage(index, builderForValue.build());
20764 }
20765 return this;
20766 }
20767 /**
20768 * <pre>
20769 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20770 * The keys used in the mapping below must be pre-defined in ONNX spec.
20771 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20772 * quantization parameter keys.
20773 * </pre>
20774 *
20775 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20776 */
20777 public Builder addQuantParameterTensorNames(onnx.OnnxMl.StringStringEntryProto value) {
20778 if (quantParameterTensorNamesBuilder_ == null) {
20779 if (value == null) {
20780 throw new NullPointerException();
20781 }
20782 ensureQuantParameterTensorNamesIsMutable();
20783 quantParameterTensorNames_.add(value);
20784 onChanged();
20785 } else {
20786 quantParameterTensorNamesBuilder_.addMessage(value);
20787 }
20788 return this;
20789 }
20790 /**
20791 * <pre>
20792 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20793 * The keys used in the mapping below must be pre-defined in ONNX spec.
20794 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20795 * quantization parameter keys.
20796 * </pre>
20797 *
20798 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20799 */
20800 public Builder addQuantParameterTensorNames(
20801 int index, onnx.OnnxMl.StringStringEntryProto value) {
20802 if (quantParameterTensorNamesBuilder_ == null) {
20803 if (value == null) {
20804 throw new NullPointerException();
20805 }
20806 ensureQuantParameterTensorNamesIsMutable();
20807 quantParameterTensorNames_.add(index, value);
20808 onChanged();
20809 } else {
20810 quantParameterTensorNamesBuilder_.addMessage(index, value);
20811 }
20812 return this;
20813 }
20814 /**
20815 * <pre>
20816 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20817 * The keys used in the mapping below must be pre-defined in ONNX spec.
20818 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20819 * quantization parameter keys.
20820 * </pre>
20821 *
20822 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20823 */
20824 public Builder addQuantParameterTensorNames(
20825 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
20826 if (quantParameterTensorNamesBuilder_ == null) {
20827 ensureQuantParameterTensorNamesIsMutable();
20828 quantParameterTensorNames_.add(builderForValue.build());
20829 onChanged();
20830 } else {
20831 quantParameterTensorNamesBuilder_.addMessage(builderForValue.build());
20832 }
20833 return this;
20834 }
20835 /**
20836 * <pre>
20837 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20838 * The keys used in the mapping below must be pre-defined in ONNX spec.
20839 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20840 * quantization parameter keys.
20841 * </pre>
20842 *
20843 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20844 */
20845 public Builder addQuantParameterTensorNames(
20846 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
20847 if (quantParameterTensorNamesBuilder_ == null) {
20848 ensureQuantParameterTensorNamesIsMutable();
20849 quantParameterTensorNames_.add(index, builderForValue.build());
20850 onChanged();
20851 } else {
20852 quantParameterTensorNamesBuilder_.addMessage(index, builderForValue.build());
20853 }
20854 return this;
20855 }
20856 /**
20857 * <pre>
20858 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20859 * The keys used in the mapping below must be pre-defined in ONNX spec.
20860 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20861 * quantization parameter keys.
20862 * </pre>
20863 *
20864 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20865 */
20866 public Builder addAllQuantParameterTensorNames(
20867 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
20868 if (quantParameterTensorNamesBuilder_ == null) {
20869 ensureQuantParameterTensorNamesIsMutable();
20870 com.google.protobuf.AbstractMessageLite.Builder.addAll(
20871 values, quantParameterTensorNames_);
20872 onChanged();
20873 } else {
20874 quantParameterTensorNamesBuilder_.addAllMessages(values);
20875 }
20876 return this;
20877 }
20878 /**
20879 * <pre>
20880 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20881 * The keys used in the mapping below must be pre-defined in ONNX spec.
20882 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20883 * quantization parameter keys.
20884 * </pre>
20885 *
20886 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20887 */
20888 public Builder clearQuantParameterTensorNames() {
20889 if (quantParameterTensorNamesBuilder_ == null) {
20890 quantParameterTensorNames_ = java.util.Collections.emptyList();
20891 bitField0_ = (bitField0_ & ~0x00000002);
20892 onChanged();
20893 } else {
20894 quantParameterTensorNamesBuilder_.clear();
20895 }
20896 return this;
20897 }
20898 /**
20899 * <pre>
20900 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20901 * The keys used in the mapping below must be pre-defined in ONNX spec.
20902 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20903 * quantization parameter keys.
20904 * </pre>
20905 *
20906 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20907 */
20908 public Builder removeQuantParameterTensorNames(int index) {
20909 if (quantParameterTensorNamesBuilder_ == null) {
20910 ensureQuantParameterTensorNamesIsMutable();
20911 quantParameterTensorNames_.remove(index);
20912 onChanged();
20913 } else {
20914 quantParameterTensorNamesBuilder_.remove(index);
20915 }
20916 return this;
20917 }
20918 /**
20919 * <pre>
20920 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20921 * The keys used in the mapping below must be pre-defined in ONNX spec.
20922 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20923 * quantization parameter keys.
20924 * </pre>
20925 *
20926 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20927 */
20928 public onnx.OnnxMl.StringStringEntryProto.Builder getQuantParameterTensorNamesBuilder(
20929 int index) {
20930 return getQuantParameterTensorNamesFieldBuilder().getBuilder(index);
20931 }
20932 /**
20933 * <pre>
20934 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20935 * The keys used in the mapping below must be pre-defined in ONNX spec.
20936 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20937 * quantization parameter keys.
20938 * </pre>
20939 *
20940 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20941 */
20942 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getQuantParameterTensorNamesOrBuilder(
20943 int index) {
20944 if (quantParameterTensorNamesBuilder_ == null) {
20945 return quantParameterTensorNames_.get(index); } else {
20946 return quantParameterTensorNamesBuilder_.getMessageOrBuilder(index);
20947 }
20948 }
20949 /**
20950 * <pre>
20951 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20952 * The keys used in the mapping below must be pre-defined in ONNX spec.
20953 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20954 * quantization parameter keys.
20955 * </pre>
20956 *
20957 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20958 */
20959 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
20960 getQuantParameterTensorNamesOrBuilderList() {
20961 if (quantParameterTensorNamesBuilder_ != null) {
20962 return quantParameterTensorNamesBuilder_.getMessageOrBuilderList();
20963 } else {
20964 return java.util.Collections.unmodifiableList(quantParameterTensorNames_);
20965 }
20966 }
20967 /**
20968 * <pre>
20969 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20970 * The keys used in the mapping below must be pre-defined in ONNX spec.
20971 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20972 * quantization parameter keys.
20973 * </pre>
20974 *
20975 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20976 */
20977 public onnx.OnnxMl.StringStringEntryProto.Builder addQuantParameterTensorNamesBuilder() {
20978 return getQuantParameterTensorNamesFieldBuilder().addBuilder(
20979 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
20980 }
20981 /**
20982 * <pre>
20983 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20984 * The keys used in the mapping below must be pre-defined in ONNX spec.
20985 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
20986 * quantization parameter keys.
20987 * </pre>
20988 *
20989 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
20990 */
20991 public onnx.OnnxMl.StringStringEntryProto.Builder addQuantParameterTensorNamesBuilder(
20992 int index) {
20993 return getQuantParameterTensorNamesFieldBuilder().addBuilder(
20994 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
20995 }
20996 /**
20997 * <pre>
20998 * <key, value> pairs to annotate tensor specified by <tensor_name> above.
20999 * The keys used in the mapping below must be pre-defined in ONNX spec.
21000 * For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as
21001 * quantization parameter keys.
21002 * </pre>
21003 *
21004 * <code>repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2;</code>
21005 */
21006 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
21007 getQuantParameterTensorNamesBuilderList() {
21008 return getQuantParameterTensorNamesFieldBuilder().getBuilderList();
21009 }
21010 private com.google.protobuf.RepeatedFieldBuilder<
21011 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
21012 getQuantParameterTensorNamesFieldBuilder() {
21013 if (quantParameterTensorNamesBuilder_ == null) {
21014 quantParameterTensorNamesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
21015 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
21016 quantParameterTensorNames_,
21017 ((bitField0_ & 0x00000002) != 0),
21018 getParentForChildren(),
21019 isClean());
21020 quantParameterTensorNames_ = null;
21021 }
21022 return quantParameterTensorNamesBuilder_;
21023 }
21024
21025 // @@protoc_insertion_point(builder_scope:onnx.TensorAnnotation)
21026 }
21027
21028 // @@protoc_insertion_point(class_scope:onnx.TensorAnnotation)
21029 private static final onnx.OnnxMl.TensorAnnotation DEFAULT_INSTANCE;
21030 static {
21031 DEFAULT_INSTANCE = new onnx.OnnxMl.TensorAnnotation();
21032 }
21033
21034 public static onnx.OnnxMl.TensorAnnotation getDefaultInstance() {
21035 return DEFAULT_INSTANCE;
21036 }
21037
21038 private static final com.google.protobuf.Parser<TensorAnnotation>
21039 PARSER = new com.google.protobuf.AbstractParser<TensorAnnotation>() {
21040 @java.lang.Override
21041 public TensorAnnotation parsePartialFrom(
21042 com.google.protobuf.CodedInputStream input,
21043 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
21044 throws com.google.protobuf.InvalidProtocolBufferException {
21045 Builder builder = newBuilder();
21046 try {
21047 builder.mergeFrom(input, extensionRegistry);
21048 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
21049 throw e.setUnfinishedMessage(builder.buildPartial());
21050 } catch (com.google.protobuf.UninitializedMessageException e) {
21051 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
21052 } catch (java.io.IOException e) {
21053 throw new com.google.protobuf.InvalidProtocolBufferException(e)
21054 .setUnfinishedMessage(builder.buildPartial());
21055 }
21056 return builder.buildPartial();
21057 }
21058 };
21059
21060 public static com.google.protobuf.Parser<TensorAnnotation> parser() {
21061 return PARSER;
21062 }
21063
21064 @java.lang.Override
21065 public com.google.protobuf.Parser<TensorAnnotation> getParserForType() {
21066 return PARSER;
21067 }
21068
21069 @java.lang.Override
21070 public onnx.OnnxMl.TensorAnnotation getDefaultInstanceForType() {
21071 return DEFAULT_INSTANCE;
21072 }
21073
21074 }
21075
21076 public interface GraphProtoOrBuilder extends
21077 // @@protoc_insertion_point(interface_extends:onnx.GraphProto)
21078 com.google.protobuf.MessageOrBuilder {
21079
21080 /**
21081 * <pre>
21082 * The nodes in the graph, sorted topologically.
21083 * </pre>
21084 *
21085 * <code>repeated .onnx.NodeProto node = 1;</code>
21086 */
21087 java.util.List<onnx.OnnxMl.NodeProto>
21088 getNodeList();
21089 /**
21090 * <pre>
21091 * The nodes in the graph, sorted topologically.
21092 * </pre>
21093 *
21094 * <code>repeated .onnx.NodeProto node = 1;</code>
21095 */
21096 onnx.OnnxMl.NodeProto getNode(int index);
21097 /**
21098 * <pre>
21099 * The nodes in the graph, sorted topologically.
21100 * </pre>
21101 *
21102 * <code>repeated .onnx.NodeProto node = 1;</code>
21103 */
21104 int getNodeCount();
21105 /**
21106 * <pre>
21107 * The nodes in the graph, sorted topologically.
21108 * </pre>
21109 *
21110 * <code>repeated .onnx.NodeProto node = 1;</code>
21111 */
21112 java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
21113 getNodeOrBuilderList();
21114 /**
21115 * <pre>
21116 * The nodes in the graph, sorted topologically.
21117 * </pre>
21118 *
21119 * <code>repeated .onnx.NodeProto node = 1;</code>
21120 */
21121 onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
21122 int index);
21123
21124 /**
21125 * <pre>
21126 * The name of the graph.
21127 * </pre>
21128 *
21129 * <code>optional string name = 2;</code>
21130 * @return Whether the name field is set.
21131 */
21132 boolean hasName();
21133 /**
21134 * <pre>
21135 * The name of the graph.
21136 * </pre>
21137 *
21138 * <code>optional string name = 2;</code>
21139 * @return The name.
21140 */
21141 java.lang.String getName();
21142 /**
21143 * <pre>
21144 * The name of the graph.
21145 * </pre>
21146 *
21147 * <code>optional string name = 2;</code>
21148 * @return The bytes for name.
21149 */
21150 com.google.protobuf.ByteString
21151 getNameBytes();
21152
21153 /**
21154 * <pre>
21155 * A list of named tensor values, used to specify constant inputs of the graph.
21156 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21157 * The name MUST be unique across both initializer and sparse_initializer,
21158 * but the name MAY also appear in the input list.
21159 * </pre>
21160 *
21161 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21162 */
21163 java.util.List<onnx.OnnxMl.TensorProto>
21164 getInitializerList();
21165 /**
21166 * <pre>
21167 * A list of named tensor values, used to specify constant inputs of the graph.
21168 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21169 * The name MUST be unique across both initializer and sparse_initializer,
21170 * but the name MAY also appear in the input list.
21171 * </pre>
21172 *
21173 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21174 */
21175 onnx.OnnxMl.TensorProto getInitializer(int index);
21176 /**
21177 * <pre>
21178 * A list of named tensor values, used to specify constant inputs of the graph.
21179 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21180 * The name MUST be unique across both initializer and sparse_initializer,
21181 * but the name MAY also appear in the input list.
21182 * </pre>
21183 *
21184 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21185 */
21186 int getInitializerCount();
21187 /**
21188 * <pre>
21189 * A list of named tensor values, used to specify constant inputs of the graph.
21190 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21191 * The name MUST be unique across both initializer and sparse_initializer,
21192 * but the name MAY also appear in the input list.
21193 * </pre>
21194 *
21195 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21196 */
21197 java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
21198 getInitializerOrBuilderList();
21199 /**
21200 * <pre>
21201 * A list of named tensor values, used to specify constant inputs of the graph.
21202 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21203 * The name MUST be unique across both initializer and sparse_initializer,
21204 * but the name MAY also appear in the input list.
21205 * </pre>
21206 *
21207 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21208 */
21209 onnx.OnnxMl.TensorProtoOrBuilder getInitializerOrBuilder(
21210 int index);
21211
21212 /**
21213 * <pre>
21214 * Initializers (see above) stored in sparse format.
21215 * </pre>
21216 *
21217 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21218 */
21219 java.util.List<onnx.OnnxMl.SparseTensorProto>
21220 getSparseInitializerList();
21221 /**
21222 * <pre>
21223 * Initializers (see above) stored in sparse format.
21224 * </pre>
21225 *
21226 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21227 */
21228 onnx.OnnxMl.SparseTensorProto getSparseInitializer(int index);
21229 /**
21230 * <pre>
21231 * Initializers (see above) stored in sparse format.
21232 * </pre>
21233 *
21234 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21235 */
21236 int getSparseInitializerCount();
21237 /**
21238 * <pre>
21239 * Initializers (see above) stored in sparse format.
21240 * </pre>
21241 *
21242 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21243 */
21244 java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
21245 getSparseInitializerOrBuilderList();
21246 /**
21247 * <pre>
21248 * Initializers (see above) stored in sparse format.
21249 * </pre>
21250 *
21251 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21252 */
21253 onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseInitializerOrBuilder(
21254 int index);
21255
21256 /**
21257 * <pre>
21258 * A human-readable documentation for this graph. Markdown is allowed.
21259 * </pre>
21260 *
21261 * <code>optional string doc_string = 10;</code>
21262 * @return Whether the docString field is set.
21263 */
21264 boolean hasDocString();
21265 /**
21266 * <pre>
21267 * A human-readable documentation for this graph. Markdown is allowed.
21268 * </pre>
21269 *
21270 * <code>optional string doc_string = 10;</code>
21271 * @return The docString.
21272 */
21273 java.lang.String getDocString();
21274 /**
21275 * <pre>
21276 * A human-readable documentation for this graph. Markdown is allowed.
21277 * </pre>
21278 *
21279 * <code>optional string doc_string = 10;</code>
21280 * @return The bytes for docString.
21281 */
21282 com.google.protobuf.ByteString
21283 getDocStringBytes();
21284
21285 /**
21286 * <pre>
21287 * The inputs and outputs of the graph.
21288 * </pre>
21289 *
21290 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21291 */
21292 java.util.List<onnx.OnnxMl.ValueInfoProto>
21293 getInputList();
21294 /**
21295 * <pre>
21296 * The inputs and outputs of the graph.
21297 * </pre>
21298 *
21299 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21300 */
21301 onnx.OnnxMl.ValueInfoProto getInput(int index);
21302 /**
21303 * <pre>
21304 * The inputs and outputs of the graph.
21305 * </pre>
21306 *
21307 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21308 */
21309 int getInputCount();
21310 /**
21311 * <pre>
21312 * The inputs and outputs of the graph.
21313 * </pre>
21314 *
21315 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21316 */
21317 java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
21318 getInputOrBuilderList();
21319 /**
21320 * <pre>
21321 * The inputs and outputs of the graph.
21322 * </pre>
21323 *
21324 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21325 */
21326 onnx.OnnxMl.ValueInfoProtoOrBuilder getInputOrBuilder(
21327 int index);
21328
21329 /**
21330 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21331 */
21332 java.util.List<onnx.OnnxMl.ValueInfoProto>
21333 getOutputList();
21334 /**
21335 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21336 */
21337 onnx.OnnxMl.ValueInfoProto getOutput(int index);
21338 /**
21339 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21340 */
21341 int getOutputCount();
21342 /**
21343 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21344 */
21345 java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
21346 getOutputOrBuilderList();
21347 /**
21348 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21349 */
21350 onnx.OnnxMl.ValueInfoProtoOrBuilder getOutputOrBuilder(
21351 int index);
21352
21353 /**
21354 * <pre>
21355 * Information for the values in the graph. The ValueInfoProto.name's
21356 * must be distinct. It is optional for a value to appear in value_info list.
21357 * </pre>
21358 *
21359 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21360 */
21361 java.util.List<onnx.OnnxMl.ValueInfoProto>
21362 getValueInfoList();
21363 /**
21364 * <pre>
21365 * Information for the values in the graph. The ValueInfoProto.name's
21366 * must be distinct. It is optional for a value to appear in value_info list.
21367 * </pre>
21368 *
21369 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21370 */
21371 onnx.OnnxMl.ValueInfoProto getValueInfo(int index);
21372 /**
21373 * <pre>
21374 * Information for the values in the graph. The ValueInfoProto.name's
21375 * must be distinct. It is optional for a value to appear in value_info list.
21376 * </pre>
21377 *
21378 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21379 */
21380 int getValueInfoCount();
21381 /**
21382 * <pre>
21383 * Information for the values in the graph. The ValueInfoProto.name's
21384 * must be distinct. It is optional for a value to appear in value_info list.
21385 * </pre>
21386 *
21387 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21388 */
21389 java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
21390 getValueInfoOrBuilderList();
21391 /**
21392 * <pre>
21393 * Information for the values in the graph. The ValueInfoProto.name's
21394 * must be distinct. It is optional for a value to appear in value_info list.
21395 * </pre>
21396 *
21397 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21398 */
21399 onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
21400 int index);
21401
21402 /**
21403 * <pre>
21404 * This field carries information to indicate the mapping among a tensor and its
21405 * quantization parameter tensors. For example:
21406 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
21407 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
21408 * </pre>
21409 *
21410 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
21411 */
21412 java.util.List<onnx.OnnxMl.TensorAnnotation>
21413 getQuantizationAnnotationList();
21414 /**
21415 * <pre>
21416 * This field carries information to indicate the mapping among a tensor and its
21417 * quantization parameter tensors. For example:
21418 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
21419 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
21420 * </pre>
21421 *
21422 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
21423 */
21424 onnx.OnnxMl.TensorAnnotation getQuantizationAnnotation(int index);
21425 /**
21426 * <pre>
21427 * This field carries information to indicate the mapping among a tensor and its
21428 * quantization parameter tensors. For example:
21429 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
21430 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
21431 * </pre>
21432 *
21433 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
21434 */
21435 int getQuantizationAnnotationCount();
21436 /**
21437 * <pre>
21438 * This field carries information to indicate the mapping among a tensor and its
21439 * quantization parameter tensors. For example:
21440 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
21441 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
21442 * </pre>
21443 *
21444 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
21445 */
21446 java.util.List<? extends onnx.OnnxMl.TensorAnnotationOrBuilder>
21447 getQuantizationAnnotationOrBuilderList();
21448 /**
21449 * <pre>
21450 * This field carries information to indicate the mapping among a tensor and its
21451 * quantization parameter tensors. For example:
21452 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
21453 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
21454 * </pre>
21455 *
21456 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
21457 */
21458 onnx.OnnxMl.TensorAnnotationOrBuilder getQuantizationAnnotationOrBuilder(
21459 int index);
21460
21461 /**
21462 * <pre>
21463 * Named metadata values; keys should be distinct.
21464 * </pre>
21465 *
21466 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
21467 */
21468 java.util.List<onnx.OnnxMl.StringStringEntryProto>
21469 getMetadataPropsList();
21470 /**
21471 * <pre>
21472 * Named metadata values; keys should be distinct.
21473 * </pre>
21474 *
21475 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
21476 */
21477 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
21478 /**
21479 * <pre>
21480 * Named metadata values; keys should be distinct.
21481 * </pre>
21482 *
21483 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
21484 */
21485 int getMetadataPropsCount();
21486 /**
21487 * <pre>
21488 * Named metadata values; keys should be distinct.
21489 * </pre>
21490 *
21491 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
21492 */
21493 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
21494 getMetadataPropsOrBuilderList();
21495 /**
21496 * <pre>
21497 * Named metadata values; keys should be distinct.
21498 * </pre>
21499 *
21500 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
21501 */
21502 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
21503 int index);
21504 }
21505 /**
21506 * <pre>
21507 * Graphs
21508 *
21509 * A graph defines the computational logic of a model and is comprised of a parameterized
21510 * list of nodes that form a directed acyclic graph based on their inputs and outputs.
21511 * This is the equivalent of the "network" or "graph" in many deep learning
21512 * frameworks.
21513 * </pre>
21514 *
21515 * Protobuf type {@code onnx.GraphProto}
21516 */
21517 public static final class GraphProto extends
21518 com.google.protobuf.GeneratedMessage implements
21519 // @@protoc_insertion_point(message_implements:onnx.GraphProto)
21520 GraphProtoOrBuilder {
21521 private static final long serialVersionUID = 0L;
21522 static {
21523 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21524 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
21525 /* major= */ 4,
21526 /* minor= */ 29,
21527 /* patch= */ 3,
21528 /* suffix= */ "",
21529 GraphProto.class.getName());
21530 }
21531 // Use GraphProto.newBuilder() to construct.
21532 private GraphProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
21533 super(builder);
21534 }
21535 private GraphProto() {
21536 node_ = java.util.Collections.emptyList();
21537 name_ = "";
21538 initializer_ = java.util.Collections.emptyList();
21539 sparseInitializer_ = java.util.Collections.emptyList();
21540 docString_ = "";
21541 input_ = java.util.Collections.emptyList();
21542 output_ = java.util.Collections.emptyList();
21543 valueInfo_ = java.util.Collections.emptyList();
21544 quantizationAnnotation_ = java.util.Collections.emptyList();
21545 metadataProps_ = java.util.Collections.emptyList();
21546 }
21547
21548 public static final com.google.protobuf.Descriptors.Descriptor
21549 getDescriptor() {
21550 return onnx.OnnxMl.internal_static_onnx_GraphProto_descriptor;
21551 }
21552
21553 @java.lang.Override
21554 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
21555 internalGetFieldAccessorTable() {
21556 return onnx.OnnxMl.internal_static_onnx_GraphProto_fieldAccessorTable
21557 .ensureFieldAccessorsInitialized(
21558 onnx.OnnxMl.GraphProto.class, onnx.OnnxMl.GraphProto.Builder.class);
21559 }
21560
21561 private int bitField0_;
21562 public static final int NODE_FIELD_NUMBER = 1;
21563 @SuppressWarnings("serial")
21564 private java.util.List<onnx.OnnxMl.NodeProto> node_;
21565 /**
21566 * <pre>
21567 * The nodes in the graph, sorted topologically.
21568 * </pre>
21569 *
21570 * <code>repeated .onnx.NodeProto node = 1;</code>
21571 */
21572 @java.lang.Override
21573 public java.util.List<onnx.OnnxMl.NodeProto> getNodeList() {
21574 return node_;
21575 }
21576 /**
21577 * <pre>
21578 * The nodes in the graph, sorted topologically.
21579 * </pre>
21580 *
21581 * <code>repeated .onnx.NodeProto node = 1;</code>
21582 */
21583 @java.lang.Override
21584 public java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
21585 getNodeOrBuilderList() {
21586 return node_;
21587 }
21588 /**
21589 * <pre>
21590 * The nodes in the graph, sorted topologically.
21591 * </pre>
21592 *
21593 * <code>repeated .onnx.NodeProto node = 1;</code>
21594 */
21595 @java.lang.Override
21596 public int getNodeCount() {
21597 return node_.size();
21598 }
21599 /**
21600 * <pre>
21601 * The nodes in the graph, sorted topologically.
21602 * </pre>
21603 *
21604 * <code>repeated .onnx.NodeProto node = 1;</code>
21605 */
21606 @java.lang.Override
21607 public onnx.OnnxMl.NodeProto getNode(int index) {
21608 return node_.get(index);
21609 }
21610 /**
21611 * <pre>
21612 * The nodes in the graph, sorted topologically.
21613 * </pre>
21614 *
21615 * <code>repeated .onnx.NodeProto node = 1;</code>
21616 */
21617 @java.lang.Override
21618 public onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
21619 int index) {
21620 return node_.get(index);
21621 }
21622
21623 public static final int NAME_FIELD_NUMBER = 2;
21624 @SuppressWarnings("serial")
21625 private volatile java.lang.Object name_ = "";
21626 /**
21627 * <pre>
21628 * The name of the graph.
21629 * </pre>
21630 *
21631 * <code>optional string name = 2;</code>
21632 * @return Whether the name field is set.
21633 */
21634 @java.lang.Override
21635 public boolean hasName() {
21636 return ((bitField0_ & 0x00000001) != 0);
21637 }
21638 /**
21639 * <pre>
21640 * The name of the graph.
21641 * </pre>
21642 *
21643 * <code>optional string name = 2;</code>
21644 * @return The name.
21645 */
21646 @java.lang.Override
21647 public java.lang.String getName() {
21648 java.lang.Object ref = name_;
21649 if (ref instanceof java.lang.String) {
21650 return (java.lang.String) ref;
21651 } else {
21652 com.google.protobuf.ByteString bs =
21653 (com.google.protobuf.ByteString) ref;
21654 java.lang.String s = bs.toStringUtf8();
21655 if (bs.isValidUtf8()) {
21656 name_ = s;
21657 }
21658 return s;
21659 }
21660 }
21661 /**
21662 * <pre>
21663 * The name of the graph.
21664 * </pre>
21665 *
21666 * <code>optional string name = 2;</code>
21667 * @return The bytes for name.
21668 */
21669 @java.lang.Override
21670 public com.google.protobuf.ByteString
21671 getNameBytes() {
21672 java.lang.Object ref = name_;
21673 if (ref instanceof java.lang.String) {
21674 com.google.protobuf.ByteString b =
21675 com.google.protobuf.ByteString.copyFromUtf8(
21676 (java.lang.String) ref);
21677 name_ = b;
21678 return b;
21679 } else {
21680 return (com.google.protobuf.ByteString) ref;
21681 }
21682 }
21683
21684 public static final int INITIALIZER_FIELD_NUMBER = 5;
21685 @SuppressWarnings("serial")
21686 private java.util.List<onnx.OnnxMl.TensorProto> initializer_;
21687 /**
21688 * <pre>
21689 * A list of named tensor values, used to specify constant inputs of the graph.
21690 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21691 * The name MUST be unique across both initializer and sparse_initializer,
21692 * but the name MAY also appear in the input list.
21693 * </pre>
21694 *
21695 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21696 */
21697 @java.lang.Override
21698 public java.util.List<onnx.OnnxMl.TensorProto> getInitializerList() {
21699 return initializer_;
21700 }
21701 /**
21702 * <pre>
21703 * A list of named tensor values, used to specify constant inputs of the graph.
21704 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21705 * The name MUST be unique across both initializer and sparse_initializer,
21706 * but the name MAY also appear in the input list.
21707 * </pre>
21708 *
21709 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21710 */
21711 @java.lang.Override
21712 public java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
21713 getInitializerOrBuilderList() {
21714 return initializer_;
21715 }
21716 /**
21717 * <pre>
21718 * A list of named tensor values, used to specify constant inputs of the graph.
21719 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21720 * The name MUST be unique across both initializer and sparse_initializer,
21721 * but the name MAY also appear in the input list.
21722 * </pre>
21723 *
21724 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21725 */
21726 @java.lang.Override
21727 public int getInitializerCount() {
21728 return initializer_.size();
21729 }
21730 /**
21731 * <pre>
21732 * A list of named tensor values, used to specify constant inputs of the graph.
21733 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21734 * The name MUST be unique across both initializer and sparse_initializer,
21735 * but the name MAY also appear in the input list.
21736 * </pre>
21737 *
21738 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21739 */
21740 @java.lang.Override
21741 public onnx.OnnxMl.TensorProto getInitializer(int index) {
21742 return initializer_.get(index);
21743 }
21744 /**
21745 * <pre>
21746 * A list of named tensor values, used to specify constant inputs of the graph.
21747 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
21748 * The name MUST be unique across both initializer and sparse_initializer,
21749 * but the name MAY also appear in the input list.
21750 * </pre>
21751 *
21752 * <code>repeated .onnx.TensorProto initializer = 5;</code>
21753 */
21754 @java.lang.Override
21755 public onnx.OnnxMl.TensorProtoOrBuilder getInitializerOrBuilder(
21756 int index) {
21757 return initializer_.get(index);
21758 }
21759
21760 public static final int SPARSE_INITIALIZER_FIELD_NUMBER = 15;
21761 @SuppressWarnings("serial")
21762 private java.util.List<onnx.OnnxMl.SparseTensorProto> sparseInitializer_;
21763 /**
21764 * <pre>
21765 * Initializers (see above) stored in sparse format.
21766 * </pre>
21767 *
21768 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21769 */
21770 @java.lang.Override
21771 public java.util.List<onnx.OnnxMl.SparseTensorProto> getSparseInitializerList() {
21772 return sparseInitializer_;
21773 }
21774 /**
21775 * <pre>
21776 * Initializers (see above) stored in sparse format.
21777 * </pre>
21778 *
21779 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21780 */
21781 @java.lang.Override
21782 public java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
21783 getSparseInitializerOrBuilderList() {
21784 return sparseInitializer_;
21785 }
21786 /**
21787 * <pre>
21788 * Initializers (see above) stored in sparse format.
21789 * </pre>
21790 *
21791 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21792 */
21793 @java.lang.Override
21794 public int getSparseInitializerCount() {
21795 return sparseInitializer_.size();
21796 }
21797 /**
21798 * <pre>
21799 * Initializers (see above) stored in sparse format.
21800 * </pre>
21801 *
21802 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21803 */
21804 @java.lang.Override
21805 public onnx.OnnxMl.SparseTensorProto getSparseInitializer(int index) {
21806 return sparseInitializer_.get(index);
21807 }
21808 /**
21809 * <pre>
21810 * Initializers (see above) stored in sparse format.
21811 * </pre>
21812 *
21813 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
21814 */
21815 @java.lang.Override
21816 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseInitializerOrBuilder(
21817 int index) {
21818 return sparseInitializer_.get(index);
21819 }
21820
21821 public static final int DOC_STRING_FIELD_NUMBER = 10;
21822 @SuppressWarnings("serial")
21823 private volatile java.lang.Object docString_ = "";
21824 /**
21825 * <pre>
21826 * A human-readable documentation for this graph. Markdown is allowed.
21827 * </pre>
21828 *
21829 * <code>optional string doc_string = 10;</code>
21830 * @return Whether the docString field is set.
21831 */
21832 @java.lang.Override
21833 public boolean hasDocString() {
21834 return ((bitField0_ & 0x00000002) != 0);
21835 }
21836 /**
21837 * <pre>
21838 * A human-readable documentation for this graph. Markdown is allowed.
21839 * </pre>
21840 *
21841 * <code>optional string doc_string = 10;</code>
21842 * @return The docString.
21843 */
21844 @java.lang.Override
21845 public java.lang.String getDocString() {
21846 java.lang.Object ref = docString_;
21847 if (ref instanceof java.lang.String) {
21848 return (java.lang.String) ref;
21849 } else {
21850 com.google.protobuf.ByteString bs =
21851 (com.google.protobuf.ByteString) ref;
21852 java.lang.String s = bs.toStringUtf8();
21853 if (bs.isValidUtf8()) {
21854 docString_ = s;
21855 }
21856 return s;
21857 }
21858 }
21859 /**
21860 * <pre>
21861 * A human-readable documentation for this graph. Markdown is allowed.
21862 * </pre>
21863 *
21864 * <code>optional string doc_string = 10;</code>
21865 * @return The bytes for docString.
21866 */
21867 @java.lang.Override
21868 public com.google.protobuf.ByteString
21869 getDocStringBytes() {
21870 java.lang.Object ref = docString_;
21871 if (ref instanceof java.lang.String) {
21872 com.google.protobuf.ByteString b =
21873 com.google.protobuf.ByteString.copyFromUtf8(
21874 (java.lang.String) ref);
21875 docString_ = b;
21876 return b;
21877 } else {
21878 return (com.google.protobuf.ByteString) ref;
21879 }
21880 }
21881
21882 public static final int INPUT_FIELD_NUMBER = 11;
21883 @SuppressWarnings("serial")
21884 private java.util.List<onnx.OnnxMl.ValueInfoProto> input_;
21885 /**
21886 * <pre>
21887 * The inputs and outputs of the graph.
21888 * </pre>
21889 *
21890 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21891 */
21892 @java.lang.Override
21893 public java.util.List<onnx.OnnxMl.ValueInfoProto> getInputList() {
21894 return input_;
21895 }
21896 /**
21897 * <pre>
21898 * The inputs and outputs of the graph.
21899 * </pre>
21900 *
21901 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21902 */
21903 @java.lang.Override
21904 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
21905 getInputOrBuilderList() {
21906 return input_;
21907 }
21908 /**
21909 * <pre>
21910 * The inputs and outputs of the graph.
21911 * </pre>
21912 *
21913 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21914 */
21915 @java.lang.Override
21916 public int getInputCount() {
21917 return input_.size();
21918 }
21919 /**
21920 * <pre>
21921 * The inputs and outputs of the graph.
21922 * </pre>
21923 *
21924 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21925 */
21926 @java.lang.Override
21927 public onnx.OnnxMl.ValueInfoProto getInput(int index) {
21928 return input_.get(index);
21929 }
21930 /**
21931 * <pre>
21932 * The inputs and outputs of the graph.
21933 * </pre>
21934 *
21935 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
21936 */
21937 @java.lang.Override
21938 public onnx.OnnxMl.ValueInfoProtoOrBuilder getInputOrBuilder(
21939 int index) {
21940 return input_.get(index);
21941 }
21942
21943 public static final int OUTPUT_FIELD_NUMBER = 12;
21944 @SuppressWarnings("serial")
21945 private java.util.List<onnx.OnnxMl.ValueInfoProto> output_;
21946 /**
21947 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21948 */
21949 @java.lang.Override
21950 public java.util.List<onnx.OnnxMl.ValueInfoProto> getOutputList() {
21951 return output_;
21952 }
21953 /**
21954 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21955 */
21956 @java.lang.Override
21957 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
21958 getOutputOrBuilderList() {
21959 return output_;
21960 }
21961 /**
21962 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21963 */
21964 @java.lang.Override
21965 public int getOutputCount() {
21966 return output_.size();
21967 }
21968 /**
21969 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21970 */
21971 @java.lang.Override
21972 public onnx.OnnxMl.ValueInfoProto getOutput(int index) {
21973 return output_.get(index);
21974 }
21975 /**
21976 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
21977 */
21978 @java.lang.Override
21979 public onnx.OnnxMl.ValueInfoProtoOrBuilder getOutputOrBuilder(
21980 int index) {
21981 return output_.get(index);
21982 }
21983
21984 public static final int VALUE_INFO_FIELD_NUMBER = 13;
21985 @SuppressWarnings("serial")
21986 private java.util.List<onnx.OnnxMl.ValueInfoProto> valueInfo_;
21987 /**
21988 * <pre>
21989 * Information for the values in the graph. The ValueInfoProto.name's
21990 * must be distinct. It is optional for a value to appear in value_info list.
21991 * </pre>
21992 *
21993 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
21994 */
21995 @java.lang.Override
21996 public java.util.List<onnx.OnnxMl.ValueInfoProto> getValueInfoList() {
21997 return valueInfo_;
21998 }
21999 /**
22000 * <pre>
22001 * Information for the values in the graph. The ValueInfoProto.name's
22002 * must be distinct. It is optional for a value to appear in value_info list.
22003 * </pre>
22004 *
22005 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
22006 */
22007 @java.lang.Override
22008 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
22009 getValueInfoOrBuilderList() {
22010 return valueInfo_;
22011 }
22012 /**
22013 * <pre>
22014 * Information for the values in the graph. The ValueInfoProto.name's
22015 * must be distinct. It is optional for a value to appear in value_info list.
22016 * </pre>
22017 *
22018 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
22019 */
22020 @java.lang.Override
22021 public int getValueInfoCount() {
22022 return valueInfo_.size();
22023 }
22024 /**
22025 * <pre>
22026 * Information for the values in the graph. The ValueInfoProto.name's
22027 * must be distinct. It is optional for a value to appear in value_info list.
22028 * </pre>
22029 *
22030 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
22031 */
22032 @java.lang.Override
22033 public onnx.OnnxMl.ValueInfoProto getValueInfo(int index) {
22034 return valueInfo_.get(index);
22035 }
22036 /**
22037 * <pre>
22038 * Information for the values in the graph. The ValueInfoProto.name's
22039 * must be distinct. It is optional for a value to appear in value_info list.
22040 * </pre>
22041 *
22042 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
22043 */
22044 @java.lang.Override
22045 public onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
22046 int index) {
22047 return valueInfo_.get(index);
22048 }
22049
22050 public static final int QUANTIZATION_ANNOTATION_FIELD_NUMBER = 14;
22051 @SuppressWarnings("serial")
22052 private java.util.List<onnx.OnnxMl.TensorAnnotation> quantizationAnnotation_;
22053 /**
22054 * <pre>
22055 * This field carries information to indicate the mapping among a tensor and its
22056 * quantization parameter tensors. For example:
22057 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
22058 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
22059 * </pre>
22060 *
22061 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
22062 */
22063 @java.lang.Override
22064 public java.util.List<onnx.OnnxMl.TensorAnnotation> getQuantizationAnnotationList() {
22065 return quantizationAnnotation_;
22066 }
22067 /**
22068 * <pre>
22069 * This field carries information to indicate the mapping among a tensor and its
22070 * quantization parameter tensors. For example:
22071 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
22072 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
22073 * </pre>
22074 *
22075 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
22076 */
22077 @java.lang.Override
22078 public java.util.List<? extends onnx.OnnxMl.TensorAnnotationOrBuilder>
22079 getQuantizationAnnotationOrBuilderList() {
22080 return quantizationAnnotation_;
22081 }
22082 /**
22083 * <pre>
22084 * This field carries information to indicate the mapping among a tensor and its
22085 * quantization parameter tensors. For example:
22086 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
22087 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
22088 * </pre>
22089 *
22090 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
22091 */
22092 @java.lang.Override
22093 public int getQuantizationAnnotationCount() {
22094 return quantizationAnnotation_.size();
22095 }
22096 /**
22097 * <pre>
22098 * This field carries information to indicate the mapping among a tensor and its
22099 * quantization parameter tensors. For example:
22100 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
22101 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
22102 * </pre>
22103 *
22104 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
22105 */
22106 @java.lang.Override
22107 public onnx.OnnxMl.TensorAnnotation getQuantizationAnnotation(int index) {
22108 return quantizationAnnotation_.get(index);
22109 }
22110 /**
22111 * <pre>
22112 * This field carries information to indicate the mapping among a tensor and its
22113 * quantization parameter tensors. For example:
22114 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
22115 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
22116 * </pre>
22117 *
22118 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
22119 */
22120 @java.lang.Override
22121 public onnx.OnnxMl.TensorAnnotationOrBuilder getQuantizationAnnotationOrBuilder(
22122 int index) {
22123 return quantizationAnnotation_.get(index);
22124 }
22125
22126 public static final int METADATA_PROPS_FIELD_NUMBER = 16;
22127 @SuppressWarnings("serial")
22128 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
22129 /**
22130 * <pre>
22131 * Named metadata values; keys should be distinct.
22132 * </pre>
22133 *
22134 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
22135 */
22136 @java.lang.Override
22137 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
22138 return metadataProps_;
22139 }
22140 /**
22141 * <pre>
22142 * Named metadata values; keys should be distinct.
22143 * </pre>
22144 *
22145 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
22146 */
22147 @java.lang.Override
22148 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
22149 getMetadataPropsOrBuilderList() {
22150 return metadataProps_;
22151 }
22152 /**
22153 * <pre>
22154 * Named metadata values; keys should be distinct.
22155 * </pre>
22156 *
22157 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
22158 */
22159 @java.lang.Override
22160 public int getMetadataPropsCount() {
22161 return metadataProps_.size();
22162 }
22163 /**
22164 * <pre>
22165 * Named metadata values; keys should be distinct.
22166 * </pre>
22167 *
22168 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
22169 */
22170 @java.lang.Override
22171 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
22172 return metadataProps_.get(index);
22173 }
22174 /**
22175 * <pre>
22176 * Named metadata values; keys should be distinct.
22177 * </pre>
22178 *
22179 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
22180 */
22181 @java.lang.Override
22182 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
22183 int index) {
22184 return metadataProps_.get(index);
22185 }
22186
22187 private byte memoizedIsInitialized = -1;
22188 @java.lang.Override
22189 public final boolean isInitialized() {
22190 byte isInitialized = memoizedIsInitialized;
22191 if (isInitialized == 1) return true;
22192 if (isInitialized == 0) return false;
22193
22194 memoizedIsInitialized = 1;
22195 return true;
22196 }
22197
22198 @java.lang.Override
22199 public void writeTo(com.google.protobuf.CodedOutputStream output)
22200 throws java.io.IOException {
22201 for (int i = 0; i < node_.size(); i++) {
22202 output.writeMessage(1, node_.get(i));
22203 }
22204 if (((bitField0_ & 0x00000001) != 0)) {
22205 com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
22206 }
22207 for (int i = 0; i < initializer_.size(); i++) {
22208 output.writeMessage(5, initializer_.get(i));
22209 }
22210 if (((bitField0_ & 0x00000002) != 0)) {
22211 com.google.protobuf.GeneratedMessage.writeString(output, 10, docString_);
22212 }
22213 for (int i = 0; i < input_.size(); i++) {
22214 output.writeMessage(11, input_.get(i));
22215 }
22216 for (int i = 0; i < output_.size(); i++) {
22217 output.writeMessage(12, output_.get(i));
22218 }
22219 for (int i = 0; i < valueInfo_.size(); i++) {
22220 output.writeMessage(13, valueInfo_.get(i));
22221 }
22222 for (int i = 0; i < quantizationAnnotation_.size(); i++) {
22223 output.writeMessage(14, quantizationAnnotation_.get(i));
22224 }
22225 for (int i = 0; i < sparseInitializer_.size(); i++) {
22226 output.writeMessage(15, sparseInitializer_.get(i));
22227 }
22228 for (int i = 0; i < metadataProps_.size(); i++) {
22229 output.writeMessage(16, metadataProps_.get(i));
22230 }
22231 getUnknownFields().writeTo(output);
22232 }
22233
22234 @java.lang.Override
22235 public int getSerializedSize() {
22236 int size = memoizedSize;
22237 if (size != -1) return size;
22238
22239 size = 0;
22240 for (int i = 0; i < node_.size(); i++) {
22241 size += com.google.protobuf.CodedOutputStream
22242 .computeMessageSize(1, node_.get(i));
22243 }
22244 if (((bitField0_ & 0x00000001) != 0)) {
22245 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
22246 }
22247 for (int i = 0; i < initializer_.size(); i++) {
22248 size += com.google.protobuf.CodedOutputStream
22249 .computeMessageSize(5, initializer_.get(i));
22250 }
22251 if (((bitField0_ & 0x00000002) != 0)) {
22252 size += com.google.protobuf.GeneratedMessage.computeStringSize(10, docString_);
22253 }
22254 for (int i = 0; i < input_.size(); i++) {
22255 size += com.google.protobuf.CodedOutputStream
22256 .computeMessageSize(11, input_.get(i));
22257 }
22258 for (int i = 0; i < output_.size(); i++) {
22259 size += com.google.protobuf.CodedOutputStream
22260 .computeMessageSize(12, output_.get(i));
22261 }
22262 for (int i = 0; i < valueInfo_.size(); i++) {
22263 size += com.google.protobuf.CodedOutputStream
22264 .computeMessageSize(13, valueInfo_.get(i));
22265 }
22266 for (int i = 0; i < quantizationAnnotation_.size(); i++) {
22267 size += com.google.protobuf.CodedOutputStream
22268 .computeMessageSize(14, quantizationAnnotation_.get(i));
22269 }
22270 for (int i = 0; i < sparseInitializer_.size(); i++) {
22271 size += com.google.protobuf.CodedOutputStream
22272 .computeMessageSize(15, sparseInitializer_.get(i));
22273 }
22274 for (int i = 0; i < metadataProps_.size(); i++) {
22275 size += com.google.protobuf.CodedOutputStream
22276 .computeMessageSize(16, metadataProps_.get(i));
22277 }
22278 size += getUnknownFields().getSerializedSize();
22279 memoizedSize = size;
22280 return size;
22281 }
22282
22283 @java.lang.Override
22284 public boolean equals(final java.lang.Object obj) {
22285 if (obj == this) {
22286 return true;
22287 }
22288 if (!(obj instanceof onnx.OnnxMl.GraphProto)) {
22289 return super.equals(obj);
22290 }
22291 onnx.OnnxMl.GraphProto other = (onnx.OnnxMl.GraphProto) obj;
22292
22293 if (!getNodeList()
22294 .equals(other.getNodeList())) return false;
22295 if (hasName() != other.hasName()) return false;
22296 if (hasName()) {
22297 if (!getName()
22298 .equals(other.getName())) return false;
22299 }
22300 if (!getInitializerList()
22301 .equals(other.getInitializerList())) return false;
22302 if (!getSparseInitializerList()
22303 .equals(other.getSparseInitializerList())) return false;
22304 if (hasDocString() != other.hasDocString()) return false;
22305 if (hasDocString()) {
22306 if (!getDocString()
22307 .equals(other.getDocString())) return false;
22308 }
22309 if (!getInputList()
22310 .equals(other.getInputList())) return false;
22311 if (!getOutputList()
22312 .equals(other.getOutputList())) return false;
22313 if (!getValueInfoList()
22314 .equals(other.getValueInfoList())) return false;
22315 if (!getQuantizationAnnotationList()
22316 .equals(other.getQuantizationAnnotationList())) return false;
22317 if (!getMetadataPropsList()
22318 .equals(other.getMetadataPropsList())) return false;
22319 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
22320 return true;
22321 }
22322
22323 @java.lang.Override
22324 public int hashCode() {
22325 if (memoizedHashCode != 0) {
22326 return memoizedHashCode;
22327 }
22328 int hash = 41;
22329 hash = (19 * hash) + getDescriptor().hashCode();
22330 if (getNodeCount() > 0) {
22331 hash = (37 * hash) + NODE_FIELD_NUMBER;
22332 hash = (53 * hash) + getNodeList().hashCode();
22333 }
22334 if (hasName()) {
22335 hash = (37 * hash) + NAME_FIELD_NUMBER;
22336 hash = (53 * hash) + getName().hashCode();
22337 }
22338 if (getInitializerCount() > 0) {
22339 hash = (37 * hash) + INITIALIZER_FIELD_NUMBER;
22340 hash = (53 * hash) + getInitializerList().hashCode();
22341 }
22342 if (getSparseInitializerCount() > 0) {
22343 hash = (37 * hash) + SPARSE_INITIALIZER_FIELD_NUMBER;
22344 hash = (53 * hash) + getSparseInitializerList().hashCode();
22345 }
22346 if (hasDocString()) {
22347 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
22348 hash = (53 * hash) + getDocString().hashCode();
22349 }
22350 if (getInputCount() > 0) {
22351 hash = (37 * hash) + INPUT_FIELD_NUMBER;
22352 hash = (53 * hash) + getInputList().hashCode();
22353 }
22354 if (getOutputCount() > 0) {
22355 hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
22356 hash = (53 * hash) + getOutputList().hashCode();
22357 }
22358 if (getValueInfoCount() > 0) {
22359 hash = (37 * hash) + VALUE_INFO_FIELD_NUMBER;
22360 hash = (53 * hash) + getValueInfoList().hashCode();
22361 }
22362 if (getQuantizationAnnotationCount() > 0) {
22363 hash = (37 * hash) + QUANTIZATION_ANNOTATION_FIELD_NUMBER;
22364 hash = (53 * hash) + getQuantizationAnnotationList().hashCode();
22365 }
22366 if (getMetadataPropsCount() > 0) {
22367 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
22368 hash = (53 * hash) + getMetadataPropsList().hashCode();
22369 }
22370 hash = (29 * hash) + getUnknownFields().hashCode();
22371 memoizedHashCode = hash;
22372 return hash;
22373 }
22374
22375 public static onnx.OnnxMl.GraphProto parseFrom(
22376 java.nio.ByteBuffer data)
22377 throws com.google.protobuf.InvalidProtocolBufferException {
22378 return PARSER.parseFrom(data);
22379 }
22380 public static onnx.OnnxMl.GraphProto parseFrom(
22381 java.nio.ByteBuffer data,
22382 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22383 throws com.google.protobuf.InvalidProtocolBufferException {
22384 return PARSER.parseFrom(data, extensionRegistry);
22385 }
22386 public static onnx.OnnxMl.GraphProto parseFrom(
22387 com.google.protobuf.ByteString data)
22388 throws com.google.protobuf.InvalidProtocolBufferException {
22389 return PARSER.parseFrom(data);
22390 }
22391 public static onnx.OnnxMl.GraphProto parseFrom(
22392 com.google.protobuf.ByteString data,
22393 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22394 throws com.google.protobuf.InvalidProtocolBufferException {
22395 return PARSER.parseFrom(data, extensionRegistry);
22396 }
22397 public static onnx.OnnxMl.GraphProto parseFrom(byte[] data)
22398 throws com.google.protobuf.InvalidProtocolBufferException {
22399 return PARSER.parseFrom(data);
22400 }
22401 public static onnx.OnnxMl.GraphProto parseFrom(
22402 byte[] data,
22403 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22404 throws com.google.protobuf.InvalidProtocolBufferException {
22405 return PARSER.parseFrom(data, extensionRegistry);
22406 }
22407 public static onnx.OnnxMl.GraphProto parseFrom(java.io.InputStream input)
22408 throws java.io.IOException {
22409 return com.google.protobuf.GeneratedMessage
22410 .parseWithIOException(PARSER, input);
22411 }
22412 public static onnx.OnnxMl.GraphProto parseFrom(
22413 java.io.InputStream input,
22414 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22415 throws java.io.IOException {
22416 return com.google.protobuf.GeneratedMessage
22417 .parseWithIOException(PARSER, input, extensionRegistry);
22418 }
22419
22420 public static onnx.OnnxMl.GraphProto parseDelimitedFrom(java.io.InputStream input)
22421 throws java.io.IOException {
22422 return com.google.protobuf.GeneratedMessage
22423 .parseDelimitedWithIOException(PARSER, input);
22424 }
22425
22426 public static onnx.OnnxMl.GraphProto parseDelimitedFrom(
22427 java.io.InputStream input,
22428 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22429 throws java.io.IOException {
22430 return com.google.protobuf.GeneratedMessage
22431 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
22432 }
22433 public static onnx.OnnxMl.GraphProto parseFrom(
22434 com.google.protobuf.CodedInputStream input)
22435 throws java.io.IOException {
22436 return com.google.protobuf.GeneratedMessage
22437 .parseWithIOException(PARSER, input);
22438 }
22439 public static onnx.OnnxMl.GraphProto parseFrom(
22440 com.google.protobuf.CodedInputStream input,
22441 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22442 throws java.io.IOException {
22443 return com.google.protobuf.GeneratedMessage
22444 .parseWithIOException(PARSER, input, extensionRegistry);
22445 }
22446
22447 @java.lang.Override
22448 public Builder newBuilderForType() { return newBuilder(); }
22449 public static Builder newBuilder() {
22450 return DEFAULT_INSTANCE.toBuilder();
22451 }
22452 public static Builder newBuilder(onnx.OnnxMl.GraphProto prototype) {
22453 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
22454 }
22455 @java.lang.Override
22456 public Builder toBuilder() {
22457 return this == DEFAULT_INSTANCE
22458 ? new Builder() : new Builder().mergeFrom(this);
22459 }
22460
22461 @java.lang.Override
22462 protected Builder newBuilderForType(
22463 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
22464 Builder builder = new Builder(parent);
22465 return builder;
22466 }
22467 /**
22468 * <pre>
22469 * Graphs
22470 *
22471 * A graph defines the computational logic of a model and is comprised of a parameterized
22472 * list of nodes that form a directed acyclic graph based on their inputs and outputs.
22473 * This is the equivalent of the "network" or "graph" in many deep learning
22474 * frameworks.
22475 * </pre>
22476 *
22477 * Protobuf type {@code onnx.GraphProto}
22478 */
22479 public static final class Builder extends
22480 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
22481 // @@protoc_insertion_point(builder_implements:onnx.GraphProto)
22482 onnx.OnnxMl.GraphProtoOrBuilder {
22483 public static final com.google.protobuf.Descriptors.Descriptor
22484 getDescriptor() {
22485 return onnx.OnnxMl.internal_static_onnx_GraphProto_descriptor;
22486 }
22487
22488 @java.lang.Override
22489 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
22490 internalGetFieldAccessorTable() {
22491 return onnx.OnnxMl.internal_static_onnx_GraphProto_fieldAccessorTable
22492 .ensureFieldAccessorsInitialized(
22493 onnx.OnnxMl.GraphProto.class, onnx.OnnxMl.GraphProto.Builder.class);
22494 }
22495
22496 // Construct using onnx.OnnxMl.GraphProto.newBuilder()
22497 private Builder() {
22498
22499 }
22500
22501 private Builder(
22502 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
22503 super(parent);
22504
22505 }
22506 @java.lang.Override
22507 public Builder clear() {
22508 super.clear();
22509 bitField0_ = 0;
22510 if (nodeBuilder_ == null) {
22511 node_ = java.util.Collections.emptyList();
22512 } else {
22513 node_ = null;
22514 nodeBuilder_.clear();
22515 }
22516 bitField0_ = (bitField0_ & ~0x00000001);
22517 name_ = "";
22518 if (initializerBuilder_ == null) {
22519 initializer_ = java.util.Collections.emptyList();
22520 } else {
22521 initializer_ = null;
22522 initializerBuilder_.clear();
22523 }
22524 bitField0_ = (bitField0_ & ~0x00000004);
22525 if (sparseInitializerBuilder_ == null) {
22526 sparseInitializer_ = java.util.Collections.emptyList();
22527 } else {
22528 sparseInitializer_ = null;
22529 sparseInitializerBuilder_.clear();
22530 }
22531 bitField0_ = (bitField0_ & ~0x00000008);
22532 docString_ = "";
22533 if (inputBuilder_ == null) {
22534 input_ = java.util.Collections.emptyList();
22535 } else {
22536 input_ = null;
22537 inputBuilder_.clear();
22538 }
22539 bitField0_ = (bitField0_ & ~0x00000020);
22540 if (outputBuilder_ == null) {
22541 output_ = java.util.Collections.emptyList();
22542 } else {
22543 output_ = null;
22544 outputBuilder_.clear();
22545 }
22546 bitField0_ = (bitField0_ & ~0x00000040);
22547 if (valueInfoBuilder_ == null) {
22548 valueInfo_ = java.util.Collections.emptyList();
22549 } else {
22550 valueInfo_ = null;
22551 valueInfoBuilder_.clear();
22552 }
22553 bitField0_ = (bitField0_ & ~0x00000080);
22554 if (quantizationAnnotationBuilder_ == null) {
22555 quantizationAnnotation_ = java.util.Collections.emptyList();
22556 } else {
22557 quantizationAnnotation_ = null;
22558 quantizationAnnotationBuilder_.clear();
22559 }
22560 bitField0_ = (bitField0_ & ~0x00000100);
22561 if (metadataPropsBuilder_ == null) {
22562 metadataProps_ = java.util.Collections.emptyList();
22563 } else {
22564 metadataProps_ = null;
22565 metadataPropsBuilder_.clear();
22566 }
22567 bitField0_ = (bitField0_ & ~0x00000200);
22568 return this;
22569 }
22570
22571 @java.lang.Override
22572 public com.google.protobuf.Descriptors.Descriptor
22573 getDescriptorForType() {
22574 return onnx.OnnxMl.internal_static_onnx_GraphProto_descriptor;
22575 }
22576
22577 @java.lang.Override
22578 public onnx.OnnxMl.GraphProto getDefaultInstanceForType() {
22579 return onnx.OnnxMl.GraphProto.getDefaultInstance();
22580 }
22581
22582 @java.lang.Override
22583 public onnx.OnnxMl.GraphProto build() {
22584 onnx.OnnxMl.GraphProto result = buildPartial();
22585 if (!result.isInitialized()) {
22586 throw newUninitializedMessageException(result);
22587 }
22588 return result;
22589 }
22590
22591 @java.lang.Override
22592 public onnx.OnnxMl.GraphProto buildPartial() {
22593 onnx.OnnxMl.GraphProto result = new onnx.OnnxMl.GraphProto(this);
22594 buildPartialRepeatedFields(result);
22595 if (bitField0_ != 0) { buildPartial0(result); }
22596 onBuilt();
22597 return result;
22598 }
22599
22600 private void buildPartialRepeatedFields(onnx.OnnxMl.GraphProto result) {
22601 if (nodeBuilder_ == null) {
22602 if (((bitField0_ & 0x00000001) != 0)) {
22603 node_ = java.util.Collections.unmodifiableList(node_);
22604 bitField0_ = (bitField0_ & ~0x00000001);
22605 }
22606 result.node_ = node_;
22607 } else {
22608 result.node_ = nodeBuilder_.build();
22609 }
22610 if (initializerBuilder_ == null) {
22611 if (((bitField0_ & 0x00000004) != 0)) {
22612 initializer_ = java.util.Collections.unmodifiableList(initializer_);
22613 bitField0_ = (bitField0_ & ~0x00000004);
22614 }
22615 result.initializer_ = initializer_;
22616 } else {
22617 result.initializer_ = initializerBuilder_.build();
22618 }
22619 if (sparseInitializerBuilder_ == null) {
22620 if (((bitField0_ & 0x00000008) != 0)) {
22621 sparseInitializer_ = java.util.Collections.unmodifiableList(sparseInitializer_);
22622 bitField0_ = (bitField0_ & ~0x00000008);
22623 }
22624 result.sparseInitializer_ = sparseInitializer_;
22625 } else {
22626 result.sparseInitializer_ = sparseInitializerBuilder_.build();
22627 }
22628 if (inputBuilder_ == null) {
22629 if (((bitField0_ & 0x00000020) != 0)) {
22630 input_ = java.util.Collections.unmodifiableList(input_);
22631 bitField0_ = (bitField0_ & ~0x00000020);
22632 }
22633 result.input_ = input_;
22634 } else {
22635 result.input_ = inputBuilder_.build();
22636 }
22637 if (outputBuilder_ == null) {
22638 if (((bitField0_ & 0x00000040) != 0)) {
22639 output_ = java.util.Collections.unmodifiableList(output_);
22640 bitField0_ = (bitField0_ & ~0x00000040);
22641 }
22642 result.output_ = output_;
22643 } else {
22644 result.output_ = outputBuilder_.build();
22645 }
22646 if (valueInfoBuilder_ == null) {
22647 if (((bitField0_ & 0x00000080) != 0)) {
22648 valueInfo_ = java.util.Collections.unmodifiableList(valueInfo_);
22649 bitField0_ = (bitField0_ & ~0x00000080);
22650 }
22651 result.valueInfo_ = valueInfo_;
22652 } else {
22653 result.valueInfo_ = valueInfoBuilder_.build();
22654 }
22655 if (quantizationAnnotationBuilder_ == null) {
22656 if (((bitField0_ & 0x00000100) != 0)) {
22657 quantizationAnnotation_ = java.util.Collections.unmodifiableList(quantizationAnnotation_);
22658 bitField0_ = (bitField0_ & ~0x00000100);
22659 }
22660 result.quantizationAnnotation_ = quantizationAnnotation_;
22661 } else {
22662 result.quantizationAnnotation_ = quantizationAnnotationBuilder_.build();
22663 }
22664 if (metadataPropsBuilder_ == null) {
22665 if (((bitField0_ & 0x00000200) != 0)) {
22666 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
22667 bitField0_ = (bitField0_ & ~0x00000200);
22668 }
22669 result.metadataProps_ = metadataProps_;
22670 } else {
22671 result.metadataProps_ = metadataPropsBuilder_.build();
22672 }
22673 }
22674
22675 private void buildPartial0(onnx.OnnxMl.GraphProto result) {
22676 int from_bitField0_ = bitField0_;
22677 int to_bitField0_ = 0;
22678 if (((from_bitField0_ & 0x00000002) != 0)) {
22679 result.name_ = name_;
22680 to_bitField0_ |= 0x00000001;
22681 }
22682 if (((from_bitField0_ & 0x00000010) != 0)) {
22683 result.docString_ = docString_;
22684 to_bitField0_ |= 0x00000002;
22685 }
22686 result.bitField0_ |= to_bitField0_;
22687 }
22688
22689 @java.lang.Override
22690 public Builder mergeFrom(com.google.protobuf.Message other) {
22691 if (other instanceof onnx.OnnxMl.GraphProto) {
22692 return mergeFrom((onnx.OnnxMl.GraphProto)other);
22693 } else {
22694 super.mergeFrom(other);
22695 return this;
22696 }
22697 }
22698
22699 public Builder mergeFrom(onnx.OnnxMl.GraphProto other) {
22700 if (other == onnx.OnnxMl.GraphProto.getDefaultInstance()) return this;
22701 if (nodeBuilder_ == null) {
22702 if (!other.node_.isEmpty()) {
22703 if (node_.isEmpty()) {
22704 node_ = other.node_;
22705 bitField0_ = (bitField0_ & ~0x00000001);
22706 } else {
22707 ensureNodeIsMutable();
22708 node_.addAll(other.node_);
22709 }
22710 onChanged();
22711 }
22712 } else {
22713 if (!other.node_.isEmpty()) {
22714 if (nodeBuilder_.isEmpty()) {
22715 nodeBuilder_.dispose();
22716 nodeBuilder_ = null;
22717 node_ = other.node_;
22718 bitField0_ = (bitField0_ & ~0x00000001);
22719 nodeBuilder_ =
22720 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22721 getNodeFieldBuilder() : null;
22722 } else {
22723 nodeBuilder_.addAllMessages(other.node_);
22724 }
22725 }
22726 }
22727 if (other.hasName()) {
22728 name_ = other.name_;
22729 bitField0_ |= 0x00000002;
22730 onChanged();
22731 }
22732 if (initializerBuilder_ == null) {
22733 if (!other.initializer_.isEmpty()) {
22734 if (initializer_.isEmpty()) {
22735 initializer_ = other.initializer_;
22736 bitField0_ = (bitField0_ & ~0x00000004);
22737 } else {
22738 ensureInitializerIsMutable();
22739 initializer_.addAll(other.initializer_);
22740 }
22741 onChanged();
22742 }
22743 } else {
22744 if (!other.initializer_.isEmpty()) {
22745 if (initializerBuilder_.isEmpty()) {
22746 initializerBuilder_.dispose();
22747 initializerBuilder_ = null;
22748 initializer_ = other.initializer_;
22749 bitField0_ = (bitField0_ & ~0x00000004);
22750 initializerBuilder_ =
22751 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22752 getInitializerFieldBuilder() : null;
22753 } else {
22754 initializerBuilder_.addAllMessages(other.initializer_);
22755 }
22756 }
22757 }
22758 if (sparseInitializerBuilder_ == null) {
22759 if (!other.sparseInitializer_.isEmpty()) {
22760 if (sparseInitializer_.isEmpty()) {
22761 sparseInitializer_ = other.sparseInitializer_;
22762 bitField0_ = (bitField0_ & ~0x00000008);
22763 } else {
22764 ensureSparseInitializerIsMutable();
22765 sparseInitializer_.addAll(other.sparseInitializer_);
22766 }
22767 onChanged();
22768 }
22769 } else {
22770 if (!other.sparseInitializer_.isEmpty()) {
22771 if (sparseInitializerBuilder_.isEmpty()) {
22772 sparseInitializerBuilder_.dispose();
22773 sparseInitializerBuilder_ = null;
22774 sparseInitializer_ = other.sparseInitializer_;
22775 bitField0_ = (bitField0_ & ~0x00000008);
22776 sparseInitializerBuilder_ =
22777 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22778 getSparseInitializerFieldBuilder() : null;
22779 } else {
22780 sparseInitializerBuilder_.addAllMessages(other.sparseInitializer_);
22781 }
22782 }
22783 }
22784 if (other.hasDocString()) {
22785 docString_ = other.docString_;
22786 bitField0_ |= 0x00000010;
22787 onChanged();
22788 }
22789 if (inputBuilder_ == null) {
22790 if (!other.input_.isEmpty()) {
22791 if (input_.isEmpty()) {
22792 input_ = other.input_;
22793 bitField0_ = (bitField0_ & ~0x00000020);
22794 } else {
22795 ensureInputIsMutable();
22796 input_.addAll(other.input_);
22797 }
22798 onChanged();
22799 }
22800 } else {
22801 if (!other.input_.isEmpty()) {
22802 if (inputBuilder_.isEmpty()) {
22803 inputBuilder_.dispose();
22804 inputBuilder_ = null;
22805 input_ = other.input_;
22806 bitField0_ = (bitField0_ & ~0x00000020);
22807 inputBuilder_ =
22808 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22809 getInputFieldBuilder() : null;
22810 } else {
22811 inputBuilder_.addAllMessages(other.input_);
22812 }
22813 }
22814 }
22815 if (outputBuilder_ == null) {
22816 if (!other.output_.isEmpty()) {
22817 if (output_.isEmpty()) {
22818 output_ = other.output_;
22819 bitField0_ = (bitField0_ & ~0x00000040);
22820 } else {
22821 ensureOutputIsMutable();
22822 output_.addAll(other.output_);
22823 }
22824 onChanged();
22825 }
22826 } else {
22827 if (!other.output_.isEmpty()) {
22828 if (outputBuilder_.isEmpty()) {
22829 outputBuilder_.dispose();
22830 outputBuilder_ = null;
22831 output_ = other.output_;
22832 bitField0_ = (bitField0_ & ~0x00000040);
22833 outputBuilder_ =
22834 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22835 getOutputFieldBuilder() : null;
22836 } else {
22837 outputBuilder_.addAllMessages(other.output_);
22838 }
22839 }
22840 }
22841 if (valueInfoBuilder_ == null) {
22842 if (!other.valueInfo_.isEmpty()) {
22843 if (valueInfo_.isEmpty()) {
22844 valueInfo_ = other.valueInfo_;
22845 bitField0_ = (bitField0_ & ~0x00000080);
22846 } else {
22847 ensureValueInfoIsMutable();
22848 valueInfo_.addAll(other.valueInfo_);
22849 }
22850 onChanged();
22851 }
22852 } else {
22853 if (!other.valueInfo_.isEmpty()) {
22854 if (valueInfoBuilder_.isEmpty()) {
22855 valueInfoBuilder_.dispose();
22856 valueInfoBuilder_ = null;
22857 valueInfo_ = other.valueInfo_;
22858 bitField0_ = (bitField0_ & ~0x00000080);
22859 valueInfoBuilder_ =
22860 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22861 getValueInfoFieldBuilder() : null;
22862 } else {
22863 valueInfoBuilder_.addAllMessages(other.valueInfo_);
22864 }
22865 }
22866 }
22867 if (quantizationAnnotationBuilder_ == null) {
22868 if (!other.quantizationAnnotation_.isEmpty()) {
22869 if (quantizationAnnotation_.isEmpty()) {
22870 quantizationAnnotation_ = other.quantizationAnnotation_;
22871 bitField0_ = (bitField0_ & ~0x00000100);
22872 } else {
22873 ensureQuantizationAnnotationIsMutable();
22874 quantizationAnnotation_.addAll(other.quantizationAnnotation_);
22875 }
22876 onChanged();
22877 }
22878 } else {
22879 if (!other.quantizationAnnotation_.isEmpty()) {
22880 if (quantizationAnnotationBuilder_.isEmpty()) {
22881 quantizationAnnotationBuilder_.dispose();
22882 quantizationAnnotationBuilder_ = null;
22883 quantizationAnnotation_ = other.quantizationAnnotation_;
22884 bitField0_ = (bitField0_ & ~0x00000100);
22885 quantizationAnnotationBuilder_ =
22886 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22887 getQuantizationAnnotationFieldBuilder() : null;
22888 } else {
22889 quantizationAnnotationBuilder_.addAllMessages(other.quantizationAnnotation_);
22890 }
22891 }
22892 }
22893 if (metadataPropsBuilder_ == null) {
22894 if (!other.metadataProps_.isEmpty()) {
22895 if (metadataProps_.isEmpty()) {
22896 metadataProps_ = other.metadataProps_;
22897 bitField0_ = (bitField0_ & ~0x00000200);
22898 } else {
22899 ensureMetadataPropsIsMutable();
22900 metadataProps_.addAll(other.metadataProps_);
22901 }
22902 onChanged();
22903 }
22904 } else {
22905 if (!other.metadataProps_.isEmpty()) {
22906 if (metadataPropsBuilder_.isEmpty()) {
22907 metadataPropsBuilder_.dispose();
22908 metadataPropsBuilder_ = null;
22909 metadataProps_ = other.metadataProps_;
22910 bitField0_ = (bitField0_ & ~0x00000200);
22911 metadataPropsBuilder_ =
22912 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
22913 getMetadataPropsFieldBuilder() : null;
22914 } else {
22915 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
22916 }
22917 }
22918 }
22919 this.mergeUnknownFields(other.getUnknownFields());
22920 onChanged();
22921 return this;
22922 }
22923
22924 @java.lang.Override
22925 public final boolean isInitialized() {
22926 return true;
22927 }
22928
22929 @java.lang.Override
22930 public Builder mergeFrom(
22931 com.google.protobuf.CodedInputStream input,
22932 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
22933 throws java.io.IOException {
22934 if (extensionRegistry == null) {
22935 throw new java.lang.NullPointerException();
22936 }
22937 try {
22938 boolean done = false;
22939 while (!done) {
22940 int tag = input.readTag();
22941 switch (tag) {
22942 case 0:
22943 done = true;
22944 break;
22945 case 10: {
22946 onnx.OnnxMl.NodeProto m =
22947 input.readMessage(
22948 onnx.OnnxMl.NodeProto.parser(),
22949 extensionRegistry);
22950 if (nodeBuilder_ == null) {
22951 ensureNodeIsMutable();
22952 node_.add(m);
22953 } else {
22954 nodeBuilder_.addMessage(m);
22955 }
22956 break;
22957 } // case 10
22958 case 18: {
22959 name_ = input.readBytes();
22960 bitField0_ |= 0x00000002;
22961 break;
22962 } // case 18
22963 case 42: {
22964 onnx.OnnxMl.TensorProto m =
22965 input.readMessage(
22966 onnx.OnnxMl.TensorProto.parser(),
22967 extensionRegistry);
22968 if (initializerBuilder_ == null) {
22969 ensureInitializerIsMutable();
22970 initializer_.add(m);
22971 } else {
22972 initializerBuilder_.addMessage(m);
22973 }
22974 break;
22975 } // case 42
22976 case 82: {
22977 docString_ = input.readBytes();
22978 bitField0_ |= 0x00000010;
22979 break;
22980 } // case 82
22981 case 90: {
22982 onnx.OnnxMl.ValueInfoProto m =
22983 input.readMessage(
22984 onnx.OnnxMl.ValueInfoProto.parser(),
22985 extensionRegistry);
22986 if (inputBuilder_ == null) {
22987 ensureInputIsMutable();
22988 input_.add(m);
22989 } else {
22990 inputBuilder_.addMessage(m);
22991 }
22992 break;
22993 } // case 90
22994 case 98: {
22995 onnx.OnnxMl.ValueInfoProto m =
22996 input.readMessage(
22997 onnx.OnnxMl.ValueInfoProto.parser(),
22998 extensionRegistry);
22999 if (outputBuilder_ == null) {
23000 ensureOutputIsMutable();
23001 output_.add(m);
23002 } else {
23003 outputBuilder_.addMessage(m);
23004 }
23005 break;
23006 } // case 98
23007 case 106: {
23008 onnx.OnnxMl.ValueInfoProto m =
23009 input.readMessage(
23010 onnx.OnnxMl.ValueInfoProto.parser(),
23011 extensionRegistry);
23012 if (valueInfoBuilder_ == null) {
23013 ensureValueInfoIsMutable();
23014 valueInfo_.add(m);
23015 } else {
23016 valueInfoBuilder_.addMessage(m);
23017 }
23018 break;
23019 } // case 106
23020 case 114: {
23021 onnx.OnnxMl.TensorAnnotation m =
23022 input.readMessage(
23023 onnx.OnnxMl.TensorAnnotation.parser(),
23024 extensionRegistry);
23025 if (quantizationAnnotationBuilder_ == null) {
23026 ensureQuantizationAnnotationIsMutable();
23027 quantizationAnnotation_.add(m);
23028 } else {
23029 quantizationAnnotationBuilder_.addMessage(m);
23030 }
23031 break;
23032 } // case 114
23033 case 122: {
23034 onnx.OnnxMl.SparseTensorProto m =
23035 input.readMessage(
23036 onnx.OnnxMl.SparseTensorProto.parser(),
23037 extensionRegistry);
23038 if (sparseInitializerBuilder_ == null) {
23039 ensureSparseInitializerIsMutable();
23040 sparseInitializer_.add(m);
23041 } else {
23042 sparseInitializerBuilder_.addMessage(m);
23043 }
23044 break;
23045 } // case 122
23046 case 130: {
23047 onnx.OnnxMl.StringStringEntryProto m =
23048 input.readMessage(
23049 onnx.OnnxMl.StringStringEntryProto.parser(),
23050 extensionRegistry);
23051 if (metadataPropsBuilder_ == null) {
23052 ensureMetadataPropsIsMutable();
23053 metadataProps_.add(m);
23054 } else {
23055 metadataPropsBuilder_.addMessage(m);
23056 }
23057 break;
23058 } // case 130
23059 default: {
23060 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
23061 done = true; // was an endgroup tag
23062 }
23063 break;
23064 } // default:
23065 } // switch (tag)
23066 } // while (!done)
23067 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
23068 throw e.unwrapIOException();
23069 } finally {
23070 onChanged();
23071 } // finally
23072 return this;
23073 }
23074 private int bitField0_;
23075
23076 private java.util.List<onnx.OnnxMl.NodeProto> node_ =
23077 java.util.Collections.emptyList();
23078 private void ensureNodeIsMutable() {
23079 if (!((bitField0_ & 0x00000001) != 0)) {
23080 node_ = new java.util.ArrayList<onnx.OnnxMl.NodeProto>(node_);
23081 bitField0_ |= 0x00000001;
23082 }
23083 }
23084
23085 private com.google.protobuf.RepeatedFieldBuilder<
23086 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder> nodeBuilder_;
23087
23088 /**
23089 * <pre>
23090 * The nodes in the graph, sorted topologically.
23091 * </pre>
23092 *
23093 * <code>repeated .onnx.NodeProto node = 1;</code>
23094 */
23095 public java.util.List<onnx.OnnxMl.NodeProto> getNodeList() {
23096 if (nodeBuilder_ == null) {
23097 return java.util.Collections.unmodifiableList(node_);
23098 } else {
23099 return nodeBuilder_.getMessageList();
23100 }
23101 }
23102 /**
23103 * <pre>
23104 * The nodes in the graph, sorted topologically.
23105 * </pre>
23106 *
23107 * <code>repeated .onnx.NodeProto node = 1;</code>
23108 */
23109 public int getNodeCount() {
23110 if (nodeBuilder_ == null) {
23111 return node_.size();
23112 } else {
23113 return nodeBuilder_.getCount();
23114 }
23115 }
23116 /**
23117 * <pre>
23118 * The nodes in the graph, sorted topologically.
23119 * </pre>
23120 *
23121 * <code>repeated .onnx.NodeProto node = 1;</code>
23122 */
23123 public onnx.OnnxMl.NodeProto getNode(int index) {
23124 if (nodeBuilder_ == null) {
23125 return node_.get(index);
23126 } else {
23127 return nodeBuilder_.getMessage(index);
23128 }
23129 }
23130 /**
23131 * <pre>
23132 * The nodes in the graph, sorted topologically.
23133 * </pre>
23134 *
23135 * <code>repeated .onnx.NodeProto node = 1;</code>
23136 */
23137 public Builder setNode(
23138 int index, onnx.OnnxMl.NodeProto value) {
23139 if (nodeBuilder_ == null) {
23140 if (value == null) {
23141 throw new NullPointerException();
23142 }
23143 ensureNodeIsMutable();
23144 node_.set(index, value);
23145 onChanged();
23146 } else {
23147 nodeBuilder_.setMessage(index, value);
23148 }
23149 return this;
23150 }
23151 /**
23152 * <pre>
23153 * The nodes in the graph, sorted topologically.
23154 * </pre>
23155 *
23156 * <code>repeated .onnx.NodeProto node = 1;</code>
23157 */
23158 public Builder setNode(
23159 int index, onnx.OnnxMl.NodeProto.Builder builderForValue) {
23160 if (nodeBuilder_ == null) {
23161 ensureNodeIsMutable();
23162 node_.set(index, builderForValue.build());
23163 onChanged();
23164 } else {
23165 nodeBuilder_.setMessage(index, builderForValue.build());
23166 }
23167 return this;
23168 }
23169 /**
23170 * <pre>
23171 * The nodes in the graph, sorted topologically.
23172 * </pre>
23173 *
23174 * <code>repeated .onnx.NodeProto node = 1;</code>
23175 */
23176 public Builder addNode(onnx.OnnxMl.NodeProto value) {
23177 if (nodeBuilder_ == null) {
23178 if (value == null) {
23179 throw new NullPointerException();
23180 }
23181 ensureNodeIsMutable();
23182 node_.add(value);
23183 onChanged();
23184 } else {
23185 nodeBuilder_.addMessage(value);
23186 }
23187 return this;
23188 }
23189 /**
23190 * <pre>
23191 * The nodes in the graph, sorted topologically.
23192 * </pre>
23193 *
23194 * <code>repeated .onnx.NodeProto node = 1;</code>
23195 */
23196 public Builder addNode(
23197 int index, onnx.OnnxMl.NodeProto value) {
23198 if (nodeBuilder_ == null) {
23199 if (value == null) {
23200 throw new NullPointerException();
23201 }
23202 ensureNodeIsMutable();
23203 node_.add(index, value);
23204 onChanged();
23205 } else {
23206 nodeBuilder_.addMessage(index, value);
23207 }
23208 return this;
23209 }
23210 /**
23211 * <pre>
23212 * The nodes in the graph, sorted topologically.
23213 * </pre>
23214 *
23215 * <code>repeated .onnx.NodeProto node = 1;</code>
23216 */
23217 public Builder addNode(
23218 onnx.OnnxMl.NodeProto.Builder builderForValue) {
23219 if (nodeBuilder_ == null) {
23220 ensureNodeIsMutable();
23221 node_.add(builderForValue.build());
23222 onChanged();
23223 } else {
23224 nodeBuilder_.addMessage(builderForValue.build());
23225 }
23226 return this;
23227 }
23228 /**
23229 * <pre>
23230 * The nodes in the graph, sorted topologically.
23231 * </pre>
23232 *
23233 * <code>repeated .onnx.NodeProto node = 1;</code>
23234 */
23235 public Builder addNode(
23236 int index, onnx.OnnxMl.NodeProto.Builder builderForValue) {
23237 if (nodeBuilder_ == null) {
23238 ensureNodeIsMutable();
23239 node_.add(index, builderForValue.build());
23240 onChanged();
23241 } else {
23242 nodeBuilder_.addMessage(index, builderForValue.build());
23243 }
23244 return this;
23245 }
23246 /**
23247 * <pre>
23248 * The nodes in the graph, sorted topologically.
23249 * </pre>
23250 *
23251 * <code>repeated .onnx.NodeProto node = 1;</code>
23252 */
23253 public Builder addAllNode(
23254 java.lang.Iterable<? extends onnx.OnnxMl.NodeProto> values) {
23255 if (nodeBuilder_ == null) {
23256 ensureNodeIsMutable();
23257 com.google.protobuf.AbstractMessageLite.Builder.addAll(
23258 values, node_);
23259 onChanged();
23260 } else {
23261 nodeBuilder_.addAllMessages(values);
23262 }
23263 return this;
23264 }
23265 /**
23266 * <pre>
23267 * The nodes in the graph, sorted topologically.
23268 * </pre>
23269 *
23270 * <code>repeated .onnx.NodeProto node = 1;</code>
23271 */
23272 public Builder clearNode() {
23273 if (nodeBuilder_ == null) {
23274 node_ = java.util.Collections.emptyList();
23275 bitField0_ = (bitField0_ & ~0x00000001);
23276 onChanged();
23277 } else {
23278 nodeBuilder_.clear();
23279 }
23280 return this;
23281 }
23282 /**
23283 * <pre>
23284 * The nodes in the graph, sorted topologically.
23285 * </pre>
23286 *
23287 * <code>repeated .onnx.NodeProto node = 1;</code>
23288 */
23289 public Builder removeNode(int index) {
23290 if (nodeBuilder_ == null) {
23291 ensureNodeIsMutable();
23292 node_.remove(index);
23293 onChanged();
23294 } else {
23295 nodeBuilder_.remove(index);
23296 }
23297 return this;
23298 }
23299 /**
23300 * <pre>
23301 * The nodes in the graph, sorted topologically.
23302 * </pre>
23303 *
23304 * <code>repeated .onnx.NodeProto node = 1;</code>
23305 */
23306 public onnx.OnnxMl.NodeProto.Builder getNodeBuilder(
23307 int index) {
23308 return getNodeFieldBuilder().getBuilder(index);
23309 }
23310 /**
23311 * <pre>
23312 * The nodes in the graph, sorted topologically.
23313 * </pre>
23314 *
23315 * <code>repeated .onnx.NodeProto node = 1;</code>
23316 */
23317 public onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
23318 int index) {
23319 if (nodeBuilder_ == null) {
23320 return node_.get(index); } else {
23321 return nodeBuilder_.getMessageOrBuilder(index);
23322 }
23323 }
23324 /**
23325 * <pre>
23326 * The nodes in the graph, sorted topologically.
23327 * </pre>
23328 *
23329 * <code>repeated .onnx.NodeProto node = 1;</code>
23330 */
23331 public java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
23332 getNodeOrBuilderList() {
23333 if (nodeBuilder_ != null) {
23334 return nodeBuilder_.getMessageOrBuilderList();
23335 } else {
23336 return java.util.Collections.unmodifiableList(node_);
23337 }
23338 }
23339 /**
23340 * <pre>
23341 * The nodes in the graph, sorted topologically.
23342 * </pre>
23343 *
23344 * <code>repeated .onnx.NodeProto node = 1;</code>
23345 */
23346 public onnx.OnnxMl.NodeProto.Builder addNodeBuilder() {
23347 return getNodeFieldBuilder().addBuilder(
23348 onnx.OnnxMl.NodeProto.getDefaultInstance());
23349 }
23350 /**
23351 * <pre>
23352 * The nodes in the graph, sorted topologically.
23353 * </pre>
23354 *
23355 * <code>repeated .onnx.NodeProto node = 1;</code>
23356 */
23357 public onnx.OnnxMl.NodeProto.Builder addNodeBuilder(
23358 int index) {
23359 return getNodeFieldBuilder().addBuilder(
23360 index, onnx.OnnxMl.NodeProto.getDefaultInstance());
23361 }
23362 /**
23363 * <pre>
23364 * The nodes in the graph, sorted topologically.
23365 * </pre>
23366 *
23367 * <code>repeated .onnx.NodeProto node = 1;</code>
23368 */
23369 public java.util.List<onnx.OnnxMl.NodeProto.Builder>
23370 getNodeBuilderList() {
23371 return getNodeFieldBuilder().getBuilderList();
23372 }
23373 private com.google.protobuf.RepeatedFieldBuilder<
23374 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder>
23375 getNodeFieldBuilder() {
23376 if (nodeBuilder_ == null) {
23377 nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
23378 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder>(
23379 node_,
23380 ((bitField0_ & 0x00000001) != 0),
23381 getParentForChildren(),
23382 isClean());
23383 node_ = null;
23384 }
23385 return nodeBuilder_;
23386 }
23387
23388 private java.lang.Object name_ = "";
23389 /**
23390 * <pre>
23391 * The name of the graph.
23392 * </pre>
23393 *
23394 * <code>optional string name = 2;</code>
23395 * @return Whether the name field is set.
23396 */
23397 public boolean hasName() {
23398 return ((bitField0_ & 0x00000002) != 0);
23399 }
23400 /**
23401 * <pre>
23402 * The name of the graph.
23403 * </pre>
23404 *
23405 * <code>optional string name = 2;</code>
23406 * @return The name.
23407 */
23408 public java.lang.String getName() {
23409 java.lang.Object ref = name_;
23410 if (!(ref instanceof java.lang.String)) {
23411 com.google.protobuf.ByteString bs =
23412 (com.google.protobuf.ByteString) ref;
23413 java.lang.String s = bs.toStringUtf8();
23414 if (bs.isValidUtf8()) {
23415 name_ = s;
23416 }
23417 return s;
23418 } else {
23419 return (java.lang.String) ref;
23420 }
23421 }
23422 /**
23423 * <pre>
23424 * The name of the graph.
23425 * </pre>
23426 *
23427 * <code>optional string name = 2;</code>
23428 * @return The bytes for name.
23429 */
23430 public com.google.protobuf.ByteString
23431 getNameBytes() {
23432 java.lang.Object ref = name_;
23433 if (ref instanceof String) {
23434 com.google.protobuf.ByteString b =
23435 com.google.protobuf.ByteString.copyFromUtf8(
23436 (java.lang.String) ref);
23437 name_ = b;
23438 return b;
23439 } else {
23440 return (com.google.protobuf.ByteString) ref;
23441 }
23442 }
23443 /**
23444 * <pre>
23445 * The name of the graph.
23446 * </pre>
23447 *
23448 * <code>optional string name = 2;</code>
23449 * @param value The name to set.
23450 * @return This builder for chaining.
23451 */
23452 public Builder setName(
23453 java.lang.String value) {
23454 if (value == null) { throw new NullPointerException(); }
23455 name_ = value;
23456 bitField0_ |= 0x00000002;
23457 onChanged();
23458 return this;
23459 }
23460 /**
23461 * <pre>
23462 * The name of the graph.
23463 * </pre>
23464 *
23465 * <code>optional string name = 2;</code>
23466 * @return This builder for chaining.
23467 */
23468 public Builder clearName() {
23469 name_ = getDefaultInstance().getName();
23470 bitField0_ = (bitField0_ & ~0x00000002);
23471 onChanged();
23472 return this;
23473 }
23474 /**
23475 * <pre>
23476 * The name of the graph.
23477 * </pre>
23478 *
23479 * <code>optional string name = 2;</code>
23480 * @param value The bytes for name to set.
23481 * @return This builder for chaining.
23482 */
23483 public Builder setNameBytes(
23484 com.google.protobuf.ByteString value) {
23485 if (value == null) { throw new NullPointerException(); }
23486 name_ = value;
23487 bitField0_ |= 0x00000002;
23488 onChanged();
23489 return this;
23490 }
23491
23492 private java.util.List<onnx.OnnxMl.TensorProto> initializer_ =
23493 java.util.Collections.emptyList();
23494 private void ensureInitializerIsMutable() {
23495 if (!((bitField0_ & 0x00000004) != 0)) {
23496 initializer_ = new java.util.ArrayList<onnx.OnnxMl.TensorProto>(initializer_);
23497 bitField0_ |= 0x00000004;
23498 }
23499 }
23500
23501 private com.google.protobuf.RepeatedFieldBuilder<
23502 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder> initializerBuilder_;
23503
23504 /**
23505 * <pre>
23506 * A list of named tensor values, used to specify constant inputs of the graph.
23507 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23508 * The name MUST be unique across both initializer and sparse_initializer,
23509 * but the name MAY also appear in the input list.
23510 * </pre>
23511 *
23512 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23513 */
23514 public java.util.List<onnx.OnnxMl.TensorProto> getInitializerList() {
23515 if (initializerBuilder_ == null) {
23516 return java.util.Collections.unmodifiableList(initializer_);
23517 } else {
23518 return initializerBuilder_.getMessageList();
23519 }
23520 }
23521 /**
23522 * <pre>
23523 * A list of named tensor values, used to specify constant inputs of the graph.
23524 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23525 * The name MUST be unique across both initializer and sparse_initializer,
23526 * but the name MAY also appear in the input list.
23527 * </pre>
23528 *
23529 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23530 */
23531 public int getInitializerCount() {
23532 if (initializerBuilder_ == null) {
23533 return initializer_.size();
23534 } else {
23535 return initializerBuilder_.getCount();
23536 }
23537 }
23538 /**
23539 * <pre>
23540 * A list of named tensor values, used to specify constant inputs of the graph.
23541 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23542 * The name MUST be unique across both initializer and sparse_initializer,
23543 * but the name MAY also appear in the input list.
23544 * </pre>
23545 *
23546 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23547 */
23548 public onnx.OnnxMl.TensorProto getInitializer(int index) {
23549 if (initializerBuilder_ == null) {
23550 return initializer_.get(index);
23551 } else {
23552 return initializerBuilder_.getMessage(index);
23553 }
23554 }
23555 /**
23556 * <pre>
23557 * A list of named tensor values, used to specify constant inputs of the graph.
23558 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23559 * The name MUST be unique across both initializer and sparse_initializer,
23560 * but the name MAY also appear in the input list.
23561 * </pre>
23562 *
23563 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23564 */
23565 public Builder setInitializer(
23566 int index, onnx.OnnxMl.TensorProto value) {
23567 if (initializerBuilder_ == null) {
23568 if (value == null) {
23569 throw new NullPointerException();
23570 }
23571 ensureInitializerIsMutable();
23572 initializer_.set(index, value);
23573 onChanged();
23574 } else {
23575 initializerBuilder_.setMessage(index, value);
23576 }
23577 return this;
23578 }
23579 /**
23580 * <pre>
23581 * A list of named tensor values, used to specify constant inputs of the graph.
23582 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23583 * The name MUST be unique across both initializer and sparse_initializer,
23584 * but the name MAY also appear in the input list.
23585 * </pre>
23586 *
23587 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23588 */
23589 public Builder setInitializer(
23590 int index, onnx.OnnxMl.TensorProto.Builder builderForValue) {
23591 if (initializerBuilder_ == null) {
23592 ensureInitializerIsMutable();
23593 initializer_.set(index, builderForValue.build());
23594 onChanged();
23595 } else {
23596 initializerBuilder_.setMessage(index, builderForValue.build());
23597 }
23598 return this;
23599 }
23600 /**
23601 * <pre>
23602 * A list of named tensor values, used to specify constant inputs of the graph.
23603 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23604 * The name MUST be unique across both initializer and sparse_initializer,
23605 * but the name MAY also appear in the input list.
23606 * </pre>
23607 *
23608 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23609 */
23610 public Builder addInitializer(onnx.OnnxMl.TensorProto value) {
23611 if (initializerBuilder_ == null) {
23612 if (value == null) {
23613 throw new NullPointerException();
23614 }
23615 ensureInitializerIsMutable();
23616 initializer_.add(value);
23617 onChanged();
23618 } else {
23619 initializerBuilder_.addMessage(value);
23620 }
23621 return this;
23622 }
23623 /**
23624 * <pre>
23625 * A list of named tensor values, used to specify constant inputs of the graph.
23626 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23627 * The name MUST be unique across both initializer and sparse_initializer,
23628 * but the name MAY also appear in the input list.
23629 * </pre>
23630 *
23631 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23632 */
23633 public Builder addInitializer(
23634 int index, onnx.OnnxMl.TensorProto value) {
23635 if (initializerBuilder_ == null) {
23636 if (value == null) {
23637 throw new NullPointerException();
23638 }
23639 ensureInitializerIsMutable();
23640 initializer_.add(index, value);
23641 onChanged();
23642 } else {
23643 initializerBuilder_.addMessage(index, value);
23644 }
23645 return this;
23646 }
23647 /**
23648 * <pre>
23649 * A list of named tensor values, used to specify constant inputs of the graph.
23650 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23651 * The name MUST be unique across both initializer and sparse_initializer,
23652 * but the name MAY also appear in the input list.
23653 * </pre>
23654 *
23655 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23656 */
23657 public Builder addInitializer(
23658 onnx.OnnxMl.TensorProto.Builder builderForValue) {
23659 if (initializerBuilder_ == null) {
23660 ensureInitializerIsMutable();
23661 initializer_.add(builderForValue.build());
23662 onChanged();
23663 } else {
23664 initializerBuilder_.addMessage(builderForValue.build());
23665 }
23666 return this;
23667 }
23668 /**
23669 * <pre>
23670 * A list of named tensor values, used to specify constant inputs of the graph.
23671 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23672 * The name MUST be unique across both initializer and sparse_initializer,
23673 * but the name MAY also appear in the input list.
23674 * </pre>
23675 *
23676 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23677 */
23678 public Builder addInitializer(
23679 int index, onnx.OnnxMl.TensorProto.Builder builderForValue) {
23680 if (initializerBuilder_ == null) {
23681 ensureInitializerIsMutable();
23682 initializer_.add(index, builderForValue.build());
23683 onChanged();
23684 } else {
23685 initializerBuilder_.addMessage(index, builderForValue.build());
23686 }
23687 return this;
23688 }
23689 /**
23690 * <pre>
23691 * A list of named tensor values, used to specify constant inputs of the graph.
23692 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23693 * The name MUST be unique across both initializer and sparse_initializer,
23694 * but the name MAY also appear in the input list.
23695 * </pre>
23696 *
23697 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23698 */
23699 public Builder addAllInitializer(
23700 java.lang.Iterable<? extends onnx.OnnxMl.TensorProto> values) {
23701 if (initializerBuilder_ == null) {
23702 ensureInitializerIsMutable();
23703 com.google.protobuf.AbstractMessageLite.Builder.addAll(
23704 values, initializer_);
23705 onChanged();
23706 } else {
23707 initializerBuilder_.addAllMessages(values);
23708 }
23709 return this;
23710 }
23711 /**
23712 * <pre>
23713 * A list of named tensor values, used to specify constant inputs of the graph.
23714 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23715 * The name MUST be unique across both initializer and sparse_initializer,
23716 * but the name MAY also appear in the input list.
23717 * </pre>
23718 *
23719 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23720 */
23721 public Builder clearInitializer() {
23722 if (initializerBuilder_ == null) {
23723 initializer_ = java.util.Collections.emptyList();
23724 bitField0_ = (bitField0_ & ~0x00000004);
23725 onChanged();
23726 } else {
23727 initializerBuilder_.clear();
23728 }
23729 return this;
23730 }
23731 /**
23732 * <pre>
23733 * A list of named tensor values, used to specify constant inputs of the graph.
23734 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23735 * The name MUST be unique across both initializer and sparse_initializer,
23736 * but the name MAY also appear in the input list.
23737 * </pre>
23738 *
23739 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23740 */
23741 public Builder removeInitializer(int index) {
23742 if (initializerBuilder_ == null) {
23743 ensureInitializerIsMutable();
23744 initializer_.remove(index);
23745 onChanged();
23746 } else {
23747 initializerBuilder_.remove(index);
23748 }
23749 return this;
23750 }
23751 /**
23752 * <pre>
23753 * A list of named tensor values, used to specify constant inputs of the graph.
23754 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23755 * The name MUST be unique across both initializer and sparse_initializer,
23756 * but the name MAY also appear in the input list.
23757 * </pre>
23758 *
23759 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23760 */
23761 public onnx.OnnxMl.TensorProto.Builder getInitializerBuilder(
23762 int index) {
23763 return getInitializerFieldBuilder().getBuilder(index);
23764 }
23765 /**
23766 * <pre>
23767 * A list of named tensor values, used to specify constant inputs of the graph.
23768 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23769 * The name MUST be unique across both initializer and sparse_initializer,
23770 * but the name MAY also appear in the input list.
23771 * </pre>
23772 *
23773 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23774 */
23775 public onnx.OnnxMl.TensorProtoOrBuilder getInitializerOrBuilder(
23776 int index) {
23777 if (initializerBuilder_ == null) {
23778 return initializer_.get(index); } else {
23779 return initializerBuilder_.getMessageOrBuilder(index);
23780 }
23781 }
23782 /**
23783 * <pre>
23784 * A list of named tensor values, used to specify constant inputs of the graph.
23785 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23786 * The name MUST be unique across both initializer and sparse_initializer,
23787 * but the name MAY also appear in the input list.
23788 * </pre>
23789 *
23790 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23791 */
23792 public java.util.List<? extends onnx.OnnxMl.TensorProtoOrBuilder>
23793 getInitializerOrBuilderList() {
23794 if (initializerBuilder_ != null) {
23795 return initializerBuilder_.getMessageOrBuilderList();
23796 } else {
23797 return java.util.Collections.unmodifiableList(initializer_);
23798 }
23799 }
23800 /**
23801 * <pre>
23802 * A list of named tensor values, used to specify constant inputs of the graph.
23803 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23804 * The name MUST be unique across both initializer and sparse_initializer,
23805 * but the name MAY also appear in the input list.
23806 * </pre>
23807 *
23808 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23809 */
23810 public onnx.OnnxMl.TensorProto.Builder addInitializerBuilder() {
23811 return getInitializerFieldBuilder().addBuilder(
23812 onnx.OnnxMl.TensorProto.getDefaultInstance());
23813 }
23814 /**
23815 * <pre>
23816 * A list of named tensor values, used to specify constant inputs of the graph.
23817 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23818 * The name MUST be unique across both initializer and sparse_initializer,
23819 * but the name MAY also appear in the input list.
23820 * </pre>
23821 *
23822 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23823 */
23824 public onnx.OnnxMl.TensorProto.Builder addInitializerBuilder(
23825 int index) {
23826 return getInitializerFieldBuilder().addBuilder(
23827 index, onnx.OnnxMl.TensorProto.getDefaultInstance());
23828 }
23829 /**
23830 * <pre>
23831 * A list of named tensor values, used to specify constant inputs of the graph.
23832 * Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
23833 * The name MUST be unique across both initializer and sparse_initializer,
23834 * but the name MAY also appear in the input list.
23835 * </pre>
23836 *
23837 * <code>repeated .onnx.TensorProto initializer = 5;</code>
23838 */
23839 public java.util.List<onnx.OnnxMl.TensorProto.Builder>
23840 getInitializerBuilderList() {
23841 return getInitializerFieldBuilder().getBuilderList();
23842 }
23843 private com.google.protobuf.RepeatedFieldBuilder<
23844 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>
23845 getInitializerFieldBuilder() {
23846 if (initializerBuilder_ == null) {
23847 initializerBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
23848 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>(
23849 initializer_,
23850 ((bitField0_ & 0x00000004) != 0),
23851 getParentForChildren(),
23852 isClean());
23853 initializer_ = null;
23854 }
23855 return initializerBuilder_;
23856 }
23857
23858 private java.util.List<onnx.OnnxMl.SparseTensorProto> sparseInitializer_ =
23859 java.util.Collections.emptyList();
23860 private void ensureSparseInitializerIsMutable() {
23861 if (!((bitField0_ & 0x00000008) != 0)) {
23862 sparseInitializer_ = new java.util.ArrayList<onnx.OnnxMl.SparseTensorProto>(sparseInitializer_);
23863 bitField0_ |= 0x00000008;
23864 }
23865 }
23866
23867 private com.google.protobuf.RepeatedFieldBuilder<
23868 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder> sparseInitializerBuilder_;
23869
23870 /**
23871 * <pre>
23872 * Initializers (see above) stored in sparse format.
23873 * </pre>
23874 *
23875 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23876 */
23877 public java.util.List<onnx.OnnxMl.SparseTensorProto> getSparseInitializerList() {
23878 if (sparseInitializerBuilder_ == null) {
23879 return java.util.Collections.unmodifiableList(sparseInitializer_);
23880 } else {
23881 return sparseInitializerBuilder_.getMessageList();
23882 }
23883 }
23884 /**
23885 * <pre>
23886 * Initializers (see above) stored in sparse format.
23887 * </pre>
23888 *
23889 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23890 */
23891 public int getSparseInitializerCount() {
23892 if (sparseInitializerBuilder_ == null) {
23893 return sparseInitializer_.size();
23894 } else {
23895 return sparseInitializerBuilder_.getCount();
23896 }
23897 }
23898 /**
23899 * <pre>
23900 * Initializers (see above) stored in sparse format.
23901 * </pre>
23902 *
23903 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23904 */
23905 public onnx.OnnxMl.SparseTensorProto getSparseInitializer(int index) {
23906 if (sparseInitializerBuilder_ == null) {
23907 return sparseInitializer_.get(index);
23908 } else {
23909 return sparseInitializerBuilder_.getMessage(index);
23910 }
23911 }
23912 /**
23913 * <pre>
23914 * Initializers (see above) stored in sparse format.
23915 * </pre>
23916 *
23917 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23918 */
23919 public Builder setSparseInitializer(
23920 int index, onnx.OnnxMl.SparseTensorProto value) {
23921 if (sparseInitializerBuilder_ == null) {
23922 if (value == null) {
23923 throw new NullPointerException();
23924 }
23925 ensureSparseInitializerIsMutable();
23926 sparseInitializer_.set(index, value);
23927 onChanged();
23928 } else {
23929 sparseInitializerBuilder_.setMessage(index, value);
23930 }
23931 return this;
23932 }
23933 /**
23934 * <pre>
23935 * Initializers (see above) stored in sparse format.
23936 * </pre>
23937 *
23938 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23939 */
23940 public Builder setSparseInitializer(
23941 int index, onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
23942 if (sparseInitializerBuilder_ == null) {
23943 ensureSparseInitializerIsMutable();
23944 sparseInitializer_.set(index, builderForValue.build());
23945 onChanged();
23946 } else {
23947 sparseInitializerBuilder_.setMessage(index, builderForValue.build());
23948 }
23949 return this;
23950 }
23951 /**
23952 * <pre>
23953 * Initializers (see above) stored in sparse format.
23954 * </pre>
23955 *
23956 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23957 */
23958 public Builder addSparseInitializer(onnx.OnnxMl.SparseTensorProto value) {
23959 if (sparseInitializerBuilder_ == null) {
23960 if (value == null) {
23961 throw new NullPointerException();
23962 }
23963 ensureSparseInitializerIsMutable();
23964 sparseInitializer_.add(value);
23965 onChanged();
23966 } else {
23967 sparseInitializerBuilder_.addMessage(value);
23968 }
23969 return this;
23970 }
23971 /**
23972 * <pre>
23973 * Initializers (see above) stored in sparse format.
23974 * </pre>
23975 *
23976 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23977 */
23978 public Builder addSparseInitializer(
23979 int index, onnx.OnnxMl.SparseTensorProto value) {
23980 if (sparseInitializerBuilder_ == null) {
23981 if (value == null) {
23982 throw new NullPointerException();
23983 }
23984 ensureSparseInitializerIsMutable();
23985 sparseInitializer_.add(index, value);
23986 onChanged();
23987 } else {
23988 sparseInitializerBuilder_.addMessage(index, value);
23989 }
23990 return this;
23991 }
23992 /**
23993 * <pre>
23994 * Initializers (see above) stored in sparse format.
23995 * </pre>
23996 *
23997 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
23998 */
23999 public Builder addSparseInitializer(
24000 onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
24001 if (sparseInitializerBuilder_ == null) {
24002 ensureSparseInitializerIsMutable();
24003 sparseInitializer_.add(builderForValue.build());
24004 onChanged();
24005 } else {
24006 sparseInitializerBuilder_.addMessage(builderForValue.build());
24007 }
24008 return this;
24009 }
24010 /**
24011 * <pre>
24012 * Initializers (see above) stored in sparse format.
24013 * </pre>
24014 *
24015 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24016 */
24017 public Builder addSparseInitializer(
24018 int index, onnx.OnnxMl.SparseTensorProto.Builder builderForValue) {
24019 if (sparseInitializerBuilder_ == null) {
24020 ensureSparseInitializerIsMutable();
24021 sparseInitializer_.add(index, builderForValue.build());
24022 onChanged();
24023 } else {
24024 sparseInitializerBuilder_.addMessage(index, builderForValue.build());
24025 }
24026 return this;
24027 }
24028 /**
24029 * <pre>
24030 * Initializers (see above) stored in sparse format.
24031 * </pre>
24032 *
24033 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24034 */
24035 public Builder addAllSparseInitializer(
24036 java.lang.Iterable<? extends onnx.OnnxMl.SparseTensorProto> values) {
24037 if (sparseInitializerBuilder_ == null) {
24038 ensureSparseInitializerIsMutable();
24039 com.google.protobuf.AbstractMessageLite.Builder.addAll(
24040 values, sparseInitializer_);
24041 onChanged();
24042 } else {
24043 sparseInitializerBuilder_.addAllMessages(values);
24044 }
24045 return this;
24046 }
24047 /**
24048 * <pre>
24049 * Initializers (see above) stored in sparse format.
24050 * </pre>
24051 *
24052 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24053 */
24054 public Builder clearSparseInitializer() {
24055 if (sparseInitializerBuilder_ == null) {
24056 sparseInitializer_ = java.util.Collections.emptyList();
24057 bitField0_ = (bitField0_ & ~0x00000008);
24058 onChanged();
24059 } else {
24060 sparseInitializerBuilder_.clear();
24061 }
24062 return this;
24063 }
24064 /**
24065 * <pre>
24066 * Initializers (see above) stored in sparse format.
24067 * </pre>
24068 *
24069 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24070 */
24071 public Builder removeSparseInitializer(int index) {
24072 if (sparseInitializerBuilder_ == null) {
24073 ensureSparseInitializerIsMutable();
24074 sparseInitializer_.remove(index);
24075 onChanged();
24076 } else {
24077 sparseInitializerBuilder_.remove(index);
24078 }
24079 return this;
24080 }
24081 /**
24082 * <pre>
24083 * Initializers (see above) stored in sparse format.
24084 * </pre>
24085 *
24086 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24087 */
24088 public onnx.OnnxMl.SparseTensorProto.Builder getSparseInitializerBuilder(
24089 int index) {
24090 return getSparseInitializerFieldBuilder().getBuilder(index);
24091 }
24092 /**
24093 * <pre>
24094 * Initializers (see above) stored in sparse format.
24095 * </pre>
24096 *
24097 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24098 */
24099 public onnx.OnnxMl.SparseTensorProtoOrBuilder getSparseInitializerOrBuilder(
24100 int index) {
24101 if (sparseInitializerBuilder_ == null) {
24102 return sparseInitializer_.get(index); } else {
24103 return sparseInitializerBuilder_.getMessageOrBuilder(index);
24104 }
24105 }
24106 /**
24107 * <pre>
24108 * Initializers (see above) stored in sparse format.
24109 * </pre>
24110 *
24111 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24112 */
24113 public java.util.List<? extends onnx.OnnxMl.SparseTensorProtoOrBuilder>
24114 getSparseInitializerOrBuilderList() {
24115 if (sparseInitializerBuilder_ != null) {
24116 return sparseInitializerBuilder_.getMessageOrBuilderList();
24117 } else {
24118 return java.util.Collections.unmodifiableList(sparseInitializer_);
24119 }
24120 }
24121 /**
24122 * <pre>
24123 * Initializers (see above) stored in sparse format.
24124 * </pre>
24125 *
24126 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24127 */
24128 public onnx.OnnxMl.SparseTensorProto.Builder addSparseInitializerBuilder() {
24129 return getSparseInitializerFieldBuilder().addBuilder(
24130 onnx.OnnxMl.SparseTensorProto.getDefaultInstance());
24131 }
24132 /**
24133 * <pre>
24134 * Initializers (see above) stored in sparse format.
24135 * </pre>
24136 *
24137 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24138 */
24139 public onnx.OnnxMl.SparseTensorProto.Builder addSparseInitializerBuilder(
24140 int index) {
24141 return getSparseInitializerFieldBuilder().addBuilder(
24142 index, onnx.OnnxMl.SparseTensorProto.getDefaultInstance());
24143 }
24144 /**
24145 * <pre>
24146 * Initializers (see above) stored in sparse format.
24147 * </pre>
24148 *
24149 * <code>repeated .onnx.SparseTensorProto sparse_initializer = 15;</code>
24150 */
24151 public java.util.List<onnx.OnnxMl.SparseTensorProto.Builder>
24152 getSparseInitializerBuilderList() {
24153 return getSparseInitializerFieldBuilder().getBuilderList();
24154 }
24155 private com.google.protobuf.RepeatedFieldBuilder<
24156 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>
24157 getSparseInitializerFieldBuilder() {
24158 if (sparseInitializerBuilder_ == null) {
24159 sparseInitializerBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
24160 onnx.OnnxMl.SparseTensorProto, onnx.OnnxMl.SparseTensorProto.Builder, onnx.OnnxMl.SparseTensorProtoOrBuilder>(
24161 sparseInitializer_,
24162 ((bitField0_ & 0x00000008) != 0),
24163 getParentForChildren(),
24164 isClean());
24165 sparseInitializer_ = null;
24166 }
24167 return sparseInitializerBuilder_;
24168 }
24169
24170 private java.lang.Object docString_ = "";
24171 /**
24172 * <pre>
24173 * A human-readable documentation for this graph. Markdown is allowed.
24174 * </pre>
24175 *
24176 * <code>optional string doc_string = 10;</code>
24177 * @return Whether the docString field is set.
24178 */
24179 public boolean hasDocString() {
24180 return ((bitField0_ & 0x00000010) != 0);
24181 }
24182 /**
24183 * <pre>
24184 * A human-readable documentation for this graph. Markdown is allowed.
24185 * </pre>
24186 *
24187 * <code>optional string doc_string = 10;</code>
24188 * @return The docString.
24189 */
24190 public java.lang.String getDocString() {
24191 java.lang.Object ref = docString_;
24192 if (!(ref instanceof java.lang.String)) {
24193 com.google.protobuf.ByteString bs =
24194 (com.google.protobuf.ByteString) ref;
24195 java.lang.String s = bs.toStringUtf8();
24196 if (bs.isValidUtf8()) {
24197 docString_ = s;
24198 }
24199 return s;
24200 } else {
24201 return (java.lang.String) ref;
24202 }
24203 }
24204 /**
24205 * <pre>
24206 * A human-readable documentation for this graph. Markdown is allowed.
24207 * </pre>
24208 *
24209 * <code>optional string doc_string = 10;</code>
24210 * @return The bytes for docString.
24211 */
24212 public com.google.protobuf.ByteString
24213 getDocStringBytes() {
24214 java.lang.Object ref = docString_;
24215 if (ref instanceof String) {
24216 com.google.protobuf.ByteString b =
24217 com.google.protobuf.ByteString.copyFromUtf8(
24218 (java.lang.String) ref);
24219 docString_ = b;
24220 return b;
24221 } else {
24222 return (com.google.protobuf.ByteString) ref;
24223 }
24224 }
24225 /**
24226 * <pre>
24227 * A human-readable documentation for this graph. Markdown is allowed.
24228 * </pre>
24229 *
24230 * <code>optional string doc_string = 10;</code>
24231 * @param value The docString to set.
24232 * @return This builder for chaining.
24233 */
24234 public Builder setDocString(
24235 java.lang.String value) {
24236 if (value == null) { throw new NullPointerException(); }
24237 docString_ = value;
24238 bitField0_ |= 0x00000010;
24239 onChanged();
24240 return this;
24241 }
24242 /**
24243 * <pre>
24244 * A human-readable documentation for this graph. Markdown is allowed.
24245 * </pre>
24246 *
24247 * <code>optional string doc_string = 10;</code>
24248 * @return This builder for chaining.
24249 */
24250 public Builder clearDocString() {
24251 docString_ = getDefaultInstance().getDocString();
24252 bitField0_ = (bitField0_ & ~0x00000010);
24253 onChanged();
24254 return this;
24255 }
24256 /**
24257 * <pre>
24258 * A human-readable documentation for this graph. Markdown is allowed.
24259 * </pre>
24260 *
24261 * <code>optional string doc_string = 10;</code>
24262 * @param value The bytes for docString to set.
24263 * @return This builder for chaining.
24264 */
24265 public Builder setDocStringBytes(
24266 com.google.protobuf.ByteString value) {
24267 if (value == null) { throw new NullPointerException(); }
24268 docString_ = value;
24269 bitField0_ |= 0x00000010;
24270 onChanged();
24271 return this;
24272 }
24273
24274 private java.util.List<onnx.OnnxMl.ValueInfoProto> input_ =
24275 java.util.Collections.emptyList();
24276 private void ensureInputIsMutable() {
24277 if (!((bitField0_ & 0x00000020) != 0)) {
24278 input_ = new java.util.ArrayList<onnx.OnnxMl.ValueInfoProto>(input_);
24279 bitField0_ |= 0x00000020;
24280 }
24281 }
24282
24283 private com.google.protobuf.RepeatedFieldBuilder<
24284 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder> inputBuilder_;
24285
24286 /**
24287 * <pre>
24288 * The inputs and outputs of the graph.
24289 * </pre>
24290 *
24291 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24292 */
24293 public java.util.List<onnx.OnnxMl.ValueInfoProto> getInputList() {
24294 if (inputBuilder_ == null) {
24295 return java.util.Collections.unmodifiableList(input_);
24296 } else {
24297 return inputBuilder_.getMessageList();
24298 }
24299 }
24300 /**
24301 * <pre>
24302 * The inputs and outputs of the graph.
24303 * </pre>
24304 *
24305 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24306 */
24307 public int getInputCount() {
24308 if (inputBuilder_ == null) {
24309 return input_.size();
24310 } else {
24311 return inputBuilder_.getCount();
24312 }
24313 }
24314 /**
24315 * <pre>
24316 * The inputs and outputs of the graph.
24317 * </pre>
24318 *
24319 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24320 */
24321 public onnx.OnnxMl.ValueInfoProto getInput(int index) {
24322 if (inputBuilder_ == null) {
24323 return input_.get(index);
24324 } else {
24325 return inputBuilder_.getMessage(index);
24326 }
24327 }
24328 /**
24329 * <pre>
24330 * The inputs and outputs of the graph.
24331 * </pre>
24332 *
24333 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24334 */
24335 public Builder setInput(
24336 int index, onnx.OnnxMl.ValueInfoProto value) {
24337 if (inputBuilder_ == null) {
24338 if (value == null) {
24339 throw new NullPointerException();
24340 }
24341 ensureInputIsMutable();
24342 input_.set(index, value);
24343 onChanged();
24344 } else {
24345 inputBuilder_.setMessage(index, value);
24346 }
24347 return this;
24348 }
24349 /**
24350 * <pre>
24351 * The inputs and outputs of the graph.
24352 * </pre>
24353 *
24354 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24355 */
24356 public Builder setInput(
24357 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24358 if (inputBuilder_ == null) {
24359 ensureInputIsMutable();
24360 input_.set(index, builderForValue.build());
24361 onChanged();
24362 } else {
24363 inputBuilder_.setMessage(index, builderForValue.build());
24364 }
24365 return this;
24366 }
24367 /**
24368 * <pre>
24369 * The inputs and outputs of the graph.
24370 * </pre>
24371 *
24372 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24373 */
24374 public Builder addInput(onnx.OnnxMl.ValueInfoProto value) {
24375 if (inputBuilder_ == null) {
24376 if (value == null) {
24377 throw new NullPointerException();
24378 }
24379 ensureInputIsMutable();
24380 input_.add(value);
24381 onChanged();
24382 } else {
24383 inputBuilder_.addMessage(value);
24384 }
24385 return this;
24386 }
24387 /**
24388 * <pre>
24389 * The inputs and outputs of the graph.
24390 * </pre>
24391 *
24392 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24393 */
24394 public Builder addInput(
24395 int index, onnx.OnnxMl.ValueInfoProto value) {
24396 if (inputBuilder_ == null) {
24397 if (value == null) {
24398 throw new NullPointerException();
24399 }
24400 ensureInputIsMutable();
24401 input_.add(index, value);
24402 onChanged();
24403 } else {
24404 inputBuilder_.addMessage(index, value);
24405 }
24406 return this;
24407 }
24408 /**
24409 * <pre>
24410 * The inputs and outputs of the graph.
24411 * </pre>
24412 *
24413 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24414 */
24415 public Builder addInput(
24416 onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24417 if (inputBuilder_ == null) {
24418 ensureInputIsMutable();
24419 input_.add(builderForValue.build());
24420 onChanged();
24421 } else {
24422 inputBuilder_.addMessage(builderForValue.build());
24423 }
24424 return this;
24425 }
24426 /**
24427 * <pre>
24428 * The inputs and outputs of the graph.
24429 * </pre>
24430 *
24431 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24432 */
24433 public Builder addInput(
24434 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24435 if (inputBuilder_ == null) {
24436 ensureInputIsMutable();
24437 input_.add(index, builderForValue.build());
24438 onChanged();
24439 } else {
24440 inputBuilder_.addMessage(index, builderForValue.build());
24441 }
24442 return this;
24443 }
24444 /**
24445 * <pre>
24446 * The inputs and outputs of the graph.
24447 * </pre>
24448 *
24449 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24450 */
24451 public Builder addAllInput(
24452 java.lang.Iterable<? extends onnx.OnnxMl.ValueInfoProto> values) {
24453 if (inputBuilder_ == null) {
24454 ensureInputIsMutable();
24455 com.google.protobuf.AbstractMessageLite.Builder.addAll(
24456 values, input_);
24457 onChanged();
24458 } else {
24459 inputBuilder_.addAllMessages(values);
24460 }
24461 return this;
24462 }
24463 /**
24464 * <pre>
24465 * The inputs and outputs of the graph.
24466 * </pre>
24467 *
24468 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24469 */
24470 public Builder clearInput() {
24471 if (inputBuilder_ == null) {
24472 input_ = java.util.Collections.emptyList();
24473 bitField0_ = (bitField0_ & ~0x00000020);
24474 onChanged();
24475 } else {
24476 inputBuilder_.clear();
24477 }
24478 return this;
24479 }
24480 /**
24481 * <pre>
24482 * The inputs and outputs of the graph.
24483 * </pre>
24484 *
24485 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24486 */
24487 public Builder removeInput(int index) {
24488 if (inputBuilder_ == null) {
24489 ensureInputIsMutable();
24490 input_.remove(index);
24491 onChanged();
24492 } else {
24493 inputBuilder_.remove(index);
24494 }
24495 return this;
24496 }
24497 /**
24498 * <pre>
24499 * The inputs and outputs of the graph.
24500 * </pre>
24501 *
24502 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24503 */
24504 public onnx.OnnxMl.ValueInfoProto.Builder getInputBuilder(
24505 int index) {
24506 return getInputFieldBuilder().getBuilder(index);
24507 }
24508 /**
24509 * <pre>
24510 * The inputs and outputs of the graph.
24511 * </pre>
24512 *
24513 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24514 */
24515 public onnx.OnnxMl.ValueInfoProtoOrBuilder getInputOrBuilder(
24516 int index) {
24517 if (inputBuilder_ == null) {
24518 return input_.get(index); } else {
24519 return inputBuilder_.getMessageOrBuilder(index);
24520 }
24521 }
24522 /**
24523 * <pre>
24524 * The inputs and outputs of the graph.
24525 * </pre>
24526 *
24527 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24528 */
24529 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
24530 getInputOrBuilderList() {
24531 if (inputBuilder_ != null) {
24532 return inputBuilder_.getMessageOrBuilderList();
24533 } else {
24534 return java.util.Collections.unmodifiableList(input_);
24535 }
24536 }
24537 /**
24538 * <pre>
24539 * The inputs and outputs of the graph.
24540 * </pre>
24541 *
24542 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24543 */
24544 public onnx.OnnxMl.ValueInfoProto.Builder addInputBuilder() {
24545 return getInputFieldBuilder().addBuilder(
24546 onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
24547 }
24548 /**
24549 * <pre>
24550 * The inputs and outputs of the graph.
24551 * </pre>
24552 *
24553 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24554 */
24555 public onnx.OnnxMl.ValueInfoProto.Builder addInputBuilder(
24556 int index) {
24557 return getInputFieldBuilder().addBuilder(
24558 index, onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
24559 }
24560 /**
24561 * <pre>
24562 * The inputs and outputs of the graph.
24563 * </pre>
24564 *
24565 * <code>repeated .onnx.ValueInfoProto input = 11;</code>
24566 */
24567 public java.util.List<onnx.OnnxMl.ValueInfoProto.Builder>
24568 getInputBuilderList() {
24569 return getInputFieldBuilder().getBuilderList();
24570 }
24571 private com.google.protobuf.RepeatedFieldBuilder<
24572 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>
24573 getInputFieldBuilder() {
24574 if (inputBuilder_ == null) {
24575 inputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
24576 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>(
24577 input_,
24578 ((bitField0_ & 0x00000020) != 0),
24579 getParentForChildren(),
24580 isClean());
24581 input_ = null;
24582 }
24583 return inputBuilder_;
24584 }
24585
24586 private java.util.List<onnx.OnnxMl.ValueInfoProto> output_ =
24587 java.util.Collections.emptyList();
24588 private void ensureOutputIsMutable() {
24589 if (!((bitField0_ & 0x00000040) != 0)) {
24590 output_ = new java.util.ArrayList<onnx.OnnxMl.ValueInfoProto>(output_);
24591 bitField0_ |= 0x00000040;
24592 }
24593 }
24594
24595 private com.google.protobuf.RepeatedFieldBuilder<
24596 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder> outputBuilder_;
24597
24598 /**
24599 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24600 */
24601 public java.util.List<onnx.OnnxMl.ValueInfoProto> getOutputList() {
24602 if (outputBuilder_ == null) {
24603 return java.util.Collections.unmodifiableList(output_);
24604 } else {
24605 return outputBuilder_.getMessageList();
24606 }
24607 }
24608 /**
24609 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24610 */
24611 public int getOutputCount() {
24612 if (outputBuilder_ == null) {
24613 return output_.size();
24614 } else {
24615 return outputBuilder_.getCount();
24616 }
24617 }
24618 /**
24619 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24620 */
24621 public onnx.OnnxMl.ValueInfoProto getOutput(int index) {
24622 if (outputBuilder_ == null) {
24623 return output_.get(index);
24624 } else {
24625 return outputBuilder_.getMessage(index);
24626 }
24627 }
24628 /**
24629 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24630 */
24631 public Builder setOutput(
24632 int index, onnx.OnnxMl.ValueInfoProto value) {
24633 if (outputBuilder_ == null) {
24634 if (value == null) {
24635 throw new NullPointerException();
24636 }
24637 ensureOutputIsMutable();
24638 output_.set(index, value);
24639 onChanged();
24640 } else {
24641 outputBuilder_.setMessage(index, value);
24642 }
24643 return this;
24644 }
24645 /**
24646 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24647 */
24648 public Builder setOutput(
24649 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24650 if (outputBuilder_ == null) {
24651 ensureOutputIsMutable();
24652 output_.set(index, builderForValue.build());
24653 onChanged();
24654 } else {
24655 outputBuilder_.setMessage(index, builderForValue.build());
24656 }
24657 return this;
24658 }
24659 /**
24660 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24661 */
24662 public Builder addOutput(onnx.OnnxMl.ValueInfoProto value) {
24663 if (outputBuilder_ == null) {
24664 if (value == null) {
24665 throw new NullPointerException();
24666 }
24667 ensureOutputIsMutable();
24668 output_.add(value);
24669 onChanged();
24670 } else {
24671 outputBuilder_.addMessage(value);
24672 }
24673 return this;
24674 }
24675 /**
24676 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24677 */
24678 public Builder addOutput(
24679 int index, onnx.OnnxMl.ValueInfoProto value) {
24680 if (outputBuilder_ == null) {
24681 if (value == null) {
24682 throw new NullPointerException();
24683 }
24684 ensureOutputIsMutable();
24685 output_.add(index, value);
24686 onChanged();
24687 } else {
24688 outputBuilder_.addMessage(index, value);
24689 }
24690 return this;
24691 }
24692 /**
24693 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24694 */
24695 public Builder addOutput(
24696 onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24697 if (outputBuilder_ == null) {
24698 ensureOutputIsMutable();
24699 output_.add(builderForValue.build());
24700 onChanged();
24701 } else {
24702 outputBuilder_.addMessage(builderForValue.build());
24703 }
24704 return this;
24705 }
24706 /**
24707 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24708 */
24709 public Builder addOutput(
24710 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24711 if (outputBuilder_ == null) {
24712 ensureOutputIsMutable();
24713 output_.add(index, builderForValue.build());
24714 onChanged();
24715 } else {
24716 outputBuilder_.addMessage(index, builderForValue.build());
24717 }
24718 return this;
24719 }
24720 /**
24721 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24722 */
24723 public Builder addAllOutput(
24724 java.lang.Iterable<? extends onnx.OnnxMl.ValueInfoProto> values) {
24725 if (outputBuilder_ == null) {
24726 ensureOutputIsMutable();
24727 com.google.protobuf.AbstractMessageLite.Builder.addAll(
24728 values, output_);
24729 onChanged();
24730 } else {
24731 outputBuilder_.addAllMessages(values);
24732 }
24733 return this;
24734 }
24735 /**
24736 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24737 */
24738 public Builder clearOutput() {
24739 if (outputBuilder_ == null) {
24740 output_ = java.util.Collections.emptyList();
24741 bitField0_ = (bitField0_ & ~0x00000040);
24742 onChanged();
24743 } else {
24744 outputBuilder_.clear();
24745 }
24746 return this;
24747 }
24748 /**
24749 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24750 */
24751 public Builder removeOutput(int index) {
24752 if (outputBuilder_ == null) {
24753 ensureOutputIsMutable();
24754 output_.remove(index);
24755 onChanged();
24756 } else {
24757 outputBuilder_.remove(index);
24758 }
24759 return this;
24760 }
24761 /**
24762 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24763 */
24764 public onnx.OnnxMl.ValueInfoProto.Builder getOutputBuilder(
24765 int index) {
24766 return getOutputFieldBuilder().getBuilder(index);
24767 }
24768 /**
24769 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24770 */
24771 public onnx.OnnxMl.ValueInfoProtoOrBuilder getOutputOrBuilder(
24772 int index) {
24773 if (outputBuilder_ == null) {
24774 return output_.get(index); } else {
24775 return outputBuilder_.getMessageOrBuilder(index);
24776 }
24777 }
24778 /**
24779 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24780 */
24781 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
24782 getOutputOrBuilderList() {
24783 if (outputBuilder_ != null) {
24784 return outputBuilder_.getMessageOrBuilderList();
24785 } else {
24786 return java.util.Collections.unmodifiableList(output_);
24787 }
24788 }
24789 /**
24790 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24791 */
24792 public onnx.OnnxMl.ValueInfoProto.Builder addOutputBuilder() {
24793 return getOutputFieldBuilder().addBuilder(
24794 onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
24795 }
24796 /**
24797 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24798 */
24799 public onnx.OnnxMl.ValueInfoProto.Builder addOutputBuilder(
24800 int index) {
24801 return getOutputFieldBuilder().addBuilder(
24802 index, onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
24803 }
24804 /**
24805 * <code>repeated .onnx.ValueInfoProto output = 12;</code>
24806 */
24807 public java.util.List<onnx.OnnxMl.ValueInfoProto.Builder>
24808 getOutputBuilderList() {
24809 return getOutputFieldBuilder().getBuilderList();
24810 }
24811 private com.google.protobuf.RepeatedFieldBuilder<
24812 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>
24813 getOutputFieldBuilder() {
24814 if (outputBuilder_ == null) {
24815 outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
24816 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>(
24817 output_,
24818 ((bitField0_ & 0x00000040) != 0),
24819 getParentForChildren(),
24820 isClean());
24821 output_ = null;
24822 }
24823 return outputBuilder_;
24824 }
24825
24826 private java.util.List<onnx.OnnxMl.ValueInfoProto> valueInfo_ =
24827 java.util.Collections.emptyList();
24828 private void ensureValueInfoIsMutable() {
24829 if (!((bitField0_ & 0x00000080) != 0)) {
24830 valueInfo_ = new java.util.ArrayList<onnx.OnnxMl.ValueInfoProto>(valueInfo_);
24831 bitField0_ |= 0x00000080;
24832 }
24833 }
24834
24835 private com.google.protobuf.RepeatedFieldBuilder<
24836 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder> valueInfoBuilder_;
24837
24838 /**
24839 * <pre>
24840 * Information for the values in the graph. The ValueInfoProto.name's
24841 * must be distinct. It is optional for a value to appear in value_info list.
24842 * </pre>
24843 *
24844 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24845 */
24846 public java.util.List<onnx.OnnxMl.ValueInfoProto> getValueInfoList() {
24847 if (valueInfoBuilder_ == null) {
24848 return java.util.Collections.unmodifiableList(valueInfo_);
24849 } else {
24850 return valueInfoBuilder_.getMessageList();
24851 }
24852 }
24853 /**
24854 * <pre>
24855 * Information for the values in the graph. The ValueInfoProto.name's
24856 * must be distinct. It is optional for a value to appear in value_info list.
24857 * </pre>
24858 *
24859 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24860 */
24861 public int getValueInfoCount() {
24862 if (valueInfoBuilder_ == null) {
24863 return valueInfo_.size();
24864 } else {
24865 return valueInfoBuilder_.getCount();
24866 }
24867 }
24868 /**
24869 * <pre>
24870 * Information for the values in the graph. The ValueInfoProto.name's
24871 * must be distinct. It is optional for a value to appear in value_info list.
24872 * </pre>
24873 *
24874 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24875 */
24876 public onnx.OnnxMl.ValueInfoProto getValueInfo(int index) {
24877 if (valueInfoBuilder_ == null) {
24878 return valueInfo_.get(index);
24879 } else {
24880 return valueInfoBuilder_.getMessage(index);
24881 }
24882 }
24883 /**
24884 * <pre>
24885 * Information for the values in the graph. The ValueInfoProto.name's
24886 * must be distinct. It is optional for a value to appear in value_info list.
24887 * </pre>
24888 *
24889 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24890 */
24891 public Builder setValueInfo(
24892 int index, onnx.OnnxMl.ValueInfoProto value) {
24893 if (valueInfoBuilder_ == null) {
24894 if (value == null) {
24895 throw new NullPointerException();
24896 }
24897 ensureValueInfoIsMutable();
24898 valueInfo_.set(index, value);
24899 onChanged();
24900 } else {
24901 valueInfoBuilder_.setMessage(index, value);
24902 }
24903 return this;
24904 }
24905 /**
24906 * <pre>
24907 * Information for the values in the graph. The ValueInfoProto.name's
24908 * must be distinct. It is optional for a value to appear in value_info list.
24909 * </pre>
24910 *
24911 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24912 */
24913 public Builder setValueInfo(
24914 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24915 if (valueInfoBuilder_ == null) {
24916 ensureValueInfoIsMutable();
24917 valueInfo_.set(index, builderForValue.build());
24918 onChanged();
24919 } else {
24920 valueInfoBuilder_.setMessage(index, builderForValue.build());
24921 }
24922 return this;
24923 }
24924 /**
24925 * <pre>
24926 * Information for the values in the graph. The ValueInfoProto.name's
24927 * must be distinct. It is optional for a value to appear in value_info list.
24928 * </pre>
24929 *
24930 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24931 */
24932 public Builder addValueInfo(onnx.OnnxMl.ValueInfoProto value) {
24933 if (valueInfoBuilder_ == null) {
24934 if (value == null) {
24935 throw new NullPointerException();
24936 }
24937 ensureValueInfoIsMutable();
24938 valueInfo_.add(value);
24939 onChanged();
24940 } else {
24941 valueInfoBuilder_.addMessage(value);
24942 }
24943 return this;
24944 }
24945 /**
24946 * <pre>
24947 * Information for the values in the graph. The ValueInfoProto.name's
24948 * must be distinct. It is optional for a value to appear in value_info list.
24949 * </pre>
24950 *
24951 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24952 */
24953 public Builder addValueInfo(
24954 int index, onnx.OnnxMl.ValueInfoProto value) {
24955 if (valueInfoBuilder_ == null) {
24956 if (value == null) {
24957 throw new NullPointerException();
24958 }
24959 ensureValueInfoIsMutable();
24960 valueInfo_.add(index, value);
24961 onChanged();
24962 } else {
24963 valueInfoBuilder_.addMessage(index, value);
24964 }
24965 return this;
24966 }
24967 /**
24968 * <pre>
24969 * Information for the values in the graph. The ValueInfoProto.name's
24970 * must be distinct. It is optional for a value to appear in value_info list.
24971 * </pre>
24972 *
24973 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24974 */
24975 public Builder addValueInfo(
24976 onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24977 if (valueInfoBuilder_ == null) {
24978 ensureValueInfoIsMutable();
24979 valueInfo_.add(builderForValue.build());
24980 onChanged();
24981 } else {
24982 valueInfoBuilder_.addMessage(builderForValue.build());
24983 }
24984 return this;
24985 }
24986 /**
24987 * <pre>
24988 * Information for the values in the graph. The ValueInfoProto.name's
24989 * must be distinct. It is optional for a value to appear in value_info list.
24990 * </pre>
24991 *
24992 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
24993 */
24994 public Builder addValueInfo(
24995 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
24996 if (valueInfoBuilder_ == null) {
24997 ensureValueInfoIsMutable();
24998 valueInfo_.add(index, builderForValue.build());
24999 onChanged();
25000 } else {
25001 valueInfoBuilder_.addMessage(index, builderForValue.build());
25002 }
25003 return this;
25004 }
25005 /**
25006 * <pre>
25007 * Information for the values in the graph. The ValueInfoProto.name's
25008 * must be distinct. It is optional for a value to appear in value_info list.
25009 * </pre>
25010 *
25011 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25012 */
25013 public Builder addAllValueInfo(
25014 java.lang.Iterable<? extends onnx.OnnxMl.ValueInfoProto> values) {
25015 if (valueInfoBuilder_ == null) {
25016 ensureValueInfoIsMutable();
25017 com.google.protobuf.AbstractMessageLite.Builder.addAll(
25018 values, valueInfo_);
25019 onChanged();
25020 } else {
25021 valueInfoBuilder_.addAllMessages(values);
25022 }
25023 return this;
25024 }
25025 /**
25026 * <pre>
25027 * Information for the values in the graph. The ValueInfoProto.name's
25028 * must be distinct. It is optional for a value to appear in value_info list.
25029 * </pre>
25030 *
25031 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25032 */
25033 public Builder clearValueInfo() {
25034 if (valueInfoBuilder_ == null) {
25035 valueInfo_ = java.util.Collections.emptyList();
25036 bitField0_ = (bitField0_ & ~0x00000080);
25037 onChanged();
25038 } else {
25039 valueInfoBuilder_.clear();
25040 }
25041 return this;
25042 }
25043 /**
25044 * <pre>
25045 * Information for the values in the graph. The ValueInfoProto.name's
25046 * must be distinct. It is optional for a value to appear in value_info list.
25047 * </pre>
25048 *
25049 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25050 */
25051 public Builder removeValueInfo(int index) {
25052 if (valueInfoBuilder_ == null) {
25053 ensureValueInfoIsMutable();
25054 valueInfo_.remove(index);
25055 onChanged();
25056 } else {
25057 valueInfoBuilder_.remove(index);
25058 }
25059 return this;
25060 }
25061 /**
25062 * <pre>
25063 * Information for the values in the graph. The ValueInfoProto.name's
25064 * must be distinct. It is optional for a value to appear in value_info list.
25065 * </pre>
25066 *
25067 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25068 */
25069 public onnx.OnnxMl.ValueInfoProto.Builder getValueInfoBuilder(
25070 int index) {
25071 return getValueInfoFieldBuilder().getBuilder(index);
25072 }
25073 /**
25074 * <pre>
25075 * Information for the values in the graph. The ValueInfoProto.name's
25076 * must be distinct. It is optional for a value to appear in value_info list.
25077 * </pre>
25078 *
25079 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25080 */
25081 public onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
25082 int index) {
25083 if (valueInfoBuilder_ == null) {
25084 return valueInfo_.get(index); } else {
25085 return valueInfoBuilder_.getMessageOrBuilder(index);
25086 }
25087 }
25088 /**
25089 * <pre>
25090 * Information for the values in the graph. The ValueInfoProto.name's
25091 * must be distinct. It is optional for a value to appear in value_info list.
25092 * </pre>
25093 *
25094 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25095 */
25096 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
25097 getValueInfoOrBuilderList() {
25098 if (valueInfoBuilder_ != null) {
25099 return valueInfoBuilder_.getMessageOrBuilderList();
25100 } else {
25101 return java.util.Collections.unmodifiableList(valueInfo_);
25102 }
25103 }
25104 /**
25105 * <pre>
25106 * Information for the values in the graph. The ValueInfoProto.name's
25107 * must be distinct. It is optional for a value to appear in value_info list.
25108 * </pre>
25109 *
25110 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25111 */
25112 public onnx.OnnxMl.ValueInfoProto.Builder addValueInfoBuilder() {
25113 return getValueInfoFieldBuilder().addBuilder(
25114 onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
25115 }
25116 /**
25117 * <pre>
25118 * Information for the values in the graph. The ValueInfoProto.name's
25119 * must be distinct. It is optional for a value to appear in value_info list.
25120 * </pre>
25121 *
25122 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25123 */
25124 public onnx.OnnxMl.ValueInfoProto.Builder addValueInfoBuilder(
25125 int index) {
25126 return getValueInfoFieldBuilder().addBuilder(
25127 index, onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
25128 }
25129 /**
25130 * <pre>
25131 * Information for the values in the graph. The ValueInfoProto.name's
25132 * must be distinct. It is optional for a value to appear in value_info list.
25133 * </pre>
25134 *
25135 * <code>repeated .onnx.ValueInfoProto value_info = 13;</code>
25136 */
25137 public java.util.List<onnx.OnnxMl.ValueInfoProto.Builder>
25138 getValueInfoBuilderList() {
25139 return getValueInfoFieldBuilder().getBuilderList();
25140 }
25141 private com.google.protobuf.RepeatedFieldBuilder<
25142 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>
25143 getValueInfoFieldBuilder() {
25144 if (valueInfoBuilder_ == null) {
25145 valueInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
25146 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>(
25147 valueInfo_,
25148 ((bitField0_ & 0x00000080) != 0),
25149 getParentForChildren(),
25150 isClean());
25151 valueInfo_ = null;
25152 }
25153 return valueInfoBuilder_;
25154 }
25155
25156 private java.util.List<onnx.OnnxMl.TensorAnnotation> quantizationAnnotation_ =
25157 java.util.Collections.emptyList();
25158 private void ensureQuantizationAnnotationIsMutable() {
25159 if (!((bitField0_ & 0x00000100) != 0)) {
25160 quantizationAnnotation_ = new java.util.ArrayList<onnx.OnnxMl.TensorAnnotation>(quantizationAnnotation_);
25161 bitField0_ |= 0x00000100;
25162 }
25163 }
25164
25165 private com.google.protobuf.RepeatedFieldBuilder<
25166 onnx.OnnxMl.TensorAnnotation, onnx.OnnxMl.TensorAnnotation.Builder, onnx.OnnxMl.TensorAnnotationOrBuilder> quantizationAnnotationBuilder_;
25167
25168 /**
25169 * <pre>
25170 * This field carries information to indicate the mapping among a tensor and its
25171 * quantization parameter tensors. For example:
25172 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25173 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25174 * </pre>
25175 *
25176 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25177 */
25178 public java.util.List<onnx.OnnxMl.TensorAnnotation> getQuantizationAnnotationList() {
25179 if (quantizationAnnotationBuilder_ == null) {
25180 return java.util.Collections.unmodifiableList(quantizationAnnotation_);
25181 } else {
25182 return quantizationAnnotationBuilder_.getMessageList();
25183 }
25184 }
25185 /**
25186 * <pre>
25187 * This field carries information to indicate the mapping among a tensor and its
25188 * quantization parameter tensors. For example:
25189 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25190 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25191 * </pre>
25192 *
25193 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25194 */
25195 public int getQuantizationAnnotationCount() {
25196 if (quantizationAnnotationBuilder_ == null) {
25197 return quantizationAnnotation_.size();
25198 } else {
25199 return quantizationAnnotationBuilder_.getCount();
25200 }
25201 }
25202 /**
25203 * <pre>
25204 * This field carries information to indicate the mapping among a tensor and its
25205 * quantization parameter tensors. For example:
25206 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25207 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25208 * </pre>
25209 *
25210 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25211 */
25212 public onnx.OnnxMl.TensorAnnotation getQuantizationAnnotation(int index) {
25213 if (quantizationAnnotationBuilder_ == null) {
25214 return quantizationAnnotation_.get(index);
25215 } else {
25216 return quantizationAnnotationBuilder_.getMessage(index);
25217 }
25218 }
25219 /**
25220 * <pre>
25221 * This field carries information to indicate the mapping among a tensor and its
25222 * quantization parameter tensors. For example:
25223 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25224 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25225 * </pre>
25226 *
25227 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25228 */
25229 public Builder setQuantizationAnnotation(
25230 int index, onnx.OnnxMl.TensorAnnotation value) {
25231 if (quantizationAnnotationBuilder_ == null) {
25232 if (value == null) {
25233 throw new NullPointerException();
25234 }
25235 ensureQuantizationAnnotationIsMutable();
25236 quantizationAnnotation_.set(index, value);
25237 onChanged();
25238 } else {
25239 quantizationAnnotationBuilder_.setMessage(index, value);
25240 }
25241 return this;
25242 }
25243 /**
25244 * <pre>
25245 * This field carries information to indicate the mapping among a tensor and its
25246 * quantization parameter tensors. For example:
25247 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25248 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25249 * </pre>
25250 *
25251 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25252 */
25253 public Builder setQuantizationAnnotation(
25254 int index, onnx.OnnxMl.TensorAnnotation.Builder builderForValue) {
25255 if (quantizationAnnotationBuilder_ == null) {
25256 ensureQuantizationAnnotationIsMutable();
25257 quantizationAnnotation_.set(index, builderForValue.build());
25258 onChanged();
25259 } else {
25260 quantizationAnnotationBuilder_.setMessage(index, builderForValue.build());
25261 }
25262 return this;
25263 }
25264 /**
25265 * <pre>
25266 * This field carries information to indicate the mapping among a tensor and its
25267 * quantization parameter tensors. For example:
25268 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25269 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25270 * </pre>
25271 *
25272 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25273 */
25274 public Builder addQuantizationAnnotation(onnx.OnnxMl.TensorAnnotation value) {
25275 if (quantizationAnnotationBuilder_ == null) {
25276 if (value == null) {
25277 throw new NullPointerException();
25278 }
25279 ensureQuantizationAnnotationIsMutable();
25280 quantizationAnnotation_.add(value);
25281 onChanged();
25282 } else {
25283 quantizationAnnotationBuilder_.addMessage(value);
25284 }
25285 return this;
25286 }
25287 /**
25288 * <pre>
25289 * This field carries information to indicate the mapping among a tensor and its
25290 * quantization parameter tensors. For example:
25291 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25292 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25293 * </pre>
25294 *
25295 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25296 */
25297 public Builder addQuantizationAnnotation(
25298 int index, onnx.OnnxMl.TensorAnnotation value) {
25299 if (quantizationAnnotationBuilder_ == null) {
25300 if (value == null) {
25301 throw new NullPointerException();
25302 }
25303 ensureQuantizationAnnotationIsMutable();
25304 quantizationAnnotation_.add(index, value);
25305 onChanged();
25306 } else {
25307 quantizationAnnotationBuilder_.addMessage(index, value);
25308 }
25309 return this;
25310 }
25311 /**
25312 * <pre>
25313 * This field carries information to indicate the mapping among a tensor and its
25314 * quantization parameter tensors. For example:
25315 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25316 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25317 * </pre>
25318 *
25319 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25320 */
25321 public Builder addQuantizationAnnotation(
25322 onnx.OnnxMl.TensorAnnotation.Builder builderForValue) {
25323 if (quantizationAnnotationBuilder_ == null) {
25324 ensureQuantizationAnnotationIsMutable();
25325 quantizationAnnotation_.add(builderForValue.build());
25326 onChanged();
25327 } else {
25328 quantizationAnnotationBuilder_.addMessage(builderForValue.build());
25329 }
25330 return this;
25331 }
25332 /**
25333 * <pre>
25334 * This field carries information to indicate the mapping among a tensor and its
25335 * quantization parameter tensors. For example:
25336 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25337 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25338 * </pre>
25339 *
25340 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25341 */
25342 public Builder addQuantizationAnnotation(
25343 int index, onnx.OnnxMl.TensorAnnotation.Builder builderForValue) {
25344 if (quantizationAnnotationBuilder_ == null) {
25345 ensureQuantizationAnnotationIsMutable();
25346 quantizationAnnotation_.add(index, builderForValue.build());
25347 onChanged();
25348 } else {
25349 quantizationAnnotationBuilder_.addMessage(index, builderForValue.build());
25350 }
25351 return this;
25352 }
25353 /**
25354 * <pre>
25355 * This field carries information to indicate the mapping among a tensor and its
25356 * quantization parameter tensors. For example:
25357 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25358 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25359 * </pre>
25360 *
25361 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25362 */
25363 public Builder addAllQuantizationAnnotation(
25364 java.lang.Iterable<? extends onnx.OnnxMl.TensorAnnotation> values) {
25365 if (quantizationAnnotationBuilder_ == null) {
25366 ensureQuantizationAnnotationIsMutable();
25367 com.google.protobuf.AbstractMessageLite.Builder.addAll(
25368 values, quantizationAnnotation_);
25369 onChanged();
25370 } else {
25371 quantizationAnnotationBuilder_.addAllMessages(values);
25372 }
25373 return this;
25374 }
25375 /**
25376 * <pre>
25377 * This field carries information to indicate the mapping among a tensor and its
25378 * quantization parameter tensors. For example:
25379 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25380 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25381 * </pre>
25382 *
25383 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25384 */
25385 public Builder clearQuantizationAnnotation() {
25386 if (quantizationAnnotationBuilder_ == null) {
25387 quantizationAnnotation_ = java.util.Collections.emptyList();
25388 bitField0_ = (bitField0_ & ~0x00000100);
25389 onChanged();
25390 } else {
25391 quantizationAnnotationBuilder_.clear();
25392 }
25393 return this;
25394 }
25395 /**
25396 * <pre>
25397 * This field carries information to indicate the mapping among a tensor and its
25398 * quantization parameter tensors. For example:
25399 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25400 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25401 * </pre>
25402 *
25403 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25404 */
25405 public Builder removeQuantizationAnnotation(int index) {
25406 if (quantizationAnnotationBuilder_ == null) {
25407 ensureQuantizationAnnotationIsMutable();
25408 quantizationAnnotation_.remove(index);
25409 onChanged();
25410 } else {
25411 quantizationAnnotationBuilder_.remove(index);
25412 }
25413 return this;
25414 }
25415 /**
25416 * <pre>
25417 * This field carries information to indicate the mapping among a tensor and its
25418 * quantization parameter tensors. For example:
25419 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25420 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25421 * </pre>
25422 *
25423 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25424 */
25425 public onnx.OnnxMl.TensorAnnotation.Builder getQuantizationAnnotationBuilder(
25426 int index) {
25427 return getQuantizationAnnotationFieldBuilder().getBuilder(index);
25428 }
25429 /**
25430 * <pre>
25431 * This field carries information to indicate the mapping among a tensor and its
25432 * quantization parameter tensors. For example:
25433 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25434 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25435 * </pre>
25436 *
25437 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25438 */
25439 public onnx.OnnxMl.TensorAnnotationOrBuilder getQuantizationAnnotationOrBuilder(
25440 int index) {
25441 if (quantizationAnnotationBuilder_ == null) {
25442 return quantizationAnnotation_.get(index); } else {
25443 return quantizationAnnotationBuilder_.getMessageOrBuilder(index);
25444 }
25445 }
25446 /**
25447 * <pre>
25448 * This field carries information to indicate the mapping among a tensor and its
25449 * quantization parameter tensors. For example:
25450 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25451 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25452 * </pre>
25453 *
25454 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25455 */
25456 public java.util.List<? extends onnx.OnnxMl.TensorAnnotationOrBuilder>
25457 getQuantizationAnnotationOrBuilderList() {
25458 if (quantizationAnnotationBuilder_ != null) {
25459 return quantizationAnnotationBuilder_.getMessageOrBuilderList();
25460 } else {
25461 return java.util.Collections.unmodifiableList(quantizationAnnotation_);
25462 }
25463 }
25464 /**
25465 * <pre>
25466 * This field carries information to indicate the mapping among a tensor and its
25467 * quantization parameter tensors. For example:
25468 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25469 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25470 * </pre>
25471 *
25472 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25473 */
25474 public onnx.OnnxMl.TensorAnnotation.Builder addQuantizationAnnotationBuilder() {
25475 return getQuantizationAnnotationFieldBuilder().addBuilder(
25476 onnx.OnnxMl.TensorAnnotation.getDefaultInstance());
25477 }
25478 /**
25479 * <pre>
25480 * This field carries information to indicate the mapping among a tensor and its
25481 * quantization parameter tensors. For example:
25482 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25483 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25484 * </pre>
25485 *
25486 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25487 */
25488 public onnx.OnnxMl.TensorAnnotation.Builder addQuantizationAnnotationBuilder(
25489 int index) {
25490 return getQuantizationAnnotationFieldBuilder().addBuilder(
25491 index, onnx.OnnxMl.TensorAnnotation.getDefaultInstance());
25492 }
25493 /**
25494 * <pre>
25495 * This field carries information to indicate the mapping among a tensor and its
25496 * quantization parameter tensors. For example:
25497 * For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
25498 * which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
25499 * </pre>
25500 *
25501 * <code>repeated .onnx.TensorAnnotation quantization_annotation = 14;</code>
25502 */
25503 public java.util.List<onnx.OnnxMl.TensorAnnotation.Builder>
25504 getQuantizationAnnotationBuilderList() {
25505 return getQuantizationAnnotationFieldBuilder().getBuilderList();
25506 }
25507 private com.google.protobuf.RepeatedFieldBuilder<
25508 onnx.OnnxMl.TensorAnnotation, onnx.OnnxMl.TensorAnnotation.Builder, onnx.OnnxMl.TensorAnnotationOrBuilder>
25509 getQuantizationAnnotationFieldBuilder() {
25510 if (quantizationAnnotationBuilder_ == null) {
25511 quantizationAnnotationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
25512 onnx.OnnxMl.TensorAnnotation, onnx.OnnxMl.TensorAnnotation.Builder, onnx.OnnxMl.TensorAnnotationOrBuilder>(
25513 quantizationAnnotation_,
25514 ((bitField0_ & 0x00000100) != 0),
25515 getParentForChildren(),
25516 isClean());
25517 quantizationAnnotation_ = null;
25518 }
25519 return quantizationAnnotationBuilder_;
25520 }
25521
25522 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
25523 java.util.Collections.emptyList();
25524 private void ensureMetadataPropsIsMutable() {
25525 if (!((bitField0_ & 0x00000200) != 0)) {
25526 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
25527 bitField0_ |= 0x00000200;
25528 }
25529 }
25530
25531 private com.google.protobuf.RepeatedFieldBuilder<
25532 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
25533
25534 /**
25535 * <pre>
25536 * Named metadata values; keys should be distinct.
25537 * </pre>
25538 *
25539 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25540 */
25541 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
25542 if (metadataPropsBuilder_ == null) {
25543 return java.util.Collections.unmodifiableList(metadataProps_);
25544 } else {
25545 return metadataPropsBuilder_.getMessageList();
25546 }
25547 }
25548 /**
25549 * <pre>
25550 * Named metadata values; keys should be distinct.
25551 * </pre>
25552 *
25553 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25554 */
25555 public int getMetadataPropsCount() {
25556 if (metadataPropsBuilder_ == null) {
25557 return metadataProps_.size();
25558 } else {
25559 return metadataPropsBuilder_.getCount();
25560 }
25561 }
25562 /**
25563 * <pre>
25564 * Named metadata values; keys should be distinct.
25565 * </pre>
25566 *
25567 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25568 */
25569 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
25570 if (metadataPropsBuilder_ == null) {
25571 return metadataProps_.get(index);
25572 } else {
25573 return metadataPropsBuilder_.getMessage(index);
25574 }
25575 }
25576 /**
25577 * <pre>
25578 * Named metadata values; keys should be distinct.
25579 * </pre>
25580 *
25581 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25582 */
25583 public Builder setMetadataProps(
25584 int index, onnx.OnnxMl.StringStringEntryProto value) {
25585 if (metadataPropsBuilder_ == null) {
25586 if (value == null) {
25587 throw new NullPointerException();
25588 }
25589 ensureMetadataPropsIsMutable();
25590 metadataProps_.set(index, value);
25591 onChanged();
25592 } else {
25593 metadataPropsBuilder_.setMessage(index, value);
25594 }
25595 return this;
25596 }
25597 /**
25598 * <pre>
25599 * Named metadata values; keys should be distinct.
25600 * </pre>
25601 *
25602 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25603 */
25604 public Builder setMetadataProps(
25605 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
25606 if (metadataPropsBuilder_ == null) {
25607 ensureMetadataPropsIsMutable();
25608 metadataProps_.set(index, builderForValue.build());
25609 onChanged();
25610 } else {
25611 metadataPropsBuilder_.setMessage(index, builderForValue.build());
25612 }
25613 return this;
25614 }
25615 /**
25616 * <pre>
25617 * Named metadata values; keys should be distinct.
25618 * </pre>
25619 *
25620 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25621 */
25622 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
25623 if (metadataPropsBuilder_ == null) {
25624 if (value == null) {
25625 throw new NullPointerException();
25626 }
25627 ensureMetadataPropsIsMutable();
25628 metadataProps_.add(value);
25629 onChanged();
25630 } else {
25631 metadataPropsBuilder_.addMessage(value);
25632 }
25633 return this;
25634 }
25635 /**
25636 * <pre>
25637 * Named metadata values; keys should be distinct.
25638 * </pre>
25639 *
25640 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25641 */
25642 public Builder addMetadataProps(
25643 int index, onnx.OnnxMl.StringStringEntryProto value) {
25644 if (metadataPropsBuilder_ == null) {
25645 if (value == null) {
25646 throw new NullPointerException();
25647 }
25648 ensureMetadataPropsIsMutable();
25649 metadataProps_.add(index, value);
25650 onChanged();
25651 } else {
25652 metadataPropsBuilder_.addMessage(index, value);
25653 }
25654 return this;
25655 }
25656 /**
25657 * <pre>
25658 * Named metadata values; keys should be distinct.
25659 * </pre>
25660 *
25661 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25662 */
25663 public Builder addMetadataProps(
25664 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
25665 if (metadataPropsBuilder_ == null) {
25666 ensureMetadataPropsIsMutable();
25667 metadataProps_.add(builderForValue.build());
25668 onChanged();
25669 } else {
25670 metadataPropsBuilder_.addMessage(builderForValue.build());
25671 }
25672 return this;
25673 }
25674 /**
25675 * <pre>
25676 * Named metadata values; keys should be distinct.
25677 * </pre>
25678 *
25679 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25680 */
25681 public Builder addMetadataProps(
25682 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
25683 if (metadataPropsBuilder_ == null) {
25684 ensureMetadataPropsIsMutable();
25685 metadataProps_.add(index, builderForValue.build());
25686 onChanged();
25687 } else {
25688 metadataPropsBuilder_.addMessage(index, builderForValue.build());
25689 }
25690 return this;
25691 }
25692 /**
25693 * <pre>
25694 * Named metadata values; keys should be distinct.
25695 * </pre>
25696 *
25697 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25698 */
25699 public Builder addAllMetadataProps(
25700 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
25701 if (metadataPropsBuilder_ == null) {
25702 ensureMetadataPropsIsMutable();
25703 com.google.protobuf.AbstractMessageLite.Builder.addAll(
25704 values, metadataProps_);
25705 onChanged();
25706 } else {
25707 metadataPropsBuilder_.addAllMessages(values);
25708 }
25709 return this;
25710 }
25711 /**
25712 * <pre>
25713 * Named metadata values; keys should be distinct.
25714 * </pre>
25715 *
25716 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25717 */
25718 public Builder clearMetadataProps() {
25719 if (metadataPropsBuilder_ == null) {
25720 metadataProps_ = java.util.Collections.emptyList();
25721 bitField0_ = (bitField0_ & ~0x00000200);
25722 onChanged();
25723 } else {
25724 metadataPropsBuilder_.clear();
25725 }
25726 return this;
25727 }
25728 /**
25729 * <pre>
25730 * Named metadata values; keys should be distinct.
25731 * </pre>
25732 *
25733 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25734 */
25735 public Builder removeMetadataProps(int index) {
25736 if (metadataPropsBuilder_ == null) {
25737 ensureMetadataPropsIsMutable();
25738 metadataProps_.remove(index);
25739 onChanged();
25740 } else {
25741 metadataPropsBuilder_.remove(index);
25742 }
25743 return this;
25744 }
25745 /**
25746 * <pre>
25747 * Named metadata values; keys should be distinct.
25748 * </pre>
25749 *
25750 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25751 */
25752 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
25753 int index) {
25754 return getMetadataPropsFieldBuilder().getBuilder(index);
25755 }
25756 /**
25757 * <pre>
25758 * Named metadata values; keys should be distinct.
25759 * </pre>
25760 *
25761 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25762 */
25763 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
25764 int index) {
25765 if (metadataPropsBuilder_ == null) {
25766 return metadataProps_.get(index); } else {
25767 return metadataPropsBuilder_.getMessageOrBuilder(index);
25768 }
25769 }
25770 /**
25771 * <pre>
25772 * Named metadata values; keys should be distinct.
25773 * </pre>
25774 *
25775 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25776 */
25777 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
25778 getMetadataPropsOrBuilderList() {
25779 if (metadataPropsBuilder_ != null) {
25780 return metadataPropsBuilder_.getMessageOrBuilderList();
25781 } else {
25782 return java.util.Collections.unmodifiableList(metadataProps_);
25783 }
25784 }
25785 /**
25786 * <pre>
25787 * Named metadata values; keys should be distinct.
25788 * </pre>
25789 *
25790 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25791 */
25792 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
25793 return getMetadataPropsFieldBuilder().addBuilder(
25794 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
25795 }
25796 /**
25797 * <pre>
25798 * Named metadata values; keys should be distinct.
25799 * </pre>
25800 *
25801 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25802 */
25803 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
25804 int index) {
25805 return getMetadataPropsFieldBuilder().addBuilder(
25806 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
25807 }
25808 /**
25809 * <pre>
25810 * Named metadata values; keys should be distinct.
25811 * </pre>
25812 *
25813 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
25814 */
25815 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
25816 getMetadataPropsBuilderList() {
25817 return getMetadataPropsFieldBuilder().getBuilderList();
25818 }
25819 private com.google.protobuf.RepeatedFieldBuilder<
25820 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
25821 getMetadataPropsFieldBuilder() {
25822 if (metadataPropsBuilder_ == null) {
25823 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
25824 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
25825 metadataProps_,
25826 ((bitField0_ & 0x00000200) != 0),
25827 getParentForChildren(),
25828 isClean());
25829 metadataProps_ = null;
25830 }
25831 return metadataPropsBuilder_;
25832 }
25833
25834 // @@protoc_insertion_point(builder_scope:onnx.GraphProto)
25835 }
25836
25837 // @@protoc_insertion_point(class_scope:onnx.GraphProto)
25838 private static final onnx.OnnxMl.GraphProto DEFAULT_INSTANCE;
25839 static {
25840 DEFAULT_INSTANCE = new onnx.OnnxMl.GraphProto();
25841 }
25842
25843 public static onnx.OnnxMl.GraphProto getDefaultInstance() {
25844 return DEFAULT_INSTANCE;
25845 }
25846
25847 private static final com.google.protobuf.Parser<GraphProto>
25848 PARSER = new com.google.protobuf.AbstractParser<GraphProto>() {
25849 @java.lang.Override
25850 public GraphProto parsePartialFrom(
25851 com.google.protobuf.CodedInputStream input,
25852 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
25853 throws com.google.protobuf.InvalidProtocolBufferException {
25854 Builder builder = newBuilder();
25855 try {
25856 builder.mergeFrom(input, extensionRegistry);
25857 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
25858 throw e.setUnfinishedMessage(builder.buildPartial());
25859 } catch (com.google.protobuf.UninitializedMessageException e) {
25860 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
25861 } catch (java.io.IOException e) {
25862 throw new com.google.protobuf.InvalidProtocolBufferException(e)
25863 .setUnfinishedMessage(builder.buildPartial());
25864 }
25865 return builder.buildPartial();
25866 }
25867 };
25868
25869 public static com.google.protobuf.Parser<GraphProto> parser() {
25870 return PARSER;
25871 }
25872
25873 @java.lang.Override
25874 public com.google.protobuf.Parser<GraphProto> getParserForType() {
25875 return PARSER;
25876 }
25877
25878 @java.lang.Override
25879 public onnx.OnnxMl.GraphProto getDefaultInstanceForType() {
25880 return DEFAULT_INSTANCE;
25881 }
25882
25883 }
25884
25885 public interface TensorProtoOrBuilder extends
25886 // @@protoc_insertion_point(interface_extends:onnx.TensorProto)
25887 com.google.protobuf.MessageOrBuilder {
25888
25889 /**
25890 * <pre>
25891 * The shape of the tensor.
25892 * </pre>
25893 *
25894 * <code>repeated int64 dims = 1;</code>
25895 * @return A list containing the dims.
25896 */
25897 java.util.List<java.lang.Long> getDimsList();
25898 /**
25899 * <pre>
25900 * The shape of the tensor.
25901 * </pre>
25902 *
25903 * <code>repeated int64 dims = 1;</code>
25904 * @return The count of dims.
25905 */
25906 int getDimsCount();
25907 /**
25908 * <pre>
25909 * The shape of the tensor.
25910 * </pre>
25911 *
25912 * <code>repeated int64 dims = 1;</code>
25913 * @param index The index of the element to return.
25914 * @return The dims at the given index.
25915 */
25916 long getDims(int index);
25917
25918 /**
25919 * <pre>
25920 * The data type of the tensor.
25921 * This field MUST have a valid TensorProto.DataType value
25922 * </pre>
25923 *
25924 * <code>optional int32 data_type = 2;</code>
25925 * @return Whether the dataType field is set.
25926 */
25927 boolean hasDataType();
25928 /**
25929 * <pre>
25930 * The data type of the tensor.
25931 * This field MUST have a valid TensorProto.DataType value
25932 * </pre>
25933 *
25934 * <code>optional int32 data_type = 2;</code>
25935 * @return The dataType.
25936 */
25937 int getDataType();
25938
25939 /**
25940 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
25941 * @return Whether the segment field is set.
25942 */
25943 boolean hasSegment();
25944 /**
25945 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
25946 * @return The segment.
25947 */
25948 onnx.OnnxMl.TensorProto.Segment getSegment();
25949 /**
25950 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
25951 */
25952 onnx.OnnxMl.TensorProto.SegmentOrBuilder getSegmentOrBuilder();
25953
25954 /**
25955 * <pre>
25956 * For float and complex64 values
25957 * Complex64 tensors are encoded as a single array of floats,
25958 * with the real components appearing in odd numbered positions,
25959 * and the corresponding imaginary component appearing in the
25960 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
25961 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
25962 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
25963 * </pre>
25964 *
25965 * <code>repeated float float_data = 4 [packed = true];</code>
25966 * @return A list containing the floatData.
25967 */
25968 java.util.List<java.lang.Float> getFloatDataList();
25969 /**
25970 * <pre>
25971 * For float and complex64 values
25972 * Complex64 tensors are encoded as a single array of floats,
25973 * with the real components appearing in odd numbered positions,
25974 * and the corresponding imaginary component appearing in the
25975 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
25976 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
25977 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
25978 * </pre>
25979 *
25980 * <code>repeated float float_data = 4 [packed = true];</code>
25981 * @return The count of floatData.
25982 */
25983 int getFloatDataCount();
25984 /**
25985 * <pre>
25986 * For float and complex64 values
25987 * Complex64 tensors are encoded as a single array of floats,
25988 * with the real components appearing in odd numbered positions,
25989 * and the corresponding imaginary component appearing in the
25990 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
25991 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
25992 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
25993 * </pre>
25994 *
25995 * <code>repeated float float_data = 4 [packed = true];</code>
25996 * @param index The index of the element to return.
25997 * @return The floatData at the given index.
25998 */
25999 float getFloatData(int index);
26000
26001 /**
26002 * <pre>
26003 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
26004 * float16 and float8 values must be bit-wise converted to an uint16_t prior
26005 * to writing to the buffer.
26006 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
26007 * the 4 LSB and the second element is stored in the 4 MSB.
26008 * When this field is present, the data_type field MUST be
26009 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
26010 * </pre>
26011 *
26012 * <code>repeated int32 int32_data = 5 [packed = true];</code>
26013 * @return A list containing the int32Data.
26014 */
26015 java.util.List<java.lang.Integer> getInt32DataList();
26016 /**
26017 * <pre>
26018 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
26019 * float16 and float8 values must be bit-wise converted to an uint16_t prior
26020 * to writing to the buffer.
26021 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
26022 * the 4 LSB and the second element is stored in the 4 MSB.
26023 * When this field is present, the data_type field MUST be
26024 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
26025 * </pre>
26026 *
26027 * <code>repeated int32 int32_data = 5 [packed = true];</code>
26028 * @return The count of int32Data.
26029 */
26030 int getInt32DataCount();
26031 /**
26032 * <pre>
26033 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
26034 * float16 and float8 values must be bit-wise converted to an uint16_t prior
26035 * to writing to the buffer.
26036 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
26037 * the 4 LSB and the second element is stored in the 4 MSB.
26038 * When this field is present, the data_type field MUST be
26039 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
26040 * </pre>
26041 *
26042 * <code>repeated int32 int32_data = 5 [packed = true];</code>
26043 * @param index The index of the element to return.
26044 * @return The int32Data at the given index.
26045 */
26046 int getInt32Data(int index);
26047
26048 /**
26049 * <pre>
26050 * For strings.
26051 * Each element of string_data is a UTF-8 encoded Unicode
26052 * string. No trailing null, no leading BOM. The protobuf "string"
26053 * scalar type is not used to match ML community conventions.
26054 * When this field is present, the data_type field MUST be STRING
26055 * </pre>
26056 *
26057 * <code>repeated bytes string_data = 6;</code>
26058 * @return A list containing the stringData.
26059 */
26060 java.util.List<com.google.protobuf.ByteString> getStringDataList();
26061 /**
26062 * <pre>
26063 * For strings.
26064 * Each element of string_data is a UTF-8 encoded Unicode
26065 * string. No trailing null, no leading BOM. The protobuf "string"
26066 * scalar type is not used to match ML community conventions.
26067 * When this field is present, the data_type field MUST be STRING
26068 * </pre>
26069 *
26070 * <code>repeated bytes string_data = 6;</code>
26071 * @return The count of stringData.
26072 */
26073 int getStringDataCount();
26074 /**
26075 * <pre>
26076 * For strings.
26077 * Each element of string_data is a UTF-8 encoded Unicode
26078 * string. No trailing null, no leading BOM. The protobuf "string"
26079 * scalar type is not used to match ML community conventions.
26080 * When this field is present, the data_type field MUST be STRING
26081 * </pre>
26082 *
26083 * <code>repeated bytes string_data = 6;</code>
26084 * @param index The index of the element to return.
26085 * @return The stringData at the given index.
26086 */
26087 com.google.protobuf.ByteString getStringData(int index);
26088
26089 /**
26090 * <pre>
26091 * For int64.
26092 * When this field is present, the data_type field MUST be INT64
26093 * </pre>
26094 *
26095 * <code>repeated int64 int64_data = 7 [packed = true];</code>
26096 * @return A list containing the int64Data.
26097 */
26098 java.util.List<java.lang.Long> getInt64DataList();
26099 /**
26100 * <pre>
26101 * For int64.
26102 * When this field is present, the data_type field MUST be INT64
26103 * </pre>
26104 *
26105 * <code>repeated int64 int64_data = 7 [packed = true];</code>
26106 * @return The count of int64Data.
26107 */
26108 int getInt64DataCount();
26109 /**
26110 * <pre>
26111 * For int64.
26112 * When this field is present, the data_type field MUST be INT64
26113 * </pre>
26114 *
26115 * <code>repeated int64 int64_data = 7 [packed = true];</code>
26116 * @param index The index of the element to return.
26117 * @return The int64Data at the given index.
26118 */
26119 long getInt64Data(int index);
26120
26121 /**
26122 * <pre>
26123 * Optionally, a name for the tensor.
26124 * </pre>
26125 *
26126 * <code>optional string name = 8;</code>
26127 * @return Whether the name field is set.
26128 */
26129 boolean hasName();
26130 /**
26131 * <pre>
26132 * Optionally, a name for the tensor.
26133 * </pre>
26134 *
26135 * <code>optional string name = 8;</code>
26136 * @return The name.
26137 */
26138 java.lang.String getName();
26139 /**
26140 * <pre>
26141 * Optionally, a name for the tensor.
26142 * </pre>
26143 *
26144 * <code>optional string name = 8;</code>
26145 * @return The bytes for name.
26146 */
26147 com.google.protobuf.ByteString
26148 getNameBytes();
26149
26150 /**
26151 * <pre>
26152 * A human-readable documentation for this tensor. Markdown is allowed.
26153 * </pre>
26154 *
26155 * <code>optional string doc_string = 12;</code>
26156 * @return Whether the docString field is set.
26157 */
26158 boolean hasDocString();
26159 /**
26160 * <pre>
26161 * A human-readable documentation for this tensor. Markdown is allowed.
26162 * </pre>
26163 *
26164 * <code>optional string doc_string = 12;</code>
26165 * @return The docString.
26166 */
26167 java.lang.String getDocString();
26168 /**
26169 * <pre>
26170 * A human-readable documentation for this tensor. Markdown is allowed.
26171 * </pre>
26172 *
26173 * <code>optional string doc_string = 12;</code>
26174 * @return The bytes for docString.
26175 */
26176 com.google.protobuf.ByteString
26177 getDocStringBytes();
26178
26179 /**
26180 * <pre>
26181 * Serializations can either use one of the fields above, or use this
26182 * raw bytes field. The only exception is the string case, where one is
26183 * required to store the content in the repeated bytes string_data field.
26184 *
26185 * When this raw_data field is used to store tensor value, elements MUST
26186 * be stored in as fixed-width, little-endian order.
26187 * Floating-point data types MUST be stored in IEEE 754 format.
26188 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
26189 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
26190 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
26191 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
26192 *
26193 * Note: the advantage of specific field rather than the raw_data field is
26194 * that in some cases (e.g. int data), protobuf does a better packing via
26195 * variable length storage, and may lead to smaller binary footprint.
26196 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
26197 * </pre>
26198 *
26199 * <code>optional bytes raw_data = 9;</code>
26200 * @return Whether the rawData field is set.
26201 */
26202 boolean hasRawData();
26203 /**
26204 * <pre>
26205 * Serializations can either use one of the fields above, or use this
26206 * raw bytes field. The only exception is the string case, where one is
26207 * required to store the content in the repeated bytes string_data field.
26208 *
26209 * When this raw_data field is used to store tensor value, elements MUST
26210 * be stored in as fixed-width, little-endian order.
26211 * Floating-point data types MUST be stored in IEEE 754 format.
26212 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
26213 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
26214 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
26215 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
26216 *
26217 * Note: the advantage of specific field rather than the raw_data field is
26218 * that in some cases (e.g. int data), protobuf does a better packing via
26219 * variable length storage, and may lead to smaller binary footprint.
26220 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
26221 * </pre>
26222 *
26223 * <code>optional bytes raw_data = 9;</code>
26224 * @return The rawData.
26225 */
26226 com.google.protobuf.ByteString getRawData();
26227
26228 /**
26229 * <pre>
26230 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
26231 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
26232 * external_data stores key-value pairs describing data location. Recognized keys are:
26233 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
26234 * protobuf model was stored
26235 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
26236 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
26237 * - "length" (optional) - number of bytes containing data. Integer stored as string.
26238 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
26239 * </pre>
26240 *
26241 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
26242 */
26243 java.util.List<onnx.OnnxMl.StringStringEntryProto>
26244 getExternalDataList();
26245 /**
26246 * <pre>
26247 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
26248 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
26249 * external_data stores key-value pairs describing data location. Recognized keys are:
26250 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
26251 * protobuf model was stored
26252 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
26253 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
26254 * - "length" (optional) - number of bytes containing data. Integer stored as string.
26255 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
26256 * </pre>
26257 *
26258 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
26259 */
26260 onnx.OnnxMl.StringStringEntryProto getExternalData(int index);
26261 /**
26262 * <pre>
26263 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
26264 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
26265 * external_data stores key-value pairs describing data location. Recognized keys are:
26266 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
26267 * protobuf model was stored
26268 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
26269 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
26270 * - "length" (optional) - number of bytes containing data. Integer stored as string.
26271 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
26272 * </pre>
26273 *
26274 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
26275 */
26276 int getExternalDataCount();
26277 /**
26278 * <pre>
26279 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
26280 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
26281 * external_data stores key-value pairs describing data location. Recognized keys are:
26282 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
26283 * protobuf model was stored
26284 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
26285 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
26286 * - "length" (optional) - number of bytes containing data. Integer stored as string.
26287 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
26288 * </pre>
26289 *
26290 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
26291 */
26292 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
26293 getExternalDataOrBuilderList();
26294 /**
26295 * <pre>
26296 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
26297 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
26298 * external_data stores key-value pairs describing data location. Recognized keys are:
26299 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
26300 * protobuf model was stored
26301 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
26302 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
26303 * - "length" (optional) - number of bytes containing data. Integer stored as string.
26304 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
26305 * </pre>
26306 *
26307 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
26308 */
26309 onnx.OnnxMl.StringStringEntryProtoOrBuilder getExternalDataOrBuilder(
26310 int index);
26311
26312 /**
26313 * <pre>
26314 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
26315 * </pre>
26316 *
26317 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
26318 * @return Whether the dataLocation field is set.
26319 */
26320 boolean hasDataLocation();
26321 /**
26322 * <pre>
26323 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
26324 * </pre>
26325 *
26326 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
26327 * @return The dataLocation.
26328 */
26329 onnx.OnnxMl.TensorProto.DataLocation getDataLocation();
26330
26331 /**
26332 * <pre>
26333 * For double
26334 * Complex128 tensors are encoded as a single array of doubles,
26335 * with the real components appearing in odd numbered positions,
26336 * and the corresponding imaginary component appearing in the
26337 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
26338 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
26339 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
26340 * </pre>
26341 *
26342 * <code>repeated double double_data = 10 [packed = true];</code>
26343 * @return A list containing the doubleData.
26344 */
26345 java.util.List<java.lang.Double> getDoubleDataList();
26346 /**
26347 * <pre>
26348 * For double
26349 * Complex128 tensors are encoded as a single array of doubles,
26350 * with the real components appearing in odd numbered positions,
26351 * and the corresponding imaginary component appearing in the
26352 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
26353 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
26354 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
26355 * </pre>
26356 *
26357 * <code>repeated double double_data = 10 [packed = true];</code>
26358 * @return The count of doubleData.
26359 */
26360 int getDoubleDataCount();
26361 /**
26362 * <pre>
26363 * For double
26364 * Complex128 tensors are encoded as a single array of doubles,
26365 * with the real components appearing in odd numbered positions,
26366 * and the corresponding imaginary component appearing in the
26367 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
26368 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
26369 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
26370 * </pre>
26371 *
26372 * <code>repeated double double_data = 10 [packed = true];</code>
26373 * @param index The index of the element to return.
26374 * @return The doubleData at the given index.
26375 */
26376 double getDoubleData(int index);
26377
26378 /**
26379 * <pre>
26380 * For uint64 and uint32 values
26381 * When this field is present, the data_type field MUST be
26382 * UINT32 or UINT64
26383 * </pre>
26384 *
26385 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
26386 * @return A list containing the uint64Data.
26387 */
26388 java.util.List<java.lang.Long> getUint64DataList();
26389 /**
26390 * <pre>
26391 * For uint64 and uint32 values
26392 * When this field is present, the data_type field MUST be
26393 * UINT32 or UINT64
26394 * </pre>
26395 *
26396 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
26397 * @return The count of uint64Data.
26398 */
26399 int getUint64DataCount();
26400 /**
26401 * <pre>
26402 * For uint64 and uint32 values
26403 * When this field is present, the data_type field MUST be
26404 * UINT32 or UINT64
26405 * </pre>
26406 *
26407 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
26408 * @param index The index of the element to return.
26409 * @return The uint64Data at the given index.
26410 */
26411 long getUint64Data(int index);
26412
26413 /**
26414 * <pre>
26415 * Named metadata values; keys should be distinct.
26416 * </pre>
26417 *
26418 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
26419 */
26420 java.util.List<onnx.OnnxMl.StringStringEntryProto>
26421 getMetadataPropsList();
26422 /**
26423 * <pre>
26424 * Named metadata values; keys should be distinct.
26425 * </pre>
26426 *
26427 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
26428 */
26429 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
26430 /**
26431 * <pre>
26432 * Named metadata values; keys should be distinct.
26433 * </pre>
26434 *
26435 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
26436 */
26437 int getMetadataPropsCount();
26438 /**
26439 * <pre>
26440 * Named metadata values; keys should be distinct.
26441 * </pre>
26442 *
26443 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
26444 */
26445 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
26446 getMetadataPropsOrBuilderList();
26447 /**
26448 * <pre>
26449 * Named metadata values; keys should be distinct.
26450 * </pre>
26451 *
26452 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
26453 */
26454 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
26455 int index);
26456 }
26457 /**
26458 * <pre>
26459 * Tensors
26460 *
26461 * A serialized tensor value.
26462 * </pre>
26463 *
26464 * Protobuf type {@code onnx.TensorProto}
26465 */
26466 public static final class TensorProto extends
26467 com.google.protobuf.GeneratedMessage implements
26468 // @@protoc_insertion_point(message_implements:onnx.TensorProto)
26469 TensorProtoOrBuilder {
26470 private static final long serialVersionUID = 0L;
26471 static {
26472 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
26473 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
26474 /* major= */ 4,
26475 /* minor= */ 29,
26476 /* patch= */ 3,
26477 /* suffix= */ "",
26478 TensorProto.class.getName());
26479 }
26480 // Use TensorProto.newBuilder() to construct.
26481 private TensorProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
26482 super(builder);
26483 }
26484 private TensorProto() {
26485 dims_ = emptyLongList();
26486 floatData_ = emptyFloatList();
26487 int32Data_ = emptyIntList();
26488 stringData_ = emptyList(com.google.protobuf.ByteString.class);
26489 int64Data_ = emptyLongList();
26490 name_ = "";
26491 docString_ = "";
26492 rawData_ = com.google.protobuf.ByteString.EMPTY;
26493 externalData_ = java.util.Collections.emptyList();
26494 dataLocation_ = 0;
26495 doubleData_ = emptyDoubleList();
26496 uint64Data_ = emptyLongList();
26497 metadataProps_ = java.util.Collections.emptyList();
26498 }
26499
26500 public static final com.google.protobuf.Descriptors.Descriptor
26501 getDescriptor() {
26502 return onnx.OnnxMl.internal_static_onnx_TensorProto_descriptor;
26503 }
26504
26505 @java.lang.Override
26506 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
26507 internalGetFieldAccessorTable() {
26508 return onnx.OnnxMl.internal_static_onnx_TensorProto_fieldAccessorTable
26509 .ensureFieldAccessorsInitialized(
26510 onnx.OnnxMl.TensorProto.class, onnx.OnnxMl.TensorProto.Builder.class);
26511 }
26512
26513 /**
26514 * Protobuf enum {@code onnx.TensorProto.DataType}
26515 */
26516 public enum DataType
26517 implements com.google.protobuf.ProtocolMessageEnum {
26518 /**
26519 * <code>UNDEFINED = 0;</code>
26520 */
26521 UNDEFINED(0),
26522 /**
26523 * <pre>
26524 * Basic types.
26525 * </pre>
26526 *
26527 * <code>FLOAT = 1;</code>
26528 */
26529 FLOAT(1),
26530 /**
26531 * <pre>
26532 * uint8_t
26533 * </pre>
26534 *
26535 * <code>UINT8 = 2;</code>
26536 */
26537 UINT8(2),
26538 /**
26539 * <pre>
26540 * int8_t
26541 * </pre>
26542 *
26543 * <code>INT8 = 3;</code>
26544 */
26545 INT8(3),
26546 /**
26547 * <pre>
26548 * uint16_t
26549 * </pre>
26550 *
26551 * <code>UINT16 = 4;</code>
26552 */
26553 UINT16(4),
26554 /**
26555 * <pre>
26556 * int16_t
26557 * </pre>
26558 *
26559 * <code>INT16 = 5;</code>
26560 */
26561 INT16(5),
26562 /**
26563 * <pre>
26564 * int32_t
26565 * </pre>
26566 *
26567 * <code>INT32 = 6;</code>
26568 */
26569 INT32(6),
26570 /**
26571 * <pre>
26572 * int64_t
26573 * </pre>
26574 *
26575 * <code>INT64 = 7;</code>
26576 */
26577 INT64(7),
26578 /**
26579 * <pre>
26580 * string
26581 * </pre>
26582 *
26583 * <code>STRING = 8;</code>
26584 */
26585 STRING(8),
26586 /**
26587 * <pre>
26588 * bool
26589 * </pre>
26590 *
26591 * <code>BOOL = 9;</code>
26592 */
26593 BOOL(9),
26594 /**
26595 * <pre>
26596 * IEEE754 half-precision floating-point format (16 bits wide).
26597 * This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits.
26598 * </pre>
26599 *
26600 * <code>FLOAT16 = 10;</code>
26601 */
26602 FLOAT16(10),
26603 /**
26604 * <code>DOUBLE = 11;</code>
26605 */
26606 DOUBLE(11),
26607 /**
26608 * <code>UINT32 = 12;</code>
26609 */
26610 UINT32(12),
26611 /**
26612 * <code>UINT64 = 13;</code>
26613 */
26614 UINT64(13),
26615 /**
26616 * <pre>
26617 * complex with float32 real and imaginary components
26618 * </pre>
26619 *
26620 * <code>COMPLEX64 = 14;</code>
26621 */
26622 COMPLEX64(14),
26623 /**
26624 * <pre>
26625 * complex with float64 real and imaginary components
26626 * </pre>
26627 *
26628 * <code>COMPLEX128 = 15;</code>
26629 */
26630 COMPLEX128(15),
26631 /**
26632 * <pre>
26633 * Non-IEEE floating-point format based on IEEE754 single-precision
26634 * floating-point number truncated to 16 bits.
26635 * This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits.
26636 * </pre>
26637 *
26638 * <code>BFLOAT16 = 16;</code>
26639 */
26640 BFLOAT16(16),
26641 /**
26642 * <pre>
26643 * Non-IEEE floating-point format based on papers
26644 * FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433,
26645 * 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf.
26646 * Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear.
26647 * The computation usually happens inside a block quantize / dequantize
26648 * fused by the runtime.
26649 * </pre>
26650 *
26651 * <code>FLOAT8E4M3FN = 17;</code>
26652 */
26653 FLOAT8E4M3FN(17),
26654 /**
26655 * <pre>
26656 * float 8, mostly used for coefficients, supports nan, not inf, no negative zero
26657 * </pre>
26658 *
26659 * <code>FLOAT8E4M3FNUZ = 18;</code>
26660 */
26661 FLOAT8E4M3FNUZ(18),
26662 /**
26663 * <pre>
26664 * follows IEEE 754, supports nan, inf, mostly used for gradients
26665 * </pre>
26666 *
26667 * <code>FLOAT8E5M2 = 19;</code>
26668 */
26669 FLOAT8E5M2(19),
26670 /**
26671 * <pre>
26672 * follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero
26673 * </pre>
26674 *
26675 * <code>FLOAT8E5M2FNUZ = 20;</code>
26676 */
26677 FLOAT8E5M2FNUZ(20),
26678 /**
26679 * <pre>
26680 * 4-bit data-types
26681 * </pre>
26682 *
26683 * <code>UINT4 = 21;</code>
26684 */
26685 UINT4(21),
26686 /**
26687 * <pre>
26688 * Signed integer in range [-8, 7], using two's-complement representation
26689 * </pre>
26690 *
26691 * <code>INT4 = 22;</code>
26692 */
26693 INT4(22),
26694 ;
26695
26696 static {
26697 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
26698 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
26699 /* major= */ 4,
26700 /* minor= */ 29,
26701 /* patch= */ 3,
26702 /* suffix= */ "",
26703 DataType.class.getName());
26704 }
26705 /**
26706 * <code>UNDEFINED = 0;</code>
26707 */
26708 public static final int UNDEFINED_VALUE = 0;
26709 /**
26710 * <pre>
26711 * Basic types.
26712 * </pre>
26713 *
26714 * <code>FLOAT = 1;</code>
26715 */
26716 public static final int FLOAT_VALUE = 1;
26717 /**
26718 * <pre>
26719 * uint8_t
26720 * </pre>
26721 *
26722 * <code>UINT8 = 2;</code>
26723 */
26724 public static final int UINT8_VALUE = 2;
26725 /**
26726 * <pre>
26727 * int8_t
26728 * </pre>
26729 *
26730 * <code>INT8 = 3;</code>
26731 */
26732 public static final int INT8_VALUE = 3;
26733 /**
26734 * <pre>
26735 * uint16_t
26736 * </pre>
26737 *
26738 * <code>UINT16 = 4;</code>
26739 */
26740 public static final int UINT16_VALUE = 4;
26741 /**
26742 * <pre>
26743 * int16_t
26744 * </pre>
26745 *
26746 * <code>INT16 = 5;</code>
26747 */
26748 public static final int INT16_VALUE = 5;
26749 /**
26750 * <pre>
26751 * int32_t
26752 * </pre>
26753 *
26754 * <code>INT32 = 6;</code>
26755 */
26756 public static final int INT32_VALUE = 6;
26757 /**
26758 * <pre>
26759 * int64_t
26760 * </pre>
26761 *
26762 * <code>INT64 = 7;</code>
26763 */
26764 public static final int INT64_VALUE = 7;
26765 /**
26766 * <pre>
26767 * string
26768 * </pre>
26769 *
26770 * <code>STRING = 8;</code>
26771 */
26772 public static final int STRING_VALUE = 8;
26773 /**
26774 * <pre>
26775 * bool
26776 * </pre>
26777 *
26778 * <code>BOOL = 9;</code>
26779 */
26780 public static final int BOOL_VALUE = 9;
26781 /**
26782 * <pre>
26783 * IEEE754 half-precision floating-point format (16 bits wide).
26784 * This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits.
26785 * </pre>
26786 *
26787 * <code>FLOAT16 = 10;</code>
26788 */
26789 public static final int FLOAT16_VALUE = 10;
26790 /**
26791 * <code>DOUBLE = 11;</code>
26792 */
26793 public static final int DOUBLE_VALUE = 11;
26794 /**
26795 * <code>UINT32 = 12;</code>
26796 */
26797 public static final int UINT32_VALUE = 12;
26798 /**
26799 * <code>UINT64 = 13;</code>
26800 */
26801 public static final int UINT64_VALUE = 13;
26802 /**
26803 * <pre>
26804 * complex with float32 real and imaginary components
26805 * </pre>
26806 *
26807 * <code>COMPLEX64 = 14;</code>
26808 */
26809 public static final int COMPLEX64_VALUE = 14;
26810 /**
26811 * <pre>
26812 * complex with float64 real and imaginary components
26813 * </pre>
26814 *
26815 * <code>COMPLEX128 = 15;</code>
26816 */
26817 public static final int COMPLEX128_VALUE = 15;
26818 /**
26819 * <pre>
26820 * Non-IEEE floating-point format based on IEEE754 single-precision
26821 * floating-point number truncated to 16 bits.
26822 * This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits.
26823 * </pre>
26824 *
26825 * <code>BFLOAT16 = 16;</code>
26826 */
26827 public static final int BFLOAT16_VALUE = 16;
26828 /**
26829 * <pre>
26830 * Non-IEEE floating-point format based on papers
26831 * FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433,
26832 * 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf.
26833 * Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear.
26834 * The computation usually happens inside a block quantize / dequantize
26835 * fused by the runtime.
26836 * </pre>
26837 *
26838 * <code>FLOAT8E4M3FN = 17;</code>
26839 */
26840 public static final int FLOAT8E4M3FN_VALUE = 17;
26841 /**
26842 * <pre>
26843 * float 8, mostly used for coefficients, supports nan, not inf, no negative zero
26844 * </pre>
26845 *
26846 * <code>FLOAT8E4M3FNUZ = 18;</code>
26847 */
26848 public static final int FLOAT8E4M3FNUZ_VALUE = 18;
26849 /**
26850 * <pre>
26851 * follows IEEE 754, supports nan, inf, mostly used for gradients
26852 * </pre>
26853 *
26854 * <code>FLOAT8E5M2 = 19;</code>
26855 */
26856 public static final int FLOAT8E5M2_VALUE = 19;
26857 /**
26858 * <pre>
26859 * follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero
26860 * </pre>
26861 *
26862 * <code>FLOAT8E5M2FNUZ = 20;</code>
26863 */
26864 public static final int FLOAT8E5M2FNUZ_VALUE = 20;
26865 /**
26866 * <pre>
26867 * 4-bit data-types
26868 * </pre>
26869 *
26870 * <code>UINT4 = 21;</code>
26871 */
26872 public static final int UINT4_VALUE = 21;
26873 /**
26874 * <pre>
26875 * Signed integer in range [-8, 7], using two's-complement representation
26876 * </pre>
26877 *
26878 * <code>INT4 = 22;</code>
26879 */
26880 public static final int INT4_VALUE = 22;
26881
26882 public final int getNumber() {
26883 return value;
26884 }
26885
26886 /**
26887 * @param value The numeric wire value of the corresponding enum entry.
26888 * @return The enum associated with the given numeric wire value.
26889 * @deprecated Use {@link #forNumber(int)} instead.
26890 */
26891 @java.lang.Deprecated
26892 public static DataType valueOf(int value) {
26893 return forNumber(value);
26894 }
26895
26896 /**
26897 * @param value The numeric wire value of the corresponding enum entry.
26898 * @return The enum associated with the given numeric wire value.
26899 */
26900 public static DataType forNumber(int value) {
26901 switch (value) {
26902 case 0: return UNDEFINED;
26903 case 1: return FLOAT;
26904 case 2: return UINT8;
26905 case 3: return INT8;
26906 case 4: return UINT16;
26907 case 5: return INT16;
26908 case 6: return INT32;
26909 case 7: return INT64;
26910 case 8: return STRING;
26911 case 9: return BOOL;
26912 case 10: return FLOAT16;
26913 case 11: return DOUBLE;
26914 case 12: return UINT32;
26915 case 13: return UINT64;
26916 case 14: return COMPLEX64;
26917 case 15: return COMPLEX128;
26918 case 16: return BFLOAT16;
26919 case 17: return FLOAT8E4M3FN;
26920 case 18: return FLOAT8E4M3FNUZ;
26921 case 19: return FLOAT8E5M2;
26922 case 20: return FLOAT8E5M2FNUZ;
26923 case 21: return UINT4;
26924 case 22: return INT4;
26925 default: return null;
26926 }
26927 }
26928
26929 public static com.google.protobuf.Internal.EnumLiteMap<DataType>
26930 internalGetValueMap() {
26931 return internalValueMap;
26932 }
26933 private static final com.google.protobuf.Internal.EnumLiteMap<
26934 DataType> internalValueMap =
26935 new com.google.protobuf.Internal.EnumLiteMap<DataType>() {
26936 public DataType findValueByNumber(int number) {
26937 return DataType.forNumber(number);
26938 }
26939 };
26940
26941 public final com.google.protobuf.Descriptors.EnumValueDescriptor
26942 getValueDescriptor() {
26943 return getDescriptor().getValues().get(ordinal());
26944 }
26945 public final com.google.protobuf.Descriptors.EnumDescriptor
26946 getDescriptorForType() {
26947 return getDescriptor();
26948 }
26949 public static final com.google.protobuf.Descriptors.EnumDescriptor
26950 getDescriptor() {
26951 return onnx.OnnxMl.TensorProto.getDescriptor().getEnumTypes().get(0);
26952 }
26953
26954 private static final DataType[] VALUES = values();
26955
26956 public static DataType valueOf(
26957 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
26958 if (desc.getType() != getDescriptor()) {
26959 throw new java.lang.IllegalArgumentException(
26960 "EnumValueDescriptor is not for this type.");
26961 }
26962 return VALUES[desc.getIndex()];
26963 }
26964
26965 private final int value;
26966
26967 private DataType(int value) {
26968 this.value = value;
26969 }
26970
26971 // @@protoc_insertion_point(enum_scope:onnx.TensorProto.DataType)
26972 }
26973
26974 /**
26975 * <pre>
26976 * Location of the data for this tensor. MUST be one of:
26977 * - DEFAULT - data stored inside the protobuf message. Data is stored in raw_data (if set) otherwise in type-specified field.
26978 * - EXTERNAL - data stored in an external location as described by external_data field.
26979 * </pre>
26980 *
26981 * Protobuf enum {@code onnx.TensorProto.DataLocation}
26982 */
26983 public enum DataLocation
26984 implements com.google.protobuf.ProtocolMessageEnum {
26985 /**
26986 * <code>DEFAULT = 0;</code>
26987 */
26988 DEFAULT(0),
26989 /**
26990 * <code>EXTERNAL = 1;</code>
26991 */
26992 EXTERNAL(1),
26993 ;
26994
26995 static {
26996 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
26997 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
26998 /* major= */ 4,
26999 /* minor= */ 29,
27000 /* patch= */ 3,
27001 /* suffix= */ "",
27002 DataLocation.class.getName());
27003 }
27004 /**
27005 * <code>DEFAULT = 0;</code>
27006 */
27007 public static final int DEFAULT_VALUE = 0;
27008 /**
27009 * <code>EXTERNAL = 1;</code>
27010 */
27011 public static final int EXTERNAL_VALUE = 1;
27012
27013 public final int getNumber() {
27014 return value;
27015 }
27016
27017 /**
27018 * @param value The numeric wire value of the corresponding enum entry.
27019 * @return The enum associated with the given numeric wire value.
27020 * @deprecated Use {@link #forNumber(int)} instead.
27021 */
27022 @java.lang.Deprecated
27023 public static DataLocation valueOf(int value) {
27024 return forNumber(value);
27025 }
27026
27027 /**
27028 * @param value The numeric wire value of the corresponding enum entry.
27029 * @return The enum associated with the given numeric wire value.
27030 */
27031 public static DataLocation forNumber(int value) {
27032 switch (value) {
27033 case 0: return DEFAULT;
27034 case 1: return EXTERNAL;
27035 default: return null;
27036 }
27037 }
27038
27039 public static com.google.protobuf.Internal.EnumLiteMap<DataLocation>
27040 internalGetValueMap() {
27041 return internalValueMap;
27042 }
27043 private static final com.google.protobuf.Internal.EnumLiteMap<
27044 DataLocation> internalValueMap =
27045 new com.google.protobuf.Internal.EnumLiteMap<DataLocation>() {
27046 public DataLocation findValueByNumber(int number) {
27047 return DataLocation.forNumber(number);
27048 }
27049 };
27050
27051 public final com.google.protobuf.Descriptors.EnumValueDescriptor
27052 getValueDescriptor() {
27053 return getDescriptor().getValues().get(ordinal());
27054 }
27055 public final com.google.protobuf.Descriptors.EnumDescriptor
27056 getDescriptorForType() {
27057 return getDescriptor();
27058 }
27059 public static final com.google.protobuf.Descriptors.EnumDescriptor
27060 getDescriptor() {
27061 return onnx.OnnxMl.TensorProto.getDescriptor().getEnumTypes().get(1);
27062 }
27063
27064 private static final DataLocation[] VALUES = values();
27065
27066 public static DataLocation valueOf(
27067 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
27068 if (desc.getType() != getDescriptor()) {
27069 throw new java.lang.IllegalArgumentException(
27070 "EnumValueDescriptor is not for this type.");
27071 }
27072 return VALUES[desc.getIndex()];
27073 }
27074
27075 private final int value;
27076
27077 private DataLocation(int value) {
27078 this.value = value;
27079 }
27080
27081 // @@protoc_insertion_point(enum_scope:onnx.TensorProto.DataLocation)
27082 }
27083
27084 public interface SegmentOrBuilder extends
27085 // @@protoc_insertion_point(interface_extends:onnx.TensorProto.Segment)
27086 com.google.protobuf.MessageOrBuilder {
27087
27088 /**
27089 * <code>optional int64 begin = 1;</code>
27090 * @return Whether the begin field is set.
27091 */
27092 boolean hasBegin();
27093 /**
27094 * <code>optional int64 begin = 1;</code>
27095 * @return The begin.
27096 */
27097 long getBegin();
27098
27099 /**
27100 * <code>optional int64 end = 2;</code>
27101 * @return Whether the end field is set.
27102 */
27103 boolean hasEnd();
27104 /**
27105 * <code>optional int64 end = 2;</code>
27106 * @return The end.
27107 */
27108 long getEnd();
27109 }
27110 /**
27111 * <pre>
27112 * For very large tensors, we may want to store them in chunks, in which
27113 * case the following fields will specify the segment that is stored in
27114 * the current TensorProto.
27115 * </pre>
27116 *
27117 * Protobuf type {@code onnx.TensorProto.Segment}
27118 */
27119 public static final class Segment extends
27120 com.google.protobuf.GeneratedMessage implements
27121 // @@protoc_insertion_point(message_implements:onnx.TensorProto.Segment)
27122 SegmentOrBuilder {
27123 private static final long serialVersionUID = 0L;
27124 static {
27125 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
27126 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27127 /* major= */ 4,
27128 /* minor= */ 29,
27129 /* patch= */ 3,
27130 /* suffix= */ "",
27131 Segment.class.getName());
27132 }
27133 // Use Segment.newBuilder() to construct.
27134 private Segment(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
27135 super(builder);
27136 }
27137 private Segment() {
27138 }
27139
27140 public static final com.google.protobuf.Descriptors.Descriptor
27141 getDescriptor() {
27142 return onnx.OnnxMl.internal_static_onnx_TensorProto_Segment_descriptor;
27143 }
27144
27145 @java.lang.Override
27146 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
27147 internalGetFieldAccessorTable() {
27148 return onnx.OnnxMl.internal_static_onnx_TensorProto_Segment_fieldAccessorTable
27149 .ensureFieldAccessorsInitialized(
27150 onnx.OnnxMl.TensorProto.Segment.class, onnx.OnnxMl.TensorProto.Segment.Builder.class);
27151 }
27152
27153 private int bitField0_;
27154 public static final int BEGIN_FIELD_NUMBER = 1;
27155 private long begin_ = 0L;
27156 /**
27157 * <code>optional int64 begin = 1;</code>
27158 * @return Whether the begin field is set.
27159 */
27160 @java.lang.Override
27161 public boolean hasBegin() {
27162 return ((bitField0_ & 0x00000001) != 0);
27163 }
27164 /**
27165 * <code>optional int64 begin = 1;</code>
27166 * @return The begin.
27167 */
27168 @java.lang.Override
27169 public long getBegin() {
27170 return begin_;
27171 }
27172
27173 public static final int END_FIELD_NUMBER = 2;
27174 private long end_ = 0L;
27175 /**
27176 * <code>optional int64 end = 2;</code>
27177 * @return Whether the end field is set.
27178 */
27179 @java.lang.Override
27180 public boolean hasEnd() {
27181 return ((bitField0_ & 0x00000002) != 0);
27182 }
27183 /**
27184 * <code>optional int64 end = 2;</code>
27185 * @return The end.
27186 */
27187 @java.lang.Override
27188 public long getEnd() {
27189 return end_;
27190 }
27191
27192 private byte memoizedIsInitialized = -1;
27193 @java.lang.Override
27194 public final boolean isInitialized() {
27195 byte isInitialized = memoizedIsInitialized;
27196 if (isInitialized == 1) return true;
27197 if (isInitialized == 0) return false;
27198
27199 memoizedIsInitialized = 1;
27200 return true;
27201 }
27202
27203 @java.lang.Override
27204 public void writeTo(com.google.protobuf.CodedOutputStream output)
27205 throws java.io.IOException {
27206 if (((bitField0_ & 0x00000001) != 0)) {
27207 output.writeInt64(1, begin_);
27208 }
27209 if (((bitField0_ & 0x00000002) != 0)) {
27210 output.writeInt64(2, end_);
27211 }
27212 getUnknownFields().writeTo(output);
27213 }
27214
27215 @java.lang.Override
27216 public int getSerializedSize() {
27217 int size = memoizedSize;
27218 if (size != -1) return size;
27219
27220 size = 0;
27221 if (((bitField0_ & 0x00000001) != 0)) {
27222 size += com.google.protobuf.CodedOutputStream
27223 .computeInt64Size(1, begin_);
27224 }
27225 if (((bitField0_ & 0x00000002) != 0)) {
27226 size += com.google.protobuf.CodedOutputStream
27227 .computeInt64Size(2, end_);
27228 }
27229 size += getUnknownFields().getSerializedSize();
27230 memoizedSize = size;
27231 return size;
27232 }
27233
27234 @java.lang.Override
27235 public boolean equals(final java.lang.Object obj) {
27236 if (obj == this) {
27237 return true;
27238 }
27239 if (!(obj instanceof onnx.OnnxMl.TensorProto.Segment)) {
27240 return super.equals(obj);
27241 }
27242 onnx.OnnxMl.TensorProto.Segment other = (onnx.OnnxMl.TensorProto.Segment) obj;
27243
27244 if (hasBegin() != other.hasBegin()) return false;
27245 if (hasBegin()) {
27246 if (getBegin()
27247 != other.getBegin()) return false;
27248 }
27249 if (hasEnd() != other.hasEnd()) return false;
27250 if (hasEnd()) {
27251 if (getEnd()
27252 != other.getEnd()) return false;
27253 }
27254 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
27255 return true;
27256 }
27257
27258 @java.lang.Override
27259 public int hashCode() {
27260 if (memoizedHashCode != 0) {
27261 return memoizedHashCode;
27262 }
27263 int hash = 41;
27264 hash = (19 * hash) + getDescriptor().hashCode();
27265 if (hasBegin()) {
27266 hash = (37 * hash) + BEGIN_FIELD_NUMBER;
27267 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
27268 getBegin());
27269 }
27270 if (hasEnd()) {
27271 hash = (37 * hash) + END_FIELD_NUMBER;
27272 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
27273 getEnd());
27274 }
27275 hash = (29 * hash) + getUnknownFields().hashCode();
27276 memoizedHashCode = hash;
27277 return hash;
27278 }
27279
27280 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27281 java.nio.ByteBuffer data)
27282 throws com.google.protobuf.InvalidProtocolBufferException {
27283 return PARSER.parseFrom(data);
27284 }
27285 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27286 java.nio.ByteBuffer data,
27287 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27288 throws com.google.protobuf.InvalidProtocolBufferException {
27289 return PARSER.parseFrom(data, extensionRegistry);
27290 }
27291 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27292 com.google.protobuf.ByteString data)
27293 throws com.google.protobuf.InvalidProtocolBufferException {
27294 return PARSER.parseFrom(data);
27295 }
27296 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27297 com.google.protobuf.ByteString data,
27298 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27299 throws com.google.protobuf.InvalidProtocolBufferException {
27300 return PARSER.parseFrom(data, extensionRegistry);
27301 }
27302 public static onnx.OnnxMl.TensorProto.Segment parseFrom(byte[] data)
27303 throws com.google.protobuf.InvalidProtocolBufferException {
27304 return PARSER.parseFrom(data);
27305 }
27306 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27307 byte[] data,
27308 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27309 throws com.google.protobuf.InvalidProtocolBufferException {
27310 return PARSER.parseFrom(data, extensionRegistry);
27311 }
27312 public static onnx.OnnxMl.TensorProto.Segment parseFrom(java.io.InputStream input)
27313 throws java.io.IOException {
27314 return com.google.protobuf.GeneratedMessage
27315 .parseWithIOException(PARSER, input);
27316 }
27317 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27318 java.io.InputStream input,
27319 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27320 throws java.io.IOException {
27321 return com.google.protobuf.GeneratedMessage
27322 .parseWithIOException(PARSER, input, extensionRegistry);
27323 }
27324
27325 public static onnx.OnnxMl.TensorProto.Segment parseDelimitedFrom(java.io.InputStream input)
27326 throws java.io.IOException {
27327 return com.google.protobuf.GeneratedMessage
27328 .parseDelimitedWithIOException(PARSER, input);
27329 }
27330
27331 public static onnx.OnnxMl.TensorProto.Segment parseDelimitedFrom(
27332 java.io.InputStream input,
27333 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27334 throws java.io.IOException {
27335 return com.google.protobuf.GeneratedMessage
27336 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
27337 }
27338 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27339 com.google.protobuf.CodedInputStream input)
27340 throws java.io.IOException {
27341 return com.google.protobuf.GeneratedMessage
27342 .parseWithIOException(PARSER, input);
27343 }
27344 public static onnx.OnnxMl.TensorProto.Segment parseFrom(
27345 com.google.protobuf.CodedInputStream input,
27346 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27347 throws java.io.IOException {
27348 return com.google.protobuf.GeneratedMessage
27349 .parseWithIOException(PARSER, input, extensionRegistry);
27350 }
27351
27352 @java.lang.Override
27353 public Builder newBuilderForType() { return newBuilder(); }
27354 public static Builder newBuilder() {
27355 return DEFAULT_INSTANCE.toBuilder();
27356 }
27357 public static Builder newBuilder(onnx.OnnxMl.TensorProto.Segment prototype) {
27358 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
27359 }
27360 @java.lang.Override
27361 public Builder toBuilder() {
27362 return this == DEFAULT_INSTANCE
27363 ? new Builder() : new Builder().mergeFrom(this);
27364 }
27365
27366 @java.lang.Override
27367 protected Builder newBuilderForType(
27368 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
27369 Builder builder = new Builder(parent);
27370 return builder;
27371 }
27372 /**
27373 * <pre>
27374 * For very large tensors, we may want to store them in chunks, in which
27375 * case the following fields will specify the segment that is stored in
27376 * the current TensorProto.
27377 * </pre>
27378 *
27379 * Protobuf type {@code onnx.TensorProto.Segment}
27380 */
27381 public static final class Builder extends
27382 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
27383 // @@protoc_insertion_point(builder_implements:onnx.TensorProto.Segment)
27384 onnx.OnnxMl.TensorProto.SegmentOrBuilder {
27385 public static final com.google.protobuf.Descriptors.Descriptor
27386 getDescriptor() {
27387 return onnx.OnnxMl.internal_static_onnx_TensorProto_Segment_descriptor;
27388 }
27389
27390 @java.lang.Override
27391 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
27392 internalGetFieldAccessorTable() {
27393 return onnx.OnnxMl.internal_static_onnx_TensorProto_Segment_fieldAccessorTable
27394 .ensureFieldAccessorsInitialized(
27395 onnx.OnnxMl.TensorProto.Segment.class, onnx.OnnxMl.TensorProto.Segment.Builder.class);
27396 }
27397
27398 // Construct using onnx.OnnxMl.TensorProto.Segment.newBuilder()
27399 private Builder() {
27400
27401 }
27402
27403 private Builder(
27404 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
27405 super(parent);
27406
27407 }
27408 @java.lang.Override
27409 public Builder clear() {
27410 super.clear();
27411 bitField0_ = 0;
27412 begin_ = 0L;
27413 end_ = 0L;
27414 return this;
27415 }
27416
27417 @java.lang.Override
27418 public com.google.protobuf.Descriptors.Descriptor
27419 getDescriptorForType() {
27420 return onnx.OnnxMl.internal_static_onnx_TensorProto_Segment_descriptor;
27421 }
27422
27423 @java.lang.Override
27424 public onnx.OnnxMl.TensorProto.Segment getDefaultInstanceForType() {
27425 return onnx.OnnxMl.TensorProto.Segment.getDefaultInstance();
27426 }
27427
27428 @java.lang.Override
27429 public onnx.OnnxMl.TensorProto.Segment build() {
27430 onnx.OnnxMl.TensorProto.Segment result = buildPartial();
27431 if (!result.isInitialized()) {
27432 throw newUninitializedMessageException(result);
27433 }
27434 return result;
27435 }
27436
27437 @java.lang.Override
27438 public onnx.OnnxMl.TensorProto.Segment buildPartial() {
27439 onnx.OnnxMl.TensorProto.Segment result = new onnx.OnnxMl.TensorProto.Segment(this);
27440 if (bitField0_ != 0) { buildPartial0(result); }
27441 onBuilt();
27442 return result;
27443 }
27444
27445 private void buildPartial0(onnx.OnnxMl.TensorProto.Segment result) {
27446 int from_bitField0_ = bitField0_;
27447 int to_bitField0_ = 0;
27448 if (((from_bitField0_ & 0x00000001) != 0)) {
27449 result.begin_ = begin_;
27450 to_bitField0_ |= 0x00000001;
27451 }
27452 if (((from_bitField0_ & 0x00000002) != 0)) {
27453 result.end_ = end_;
27454 to_bitField0_ |= 0x00000002;
27455 }
27456 result.bitField0_ |= to_bitField0_;
27457 }
27458
27459 @java.lang.Override
27460 public Builder mergeFrom(com.google.protobuf.Message other) {
27461 if (other instanceof onnx.OnnxMl.TensorProto.Segment) {
27462 return mergeFrom((onnx.OnnxMl.TensorProto.Segment)other);
27463 } else {
27464 super.mergeFrom(other);
27465 return this;
27466 }
27467 }
27468
27469 public Builder mergeFrom(onnx.OnnxMl.TensorProto.Segment other) {
27470 if (other == onnx.OnnxMl.TensorProto.Segment.getDefaultInstance()) return this;
27471 if (other.hasBegin()) {
27472 setBegin(other.getBegin());
27473 }
27474 if (other.hasEnd()) {
27475 setEnd(other.getEnd());
27476 }
27477 this.mergeUnknownFields(other.getUnknownFields());
27478 onChanged();
27479 return this;
27480 }
27481
27482 @java.lang.Override
27483 public final boolean isInitialized() {
27484 return true;
27485 }
27486
27487 @java.lang.Override
27488 public Builder mergeFrom(
27489 com.google.protobuf.CodedInputStream input,
27490 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27491 throws java.io.IOException {
27492 if (extensionRegistry == null) {
27493 throw new java.lang.NullPointerException();
27494 }
27495 try {
27496 boolean done = false;
27497 while (!done) {
27498 int tag = input.readTag();
27499 switch (tag) {
27500 case 0:
27501 done = true;
27502 break;
27503 case 8: {
27504 begin_ = input.readInt64();
27505 bitField0_ |= 0x00000001;
27506 break;
27507 } // case 8
27508 case 16: {
27509 end_ = input.readInt64();
27510 bitField0_ |= 0x00000002;
27511 break;
27512 } // case 16
27513 default: {
27514 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
27515 done = true; // was an endgroup tag
27516 }
27517 break;
27518 } // default:
27519 } // switch (tag)
27520 } // while (!done)
27521 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
27522 throw e.unwrapIOException();
27523 } finally {
27524 onChanged();
27525 } // finally
27526 return this;
27527 }
27528 private int bitField0_;
27529
27530 private long begin_ ;
27531 /**
27532 * <code>optional int64 begin = 1;</code>
27533 * @return Whether the begin field is set.
27534 */
27535 @java.lang.Override
27536 public boolean hasBegin() {
27537 return ((bitField0_ & 0x00000001) != 0);
27538 }
27539 /**
27540 * <code>optional int64 begin = 1;</code>
27541 * @return The begin.
27542 */
27543 @java.lang.Override
27544 public long getBegin() {
27545 return begin_;
27546 }
27547 /**
27548 * <code>optional int64 begin = 1;</code>
27549 * @param value The begin to set.
27550 * @return This builder for chaining.
27551 */
27552 public Builder setBegin(long value) {
27553
27554 begin_ = value;
27555 bitField0_ |= 0x00000001;
27556 onChanged();
27557 return this;
27558 }
27559 /**
27560 * <code>optional int64 begin = 1;</code>
27561 * @return This builder for chaining.
27562 */
27563 public Builder clearBegin() {
27564 bitField0_ = (bitField0_ & ~0x00000001);
27565 begin_ = 0L;
27566 onChanged();
27567 return this;
27568 }
27569
27570 private long end_ ;
27571 /**
27572 * <code>optional int64 end = 2;</code>
27573 * @return Whether the end field is set.
27574 */
27575 @java.lang.Override
27576 public boolean hasEnd() {
27577 return ((bitField0_ & 0x00000002) != 0);
27578 }
27579 /**
27580 * <code>optional int64 end = 2;</code>
27581 * @return The end.
27582 */
27583 @java.lang.Override
27584 public long getEnd() {
27585 return end_;
27586 }
27587 /**
27588 * <code>optional int64 end = 2;</code>
27589 * @param value The end to set.
27590 * @return This builder for chaining.
27591 */
27592 public Builder setEnd(long value) {
27593
27594 end_ = value;
27595 bitField0_ |= 0x00000002;
27596 onChanged();
27597 return this;
27598 }
27599 /**
27600 * <code>optional int64 end = 2;</code>
27601 * @return This builder for chaining.
27602 */
27603 public Builder clearEnd() {
27604 bitField0_ = (bitField0_ & ~0x00000002);
27605 end_ = 0L;
27606 onChanged();
27607 return this;
27608 }
27609
27610 // @@protoc_insertion_point(builder_scope:onnx.TensorProto.Segment)
27611 }
27612
27613 // @@protoc_insertion_point(class_scope:onnx.TensorProto.Segment)
27614 private static final onnx.OnnxMl.TensorProto.Segment DEFAULT_INSTANCE;
27615 static {
27616 DEFAULT_INSTANCE = new onnx.OnnxMl.TensorProto.Segment();
27617 }
27618
27619 public static onnx.OnnxMl.TensorProto.Segment getDefaultInstance() {
27620 return DEFAULT_INSTANCE;
27621 }
27622
27623 private static final com.google.protobuf.Parser<Segment>
27624 PARSER = new com.google.protobuf.AbstractParser<Segment>() {
27625 @java.lang.Override
27626 public Segment parsePartialFrom(
27627 com.google.protobuf.CodedInputStream input,
27628 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
27629 throws com.google.protobuf.InvalidProtocolBufferException {
27630 Builder builder = newBuilder();
27631 try {
27632 builder.mergeFrom(input, extensionRegistry);
27633 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
27634 throw e.setUnfinishedMessage(builder.buildPartial());
27635 } catch (com.google.protobuf.UninitializedMessageException e) {
27636 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
27637 } catch (java.io.IOException e) {
27638 throw new com.google.protobuf.InvalidProtocolBufferException(e)
27639 .setUnfinishedMessage(builder.buildPartial());
27640 }
27641 return builder.buildPartial();
27642 }
27643 };
27644
27645 public static com.google.protobuf.Parser<Segment> parser() {
27646 return PARSER;
27647 }
27648
27649 @java.lang.Override
27650 public com.google.protobuf.Parser<Segment> getParserForType() {
27651 return PARSER;
27652 }
27653
27654 @java.lang.Override
27655 public onnx.OnnxMl.TensorProto.Segment getDefaultInstanceForType() {
27656 return DEFAULT_INSTANCE;
27657 }
27658
27659 }
27660
27661 private int bitField0_;
27662 public static final int DIMS_FIELD_NUMBER = 1;
27663 @SuppressWarnings("serial")
27664 private com.google.protobuf.Internal.LongList dims_ =
27665 emptyLongList();
27666 /**
27667 * <pre>
27668 * The shape of the tensor.
27669 * </pre>
27670 *
27671 * <code>repeated int64 dims = 1;</code>
27672 * @return A list containing the dims.
27673 */
27674 @java.lang.Override
27675 public java.util.List<java.lang.Long>
27676 getDimsList() {
27677 return dims_;
27678 }
27679 /**
27680 * <pre>
27681 * The shape of the tensor.
27682 * </pre>
27683 *
27684 * <code>repeated int64 dims = 1;</code>
27685 * @return The count of dims.
27686 */
27687 public int getDimsCount() {
27688 return dims_.size();
27689 }
27690 /**
27691 * <pre>
27692 * The shape of the tensor.
27693 * </pre>
27694 *
27695 * <code>repeated int64 dims = 1;</code>
27696 * @param index The index of the element to return.
27697 * @return The dims at the given index.
27698 */
27699 public long getDims(int index) {
27700 return dims_.getLong(index);
27701 }
27702
27703 public static final int DATA_TYPE_FIELD_NUMBER = 2;
27704 private int dataType_ = 0;
27705 /**
27706 * <pre>
27707 * The data type of the tensor.
27708 * This field MUST have a valid TensorProto.DataType value
27709 * </pre>
27710 *
27711 * <code>optional int32 data_type = 2;</code>
27712 * @return Whether the dataType field is set.
27713 */
27714 @java.lang.Override
27715 public boolean hasDataType() {
27716 return ((bitField0_ & 0x00000001) != 0);
27717 }
27718 /**
27719 * <pre>
27720 * The data type of the tensor.
27721 * This field MUST have a valid TensorProto.DataType value
27722 * </pre>
27723 *
27724 * <code>optional int32 data_type = 2;</code>
27725 * @return The dataType.
27726 */
27727 @java.lang.Override
27728 public int getDataType() {
27729 return dataType_;
27730 }
27731
27732 public static final int SEGMENT_FIELD_NUMBER = 3;
27733 private onnx.OnnxMl.TensorProto.Segment segment_;
27734 /**
27735 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
27736 * @return Whether the segment field is set.
27737 */
27738 @java.lang.Override
27739 public boolean hasSegment() {
27740 return ((bitField0_ & 0x00000002) != 0);
27741 }
27742 /**
27743 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
27744 * @return The segment.
27745 */
27746 @java.lang.Override
27747 public onnx.OnnxMl.TensorProto.Segment getSegment() {
27748 return segment_ == null ? onnx.OnnxMl.TensorProto.Segment.getDefaultInstance() : segment_;
27749 }
27750 /**
27751 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
27752 */
27753 @java.lang.Override
27754 public onnx.OnnxMl.TensorProto.SegmentOrBuilder getSegmentOrBuilder() {
27755 return segment_ == null ? onnx.OnnxMl.TensorProto.Segment.getDefaultInstance() : segment_;
27756 }
27757
27758 public static final int FLOAT_DATA_FIELD_NUMBER = 4;
27759 @SuppressWarnings("serial")
27760 private com.google.protobuf.Internal.FloatList floatData_ =
27761 emptyFloatList();
27762 /**
27763 * <pre>
27764 * For float and complex64 values
27765 * Complex64 tensors are encoded as a single array of floats,
27766 * with the real components appearing in odd numbered positions,
27767 * and the corresponding imaginary component appearing in the
27768 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
27769 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
27770 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
27771 * </pre>
27772 *
27773 * <code>repeated float float_data = 4 [packed = true];</code>
27774 * @return A list containing the floatData.
27775 */
27776 @java.lang.Override
27777 public java.util.List<java.lang.Float>
27778 getFloatDataList() {
27779 return floatData_;
27780 }
27781 /**
27782 * <pre>
27783 * For float and complex64 values
27784 * Complex64 tensors are encoded as a single array of floats,
27785 * with the real components appearing in odd numbered positions,
27786 * and the corresponding imaginary component appearing in the
27787 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
27788 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
27789 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
27790 * </pre>
27791 *
27792 * <code>repeated float float_data = 4 [packed = true];</code>
27793 * @return The count of floatData.
27794 */
27795 public int getFloatDataCount() {
27796 return floatData_.size();
27797 }
27798 /**
27799 * <pre>
27800 * For float and complex64 values
27801 * Complex64 tensors are encoded as a single array of floats,
27802 * with the real components appearing in odd numbered positions,
27803 * and the corresponding imaginary component appearing in the
27804 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
27805 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
27806 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
27807 * </pre>
27808 *
27809 * <code>repeated float float_data = 4 [packed = true];</code>
27810 * @param index The index of the element to return.
27811 * @return The floatData at the given index.
27812 */
27813 public float getFloatData(int index) {
27814 return floatData_.getFloat(index);
27815 }
27816 private int floatDataMemoizedSerializedSize = -1;
27817
27818 public static final int INT32_DATA_FIELD_NUMBER = 5;
27819 @SuppressWarnings("serial")
27820 private com.google.protobuf.Internal.IntList int32Data_ =
27821 emptyIntList();
27822 /**
27823 * <pre>
27824 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
27825 * float16 and float8 values must be bit-wise converted to an uint16_t prior
27826 * to writing to the buffer.
27827 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
27828 * the 4 LSB and the second element is stored in the 4 MSB.
27829 * When this field is present, the data_type field MUST be
27830 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
27831 * </pre>
27832 *
27833 * <code>repeated int32 int32_data = 5 [packed = true];</code>
27834 * @return A list containing the int32Data.
27835 */
27836 @java.lang.Override
27837 public java.util.List<java.lang.Integer>
27838 getInt32DataList() {
27839 return int32Data_;
27840 }
27841 /**
27842 * <pre>
27843 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
27844 * float16 and float8 values must be bit-wise converted to an uint16_t prior
27845 * to writing to the buffer.
27846 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
27847 * the 4 LSB and the second element is stored in the 4 MSB.
27848 * When this field is present, the data_type field MUST be
27849 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
27850 * </pre>
27851 *
27852 * <code>repeated int32 int32_data = 5 [packed = true];</code>
27853 * @return The count of int32Data.
27854 */
27855 public int getInt32DataCount() {
27856 return int32Data_.size();
27857 }
27858 /**
27859 * <pre>
27860 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
27861 * float16 and float8 values must be bit-wise converted to an uint16_t prior
27862 * to writing to the buffer.
27863 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
27864 * the 4 LSB and the second element is stored in the 4 MSB.
27865 * When this field is present, the data_type field MUST be
27866 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
27867 * </pre>
27868 *
27869 * <code>repeated int32 int32_data = 5 [packed = true];</code>
27870 * @param index The index of the element to return.
27871 * @return The int32Data at the given index.
27872 */
27873 public int getInt32Data(int index) {
27874 return int32Data_.getInt(index);
27875 }
27876 private int int32DataMemoizedSerializedSize = -1;
27877
27878 public static final int STRING_DATA_FIELD_NUMBER = 6;
27879 @SuppressWarnings("serial")
27880 private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> stringData_ =
27881 emptyList(com.google.protobuf.ByteString.class);
27882 /**
27883 * <pre>
27884 * For strings.
27885 * Each element of string_data is a UTF-8 encoded Unicode
27886 * string. No trailing null, no leading BOM. The protobuf "string"
27887 * scalar type is not used to match ML community conventions.
27888 * When this field is present, the data_type field MUST be STRING
27889 * </pre>
27890 *
27891 * <code>repeated bytes string_data = 6;</code>
27892 * @return A list containing the stringData.
27893 */
27894 @java.lang.Override
27895 public java.util.List<com.google.protobuf.ByteString>
27896 getStringDataList() {
27897 return stringData_;
27898 }
27899 /**
27900 * <pre>
27901 * For strings.
27902 * Each element of string_data is a UTF-8 encoded Unicode
27903 * string. No trailing null, no leading BOM. The protobuf "string"
27904 * scalar type is not used to match ML community conventions.
27905 * When this field is present, the data_type field MUST be STRING
27906 * </pre>
27907 *
27908 * <code>repeated bytes string_data = 6;</code>
27909 * @return The count of stringData.
27910 */
27911 public int getStringDataCount() {
27912 return stringData_.size();
27913 }
27914 /**
27915 * <pre>
27916 * For strings.
27917 * Each element of string_data is a UTF-8 encoded Unicode
27918 * string. No trailing null, no leading BOM. The protobuf "string"
27919 * scalar type is not used to match ML community conventions.
27920 * When this field is present, the data_type field MUST be STRING
27921 * </pre>
27922 *
27923 * <code>repeated bytes string_data = 6;</code>
27924 * @param index The index of the element to return.
27925 * @return The stringData at the given index.
27926 */
27927 public com.google.protobuf.ByteString getStringData(int index) {
27928 return stringData_.get(index);
27929 }
27930
27931 public static final int INT64_DATA_FIELD_NUMBER = 7;
27932 @SuppressWarnings("serial")
27933 private com.google.protobuf.Internal.LongList int64Data_ =
27934 emptyLongList();
27935 /**
27936 * <pre>
27937 * For int64.
27938 * When this field is present, the data_type field MUST be INT64
27939 * </pre>
27940 *
27941 * <code>repeated int64 int64_data = 7 [packed = true];</code>
27942 * @return A list containing the int64Data.
27943 */
27944 @java.lang.Override
27945 public java.util.List<java.lang.Long>
27946 getInt64DataList() {
27947 return int64Data_;
27948 }
27949 /**
27950 * <pre>
27951 * For int64.
27952 * When this field is present, the data_type field MUST be INT64
27953 * </pre>
27954 *
27955 * <code>repeated int64 int64_data = 7 [packed = true];</code>
27956 * @return The count of int64Data.
27957 */
27958 public int getInt64DataCount() {
27959 return int64Data_.size();
27960 }
27961 /**
27962 * <pre>
27963 * For int64.
27964 * When this field is present, the data_type field MUST be INT64
27965 * </pre>
27966 *
27967 * <code>repeated int64 int64_data = 7 [packed = true];</code>
27968 * @param index The index of the element to return.
27969 * @return The int64Data at the given index.
27970 */
27971 public long getInt64Data(int index) {
27972 return int64Data_.getLong(index);
27973 }
27974 private int int64DataMemoizedSerializedSize = -1;
27975
27976 public static final int NAME_FIELD_NUMBER = 8;
27977 @SuppressWarnings("serial")
27978 private volatile java.lang.Object name_ = "";
27979 /**
27980 * <pre>
27981 * Optionally, a name for the tensor.
27982 * </pre>
27983 *
27984 * <code>optional string name = 8;</code>
27985 * @return Whether the name field is set.
27986 */
27987 @java.lang.Override
27988 public boolean hasName() {
27989 return ((bitField0_ & 0x00000004) != 0);
27990 }
27991 /**
27992 * <pre>
27993 * Optionally, a name for the tensor.
27994 * </pre>
27995 *
27996 * <code>optional string name = 8;</code>
27997 * @return The name.
27998 */
27999 @java.lang.Override
28000 public java.lang.String getName() {
28001 java.lang.Object ref = name_;
28002 if (ref instanceof java.lang.String) {
28003 return (java.lang.String) ref;
28004 } else {
28005 com.google.protobuf.ByteString bs =
28006 (com.google.protobuf.ByteString) ref;
28007 java.lang.String s = bs.toStringUtf8();
28008 if (bs.isValidUtf8()) {
28009 name_ = s;
28010 }
28011 return s;
28012 }
28013 }
28014 /**
28015 * <pre>
28016 * Optionally, a name for the tensor.
28017 * </pre>
28018 *
28019 * <code>optional string name = 8;</code>
28020 * @return The bytes for name.
28021 */
28022 @java.lang.Override
28023 public com.google.protobuf.ByteString
28024 getNameBytes() {
28025 java.lang.Object ref = name_;
28026 if (ref instanceof java.lang.String) {
28027 com.google.protobuf.ByteString b =
28028 com.google.protobuf.ByteString.copyFromUtf8(
28029 (java.lang.String) ref);
28030 name_ = b;
28031 return b;
28032 } else {
28033 return (com.google.protobuf.ByteString) ref;
28034 }
28035 }
28036
28037 public static final int DOC_STRING_FIELD_NUMBER = 12;
28038 @SuppressWarnings("serial")
28039 private volatile java.lang.Object docString_ = "";
28040 /**
28041 * <pre>
28042 * A human-readable documentation for this tensor. Markdown is allowed.
28043 * </pre>
28044 *
28045 * <code>optional string doc_string = 12;</code>
28046 * @return Whether the docString field is set.
28047 */
28048 @java.lang.Override
28049 public boolean hasDocString() {
28050 return ((bitField0_ & 0x00000008) != 0);
28051 }
28052 /**
28053 * <pre>
28054 * A human-readable documentation for this tensor. Markdown is allowed.
28055 * </pre>
28056 *
28057 * <code>optional string doc_string = 12;</code>
28058 * @return The docString.
28059 */
28060 @java.lang.Override
28061 public java.lang.String getDocString() {
28062 java.lang.Object ref = docString_;
28063 if (ref instanceof java.lang.String) {
28064 return (java.lang.String) ref;
28065 } else {
28066 com.google.protobuf.ByteString bs =
28067 (com.google.protobuf.ByteString) ref;
28068 java.lang.String s = bs.toStringUtf8();
28069 if (bs.isValidUtf8()) {
28070 docString_ = s;
28071 }
28072 return s;
28073 }
28074 }
28075 /**
28076 * <pre>
28077 * A human-readable documentation for this tensor. Markdown is allowed.
28078 * </pre>
28079 *
28080 * <code>optional string doc_string = 12;</code>
28081 * @return The bytes for docString.
28082 */
28083 @java.lang.Override
28084 public com.google.protobuf.ByteString
28085 getDocStringBytes() {
28086 java.lang.Object ref = docString_;
28087 if (ref instanceof java.lang.String) {
28088 com.google.protobuf.ByteString b =
28089 com.google.protobuf.ByteString.copyFromUtf8(
28090 (java.lang.String) ref);
28091 docString_ = b;
28092 return b;
28093 } else {
28094 return (com.google.protobuf.ByteString) ref;
28095 }
28096 }
28097
28098 public static final int RAW_DATA_FIELD_NUMBER = 9;
28099 private com.google.protobuf.ByteString rawData_ = com.google.protobuf.ByteString.EMPTY;
28100 /**
28101 * <pre>
28102 * Serializations can either use one of the fields above, or use this
28103 * raw bytes field. The only exception is the string case, where one is
28104 * required to store the content in the repeated bytes string_data field.
28105 *
28106 * When this raw_data field is used to store tensor value, elements MUST
28107 * be stored in as fixed-width, little-endian order.
28108 * Floating-point data types MUST be stored in IEEE 754 format.
28109 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
28110 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
28111 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
28112 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
28113 *
28114 * Note: the advantage of specific field rather than the raw_data field is
28115 * that in some cases (e.g. int data), protobuf does a better packing via
28116 * variable length storage, and may lead to smaller binary footprint.
28117 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
28118 * </pre>
28119 *
28120 * <code>optional bytes raw_data = 9;</code>
28121 * @return Whether the rawData field is set.
28122 */
28123 @java.lang.Override
28124 public boolean hasRawData() {
28125 return ((bitField0_ & 0x00000010) != 0);
28126 }
28127 /**
28128 * <pre>
28129 * Serializations can either use one of the fields above, or use this
28130 * raw bytes field. The only exception is the string case, where one is
28131 * required to store the content in the repeated bytes string_data field.
28132 *
28133 * When this raw_data field is used to store tensor value, elements MUST
28134 * be stored in as fixed-width, little-endian order.
28135 * Floating-point data types MUST be stored in IEEE 754 format.
28136 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
28137 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
28138 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
28139 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
28140 *
28141 * Note: the advantage of specific field rather than the raw_data field is
28142 * that in some cases (e.g. int data), protobuf does a better packing via
28143 * variable length storage, and may lead to smaller binary footprint.
28144 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
28145 * </pre>
28146 *
28147 * <code>optional bytes raw_data = 9;</code>
28148 * @return The rawData.
28149 */
28150 @java.lang.Override
28151 public com.google.protobuf.ByteString getRawData() {
28152 return rawData_;
28153 }
28154
28155 public static final int EXTERNAL_DATA_FIELD_NUMBER = 13;
28156 @SuppressWarnings("serial")
28157 private java.util.List<onnx.OnnxMl.StringStringEntryProto> externalData_;
28158 /**
28159 * <pre>
28160 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
28161 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
28162 * external_data stores key-value pairs describing data location. Recognized keys are:
28163 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
28164 * protobuf model was stored
28165 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
28166 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
28167 * - "length" (optional) - number of bytes containing data. Integer stored as string.
28168 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
28169 * </pre>
28170 *
28171 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
28172 */
28173 @java.lang.Override
28174 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getExternalDataList() {
28175 return externalData_;
28176 }
28177 /**
28178 * <pre>
28179 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
28180 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
28181 * external_data stores key-value pairs describing data location. Recognized keys are:
28182 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
28183 * protobuf model was stored
28184 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
28185 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
28186 * - "length" (optional) - number of bytes containing data. Integer stored as string.
28187 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
28188 * </pre>
28189 *
28190 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
28191 */
28192 @java.lang.Override
28193 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
28194 getExternalDataOrBuilderList() {
28195 return externalData_;
28196 }
28197 /**
28198 * <pre>
28199 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
28200 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
28201 * external_data stores key-value pairs describing data location. Recognized keys are:
28202 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
28203 * protobuf model was stored
28204 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
28205 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
28206 * - "length" (optional) - number of bytes containing data. Integer stored as string.
28207 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
28208 * </pre>
28209 *
28210 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
28211 */
28212 @java.lang.Override
28213 public int getExternalDataCount() {
28214 return externalData_.size();
28215 }
28216 /**
28217 * <pre>
28218 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
28219 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
28220 * external_data stores key-value pairs describing data location. Recognized keys are:
28221 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
28222 * protobuf model was stored
28223 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
28224 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
28225 * - "length" (optional) - number of bytes containing data. Integer stored as string.
28226 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
28227 * </pre>
28228 *
28229 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
28230 */
28231 @java.lang.Override
28232 public onnx.OnnxMl.StringStringEntryProto getExternalData(int index) {
28233 return externalData_.get(index);
28234 }
28235 /**
28236 * <pre>
28237 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
28238 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
28239 * external_data stores key-value pairs describing data location. Recognized keys are:
28240 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
28241 * protobuf model was stored
28242 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
28243 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
28244 * - "length" (optional) - number of bytes containing data. Integer stored as string.
28245 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
28246 * </pre>
28247 *
28248 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
28249 */
28250 @java.lang.Override
28251 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getExternalDataOrBuilder(
28252 int index) {
28253 return externalData_.get(index);
28254 }
28255
28256 public static final int DATA_LOCATION_FIELD_NUMBER = 14;
28257 private int dataLocation_ = 0;
28258 /**
28259 * <pre>
28260 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
28261 * </pre>
28262 *
28263 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
28264 * @return Whether the dataLocation field is set.
28265 */
28266 @java.lang.Override public boolean hasDataLocation() {
28267 return ((bitField0_ & 0x00000020) != 0);
28268 }
28269 /**
28270 * <pre>
28271 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
28272 * </pre>
28273 *
28274 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
28275 * @return The dataLocation.
28276 */
28277 @java.lang.Override public onnx.OnnxMl.TensorProto.DataLocation getDataLocation() {
28278 onnx.OnnxMl.TensorProto.DataLocation result = onnx.OnnxMl.TensorProto.DataLocation.forNumber(dataLocation_);
28279 return result == null ? onnx.OnnxMl.TensorProto.DataLocation.DEFAULT : result;
28280 }
28281
28282 public static final int DOUBLE_DATA_FIELD_NUMBER = 10;
28283 @SuppressWarnings("serial")
28284 private com.google.protobuf.Internal.DoubleList doubleData_ =
28285 emptyDoubleList();
28286 /**
28287 * <pre>
28288 * For double
28289 * Complex128 tensors are encoded as a single array of doubles,
28290 * with the real components appearing in odd numbered positions,
28291 * and the corresponding imaginary component appearing in the
28292 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
28293 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
28294 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
28295 * </pre>
28296 *
28297 * <code>repeated double double_data = 10 [packed = true];</code>
28298 * @return A list containing the doubleData.
28299 */
28300 @java.lang.Override
28301 public java.util.List<java.lang.Double>
28302 getDoubleDataList() {
28303 return doubleData_;
28304 }
28305 /**
28306 * <pre>
28307 * For double
28308 * Complex128 tensors are encoded as a single array of doubles,
28309 * with the real components appearing in odd numbered positions,
28310 * and the corresponding imaginary component appearing in the
28311 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
28312 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
28313 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
28314 * </pre>
28315 *
28316 * <code>repeated double double_data = 10 [packed = true];</code>
28317 * @return The count of doubleData.
28318 */
28319 public int getDoubleDataCount() {
28320 return doubleData_.size();
28321 }
28322 /**
28323 * <pre>
28324 * For double
28325 * Complex128 tensors are encoded as a single array of doubles,
28326 * with the real components appearing in odd numbered positions,
28327 * and the corresponding imaginary component appearing in the
28328 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
28329 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
28330 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
28331 * </pre>
28332 *
28333 * <code>repeated double double_data = 10 [packed = true];</code>
28334 * @param index The index of the element to return.
28335 * @return The doubleData at the given index.
28336 */
28337 public double getDoubleData(int index) {
28338 return doubleData_.getDouble(index);
28339 }
28340 private int doubleDataMemoizedSerializedSize = -1;
28341
28342 public static final int UINT64_DATA_FIELD_NUMBER = 11;
28343 @SuppressWarnings("serial")
28344 private com.google.protobuf.Internal.LongList uint64Data_ =
28345 emptyLongList();
28346 /**
28347 * <pre>
28348 * For uint64 and uint32 values
28349 * When this field is present, the data_type field MUST be
28350 * UINT32 or UINT64
28351 * </pre>
28352 *
28353 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
28354 * @return A list containing the uint64Data.
28355 */
28356 @java.lang.Override
28357 public java.util.List<java.lang.Long>
28358 getUint64DataList() {
28359 return uint64Data_;
28360 }
28361 /**
28362 * <pre>
28363 * For uint64 and uint32 values
28364 * When this field is present, the data_type field MUST be
28365 * UINT32 or UINT64
28366 * </pre>
28367 *
28368 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
28369 * @return The count of uint64Data.
28370 */
28371 public int getUint64DataCount() {
28372 return uint64Data_.size();
28373 }
28374 /**
28375 * <pre>
28376 * For uint64 and uint32 values
28377 * When this field is present, the data_type field MUST be
28378 * UINT32 or UINT64
28379 * </pre>
28380 *
28381 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
28382 * @param index The index of the element to return.
28383 * @return The uint64Data at the given index.
28384 */
28385 public long getUint64Data(int index) {
28386 return uint64Data_.getLong(index);
28387 }
28388 private int uint64DataMemoizedSerializedSize = -1;
28389
28390 public static final int METADATA_PROPS_FIELD_NUMBER = 16;
28391 @SuppressWarnings("serial")
28392 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
28393 /**
28394 * <pre>
28395 * Named metadata values; keys should be distinct.
28396 * </pre>
28397 *
28398 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
28399 */
28400 @java.lang.Override
28401 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
28402 return metadataProps_;
28403 }
28404 /**
28405 * <pre>
28406 * Named metadata values; keys should be distinct.
28407 * </pre>
28408 *
28409 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
28410 */
28411 @java.lang.Override
28412 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
28413 getMetadataPropsOrBuilderList() {
28414 return metadataProps_;
28415 }
28416 /**
28417 * <pre>
28418 * Named metadata values; keys should be distinct.
28419 * </pre>
28420 *
28421 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
28422 */
28423 @java.lang.Override
28424 public int getMetadataPropsCount() {
28425 return metadataProps_.size();
28426 }
28427 /**
28428 * <pre>
28429 * Named metadata values; keys should be distinct.
28430 * </pre>
28431 *
28432 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
28433 */
28434 @java.lang.Override
28435 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
28436 return metadataProps_.get(index);
28437 }
28438 /**
28439 * <pre>
28440 * Named metadata values; keys should be distinct.
28441 * </pre>
28442 *
28443 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
28444 */
28445 @java.lang.Override
28446 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
28447 int index) {
28448 return metadataProps_.get(index);
28449 }
28450
28451 private byte memoizedIsInitialized = -1;
28452 @java.lang.Override
28453 public final boolean isInitialized() {
28454 byte isInitialized = memoizedIsInitialized;
28455 if (isInitialized == 1) return true;
28456 if (isInitialized == 0) return false;
28457
28458 memoizedIsInitialized = 1;
28459 return true;
28460 }
28461
28462 @java.lang.Override
28463 public void writeTo(com.google.protobuf.CodedOutputStream output)
28464 throws java.io.IOException {
28465 getSerializedSize();
28466 for (int i = 0; i < dims_.size(); i++) {
28467 output.writeInt64(1, dims_.getLong(i));
28468 }
28469 if (((bitField0_ & 0x00000001) != 0)) {
28470 output.writeInt32(2, dataType_);
28471 }
28472 if (((bitField0_ & 0x00000002) != 0)) {
28473 output.writeMessage(3, getSegment());
28474 }
28475 if (getFloatDataList().size() > 0) {
28476 output.writeUInt32NoTag(34);
28477 output.writeUInt32NoTag(floatDataMemoizedSerializedSize);
28478 }
28479 for (int i = 0; i < floatData_.size(); i++) {
28480 output.writeFloatNoTag(floatData_.getFloat(i));
28481 }
28482 if (getInt32DataList().size() > 0) {
28483 output.writeUInt32NoTag(42);
28484 output.writeUInt32NoTag(int32DataMemoizedSerializedSize);
28485 }
28486 for (int i = 0; i < int32Data_.size(); i++) {
28487 output.writeInt32NoTag(int32Data_.getInt(i));
28488 }
28489 for (int i = 0; i < stringData_.size(); i++) {
28490 output.writeBytes(6, stringData_.get(i));
28491 }
28492 if (getInt64DataList().size() > 0) {
28493 output.writeUInt32NoTag(58);
28494 output.writeUInt32NoTag(int64DataMemoizedSerializedSize);
28495 }
28496 for (int i = 0; i < int64Data_.size(); i++) {
28497 output.writeInt64NoTag(int64Data_.getLong(i));
28498 }
28499 if (((bitField0_ & 0x00000004) != 0)) {
28500 com.google.protobuf.GeneratedMessage.writeString(output, 8, name_);
28501 }
28502 if (((bitField0_ & 0x00000010) != 0)) {
28503 output.writeBytes(9, rawData_);
28504 }
28505 if (getDoubleDataList().size() > 0) {
28506 output.writeUInt32NoTag(82);
28507 output.writeUInt32NoTag(doubleDataMemoizedSerializedSize);
28508 }
28509 for (int i = 0; i < doubleData_.size(); i++) {
28510 output.writeDoubleNoTag(doubleData_.getDouble(i));
28511 }
28512 if (getUint64DataList().size() > 0) {
28513 output.writeUInt32NoTag(90);
28514 output.writeUInt32NoTag(uint64DataMemoizedSerializedSize);
28515 }
28516 for (int i = 0; i < uint64Data_.size(); i++) {
28517 output.writeUInt64NoTag(uint64Data_.getLong(i));
28518 }
28519 if (((bitField0_ & 0x00000008) != 0)) {
28520 com.google.protobuf.GeneratedMessage.writeString(output, 12, docString_);
28521 }
28522 for (int i = 0; i < externalData_.size(); i++) {
28523 output.writeMessage(13, externalData_.get(i));
28524 }
28525 if (((bitField0_ & 0x00000020) != 0)) {
28526 output.writeEnum(14, dataLocation_);
28527 }
28528 for (int i = 0; i < metadataProps_.size(); i++) {
28529 output.writeMessage(16, metadataProps_.get(i));
28530 }
28531 getUnknownFields().writeTo(output);
28532 }
28533
28534 @java.lang.Override
28535 public int getSerializedSize() {
28536 int size = memoizedSize;
28537 if (size != -1) return size;
28538
28539 size = 0;
28540 {
28541 int dataSize = 0;
28542 for (int i = 0; i < dims_.size(); i++) {
28543 dataSize += com.google.protobuf.CodedOutputStream
28544 .computeInt64SizeNoTag(dims_.getLong(i));
28545 }
28546 size += dataSize;
28547 size += 1 * getDimsList().size();
28548 }
28549 if (((bitField0_ & 0x00000001) != 0)) {
28550 size += com.google.protobuf.CodedOutputStream
28551 .computeInt32Size(2, dataType_);
28552 }
28553 if (((bitField0_ & 0x00000002) != 0)) {
28554 size += com.google.protobuf.CodedOutputStream
28555 .computeMessageSize(3, getSegment());
28556 }
28557 {
28558 int dataSize = 0;
28559 dataSize = 4 * getFloatDataList().size();
28560 size += dataSize;
28561 if (!getFloatDataList().isEmpty()) {
28562 size += 1;
28563 size += com.google.protobuf.CodedOutputStream
28564 .computeInt32SizeNoTag(dataSize);
28565 }
28566 floatDataMemoizedSerializedSize = dataSize;
28567 }
28568 {
28569 int dataSize = 0;
28570 for (int i = 0; i < int32Data_.size(); i++) {
28571 dataSize += com.google.protobuf.CodedOutputStream
28572 .computeInt32SizeNoTag(int32Data_.getInt(i));
28573 }
28574 size += dataSize;
28575 if (!getInt32DataList().isEmpty()) {
28576 size += 1;
28577 size += com.google.protobuf.CodedOutputStream
28578 .computeInt32SizeNoTag(dataSize);
28579 }
28580 int32DataMemoizedSerializedSize = dataSize;
28581 }
28582 {
28583 int dataSize = 0;
28584 for (int i = 0; i < stringData_.size(); i++) {
28585 dataSize += com.google.protobuf.CodedOutputStream
28586 .computeBytesSizeNoTag(stringData_.get(i));
28587 }
28588 size += dataSize;
28589 size += 1 * getStringDataList().size();
28590 }
28591 {
28592 int dataSize = 0;
28593 for (int i = 0; i < int64Data_.size(); i++) {
28594 dataSize += com.google.protobuf.CodedOutputStream
28595 .computeInt64SizeNoTag(int64Data_.getLong(i));
28596 }
28597 size += dataSize;
28598 if (!getInt64DataList().isEmpty()) {
28599 size += 1;
28600 size += com.google.protobuf.CodedOutputStream
28601 .computeInt32SizeNoTag(dataSize);
28602 }
28603 int64DataMemoizedSerializedSize = dataSize;
28604 }
28605 if (((bitField0_ & 0x00000004) != 0)) {
28606 size += com.google.protobuf.GeneratedMessage.computeStringSize(8, name_);
28607 }
28608 if (((bitField0_ & 0x00000010) != 0)) {
28609 size += com.google.protobuf.CodedOutputStream
28610 .computeBytesSize(9, rawData_);
28611 }
28612 {
28613 int dataSize = 0;
28614 dataSize = 8 * getDoubleDataList().size();
28615 size += dataSize;
28616 if (!getDoubleDataList().isEmpty()) {
28617 size += 1;
28618 size += com.google.protobuf.CodedOutputStream
28619 .computeInt32SizeNoTag(dataSize);
28620 }
28621 doubleDataMemoizedSerializedSize = dataSize;
28622 }
28623 {
28624 int dataSize = 0;
28625 for (int i = 0; i < uint64Data_.size(); i++) {
28626 dataSize += com.google.protobuf.CodedOutputStream
28627 .computeUInt64SizeNoTag(uint64Data_.getLong(i));
28628 }
28629 size += dataSize;
28630 if (!getUint64DataList().isEmpty()) {
28631 size += 1;
28632 size += com.google.protobuf.CodedOutputStream
28633 .computeInt32SizeNoTag(dataSize);
28634 }
28635 uint64DataMemoizedSerializedSize = dataSize;
28636 }
28637 if (((bitField0_ & 0x00000008) != 0)) {
28638 size += com.google.protobuf.GeneratedMessage.computeStringSize(12, docString_);
28639 }
28640 for (int i = 0; i < externalData_.size(); i++) {
28641 size += com.google.protobuf.CodedOutputStream
28642 .computeMessageSize(13, externalData_.get(i));
28643 }
28644 if (((bitField0_ & 0x00000020) != 0)) {
28645 size += com.google.protobuf.CodedOutputStream
28646 .computeEnumSize(14, dataLocation_);
28647 }
28648 for (int i = 0; i < metadataProps_.size(); i++) {
28649 size += com.google.protobuf.CodedOutputStream
28650 .computeMessageSize(16, metadataProps_.get(i));
28651 }
28652 size += getUnknownFields().getSerializedSize();
28653 memoizedSize = size;
28654 return size;
28655 }
28656
28657 @java.lang.Override
28658 public boolean equals(final java.lang.Object obj) {
28659 if (obj == this) {
28660 return true;
28661 }
28662 if (!(obj instanceof onnx.OnnxMl.TensorProto)) {
28663 return super.equals(obj);
28664 }
28665 onnx.OnnxMl.TensorProto other = (onnx.OnnxMl.TensorProto) obj;
28666
28667 if (!getDimsList()
28668 .equals(other.getDimsList())) return false;
28669 if (hasDataType() != other.hasDataType()) return false;
28670 if (hasDataType()) {
28671 if (getDataType()
28672 != other.getDataType()) return false;
28673 }
28674 if (hasSegment() != other.hasSegment()) return false;
28675 if (hasSegment()) {
28676 if (!getSegment()
28677 .equals(other.getSegment())) return false;
28678 }
28679 if (!getFloatDataList()
28680 .equals(other.getFloatDataList())) return false;
28681 if (!getInt32DataList()
28682 .equals(other.getInt32DataList())) return false;
28683 if (!getStringDataList()
28684 .equals(other.getStringDataList())) return false;
28685 if (!getInt64DataList()
28686 .equals(other.getInt64DataList())) return false;
28687 if (hasName() != other.hasName()) return false;
28688 if (hasName()) {
28689 if (!getName()
28690 .equals(other.getName())) return false;
28691 }
28692 if (hasDocString() != other.hasDocString()) return false;
28693 if (hasDocString()) {
28694 if (!getDocString()
28695 .equals(other.getDocString())) return false;
28696 }
28697 if (hasRawData() != other.hasRawData()) return false;
28698 if (hasRawData()) {
28699 if (!getRawData()
28700 .equals(other.getRawData())) return false;
28701 }
28702 if (!getExternalDataList()
28703 .equals(other.getExternalDataList())) return false;
28704 if (hasDataLocation() != other.hasDataLocation()) return false;
28705 if (hasDataLocation()) {
28706 if (dataLocation_ != other.dataLocation_) return false;
28707 }
28708 if (!getDoubleDataList()
28709 .equals(other.getDoubleDataList())) return false;
28710 if (!getUint64DataList()
28711 .equals(other.getUint64DataList())) return false;
28712 if (!getMetadataPropsList()
28713 .equals(other.getMetadataPropsList())) return false;
28714 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
28715 return true;
28716 }
28717
28718 @java.lang.Override
28719 public int hashCode() {
28720 if (memoizedHashCode != 0) {
28721 return memoizedHashCode;
28722 }
28723 int hash = 41;
28724 hash = (19 * hash) + getDescriptor().hashCode();
28725 if (getDimsCount() > 0) {
28726 hash = (37 * hash) + DIMS_FIELD_NUMBER;
28727 hash = (53 * hash) + getDimsList().hashCode();
28728 }
28729 if (hasDataType()) {
28730 hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER;
28731 hash = (53 * hash) + getDataType();
28732 }
28733 if (hasSegment()) {
28734 hash = (37 * hash) + SEGMENT_FIELD_NUMBER;
28735 hash = (53 * hash) + getSegment().hashCode();
28736 }
28737 if (getFloatDataCount() > 0) {
28738 hash = (37 * hash) + FLOAT_DATA_FIELD_NUMBER;
28739 hash = (53 * hash) + getFloatDataList().hashCode();
28740 }
28741 if (getInt32DataCount() > 0) {
28742 hash = (37 * hash) + INT32_DATA_FIELD_NUMBER;
28743 hash = (53 * hash) + getInt32DataList().hashCode();
28744 }
28745 if (getStringDataCount() > 0) {
28746 hash = (37 * hash) + STRING_DATA_FIELD_NUMBER;
28747 hash = (53 * hash) + getStringDataList().hashCode();
28748 }
28749 if (getInt64DataCount() > 0) {
28750 hash = (37 * hash) + INT64_DATA_FIELD_NUMBER;
28751 hash = (53 * hash) + getInt64DataList().hashCode();
28752 }
28753 if (hasName()) {
28754 hash = (37 * hash) + NAME_FIELD_NUMBER;
28755 hash = (53 * hash) + getName().hashCode();
28756 }
28757 if (hasDocString()) {
28758 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
28759 hash = (53 * hash) + getDocString().hashCode();
28760 }
28761 if (hasRawData()) {
28762 hash = (37 * hash) + RAW_DATA_FIELD_NUMBER;
28763 hash = (53 * hash) + getRawData().hashCode();
28764 }
28765 if (getExternalDataCount() > 0) {
28766 hash = (37 * hash) + EXTERNAL_DATA_FIELD_NUMBER;
28767 hash = (53 * hash) + getExternalDataList().hashCode();
28768 }
28769 if (hasDataLocation()) {
28770 hash = (37 * hash) + DATA_LOCATION_FIELD_NUMBER;
28771 hash = (53 * hash) + dataLocation_;
28772 }
28773 if (getDoubleDataCount() > 0) {
28774 hash = (37 * hash) + DOUBLE_DATA_FIELD_NUMBER;
28775 hash = (53 * hash) + getDoubleDataList().hashCode();
28776 }
28777 if (getUint64DataCount() > 0) {
28778 hash = (37 * hash) + UINT64_DATA_FIELD_NUMBER;
28779 hash = (53 * hash) + getUint64DataList().hashCode();
28780 }
28781 if (getMetadataPropsCount() > 0) {
28782 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
28783 hash = (53 * hash) + getMetadataPropsList().hashCode();
28784 }
28785 hash = (29 * hash) + getUnknownFields().hashCode();
28786 memoizedHashCode = hash;
28787 return hash;
28788 }
28789
28790 public static onnx.OnnxMl.TensorProto parseFrom(
28791 java.nio.ByteBuffer data)
28792 throws com.google.protobuf.InvalidProtocolBufferException {
28793 return PARSER.parseFrom(data);
28794 }
28795 public static onnx.OnnxMl.TensorProto parseFrom(
28796 java.nio.ByteBuffer data,
28797 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28798 throws com.google.protobuf.InvalidProtocolBufferException {
28799 return PARSER.parseFrom(data, extensionRegistry);
28800 }
28801 public static onnx.OnnxMl.TensorProto parseFrom(
28802 com.google.protobuf.ByteString data)
28803 throws com.google.protobuf.InvalidProtocolBufferException {
28804 return PARSER.parseFrom(data);
28805 }
28806 public static onnx.OnnxMl.TensorProto parseFrom(
28807 com.google.protobuf.ByteString data,
28808 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28809 throws com.google.protobuf.InvalidProtocolBufferException {
28810 return PARSER.parseFrom(data, extensionRegistry);
28811 }
28812 public static onnx.OnnxMl.TensorProto parseFrom(byte[] data)
28813 throws com.google.protobuf.InvalidProtocolBufferException {
28814 return PARSER.parseFrom(data);
28815 }
28816 public static onnx.OnnxMl.TensorProto parseFrom(
28817 byte[] data,
28818 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28819 throws com.google.protobuf.InvalidProtocolBufferException {
28820 return PARSER.parseFrom(data, extensionRegistry);
28821 }
28822 public static onnx.OnnxMl.TensorProto parseFrom(java.io.InputStream input)
28823 throws java.io.IOException {
28824 return com.google.protobuf.GeneratedMessage
28825 .parseWithIOException(PARSER, input);
28826 }
28827 public static onnx.OnnxMl.TensorProto parseFrom(
28828 java.io.InputStream input,
28829 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28830 throws java.io.IOException {
28831 return com.google.protobuf.GeneratedMessage
28832 .parseWithIOException(PARSER, input, extensionRegistry);
28833 }
28834
28835 public static onnx.OnnxMl.TensorProto parseDelimitedFrom(java.io.InputStream input)
28836 throws java.io.IOException {
28837 return com.google.protobuf.GeneratedMessage
28838 .parseDelimitedWithIOException(PARSER, input);
28839 }
28840
28841 public static onnx.OnnxMl.TensorProto parseDelimitedFrom(
28842 java.io.InputStream input,
28843 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28844 throws java.io.IOException {
28845 return com.google.protobuf.GeneratedMessage
28846 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
28847 }
28848 public static onnx.OnnxMl.TensorProto parseFrom(
28849 com.google.protobuf.CodedInputStream input)
28850 throws java.io.IOException {
28851 return com.google.protobuf.GeneratedMessage
28852 .parseWithIOException(PARSER, input);
28853 }
28854 public static onnx.OnnxMl.TensorProto parseFrom(
28855 com.google.protobuf.CodedInputStream input,
28856 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
28857 throws java.io.IOException {
28858 return com.google.protobuf.GeneratedMessage
28859 .parseWithIOException(PARSER, input, extensionRegistry);
28860 }
28861
28862 @java.lang.Override
28863 public Builder newBuilderForType() { return newBuilder(); }
28864 public static Builder newBuilder() {
28865 return DEFAULT_INSTANCE.toBuilder();
28866 }
28867 public static Builder newBuilder(onnx.OnnxMl.TensorProto prototype) {
28868 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
28869 }
28870 @java.lang.Override
28871 public Builder toBuilder() {
28872 return this == DEFAULT_INSTANCE
28873 ? new Builder() : new Builder().mergeFrom(this);
28874 }
28875
28876 @java.lang.Override
28877 protected Builder newBuilderForType(
28878 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
28879 Builder builder = new Builder(parent);
28880 return builder;
28881 }
28882 /**
28883 * <pre>
28884 * Tensors
28885 *
28886 * A serialized tensor value.
28887 * </pre>
28888 *
28889 * Protobuf type {@code onnx.TensorProto}
28890 */
28891 public static final class Builder extends
28892 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
28893 // @@protoc_insertion_point(builder_implements:onnx.TensorProto)
28894 onnx.OnnxMl.TensorProtoOrBuilder {
28895 public static final com.google.protobuf.Descriptors.Descriptor
28896 getDescriptor() {
28897 return onnx.OnnxMl.internal_static_onnx_TensorProto_descriptor;
28898 }
28899
28900 @java.lang.Override
28901 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
28902 internalGetFieldAccessorTable() {
28903 return onnx.OnnxMl.internal_static_onnx_TensorProto_fieldAccessorTable
28904 .ensureFieldAccessorsInitialized(
28905 onnx.OnnxMl.TensorProto.class, onnx.OnnxMl.TensorProto.Builder.class);
28906 }
28907
28908 // Construct using onnx.OnnxMl.TensorProto.newBuilder()
28909 private Builder() {
28910 maybeForceBuilderInitialization();
28911 }
28912
28913 private Builder(
28914 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
28915 super(parent);
28916 maybeForceBuilderInitialization();
28917 }
28918 private void maybeForceBuilderInitialization() {
28919 if (com.google.protobuf.GeneratedMessage
28920 .alwaysUseFieldBuilders) {
28921 getSegmentFieldBuilder();
28922 getExternalDataFieldBuilder();
28923 getMetadataPropsFieldBuilder();
28924 }
28925 }
28926 @java.lang.Override
28927 public Builder clear() {
28928 super.clear();
28929 bitField0_ = 0;
28930 dims_ = emptyLongList();
28931 dataType_ = 0;
28932 segment_ = null;
28933 if (segmentBuilder_ != null) {
28934 segmentBuilder_.dispose();
28935 segmentBuilder_ = null;
28936 }
28937 floatData_ = emptyFloatList();
28938 int32Data_ = emptyIntList();
28939 stringData_ = emptyList(com.google.protobuf.ByteString.class);
28940 int64Data_ = emptyLongList();
28941 name_ = "";
28942 docString_ = "";
28943 rawData_ = com.google.protobuf.ByteString.EMPTY;
28944 if (externalDataBuilder_ == null) {
28945 externalData_ = java.util.Collections.emptyList();
28946 } else {
28947 externalData_ = null;
28948 externalDataBuilder_.clear();
28949 }
28950 bitField0_ = (bitField0_ & ~0x00000400);
28951 dataLocation_ = 0;
28952 doubleData_ = emptyDoubleList();
28953 uint64Data_ = emptyLongList();
28954 if (metadataPropsBuilder_ == null) {
28955 metadataProps_ = java.util.Collections.emptyList();
28956 } else {
28957 metadataProps_ = null;
28958 metadataPropsBuilder_.clear();
28959 }
28960 bitField0_ = (bitField0_ & ~0x00004000);
28961 return this;
28962 }
28963
28964 @java.lang.Override
28965 public com.google.protobuf.Descriptors.Descriptor
28966 getDescriptorForType() {
28967 return onnx.OnnxMl.internal_static_onnx_TensorProto_descriptor;
28968 }
28969
28970 @java.lang.Override
28971 public onnx.OnnxMl.TensorProto getDefaultInstanceForType() {
28972 return onnx.OnnxMl.TensorProto.getDefaultInstance();
28973 }
28974
28975 @java.lang.Override
28976 public onnx.OnnxMl.TensorProto build() {
28977 onnx.OnnxMl.TensorProto result = buildPartial();
28978 if (!result.isInitialized()) {
28979 throw newUninitializedMessageException(result);
28980 }
28981 return result;
28982 }
28983
28984 @java.lang.Override
28985 public onnx.OnnxMl.TensorProto buildPartial() {
28986 onnx.OnnxMl.TensorProto result = new onnx.OnnxMl.TensorProto(this);
28987 buildPartialRepeatedFields(result);
28988 if (bitField0_ != 0) { buildPartial0(result); }
28989 onBuilt();
28990 return result;
28991 }
28992
28993 private void buildPartialRepeatedFields(onnx.OnnxMl.TensorProto result) {
28994 if (externalDataBuilder_ == null) {
28995 if (((bitField0_ & 0x00000400) != 0)) {
28996 externalData_ = java.util.Collections.unmodifiableList(externalData_);
28997 bitField0_ = (bitField0_ & ~0x00000400);
28998 }
28999 result.externalData_ = externalData_;
29000 } else {
29001 result.externalData_ = externalDataBuilder_.build();
29002 }
29003 if (metadataPropsBuilder_ == null) {
29004 if (((bitField0_ & 0x00004000) != 0)) {
29005 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
29006 bitField0_ = (bitField0_ & ~0x00004000);
29007 }
29008 result.metadataProps_ = metadataProps_;
29009 } else {
29010 result.metadataProps_ = metadataPropsBuilder_.build();
29011 }
29012 }
29013
29014 private void buildPartial0(onnx.OnnxMl.TensorProto result) {
29015 int from_bitField0_ = bitField0_;
29016 if (((from_bitField0_ & 0x00000001) != 0)) {
29017 dims_.makeImmutable();
29018 result.dims_ = dims_;
29019 }
29020 int to_bitField0_ = 0;
29021 if (((from_bitField0_ & 0x00000002) != 0)) {
29022 result.dataType_ = dataType_;
29023 to_bitField0_ |= 0x00000001;
29024 }
29025 if (((from_bitField0_ & 0x00000004) != 0)) {
29026 result.segment_ = segmentBuilder_ == null
29027 ? segment_
29028 : segmentBuilder_.build();
29029 to_bitField0_ |= 0x00000002;
29030 }
29031 if (((from_bitField0_ & 0x00000008) != 0)) {
29032 floatData_.makeImmutable();
29033 result.floatData_ = floatData_;
29034 }
29035 if (((from_bitField0_ & 0x00000010) != 0)) {
29036 int32Data_.makeImmutable();
29037 result.int32Data_ = int32Data_;
29038 }
29039 if (((from_bitField0_ & 0x00000020) != 0)) {
29040 stringData_.makeImmutable();
29041 result.stringData_ = stringData_;
29042 }
29043 if (((from_bitField0_ & 0x00000040) != 0)) {
29044 int64Data_.makeImmutable();
29045 result.int64Data_ = int64Data_;
29046 }
29047 if (((from_bitField0_ & 0x00000080) != 0)) {
29048 result.name_ = name_;
29049 to_bitField0_ |= 0x00000004;
29050 }
29051 if (((from_bitField0_ & 0x00000100) != 0)) {
29052 result.docString_ = docString_;
29053 to_bitField0_ |= 0x00000008;
29054 }
29055 if (((from_bitField0_ & 0x00000200) != 0)) {
29056 result.rawData_ = rawData_;
29057 to_bitField0_ |= 0x00000010;
29058 }
29059 if (((from_bitField0_ & 0x00000800) != 0)) {
29060 result.dataLocation_ = dataLocation_;
29061 to_bitField0_ |= 0x00000020;
29062 }
29063 if (((from_bitField0_ & 0x00001000) != 0)) {
29064 doubleData_.makeImmutable();
29065 result.doubleData_ = doubleData_;
29066 }
29067 if (((from_bitField0_ & 0x00002000) != 0)) {
29068 uint64Data_.makeImmutable();
29069 result.uint64Data_ = uint64Data_;
29070 }
29071 result.bitField0_ |= to_bitField0_;
29072 }
29073
29074 @java.lang.Override
29075 public Builder mergeFrom(com.google.protobuf.Message other) {
29076 if (other instanceof onnx.OnnxMl.TensorProto) {
29077 return mergeFrom((onnx.OnnxMl.TensorProto)other);
29078 } else {
29079 super.mergeFrom(other);
29080 return this;
29081 }
29082 }
29083
29084 public Builder mergeFrom(onnx.OnnxMl.TensorProto other) {
29085 if (other == onnx.OnnxMl.TensorProto.getDefaultInstance()) return this;
29086 if (!other.dims_.isEmpty()) {
29087 if (dims_.isEmpty()) {
29088 dims_ = other.dims_;
29089 dims_.makeImmutable();
29090 bitField0_ |= 0x00000001;
29091 } else {
29092 ensureDimsIsMutable();
29093 dims_.addAll(other.dims_);
29094 }
29095 onChanged();
29096 }
29097 if (other.hasDataType()) {
29098 setDataType(other.getDataType());
29099 }
29100 if (other.hasSegment()) {
29101 mergeSegment(other.getSegment());
29102 }
29103 if (!other.floatData_.isEmpty()) {
29104 if (floatData_.isEmpty()) {
29105 floatData_ = other.floatData_;
29106 floatData_.makeImmutable();
29107 bitField0_ |= 0x00000008;
29108 } else {
29109 ensureFloatDataIsMutable();
29110 floatData_.addAll(other.floatData_);
29111 }
29112 onChanged();
29113 }
29114 if (!other.int32Data_.isEmpty()) {
29115 if (int32Data_.isEmpty()) {
29116 int32Data_ = other.int32Data_;
29117 int32Data_.makeImmutable();
29118 bitField0_ |= 0x00000010;
29119 } else {
29120 ensureInt32DataIsMutable();
29121 int32Data_.addAll(other.int32Data_);
29122 }
29123 onChanged();
29124 }
29125 if (!other.stringData_.isEmpty()) {
29126 if (stringData_.isEmpty()) {
29127 stringData_ = other.stringData_;
29128 stringData_.makeImmutable();
29129 bitField0_ |= 0x00000020;
29130 } else {
29131 ensureStringDataIsMutable();
29132 stringData_.addAll(other.stringData_);
29133 }
29134 onChanged();
29135 }
29136 if (!other.int64Data_.isEmpty()) {
29137 if (int64Data_.isEmpty()) {
29138 int64Data_ = other.int64Data_;
29139 int64Data_.makeImmutable();
29140 bitField0_ |= 0x00000040;
29141 } else {
29142 ensureInt64DataIsMutable();
29143 int64Data_.addAll(other.int64Data_);
29144 }
29145 onChanged();
29146 }
29147 if (other.hasName()) {
29148 name_ = other.name_;
29149 bitField0_ |= 0x00000080;
29150 onChanged();
29151 }
29152 if (other.hasDocString()) {
29153 docString_ = other.docString_;
29154 bitField0_ |= 0x00000100;
29155 onChanged();
29156 }
29157 if (other.hasRawData()) {
29158 setRawData(other.getRawData());
29159 }
29160 if (externalDataBuilder_ == null) {
29161 if (!other.externalData_.isEmpty()) {
29162 if (externalData_.isEmpty()) {
29163 externalData_ = other.externalData_;
29164 bitField0_ = (bitField0_ & ~0x00000400);
29165 } else {
29166 ensureExternalDataIsMutable();
29167 externalData_.addAll(other.externalData_);
29168 }
29169 onChanged();
29170 }
29171 } else {
29172 if (!other.externalData_.isEmpty()) {
29173 if (externalDataBuilder_.isEmpty()) {
29174 externalDataBuilder_.dispose();
29175 externalDataBuilder_ = null;
29176 externalData_ = other.externalData_;
29177 bitField0_ = (bitField0_ & ~0x00000400);
29178 externalDataBuilder_ =
29179 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
29180 getExternalDataFieldBuilder() : null;
29181 } else {
29182 externalDataBuilder_.addAllMessages(other.externalData_);
29183 }
29184 }
29185 }
29186 if (other.hasDataLocation()) {
29187 setDataLocation(other.getDataLocation());
29188 }
29189 if (!other.doubleData_.isEmpty()) {
29190 if (doubleData_.isEmpty()) {
29191 doubleData_ = other.doubleData_;
29192 doubleData_.makeImmutable();
29193 bitField0_ |= 0x00001000;
29194 } else {
29195 ensureDoubleDataIsMutable();
29196 doubleData_.addAll(other.doubleData_);
29197 }
29198 onChanged();
29199 }
29200 if (!other.uint64Data_.isEmpty()) {
29201 if (uint64Data_.isEmpty()) {
29202 uint64Data_ = other.uint64Data_;
29203 uint64Data_.makeImmutable();
29204 bitField0_ |= 0x00002000;
29205 } else {
29206 ensureUint64DataIsMutable();
29207 uint64Data_.addAll(other.uint64Data_);
29208 }
29209 onChanged();
29210 }
29211 if (metadataPropsBuilder_ == null) {
29212 if (!other.metadataProps_.isEmpty()) {
29213 if (metadataProps_.isEmpty()) {
29214 metadataProps_ = other.metadataProps_;
29215 bitField0_ = (bitField0_ & ~0x00004000);
29216 } else {
29217 ensureMetadataPropsIsMutable();
29218 metadataProps_.addAll(other.metadataProps_);
29219 }
29220 onChanged();
29221 }
29222 } else {
29223 if (!other.metadataProps_.isEmpty()) {
29224 if (metadataPropsBuilder_.isEmpty()) {
29225 metadataPropsBuilder_.dispose();
29226 metadataPropsBuilder_ = null;
29227 metadataProps_ = other.metadataProps_;
29228 bitField0_ = (bitField0_ & ~0x00004000);
29229 metadataPropsBuilder_ =
29230 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
29231 getMetadataPropsFieldBuilder() : null;
29232 } else {
29233 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
29234 }
29235 }
29236 }
29237 this.mergeUnknownFields(other.getUnknownFields());
29238 onChanged();
29239 return this;
29240 }
29241
29242 @java.lang.Override
29243 public final boolean isInitialized() {
29244 return true;
29245 }
29246
29247 @java.lang.Override
29248 public Builder mergeFrom(
29249 com.google.protobuf.CodedInputStream input,
29250 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
29251 throws java.io.IOException {
29252 if (extensionRegistry == null) {
29253 throw new java.lang.NullPointerException();
29254 }
29255 try {
29256 boolean done = false;
29257 while (!done) {
29258 int tag = input.readTag();
29259 switch (tag) {
29260 case 0:
29261 done = true;
29262 break;
29263 case 8: {
29264 long v = input.readInt64();
29265 ensureDimsIsMutable();
29266 dims_.addLong(v);
29267 break;
29268 } // case 8
29269 case 10: {
29270 int length = input.readRawVarint32();
29271 int limit = input.pushLimit(length);
29272 ensureDimsIsMutable();
29273 while (input.getBytesUntilLimit() > 0) {
29274 dims_.addLong(input.readInt64());
29275 }
29276 input.popLimit(limit);
29277 break;
29278 } // case 10
29279 case 16: {
29280 dataType_ = input.readInt32();
29281 bitField0_ |= 0x00000002;
29282 break;
29283 } // case 16
29284 case 26: {
29285 input.readMessage(
29286 getSegmentFieldBuilder().getBuilder(),
29287 extensionRegistry);
29288 bitField0_ |= 0x00000004;
29289 break;
29290 } // case 26
29291 case 37: {
29292 float v = input.readFloat();
29293 ensureFloatDataIsMutable();
29294 floatData_.addFloat(v);
29295 break;
29296 } // case 37
29297 case 34: {
29298 int length = input.readRawVarint32();
29299 int limit = input.pushLimit(length);
29300 int alloc = length > 4096 ? 4096 : length;
29301 ensureFloatDataIsMutable(alloc / 4);
29302 while (input.getBytesUntilLimit() > 0) {
29303 floatData_.addFloat(input.readFloat());
29304 }
29305 input.popLimit(limit);
29306 break;
29307 } // case 34
29308 case 40: {
29309 int v = input.readInt32();
29310 ensureInt32DataIsMutable();
29311 int32Data_.addInt(v);
29312 break;
29313 } // case 40
29314 case 42: {
29315 int length = input.readRawVarint32();
29316 int limit = input.pushLimit(length);
29317 ensureInt32DataIsMutable();
29318 while (input.getBytesUntilLimit() > 0) {
29319 int32Data_.addInt(input.readInt32());
29320 }
29321 input.popLimit(limit);
29322 break;
29323 } // case 42
29324 case 50: {
29325 com.google.protobuf.ByteString v = input.readBytes();
29326 ensureStringDataIsMutable();
29327 stringData_.add(v);
29328 break;
29329 } // case 50
29330 case 56: {
29331 long v = input.readInt64();
29332 ensureInt64DataIsMutable();
29333 int64Data_.addLong(v);
29334 break;
29335 } // case 56
29336 case 58: {
29337 int length = input.readRawVarint32();
29338 int limit = input.pushLimit(length);
29339 ensureInt64DataIsMutable();
29340 while (input.getBytesUntilLimit() > 0) {
29341 int64Data_.addLong(input.readInt64());
29342 }
29343 input.popLimit(limit);
29344 break;
29345 } // case 58
29346 case 66: {
29347 name_ = input.readBytes();
29348 bitField0_ |= 0x00000080;
29349 break;
29350 } // case 66
29351 case 74: {
29352 rawData_ = input.readBytes();
29353 bitField0_ |= 0x00000200;
29354 break;
29355 } // case 74
29356 case 81: {
29357 double v = input.readDouble();
29358 ensureDoubleDataIsMutable();
29359 doubleData_.addDouble(v);
29360 break;
29361 } // case 81
29362 case 82: {
29363 int length = input.readRawVarint32();
29364 int limit = input.pushLimit(length);
29365 int alloc = length > 4096 ? 4096 : length;
29366 ensureDoubleDataIsMutable(alloc / 8);
29367 while (input.getBytesUntilLimit() > 0) {
29368 doubleData_.addDouble(input.readDouble());
29369 }
29370 input.popLimit(limit);
29371 break;
29372 } // case 82
29373 case 88: {
29374 long v = input.readUInt64();
29375 ensureUint64DataIsMutable();
29376 uint64Data_.addLong(v);
29377 break;
29378 } // case 88
29379 case 90: {
29380 int length = input.readRawVarint32();
29381 int limit = input.pushLimit(length);
29382 ensureUint64DataIsMutable();
29383 while (input.getBytesUntilLimit() > 0) {
29384 uint64Data_.addLong(input.readUInt64());
29385 }
29386 input.popLimit(limit);
29387 break;
29388 } // case 90
29389 case 98: {
29390 docString_ = input.readBytes();
29391 bitField0_ |= 0x00000100;
29392 break;
29393 } // case 98
29394 case 106: {
29395 onnx.OnnxMl.StringStringEntryProto m =
29396 input.readMessage(
29397 onnx.OnnxMl.StringStringEntryProto.parser(),
29398 extensionRegistry);
29399 if (externalDataBuilder_ == null) {
29400 ensureExternalDataIsMutable();
29401 externalData_.add(m);
29402 } else {
29403 externalDataBuilder_.addMessage(m);
29404 }
29405 break;
29406 } // case 106
29407 case 112: {
29408 int tmpRaw = input.readEnum();
29409 onnx.OnnxMl.TensorProto.DataLocation tmpValue =
29410 onnx.OnnxMl.TensorProto.DataLocation.forNumber(tmpRaw);
29411 if (tmpValue == null) {
29412 mergeUnknownVarintField(14, tmpRaw);
29413 } else {
29414 dataLocation_ = tmpRaw;
29415 bitField0_ |= 0x00000800;
29416 }
29417 break;
29418 } // case 112
29419 case 130: {
29420 onnx.OnnxMl.StringStringEntryProto m =
29421 input.readMessage(
29422 onnx.OnnxMl.StringStringEntryProto.parser(),
29423 extensionRegistry);
29424 if (metadataPropsBuilder_ == null) {
29425 ensureMetadataPropsIsMutable();
29426 metadataProps_.add(m);
29427 } else {
29428 metadataPropsBuilder_.addMessage(m);
29429 }
29430 break;
29431 } // case 130
29432 default: {
29433 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
29434 done = true; // was an endgroup tag
29435 }
29436 break;
29437 } // default:
29438 } // switch (tag)
29439 } // while (!done)
29440 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
29441 throw e.unwrapIOException();
29442 } finally {
29443 onChanged();
29444 } // finally
29445 return this;
29446 }
29447 private int bitField0_;
29448
29449 private com.google.protobuf.Internal.LongList dims_ = emptyLongList();
29450 private void ensureDimsIsMutable() {
29451 if (!dims_.isModifiable()) {
29452 dims_ = makeMutableCopy(dims_);
29453 }
29454 bitField0_ |= 0x00000001;
29455 }
29456 /**
29457 * <pre>
29458 * The shape of the tensor.
29459 * </pre>
29460 *
29461 * <code>repeated int64 dims = 1;</code>
29462 * @return A list containing the dims.
29463 */
29464 public java.util.List<java.lang.Long>
29465 getDimsList() {
29466 dims_.makeImmutable();
29467 return dims_;
29468 }
29469 /**
29470 * <pre>
29471 * The shape of the tensor.
29472 * </pre>
29473 *
29474 * <code>repeated int64 dims = 1;</code>
29475 * @return The count of dims.
29476 */
29477 public int getDimsCount() {
29478 return dims_.size();
29479 }
29480 /**
29481 * <pre>
29482 * The shape of the tensor.
29483 * </pre>
29484 *
29485 * <code>repeated int64 dims = 1;</code>
29486 * @param index The index of the element to return.
29487 * @return The dims at the given index.
29488 */
29489 public long getDims(int index) {
29490 return dims_.getLong(index);
29491 }
29492 /**
29493 * <pre>
29494 * The shape of the tensor.
29495 * </pre>
29496 *
29497 * <code>repeated int64 dims = 1;</code>
29498 * @param index The index to set the value at.
29499 * @param value The dims to set.
29500 * @return This builder for chaining.
29501 */
29502 public Builder setDims(
29503 int index, long value) {
29504
29505 ensureDimsIsMutable();
29506 dims_.setLong(index, value);
29507 bitField0_ |= 0x00000001;
29508 onChanged();
29509 return this;
29510 }
29511 /**
29512 * <pre>
29513 * The shape of the tensor.
29514 * </pre>
29515 *
29516 * <code>repeated int64 dims = 1;</code>
29517 * @param value The dims to add.
29518 * @return This builder for chaining.
29519 */
29520 public Builder addDims(long value) {
29521
29522 ensureDimsIsMutable();
29523 dims_.addLong(value);
29524 bitField0_ |= 0x00000001;
29525 onChanged();
29526 return this;
29527 }
29528 /**
29529 * <pre>
29530 * The shape of the tensor.
29531 * </pre>
29532 *
29533 * <code>repeated int64 dims = 1;</code>
29534 * @param values The dims to add.
29535 * @return This builder for chaining.
29536 */
29537 public Builder addAllDims(
29538 java.lang.Iterable<? extends java.lang.Long> values) {
29539 ensureDimsIsMutable();
29540 com.google.protobuf.AbstractMessageLite.Builder.addAll(
29541 values, dims_);
29542 bitField0_ |= 0x00000001;
29543 onChanged();
29544 return this;
29545 }
29546 /**
29547 * <pre>
29548 * The shape of the tensor.
29549 * </pre>
29550 *
29551 * <code>repeated int64 dims = 1;</code>
29552 * @return This builder for chaining.
29553 */
29554 public Builder clearDims() {
29555 dims_ = emptyLongList();
29556 bitField0_ = (bitField0_ & ~0x00000001);
29557 onChanged();
29558 return this;
29559 }
29560
29561 private int dataType_ ;
29562 /**
29563 * <pre>
29564 * The data type of the tensor.
29565 * This field MUST have a valid TensorProto.DataType value
29566 * </pre>
29567 *
29568 * <code>optional int32 data_type = 2;</code>
29569 * @return Whether the dataType field is set.
29570 */
29571 @java.lang.Override
29572 public boolean hasDataType() {
29573 return ((bitField0_ & 0x00000002) != 0);
29574 }
29575 /**
29576 * <pre>
29577 * The data type of the tensor.
29578 * This field MUST have a valid TensorProto.DataType value
29579 * </pre>
29580 *
29581 * <code>optional int32 data_type = 2;</code>
29582 * @return The dataType.
29583 */
29584 @java.lang.Override
29585 public int getDataType() {
29586 return dataType_;
29587 }
29588 /**
29589 * <pre>
29590 * The data type of the tensor.
29591 * This field MUST have a valid TensorProto.DataType value
29592 * </pre>
29593 *
29594 * <code>optional int32 data_type = 2;</code>
29595 * @param value The dataType to set.
29596 * @return This builder for chaining.
29597 */
29598 public Builder setDataType(int value) {
29599
29600 dataType_ = value;
29601 bitField0_ |= 0x00000002;
29602 onChanged();
29603 return this;
29604 }
29605 /**
29606 * <pre>
29607 * The data type of the tensor.
29608 * This field MUST have a valid TensorProto.DataType value
29609 * </pre>
29610 *
29611 * <code>optional int32 data_type = 2;</code>
29612 * @return This builder for chaining.
29613 */
29614 public Builder clearDataType() {
29615 bitField0_ = (bitField0_ & ~0x00000002);
29616 dataType_ = 0;
29617 onChanged();
29618 return this;
29619 }
29620
29621 private onnx.OnnxMl.TensorProto.Segment segment_;
29622 private com.google.protobuf.SingleFieldBuilder<
29623 onnx.OnnxMl.TensorProto.Segment, onnx.OnnxMl.TensorProto.Segment.Builder, onnx.OnnxMl.TensorProto.SegmentOrBuilder> segmentBuilder_;
29624 /**
29625 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29626 * @return Whether the segment field is set.
29627 */
29628 public boolean hasSegment() {
29629 return ((bitField0_ & 0x00000004) != 0);
29630 }
29631 /**
29632 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29633 * @return The segment.
29634 */
29635 public onnx.OnnxMl.TensorProto.Segment getSegment() {
29636 if (segmentBuilder_ == null) {
29637 return segment_ == null ? onnx.OnnxMl.TensorProto.Segment.getDefaultInstance() : segment_;
29638 } else {
29639 return segmentBuilder_.getMessage();
29640 }
29641 }
29642 /**
29643 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29644 */
29645 public Builder setSegment(onnx.OnnxMl.TensorProto.Segment value) {
29646 if (segmentBuilder_ == null) {
29647 if (value == null) {
29648 throw new NullPointerException();
29649 }
29650 segment_ = value;
29651 } else {
29652 segmentBuilder_.setMessage(value);
29653 }
29654 bitField0_ |= 0x00000004;
29655 onChanged();
29656 return this;
29657 }
29658 /**
29659 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29660 */
29661 public Builder setSegment(
29662 onnx.OnnxMl.TensorProto.Segment.Builder builderForValue) {
29663 if (segmentBuilder_ == null) {
29664 segment_ = builderForValue.build();
29665 } else {
29666 segmentBuilder_.setMessage(builderForValue.build());
29667 }
29668 bitField0_ |= 0x00000004;
29669 onChanged();
29670 return this;
29671 }
29672 /**
29673 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29674 */
29675 public Builder mergeSegment(onnx.OnnxMl.TensorProto.Segment value) {
29676 if (segmentBuilder_ == null) {
29677 if (((bitField0_ & 0x00000004) != 0) &&
29678 segment_ != null &&
29679 segment_ != onnx.OnnxMl.TensorProto.Segment.getDefaultInstance()) {
29680 getSegmentBuilder().mergeFrom(value);
29681 } else {
29682 segment_ = value;
29683 }
29684 } else {
29685 segmentBuilder_.mergeFrom(value);
29686 }
29687 if (segment_ != null) {
29688 bitField0_ |= 0x00000004;
29689 onChanged();
29690 }
29691 return this;
29692 }
29693 /**
29694 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29695 */
29696 public Builder clearSegment() {
29697 bitField0_ = (bitField0_ & ~0x00000004);
29698 segment_ = null;
29699 if (segmentBuilder_ != null) {
29700 segmentBuilder_.dispose();
29701 segmentBuilder_ = null;
29702 }
29703 onChanged();
29704 return this;
29705 }
29706 /**
29707 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29708 */
29709 public onnx.OnnxMl.TensorProto.Segment.Builder getSegmentBuilder() {
29710 bitField0_ |= 0x00000004;
29711 onChanged();
29712 return getSegmentFieldBuilder().getBuilder();
29713 }
29714 /**
29715 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29716 */
29717 public onnx.OnnxMl.TensorProto.SegmentOrBuilder getSegmentOrBuilder() {
29718 if (segmentBuilder_ != null) {
29719 return segmentBuilder_.getMessageOrBuilder();
29720 } else {
29721 return segment_ == null ?
29722 onnx.OnnxMl.TensorProto.Segment.getDefaultInstance() : segment_;
29723 }
29724 }
29725 /**
29726 * <code>optional .onnx.TensorProto.Segment segment = 3;</code>
29727 */
29728 private com.google.protobuf.SingleFieldBuilder<
29729 onnx.OnnxMl.TensorProto.Segment, onnx.OnnxMl.TensorProto.Segment.Builder, onnx.OnnxMl.TensorProto.SegmentOrBuilder>
29730 getSegmentFieldBuilder() {
29731 if (segmentBuilder_ == null) {
29732 segmentBuilder_ = new com.google.protobuf.SingleFieldBuilder<
29733 onnx.OnnxMl.TensorProto.Segment, onnx.OnnxMl.TensorProto.Segment.Builder, onnx.OnnxMl.TensorProto.SegmentOrBuilder>(
29734 getSegment(),
29735 getParentForChildren(),
29736 isClean());
29737 segment_ = null;
29738 }
29739 return segmentBuilder_;
29740 }
29741
29742 private com.google.protobuf.Internal.FloatList floatData_ = emptyFloatList();
29743 private void ensureFloatDataIsMutable() {
29744 if (!floatData_.isModifiable()) {
29745 floatData_ = makeMutableCopy(floatData_);
29746 }
29747 bitField0_ |= 0x00000008;
29748 }
29749 private void ensureFloatDataIsMutable(int capacity) {
29750 if (!floatData_.isModifiable()) {
29751 floatData_ = makeMutableCopy(floatData_, capacity);
29752 }
29753 bitField0_ |= 0x00000008;
29754 }
29755 /**
29756 * <pre>
29757 * For float and complex64 values
29758 * Complex64 tensors are encoded as a single array of floats,
29759 * with the real components appearing in odd numbered positions,
29760 * and the corresponding imaginary component appearing in the
29761 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29762 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29763 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29764 * </pre>
29765 *
29766 * <code>repeated float float_data = 4 [packed = true];</code>
29767 * @return A list containing the floatData.
29768 */
29769 public java.util.List<java.lang.Float>
29770 getFloatDataList() {
29771 floatData_.makeImmutable();
29772 return floatData_;
29773 }
29774 /**
29775 * <pre>
29776 * For float and complex64 values
29777 * Complex64 tensors are encoded as a single array of floats,
29778 * with the real components appearing in odd numbered positions,
29779 * and the corresponding imaginary component appearing in the
29780 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29781 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29782 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29783 * </pre>
29784 *
29785 * <code>repeated float float_data = 4 [packed = true];</code>
29786 * @return The count of floatData.
29787 */
29788 public int getFloatDataCount() {
29789 return floatData_.size();
29790 }
29791 /**
29792 * <pre>
29793 * For float and complex64 values
29794 * Complex64 tensors are encoded as a single array of floats,
29795 * with the real components appearing in odd numbered positions,
29796 * and the corresponding imaginary component appearing in the
29797 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29798 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29799 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29800 * </pre>
29801 *
29802 * <code>repeated float float_data = 4 [packed = true];</code>
29803 * @param index The index of the element to return.
29804 * @return The floatData at the given index.
29805 */
29806 public float getFloatData(int index) {
29807 return floatData_.getFloat(index);
29808 }
29809 /**
29810 * <pre>
29811 * For float and complex64 values
29812 * Complex64 tensors are encoded as a single array of floats,
29813 * with the real components appearing in odd numbered positions,
29814 * and the corresponding imaginary component appearing in the
29815 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29816 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29817 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29818 * </pre>
29819 *
29820 * <code>repeated float float_data = 4 [packed = true];</code>
29821 * @param index The index to set the value at.
29822 * @param value The floatData to set.
29823 * @return This builder for chaining.
29824 */
29825 public Builder setFloatData(
29826 int index, float value) {
29827
29828 ensureFloatDataIsMutable();
29829 floatData_.setFloat(index, value);
29830 bitField0_ |= 0x00000008;
29831 onChanged();
29832 return this;
29833 }
29834 /**
29835 * <pre>
29836 * For float and complex64 values
29837 * Complex64 tensors are encoded as a single array of floats,
29838 * with the real components appearing in odd numbered positions,
29839 * and the corresponding imaginary component appearing in the
29840 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29841 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29842 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29843 * </pre>
29844 *
29845 * <code>repeated float float_data = 4 [packed = true];</code>
29846 * @param value The floatData to add.
29847 * @return This builder for chaining.
29848 */
29849 public Builder addFloatData(float value) {
29850
29851 ensureFloatDataIsMutable();
29852 floatData_.addFloat(value);
29853 bitField0_ |= 0x00000008;
29854 onChanged();
29855 return this;
29856 }
29857 /**
29858 * <pre>
29859 * For float and complex64 values
29860 * Complex64 tensors are encoded as a single array of floats,
29861 * with the real components appearing in odd numbered positions,
29862 * and the corresponding imaginary component appearing in the
29863 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29864 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29865 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29866 * </pre>
29867 *
29868 * <code>repeated float float_data = 4 [packed = true];</code>
29869 * @param values The floatData to add.
29870 * @return This builder for chaining.
29871 */
29872 public Builder addAllFloatData(
29873 java.lang.Iterable<? extends java.lang.Float> values) {
29874 ensureFloatDataIsMutable();
29875 com.google.protobuf.AbstractMessageLite.Builder.addAll(
29876 values, floatData_);
29877 bitField0_ |= 0x00000008;
29878 onChanged();
29879 return this;
29880 }
29881 /**
29882 * <pre>
29883 * For float and complex64 values
29884 * Complex64 tensors are encoded as a single array of floats,
29885 * with the real components appearing in odd numbered positions,
29886 * and the corresponding imaginary component appearing in the
29887 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
29888 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
29889 * When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
29890 * </pre>
29891 *
29892 * <code>repeated float float_data = 4 [packed = true];</code>
29893 * @return This builder for chaining.
29894 */
29895 public Builder clearFloatData() {
29896 floatData_ = emptyFloatList();
29897 bitField0_ = (bitField0_ & ~0x00000008);
29898 onChanged();
29899 return this;
29900 }
29901
29902 private com.google.protobuf.Internal.IntList int32Data_ = emptyIntList();
29903 private void ensureInt32DataIsMutable() {
29904 if (!int32Data_.isModifiable()) {
29905 int32Data_ = makeMutableCopy(int32Data_);
29906 }
29907 bitField0_ |= 0x00000010;
29908 }
29909 /**
29910 * <pre>
29911 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
29912 * float16 and float8 values must be bit-wise converted to an uint16_t prior
29913 * to writing to the buffer.
29914 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
29915 * the 4 LSB and the second element is stored in the 4 MSB.
29916 * When this field is present, the data_type field MUST be
29917 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
29918 * </pre>
29919 *
29920 * <code>repeated int32 int32_data = 5 [packed = true];</code>
29921 * @return A list containing the int32Data.
29922 */
29923 public java.util.List<java.lang.Integer>
29924 getInt32DataList() {
29925 int32Data_.makeImmutable();
29926 return int32Data_;
29927 }
29928 /**
29929 * <pre>
29930 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
29931 * float16 and float8 values must be bit-wise converted to an uint16_t prior
29932 * to writing to the buffer.
29933 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
29934 * the 4 LSB and the second element is stored in the 4 MSB.
29935 * When this field is present, the data_type field MUST be
29936 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
29937 * </pre>
29938 *
29939 * <code>repeated int32 int32_data = 5 [packed = true];</code>
29940 * @return The count of int32Data.
29941 */
29942 public int getInt32DataCount() {
29943 return int32Data_.size();
29944 }
29945 /**
29946 * <pre>
29947 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
29948 * float16 and float8 values must be bit-wise converted to an uint16_t prior
29949 * to writing to the buffer.
29950 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
29951 * the 4 LSB and the second element is stored in the 4 MSB.
29952 * When this field is present, the data_type field MUST be
29953 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
29954 * </pre>
29955 *
29956 * <code>repeated int32 int32_data = 5 [packed = true];</code>
29957 * @param index The index of the element to return.
29958 * @return The int32Data at the given index.
29959 */
29960 public int getInt32Data(int index) {
29961 return int32Data_.getInt(index);
29962 }
29963 /**
29964 * <pre>
29965 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
29966 * float16 and float8 values must be bit-wise converted to an uint16_t prior
29967 * to writing to the buffer.
29968 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
29969 * the 4 LSB and the second element is stored in the 4 MSB.
29970 * When this field is present, the data_type field MUST be
29971 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
29972 * </pre>
29973 *
29974 * <code>repeated int32 int32_data = 5 [packed = true];</code>
29975 * @param index The index to set the value at.
29976 * @param value The int32Data to set.
29977 * @return This builder for chaining.
29978 */
29979 public Builder setInt32Data(
29980 int index, int value) {
29981
29982 ensureInt32DataIsMutable();
29983 int32Data_.setInt(index, value);
29984 bitField0_ |= 0x00000010;
29985 onChanged();
29986 return this;
29987 }
29988 /**
29989 * <pre>
29990 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
29991 * float16 and float8 values must be bit-wise converted to an uint16_t prior
29992 * to writing to the buffer.
29993 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
29994 * the 4 LSB and the second element is stored in the 4 MSB.
29995 * When this field is present, the data_type field MUST be
29996 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
29997 * </pre>
29998 *
29999 * <code>repeated int32 int32_data = 5 [packed = true];</code>
30000 * @param value The int32Data to add.
30001 * @return This builder for chaining.
30002 */
30003 public Builder addInt32Data(int value) {
30004
30005 ensureInt32DataIsMutable();
30006 int32Data_.addInt(value);
30007 bitField0_ |= 0x00000010;
30008 onChanged();
30009 return this;
30010 }
30011 /**
30012 * <pre>
30013 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
30014 * float16 and float8 values must be bit-wise converted to an uint16_t prior
30015 * to writing to the buffer.
30016 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
30017 * the 4 LSB and the second element is stored in the 4 MSB.
30018 * When this field is present, the data_type field MUST be
30019 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
30020 * </pre>
30021 *
30022 * <code>repeated int32 int32_data = 5 [packed = true];</code>
30023 * @param values The int32Data to add.
30024 * @return This builder for chaining.
30025 */
30026 public Builder addAllInt32Data(
30027 java.lang.Iterable<? extends java.lang.Integer> values) {
30028 ensureInt32DataIsMutable();
30029 com.google.protobuf.AbstractMessageLite.Builder.addAll(
30030 values, int32Data_);
30031 bitField0_ |= 0x00000010;
30032 onChanged();
30033 return this;
30034 }
30035 /**
30036 * <pre>
30037 * For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values
30038 * float16 and float8 values must be bit-wise converted to an uint16_t prior
30039 * to writing to the buffer.
30040 * uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in
30041 * the 4 LSB and the second element is stored in the 4 MSB.
30042 * When this field is present, the data_type field MUST be
30043 * INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
30044 * </pre>
30045 *
30046 * <code>repeated int32 int32_data = 5 [packed = true];</code>
30047 * @return This builder for chaining.
30048 */
30049 public Builder clearInt32Data() {
30050 int32Data_ = emptyIntList();
30051 bitField0_ = (bitField0_ & ~0x00000010);
30052 onChanged();
30053 return this;
30054 }
30055
30056 private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> stringData_ = emptyList(com.google.protobuf.ByteString.class);
30057 private void ensureStringDataIsMutable() {
30058 if (!stringData_.isModifiable()) {
30059 stringData_ = makeMutableCopy(stringData_);
30060 }
30061 bitField0_ |= 0x00000020;
30062 }
30063 /**
30064 * <pre>
30065 * For strings.
30066 * Each element of string_data is a UTF-8 encoded Unicode
30067 * string. No trailing null, no leading BOM. The protobuf "string"
30068 * scalar type is not used to match ML community conventions.
30069 * When this field is present, the data_type field MUST be STRING
30070 * </pre>
30071 *
30072 * <code>repeated bytes string_data = 6;</code>
30073 * @return A list containing the stringData.
30074 */
30075 public java.util.List<com.google.protobuf.ByteString>
30076 getStringDataList() {
30077 stringData_.makeImmutable();
30078 return stringData_;
30079 }
30080 /**
30081 * <pre>
30082 * For strings.
30083 * Each element of string_data is a UTF-8 encoded Unicode
30084 * string. No trailing null, no leading BOM. The protobuf "string"
30085 * scalar type is not used to match ML community conventions.
30086 * When this field is present, the data_type field MUST be STRING
30087 * </pre>
30088 *
30089 * <code>repeated bytes string_data = 6;</code>
30090 * @return The count of stringData.
30091 */
30092 public int getStringDataCount() {
30093 return stringData_.size();
30094 }
30095 /**
30096 * <pre>
30097 * For strings.
30098 * Each element of string_data is a UTF-8 encoded Unicode
30099 * string. No trailing null, no leading BOM. The protobuf "string"
30100 * scalar type is not used to match ML community conventions.
30101 * When this field is present, the data_type field MUST be STRING
30102 * </pre>
30103 *
30104 * <code>repeated bytes string_data = 6;</code>
30105 * @param index The index of the element to return.
30106 * @return The stringData at the given index.
30107 */
30108 public com.google.protobuf.ByteString getStringData(int index) {
30109 return stringData_.get(index);
30110 }
30111 /**
30112 * <pre>
30113 * For strings.
30114 * Each element of string_data is a UTF-8 encoded Unicode
30115 * string. No trailing null, no leading BOM. The protobuf "string"
30116 * scalar type is not used to match ML community conventions.
30117 * When this field is present, the data_type field MUST be STRING
30118 * </pre>
30119 *
30120 * <code>repeated bytes string_data = 6;</code>
30121 * @param index The index to set the value at.
30122 * @param value The stringData to set.
30123 * @return This builder for chaining.
30124 */
30125 public Builder setStringData(
30126 int index, com.google.protobuf.ByteString value) {
30127 if (value == null) { throw new NullPointerException(); }
30128 ensureStringDataIsMutable();
30129 stringData_.set(index, value);
30130 bitField0_ |= 0x00000020;
30131 onChanged();
30132 return this;
30133 }
30134 /**
30135 * <pre>
30136 * For strings.
30137 * Each element of string_data is a UTF-8 encoded Unicode
30138 * string. No trailing null, no leading BOM. The protobuf "string"
30139 * scalar type is not used to match ML community conventions.
30140 * When this field is present, the data_type field MUST be STRING
30141 * </pre>
30142 *
30143 * <code>repeated bytes string_data = 6;</code>
30144 * @param value The stringData to add.
30145 * @return This builder for chaining.
30146 */
30147 public Builder addStringData(com.google.protobuf.ByteString value) {
30148 if (value == null) { throw new NullPointerException(); }
30149 ensureStringDataIsMutable();
30150 stringData_.add(value);
30151 bitField0_ |= 0x00000020;
30152 onChanged();
30153 return this;
30154 }
30155 /**
30156 * <pre>
30157 * For strings.
30158 * Each element of string_data is a UTF-8 encoded Unicode
30159 * string. No trailing null, no leading BOM. The protobuf "string"
30160 * scalar type is not used to match ML community conventions.
30161 * When this field is present, the data_type field MUST be STRING
30162 * </pre>
30163 *
30164 * <code>repeated bytes string_data = 6;</code>
30165 * @param values The stringData to add.
30166 * @return This builder for chaining.
30167 */
30168 public Builder addAllStringData(
30169 java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
30170 ensureStringDataIsMutable();
30171 com.google.protobuf.AbstractMessageLite.Builder.addAll(
30172 values, stringData_);
30173 bitField0_ |= 0x00000020;
30174 onChanged();
30175 return this;
30176 }
30177 /**
30178 * <pre>
30179 * For strings.
30180 * Each element of string_data is a UTF-8 encoded Unicode
30181 * string. No trailing null, no leading BOM. The protobuf "string"
30182 * scalar type is not used to match ML community conventions.
30183 * When this field is present, the data_type field MUST be STRING
30184 * </pre>
30185 *
30186 * <code>repeated bytes string_data = 6;</code>
30187 * @return This builder for chaining.
30188 */
30189 public Builder clearStringData() {
30190 stringData_ = emptyList(com.google.protobuf.ByteString.class);
30191 bitField0_ = (bitField0_ & ~0x00000020);
30192 onChanged();
30193 return this;
30194 }
30195
30196 private com.google.protobuf.Internal.LongList int64Data_ = emptyLongList();
30197 private void ensureInt64DataIsMutable() {
30198 if (!int64Data_.isModifiable()) {
30199 int64Data_ = makeMutableCopy(int64Data_);
30200 }
30201 bitField0_ |= 0x00000040;
30202 }
30203 /**
30204 * <pre>
30205 * For int64.
30206 * When this field is present, the data_type field MUST be INT64
30207 * </pre>
30208 *
30209 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30210 * @return A list containing the int64Data.
30211 */
30212 public java.util.List<java.lang.Long>
30213 getInt64DataList() {
30214 int64Data_.makeImmutable();
30215 return int64Data_;
30216 }
30217 /**
30218 * <pre>
30219 * For int64.
30220 * When this field is present, the data_type field MUST be INT64
30221 * </pre>
30222 *
30223 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30224 * @return The count of int64Data.
30225 */
30226 public int getInt64DataCount() {
30227 return int64Data_.size();
30228 }
30229 /**
30230 * <pre>
30231 * For int64.
30232 * When this field is present, the data_type field MUST be INT64
30233 * </pre>
30234 *
30235 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30236 * @param index The index of the element to return.
30237 * @return The int64Data at the given index.
30238 */
30239 public long getInt64Data(int index) {
30240 return int64Data_.getLong(index);
30241 }
30242 /**
30243 * <pre>
30244 * For int64.
30245 * When this field is present, the data_type field MUST be INT64
30246 * </pre>
30247 *
30248 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30249 * @param index The index to set the value at.
30250 * @param value The int64Data to set.
30251 * @return This builder for chaining.
30252 */
30253 public Builder setInt64Data(
30254 int index, long value) {
30255
30256 ensureInt64DataIsMutable();
30257 int64Data_.setLong(index, value);
30258 bitField0_ |= 0x00000040;
30259 onChanged();
30260 return this;
30261 }
30262 /**
30263 * <pre>
30264 * For int64.
30265 * When this field is present, the data_type field MUST be INT64
30266 * </pre>
30267 *
30268 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30269 * @param value The int64Data to add.
30270 * @return This builder for chaining.
30271 */
30272 public Builder addInt64Data(long value) {
30273
30274 ensureInt64DataIsMutable();
30275 int64Data_.addLong(value);
30276 bitField0_ |= 0x00000040;
30277 onChanged();
30278 return this;
30279 }
30280 /**
30281 * <pre>
30282 * For int64.
30283 * When this field is present, the data_type field MUST be INT64
30284 * </pre>
30285 *
30286 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30287 * @param values The int64Data to add.
30288 * @return This builder for chaining.
30289 */
30290 public Builder addAllInt64Data(
30291 java.lang.Iterable<? extends java.lang.Long> values) {
30292 ensureInt64DataIsMutable();
30293 com.google.protobuf.AbstractMessageLite.Builder.addAll(
30294 values, int64Data_);
30295 bitField0_ |= 0x00000040;
30296 onChanged();
30297 return this;
30298 }
30299 /**
30300 * <pre>
30301 * For int64.
30302 * When this field is present, the data_type field MUST be INT64
30303 * </pre>
30304 *
30305 * <code>repeated int64 int64_data = 7 [packed = true];</code>
30306 * @return This builder for chaining.
30307 */
30308 public Builder clearInt64Data() {
30309 int64Data_ = emptyLongList();
30310 bitField0_ = (bitField0_ & ~0x00000040);
30311 onChanged();
30312 return this;
30313 }
30314
30315 private java.lang.Object name_ = "";
30316 /**
30317 * <pre>
30318 * Optionally, a name for the tensor.
30319 * </pre>
30320 *
30321 * <code>optional string name = 8;</code>
30322 * @return Whether the name field is set.
30323 */
30324 public boolean hasName() {
30325 return ((bitField0_ & 0x00000080) != 0);
30326 }
30327 /**
30328 * <pre>
30329 * Optionally, a name for the tensor.
30330 * </pre>
30331 *
30332 * <code>optional string name = 8;</code>
30333 * @return The name.
30334 */
30335 public java.lang.String getName() {
30336 java.lang.Object ref = name_;
30337 if (!(ref instanceof java.lang.String)) {
30338 com.google.protobuf.ByteString bs =
30339 (com.google.protobuf.ByteString) ref;
30340 java.lang.String s = bs.toStringUtf8();
30341 if (bs.isValidUtf8()) {
30342 name_ = s;
30343 }
30344 return s;
30345 } else {
30346 return (java.lang.String) ref;
30347 }
30348 }
30349 /**
30350 * <pre>
30351 * Optionally, a name for the tensor.
30352 * </pre>
30353 *
30354 * <code>optional string name = 8;</code>
30355 * @return The bytes for name.
30356 */
30357 public com.google.protobuf.ByteString
30358 getNameBytes() {
30359 java.lang.Object ref = name_;
30360 if (ref instanceof String) {
30361 com.google.protobuf.ByteString b =
30362 com.google.protobuf.ByteString.copyFromUtf8(
30363 (java.lang.String) ref);
30364 name_ = b;
30365 return b;
30366 } else {
30367 return (com.google.protobuf.ByteString) ref;
30368 }
30369 }
30370 /**
30371 * <pre>
30372 * Optionally, a name for the tensor.
30373 * </pre>
30374 *
30375 * <code>optional string name = 8;</code>
30376 * @param value The name to set.
30377 * @return This builder for chaining.
30378 */
30379 public Builder setName(
30380 java.lang.String value) {
30381 if (value == null) { throw new NullPointerException(); }
30382 name_ = value;
30383 bitField0_ |= 0x00000080;
30384 onChanged();
30385 return this;
30386 }
30387 /**
30388 * <pre>
30389 * Optionally, a name for the tensor.
30390 * </pre>
30391 *
30392 * <code>optional string name = 8;</code>
30393 * @return This builder for chaining.
30394 */
30395 public Builder clearName() {
30396 name_ = getDefaultInstance().getName();
30397 bitField0_ = (bitField0_ & ~0x00000080);
30398 onChanged();
30399 return this;
30400 }
30401 /**
30402 * <pre>
30403 * Optionally, a name for the tensor.
30404 * </pre>
30405 *
30406 * <code>optional string name = 8;</code>
30407 * @param value The bytes for name to set.
30408 * @return This builder for chaining.
30409 */
30410 public Builder setNameBytes(
30411 com.google.protobuf.ByteString value) {
30412 if (value == null) { throw new NullPointerException(); }
30413 name_ = value;
30414 bitField0_ |= 0x00000080;
30415 onChanged();
30416 return this;
30417 }
30418
30419 private java.lang.Object docString_ = "";
30420 /**
30421 * <pre>
30422 * A human-readable documentation for this tensor. Markdown is allowed.
30423 * </pre>
30424 *
30425 * <code>optional string doc_string = 12;</code>
30426 * @return Whether the docString field is set.
30427 */
30428 public boolean hasDocString() {
30429 return ((bitField0_ & 0x00000100) != 0);
30430 }
30431 /**
30432 * <pre>
30433 * A human-readable documentation for this tensor. Markdown is allowed.
30434 * </pre>
30435 *
30436 * <code>optional string doc_string = 12;</code>
30437 * @return The docString.
30438 */
30439 public java.lang.String getDocString() {
30440 java.lang.Object ref = docString_;
30441 if (!(ref instanceof java.lang.String)) {
30442 com.google.protobuf.ByteString bs =
30443 (com.google.protobuf.ByteString) ref;
30444 java.lang.String s = bs.toStringUtf8();
30445 if (bs.isValidUtf8()) {
30446 docString_ = s;
30447 }
30448 return s;
30449 } else {
30450 return (java.lang.String) ref;
30451 }
30452 }
30453 /**
30454 * <pre>
30455 * A human-readable documentation for this tensor. Markdown is allowed.
30456 * </pre>
30457 *
30458 * <code>optional string doc_string = 12;</code>
30459 * @return The bytes for docString.
30460 */
30461 public com.google.protobuf.ByteString
30462 getDocStringBytes() {
30463 java.lang.Object ref = docString_;
30464 if (ref instanceof String) {
30465 com.google.protobuf.ByteString b =
30466 com.google.protobuf.ByteString.copyFromUtf8(
30467 (java.lang.String) ref);
30468 docString_ = b;
30469 return b;
30470 } else {
30471 return (com.google.protobuf.ByteString) ref;
30472 }
30473 }
30474 /**
30475 * <pre>
30476 * A human-readable documentation for this tensor. Markdown is allowed.
30477 * </pre>
30478 *
30479 * <code>optional string doc_string = 12;</code>
30480 * @param value The docString to set.
30481 * @return This builder for chaining.
30482 */
30483 public Builder setDocString(
30484 java.lang.String value) {
30485 if (value == null) { throw new NullPointerException(); }
30486 docString_ = value;
30487 bitField0_ |= 0x00000100;
30488 onChanged();
30489 return this;
30490 }
30491 /**
30492 * <pre>
30493 * A human-readable documentation for this tensor. Markdown is allowed.
30494 * </pre>
30495 *
30496 * <code>optional string doc_string = 12;</code>
30497 * @return This builder for chaining.
30498 */
30499 public Builder clearDocString() {
30500 docString_ = getDefaultInstance().getDocString();
30501 bitField0_ = (bitField0_ & ~0x00000100);
30502 onChanged();
30503 return this;
30504 }
30505 /**
30506 * <pre>
30507 * A human-readable documentation for this tensor. Markdown is allowed.
30508 * </pre>
30509 *
30510 * <code>optional string doc_string = 12;</code>
30511 * @param value The bytes for docString to set.
30512 * @return This builder for chaining.
30513 */
30514 public Builder setDocStringBytes(
30515 com.google.protobuf.ByteString value) {
30516 if (value == null) { throw new NullPointerException(); }
30517 docString_ = value;
30518 bitField0_ |= 0x00000100;
30519 onChanged();
30520 return this;
30521 }
30522
30523 private com.google.protobuf.ByteString rawData_ = com.google.protobuf.ByteString.EMPTY;
30524 /**
30525 * <pre>
30526 * Serializations can either use one of the fields above, or use this
30527 * raw bytes field. The only exception is the string case, where one is
30528 * required to store the content in the repeated bytes string_data field.
30529 *
30530 * When this raw_data field is used to store tensor value, elements MUST
30531 * be stored in as fixed-width, little-endian order.
30532 * Floating-point data types MUST be stored in IEEE 754 format.
30533 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
30534 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
30535 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
30536 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
30537 *
30538 * Note: the advantage of specific field rather than the raw_data field is
30539 * that in some cases (e.g. int data), protobuf does a better packing via
30540 * variable length storage, and may lead to smaller binary footprint.
30541 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
30542 * </pre>
30543 *
30544 * <code>optional bytes raw_data = 9;</code>
30545 * @return Whether the rawData field is set.
30546 */
30547 @java.lang.Override
30548 public boolean hasRawData() {
30549 return ((bitField0_ & 0x00000200) != 0);
30550 }
30551 /**
30552 * <pre>
30553 * Serializations can either use one of the fields above, or use this
30554 * raw bytes field. The only exception is the string case, where one is
30555 * required to store the content in the repeated bytes string_data field.
30556 *
30557 * When this raw_data field is used to store tensor value, elements MUST
30558 * be stored in as fixed-width, little-endian order.
30559 * Floating-point data types MUST be stored in IEEE 754 format.
30560 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
30561 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
30562 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
30563 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
30564 *
30565 * Note: the advantage of specific field rather than the raw_data field is
30566 * that in some cases (e.g. int data), protobuf does a better packing via
30567 * variable length storage, and may lead to smaller binary footprint.
30568 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
30569 * </pre>
30570 *
30571 * <code>optional bytes raw_data = 9;</code>
30572 * @return The rawData.
30573 */
30574 @java.lang.Override
30575 public com.google.protobuf.ByteString getRawData() {
30576 return rawData_;
30577 }
30578 /**
30579 * <pre>
30580 * Serializations can either use one of the fields above, or use this
30581 * raw bytes field. The only exception is the string case, where one is
30582 * required to store the content in the repeated bytes string_data field.
30583 *
30584 * When this raw_data field is used to store tensor value, elements MUST
30585 * be stored in as fixed-width, little-endian order.
30586 * Floating-point data types MUST be stored in IEEE 754 format.
30587 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
30588 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
30589 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
30590 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
30591 *
30592 * Note: the advantage of specific field rather than the raw_data field is
30593 * that in some cases (e.g. int data), protobuf does a better packing via
30594 * variable length storage, and may lead to smaller binary footprint.
30595 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
30596 * </pre>
30597 *
30598 * <code>optional bytes raw_data = 9;</code>
30599 * @param value The rawData to set.
30600 * @return This builder for chaining.
30601 */
30602 public Builder setRawData(com.google.protobuf.ByteString value) {
30603 if (value == null) { throw new NullPointerException(); }
30604 rawData_ = value;
30605 bitField0_ |= 0x00000200;
30606 onChanged();
30607 return this;
30608 }
30609 /**
30610 * <pre>
30611 * Serializations can either use one of the fields above, or use this
30612 * raw bytes field. The only exception is the string case, where one is
30613 * required to store the content in the repeated bytes string_data field.
30614 *
30615 * When this raw_data field is used to store tensor value, elements MUST
30616 * be stored in as fixed-width, little-endian order.
30617 * Floating-point data types MUST be stored in IEEE 754 format.
30618 * Complex64 elements must be written as two consecutive FLOAT values, real component first.
30619 * Complex128 elements must be written as two consecutive DOUBLE values, real component first.
30620 * Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
30621 * uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB.
30622 *
30623 * Note: the advantage of specific field rather than the raw_data field is
30624 * that in some cases (e.g. int data), protobuf does a better packing via
30625 * variable length storage, and may lead to smaller binary footprint.
30626 * When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
30627 * </pre>
30628 *
30629 * <code>optional bytes raw_data = 9;</code>
30630 * @return This builder for chaining.
30631 */
30632 public Builder clearRawData() {
30633 bitField0_ = (bitField0_ & ~0x00000200);
30634 rawData_ = getDefaultInstance().getRawData();
30635 onChanged();
30636 return this;
30637 }
30638
30639 private java.util.List<onnx.OnnxMl.StringStringEntryProto> externalData_ =
30640 java.util.Collections.emptyList();
30641 private void ensureExternalDataIsMutable() {
30642 if (!((bitField0_ & 0x00000400) != 0)) {
30643 externalData_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(externalData_);
30644 bitField0_ |= 0x00000400;
30645 }
30646 }
30647
30648 private com.google.protobuf.RepeatedFieldBuilder<
30649 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> externalDataBuilder_;
30650
30651 /**
30652 * <pre>
30653 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30654 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30655 * external_data stores key-value pairs describing data location. Recognized keys are:
30656 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30657 * protobuf model was stored
30658 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30659 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30660 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30661 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30662 * </pre>
30663 *
30664 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30665 */
30666 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getExternalDataList() {
30667 if (externalDataBuilder_ == null) {
30668 return java.util.Collections.unmodifiableList(externalData_);
30669 } else {
30670 return externalDataBuilder_.getMessageList();
30671 }
30672 }
30673 /**
30674 * <pre>
30675 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30676 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30677 * external_data stores key-value pairs describing data location. Recognized keys are:
30678 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30679 * protobuf model was stored
30680 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30681 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30682 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30683 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30684 * </pre>
30685 *
30686 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30687 */
30688 public int getExternalDataCount() {
30689 if (externalDataBuilder_ == null) {
30690 return externalData_.size();
30691 } else {
30692 return externalDataBuilder_.getCount();
30693 }
30694 }
30695 /**
30696 * <pre>
30697 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30698 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30699 * external_data stores key-value pairs describing data location. Recognized keys are:
30700 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30701 * protobuf model was stored
30702 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30703 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30704 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30705 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30706 * </pre>
30707 *
30708 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30709 */
30710 public onnx.OnnxMl.StringStringEntryProto getExternalData(int index) {
30711 if (externalDataBuilder_ == null) {
30712 return externalData_.get(index);
30713 } else {
30714 return externalDataBuilder_.getMessage(index);
30715 }
30716 }
30717 /**
30718 * <pre>
30719 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30720 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30721 * external_data stores key-value pairs describing data location. Recognized keys are:
30722 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30723 * protobuf model was stored
30724 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30725 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30726 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30727 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30728 * </pre>
30729 *
30730 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30731 */
30732 public Builder setExternalData(
30733 int index, onnx.OnnxMl.StringStringEntryProto value) {
30734 if (externalDataBuilder_ == null) {
30735 if (value == null) {
30736 throw new NullPointerException();
30737 }
30738 ensureExternalDataIsMutable();
30739 externalData_.set(index, value);
30740 onChanged();
30741 } else {
30742 externalDataBuilder_.setMessage(index, value);
30743 }
30744 return this;
30745 }
30746 /**
30747 * <pre>
30748 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30749 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30750 * external_data stores key-value pairs describing data location. Recognized keys are:
30751 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30752 * protobuf model was stored
30753 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30754 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30755 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30756 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30757 * </pre>
30758 *
30759 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30760 */
30761 public Builder setExternalData(
30762 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
30763 if (externalDataBuilder_ == null) {
30764 ensureExternalDataIsMutable();
30765 externalData_.set(index, builderForValue.build());
30766 onChanged();
30767 } else {
30768 externalDataBuilder_.setMessage(index, builderForValue.build());
30769 }
30770 return this;
30771 }
30772 /**
30773 * <pre>
30774 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30775 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30776 * external_data stores key-value pairs describing data location. Recognized keys are:
30777 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30778 * protobuf model was stored
30779 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30780 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30781 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30782 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30783 * </pre>
30784 *
30785 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30786 */
30787 public Builder addExternalData(onnx.OnnxMl.StringStringEntryProto value) {
30788 if (externalDataBuilder_ == null) {
30789 if (value == null) {
30790 throw new NullPointerException();
30791 }
30792 ensureExternalDataIsMutable();
30793 externalData_.add(value);
30794 onChanged();
30795 } else {
30796 externalDataBuilder_.addMessage(value);
30797 }
30798 return this;
30799 }
30800 /**
30801 * <pre>
30802 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30803 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30804 * external_data stores key-value pairs describing data location. Recognized keys are:
30805 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30806 * protobuf model was stored
30807 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30808 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30809 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30810 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30811 * </pre>
30812 *
30813 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30814 */
30815 public Builder addExternalData(
30816 int index, onnx.OnnxMl.StringStringEntryProto value) {
30817 if (externalDataBuilder_ == null) {
30818 if (value == null) {
30819 throw new NullPointerException();
30820 }
30821 ensureExternalDataIsMutable();
30822 externalData_.add(index, value);
30823 onChanged();
30824 } else {
30825 externalDataBuilder_.addMessage(index, value);
30826 }
30827 return this;
30828 }
30829 /**
30830 * <pre>
30831 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30832 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30833 * external_data stores key-value pairs describing data location. Recognized keys are:
30834 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30835 * protobuf model was stored
30836 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30837 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30838 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30839 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30840 * </pre>
30841 *
30842 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30843 */
30844 public Builder addExternalData(
30845 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
30846 if (externalDataBuilder_ == null) {
30847 ensureExternalDataIsMutable();
30848 externalData_.add(builderForValue.build());
30849 onChanged();
30850 } else {
30851 externalDataBuilder_.addMessage(builderForValue.build());
30852 }
30853 return this;
30854 }
30855 /**
30856 * <pre>
30857 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30858 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30859 * external_data stores key-value pairs describing data location. Recognized keys are:
30860 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30861 * protobuf model was stored
30862 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30863 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30864 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30865 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30866 * </pre>
30867 *
30868 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30869 */
30870 public Builder addExternalData(
30871 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
30872 if (externalDataBuilder_ == null) {
30873 ensureExternalDataIsMutable();
30874 externalData_.add(index, builderForValue.build());
30875 onChanged();
30876 } else {
30877 externalDataBuilder_.addMessage(index, builderForValue.build());
30878 }
30879 return this;
30880 }
30881 /**
30882 * <pre>
30883 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30884 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30885 * external_data stores key-value pairs describing data location. Recognized keys are:
30886 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30887 * protobuf model was stored
30888 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30889 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30890 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30891 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30892 * </pre>
30893 *
30894 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30895 */
30896 public Builder addAllExternalData(
30897 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
30898 if (externalDataBuilder_ == null) {
30899 ensureExternalDataIsMutable();
30900 com.google.protobuf.AbstractMessageLite.Builder.addAll(
30901 values, externalData_);
30902 onChanged();
30903 } else {
30904 externalDataBuilder_.addAllMessages(values);
30905 }
30906 return this;
30907 }
30908 /**
30909 * <pre>
30910 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30911 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30912 * external_data stores key-value pairs describing data location. Recognized keys are:
30913 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30914 * protobuf model was stored
30915 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30916 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30917 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30918 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30919 * </pre>
30920 *
30921 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30922 */
30923 public Builder clearExternalData() {
30924 if (externalDataBuilder_ == null) {
30925 externalData_ = java.util.Collections.emptyList();
30926 bitField0_ = (bitField0_ & ~0x00000400);
30927 onChanged();
30928 } else {
30929 externalDataBuilder_.clear();
30930 }
30931 return this;
30932 }
30933 /**
30934 * <pre>
30935 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30936 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30937 * external_data stores key-value pairs describing data location. Recognized keys are:
30938 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30939 * protobuf model was stored
30940 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30941 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30942 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30943 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30944 * </pre>
30945 *
30946 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30947 */
30948 public Builder removeExternalData(int index) {
30949 if (externalDataBuilder_ == null) {
30950 ensureExternalDataIsMutable();
30951 externalData_.remove(index);
30952 onChanged();
30953 } else {
30954 externalDataBuilder_.remove(index);
30955 }
30956 return this;
30957 }
30958 /**
30959 * <pre>
30960 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30961 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30962 * external_data stores key-value pairs describing data location. Recognized keys are:
30963 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30964 * protobuf model was stored
30965 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30966 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30967 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30968 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30969 * </pre>
30970 *
30971 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30972 */
30973 public onnx.OnnxMl.StringStringEntryProto.Builder getExternalDataBuilder(
30974 int index) {
30975 return getExternalDataFieldBuilder().getBuilder(index);
30976 }
30977 /**
30978 * <pre>
30979 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
30980 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
30981 * external_data stores key-value pairs describing data location. Recognized keys are:
30982 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
30983 * protobuf model was stored
30984 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
30985 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
30986 * - "length" (optional) - number of bytes containing data. Integer stored as string.
30987 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
30988 * </pre>
30989 *
30990 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
30991 */
30992 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getExternalDataOrBuilder(
30993 int index) {
30994 if (externalDataBuilder_ == null) {
30995 return externalData_.get(index); } else {
30996 return externalDataBuilder_.getMessageOrBuilder(index);
30997 }
30998 }
30999 /**
31000 * <pre>
31001 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
31002 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
31003 * external_data stores key-value pairs describing data location. Recognized keys are:
31004 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
31005 * protobuf model was stored
31006 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
31007 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
31008 * - "length" (optional) - number of bytes containing data. Integer stored as string.
31009 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
31010 * </pre>
31011 *
31012 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
31013 */
31014 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
31015 getExternalDataOrBuilderList() {
31016 if (externalDataBuilder_ != null) {
31017 return externalDataBuilder_.getMessageOrBuilderList();
31018 } else {
31019 return java.util.Collections.unmodifiableList(externalData_);
31020 }
31021 }
31022 /**
31023 * <pre>
31024 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
31025 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
31026 * external_data stores key-value pairs describing data location. Recognized keys are:
31027 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
31028 * protobuf model was stored
31029 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
31030 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
31031 * - "length" (optional) - number of bytes containing data. Integer stored as string.
31032 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
31033 * </pre>
31034 *
31035 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
31036 */
31037 public onnx.OnnxMl.StringStringEntryProto.Builder addExternalDataBuilder() {
31038 return getExternalDataFieldBuilder().addBuilder(
31039 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
31040 }
31041 /**
31042 * <pre>
31043 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
31044 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
31045 * external_data stores key-value pairs describing data location. Recognized keys are:
31046 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
31047 * protobuf model was stored
31048 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
31049 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
31050 * - "length" (optional) - number of bytes containing data. Integer stored as string.
31051 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
31052 * </pre>
31053 *
31054 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
31055 */
31056 public onnx.OnnxMl.StringStringEntryProto.Builder addExternalDataBuilder(
31057 int index) {
31058 return getExternalDataFieldBuilder().addBuilder(
31059 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
31060 }
31061 /**
31062 * <pre>
31063 * Data can be stored inside the protobuf file using type-specific fields or raw_data.
31064 * Alternatively, raw bytes data can be stored in an external file, using the external_data field.
31065 * external_data stores key-value pairs describing data location. Recognized keys are:
31066 * - "location" (required) - POSIX filesystem path relative to the directory where the ONNX
31067 * protobuf model was stored
31068 * - "offset" (optional) - position of byte at which stored data begins. Integer stored as string.
31069 * Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
31070 * - "length" (optional) - number of bytes containing data. Integer stored as string.
31071 * - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
31072 * </pre>
31073 *
31074 * <code>repeated .onnx.StringStringEntryProto external_data = 13;</code>
31075 */
31076 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
31077 getExternalDataBuilderList() {
31078 return getExternalDataFieldBuilder().getBuilderList();
31079 }
31080 private com.google.protobuf.RepeatedFieldBuilder<
31081 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
31082 getExternalDataFieldBuilder() {
31083 if (externalDataBuilder_ == null) {
31084 externalDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
31085 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
31086 externalData_,
31087 ((bitField0_ & 0x00000400) != 0),
31088 getParentForChildren(),
31089 isClean());
31090 externalData_ = null;
31091 }
31092 return externalDataBuilder_;
31093 }
31094
31095 private int dataLocation_ = 0;
31096 /**
31097 * <pre>
31098 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
31099 * </pre>
31100 *
31101 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
31102 * @return Whether the dataLocation field is set.
31103 */
31104 @java.lang.Override public boolean hasDataLocation() {
31105 return ((bitField0_ & 0x00000800) != 0);
31106 }
31107 /**
31108 * <pre>
31109 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
31110 * </pre>
31111 *
31112 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
31113 * @return The dataLocation.
31114 */
31115 @java.lang.Override
31116 public onnx.OnnxMl.TensorProto.DataLocation getDataLocation() {
31117 onnx.OnnxMl.TensorProto.DataLocation result = onnx.OnnxMl.TensorProto.DataLocation.forNumber(dataLocation_);
31118 return result == null ? onnx.OnnxMl.TensorProto.DataLocation.DEFAULT : result;
31119 }
31120 /**
31121 * <pre>
31122 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
31123 * </pre>
31124 *
31125 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
31126 * @param value The dataLocation to set.
31127 * @return This builder for chaining.
31128 */
31129 public Builder setDataLocation(onnx.OnnxMl.TensorProto.DataLocation value) {
31130 if (value == null) {
31131 throw new NullPointerException();
31132 }
31133 bitField0_ |= 0x00000800;
31134 dataLocation_ = value.getNumber();
31135 onChanged();
31136 return this;
31137 }
31138 /**
31139 * <pre>
31140 * If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
31141 * </pre>
31142 *
31143 * <code>optional .onnx.TensorProto.DataLocation data_location = 14;</code>
31144 * @return This builder for chaining.
31145 */
31146 public Builder clearDataLocation() {
31147 bitField0_ = (bitField0_ & ~0x00000800);
31148 dataLocation_ = 0;
31149 onChanged();
31150 return this;
31151 }
31152
31153 private com.google.protobuf.Internal.DoubleList doubleData_ = emptyDoubleList();
31154 private void ensureDoubleDataIsMutable() {
31155 if (!doubleData_.isModifiable()) {
31156 doubleData_ = makeMutableCopy(doubleData_);
31157 }
31158 bitField0_ |= 0x00001000;
31159 }
31160 private void ensureDoubleDataIsMutable(int capacity) {
31161 if (!doubleData_.isModifiable()) {
31162 doubleData_ = makeMutableCopy(doubleData_, capacity);
31163 }
31164 bitField0_ |= 0x00001000;
31165 }
31166 /**
31167 * <pre>
31168 * For double
31169 * Complex128 tensors are encoded as a single array of doubles,
31170 * with the real components appearing in odd numbered positions,
31171 * and the corresponding imaginary component appearing in the
31172 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31173 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31174 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31175 * </pre>
31176 *
31177 * <code>repeated double double_data = 10 [packed = true];</code>
31178 * @return A list containing the doubleData.
31179 */
31180 public java.util.List<java.lang.Double>
31181 getDoubleDataList() {
31182 doubleData_.makeImmutable();
31183 return doubleData_;
31184 }
31185 /**
31186 * <pre>
31187 * For double
31188 * Complex128 tensors are encoded as a single array of doubles,
31189 * with the real components appearing in odd numbered positions,
31190 * and the corresponding imaginary component appearing in the
31191 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31192 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31193 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31194 * </pre>
31195 *
31196 * <code>repeated double double_data = 10 [packed = true];</code>
31197 * @return The count of doubleData.
31198 */
31199 public int getDoubleDataCount() {
31200 return doubleData_.size();
31201 }
31202 /**
31203 * <pre>
31204 * For double
31205 * Complex128 tensors are encoded as a single array of doubles,
31206 * with the real components appearing in odd numbered positions,
31207 * and the corresponding imaginary component appearing in the
31208 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31209 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31210 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31211 * </pre>
31212 *
31213 * <code>repeated double double_data = 10 [packed = true];</code>
31214 * @param index The index of the element to return.
31215 * @return The doubleData at the given index.
31216 */
31217 public double getDoubleData(int index) {
31218 return doubleData_.getDouble(index);
31219 }
31220 /**
31221 * <pre>
31222 * For double
31223 * Complex128 tensors are encoded as a single array of doubles,
31224 * with the real components appearing in odd numbered positions,
31225 * and the corresponding imaginary component appearing in the
31226 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31227 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31228 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31229 * </pre>
31230 *
31231 * <code>repeated double double_data = 10 [packed = true];</code>
31232 * @param index The index to set the value at.
31233 * @param value The doubleData to set.
31234 * @return This builder for chaining.
31235 */
31236 public Builder setDoubleData(
31237 int index, double value) {
31238
31239 ensureDoubleDataIsMutable();
31240 doubleData_.setDouble(index, value);
31241 bitField0_ |= 0x00001000;
31242 onChanged();
31243 return this;
31244 }
31245 /**
31246 * <pre>
31247 * For double
31248 * Complex128 tensors are encoded as a single array of doubles,
31249 * with the real components appearing in odd numbered positions,
31250 * and the corresponding imaginary component appearing in the
31251 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31252 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31253 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31254 * </pre>
31255 *
31256 * <code>repeated double double_data = 10 [packed = true];</code>
31257 * @param value The doubleData to add.
31258 * @return This builder for chaining.
31259 */
31260 public Builder addDoubleData(double value) {
31261
31262 ensureDoubleDataIsMutable();
31263 doubleData_.addDouble(value);
31264 bitField0_ |= 0x00001000;
31265 onChanged();
31266 return this;
31267 }
31268 /**
31269 * <pre>
31270 * For double
31271 * Complex128 tensors are encoded as a single array of doubles,
31272 * with the real components appearing in odd numbered positions,
31273 * and the corresponding imaginary component appearing in the
31274 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31275 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31276 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31277 * </pre>
31278 *
31279 * <code>repeated double double_data = 10 [packed = true];</code>
31280 * @param values The doubleData to add.
31281 * @return This builder for chaining.
31282 */
31283 public Builder addAllDoubleData(
31284 java.lang.Iterable<? extends java.lang.Double> values) {
31285 ensureDoubleDataIsMutable();
31286 com.google.protobuf.AbstractMessageLite.Builder.addAll(
31287 values, doubleData_);
31288 bitField0_ |= 0x00001000;
31289 onChanged();
31290 return this;
31291 }
31292 /**
31293 * <pre>
31294 * For double
31295 * Complex128 tensors are encoded as a single array of doubles,
31296 * with the real components appearing in odd numbered positions,
31297 * and the corresponding imaginary component appearing in the
31298 * subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
31299 * is encoded as [1.0, 2.0 ,3.0 ,4.0]
31300 * When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
31301 * </pre>
31302 *
31303 * <code>repeated double double_data = 10 [packed = true];</code>
31304 * @return This builder for chaining.
31305 */
31306 public Builder clearDoubleData() {
31307 doubleData_ = emptyDoubleList();
31308 bitField0_ = (bitField0_ & ~0x00001000);
31309 onChanged();
31310 return this;
31311 }
31312
31313 private com.google.protobuf.Internal.LongList uint64Data_ = emptyLongList();
31314 private void ensureUint64DataIsMutable() {
31315 if (!uint64Data_.isModifiable()) {
31316 uint64Data_ = makeMutableCopy(uint64Data_);
31317 }
31318 bitField0_ |= 0x00002000;
31319 }
31320 /**
31321 * <pre>
31322 * For uint64 and uint32 values
31323 * When this field is present, the data_type field MUST be
31324 * UINT32 or UINT64
31325 * </pre>
31326 *
31327 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31328 * @return A list containing the uint64Data.
31329 */
31330 public java.util.List<java.lang.Long>
31331 getUint64DataList() {
31332 uint64Data_.makeImmutable();
31333 return uint64Data_;
31334 }
31335 /**
31336 * <pre>
31337 * For uint64 and uint32 values
31338 * When this field is present, the data_type field MUST be
31339 * UINT32 or UINT64
31340 * </pre>
31341 *
31342 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31343 * @return The count of uint64Data.
31344 */
31345 public int getUint64DataCount() {
31346 return uint64Data_.size();
31347 }
31348 /**
31349 * <pre>
31350 * For uint64 and uint32 values
31351 * When this field is present, the data_type field MUST be
31352 * UINT32 or UINT64
31353 * </pre>
31354 *
31355 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31356 * @param index The index of the element to return.
31357 * @return The uint64Data at the given index.
31358 */
31359 public long getUint64Data(int index) {
31360 return uint64Data_.getLong(index);
31361 }
31362 /**
31363 * <pre>
31364 * For uint64 and uint32 values
31365 * When this field is present, the data_type field MUST be
31366 * UINT32 or UINT64
31367 * </pre>
31368 *
31369 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31370 * @param index The index to set the value at.
31371 * @param value The uint64Data to set.
31372 * @return This builder for chaining.
31373 */
31374 public Builder setUint64Data(
31375 int index, long value) {
31376
31377 ensureUint64DataIsMutable();
31378 uint64Data_.setLong(index, value);
31379 bitField0_ |= 0x00002000;
31380 onChanged();
31381 return this;
31382 }
31383 /**
31384 * <pre>
31385 * For uint64 and uint32 values
31386 * When this field is present, the data_type field MUST be
31387 * UINT32 or UINT64
31388 * </pre>
31389 *
31390 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31391 * @param value The uint64Data to add.
31392 * @return This builder for chaining.
31393 */
31394 public Builder addUint64Data(long value) {
31395
31396 ensureUint64DataIsMutable();
31397 uint64Data_.addLong(value);
31398 bitField0_ |= 0x00002000;
31399 onChanged();
31400 return this;
31401 }
31402 /**
31403 * <pre>
31404 * For uint64 and uint32 values
31405 * When this field is present, the data_type field MUST be
31406 * UINT32 or UINT64
31407 * </pre>
31408 *
31409 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31410 * @param values The uint64Data to add.
31411 * @return This builder for chaining.
31412 */
31413 public Builder addAllUint64Data(
31414 java.lang.Iterable<? extends java.lang.Long> values) {
31415 ensureUint64DataIsMutable();
31416 com.google.protobuf.AbstractMessageLite.Builder.addAll(
31417 values, uint64Data_);
31418 bitField0_ |= 0x00002000;
31419 onChanged();
31420 return this;
31421 }
31422 /**
31423 * <pre>
31424 * For uint64 and uint32 values
31425 * When this field is present, the data_type field MUST be
31426 * UINT32 or UINT64
31427 * </pre>
31428 *
31429 * <code>repeated uint64 uint64_data = 11 [packed = true];</code>
31430 * @return This builder for chaining.
31431 */
31432 public Builder clearUint64Data() {
31433 uint64Data_ = emptyLongList();
31434 bitField0_ = (bitField0_ & ~0x00002000);
31435 onChanged();
31436 return this;
31437 }
31438
31439 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
31440 java.util.Collections.emptyList();
31441 private void ensureMetadataPropsIsMutable() {
31442 if (!((bitField0_ & 0x00004000) != 0)) {
31443 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
31444 bitField0_ |= 0x00004000;
31445 }
31446 }
31447
31448 private com.google.protobuf.RepeatedFieldBuilder<
31449 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
31450
31451 /**
31452 * <pre>
31453 * Named metadata values; keys should be distinct.
31454 * </pre>
31455 *
31456 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31457 */
31458 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
31459 if (metadataPropsBuilder_ == null) {
31460 return java.util.Collections.unmodifiableList(metadataProps_);
31461 } else {
31462 return metadataPropsBuilder_.getMessageList();
31463 }
31464 }
31465 /**
31466 * <pre>
31467 * Named metadata values; keys should be distinct.
31468 * </pre>
31469 *
31470 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31471 */
31472 public int getMetadataPropsCount() {
31473 if (metadataPropsBuilder_ == null) {
31474 return metadataProps_.size();
31475 } else {
31476 return metadataPropsBuilder_.getCount();
31477 }
31478 }
31479 /**
31480 * <pre>
31481 * Named metadata values; keys should be distinct.
31482 * </pre>
31483 *
31484 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31485 */
31486 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
31487 if (metadataPropsBuilder_ == null) {
31488 return metadataProps_.get(index);
31489 } else {
31490 return metadataPropsBuilder_.getMessage(index);
31491 }
31492 }
31493 /**
31494 * <pre>
31495 * Named metadata values; keys should be distinct.
31496 * </pre>
31497 *
31498 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31499 */
31500 public Builder setMetadataProps(
31501 int index, onnx.OnnxMl.StringStringEntryProto value) {
31502 if (metadataPropsBuilder_ == null) {
31503 if (value == null) {
31504 throw new NullPointerException();
31505 }
31506 ensureMetadataPropsIsMutable();
31507 metadataProps_.set(index, value);
31508 onChanged();
31509 } else {
31510 metadataPropsBuilder_.setMessage(index, value);
31511 }
31512 return this;
31513 }
31514 /**
31515 * <pre>
31516 * Named metadata values; keys should be distinct.
31517 * </pre>
31518 *
31519 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31520 */
31521 public Builder setMetadataProps(
31522 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
31523 if (metadataPropsBuilder_ == null) {
31524 ensureMetadataPropsIsMutable();
31525 metadataProps_.set(index, builderForValue.build());
31526 onChanged();
31527 } else {
31528 metadataPropsBuilder_.setMessage(index, builderForValue.build());
31529 }
31530 return this;
31531 }
31532 /**
31533 * <pre>
31534 * Named metadata values; keys should be distinct.
31535 * </pre>
31536 *
31537 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31538 */
31539 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
31540 if (metadataPropsBuilder_ == null) {
31541 if (value == null) {
31542 throw new NullPointerException();
31543 }
31544 ensureMetadataPropsIsMutable();
31545 metadataProps_.add(value);
31546 onChanged();
31547 } else {
31548 metadataPropsBuilder_.addMessage(value);
31549 }
31550 return this;
31551 }
31552 /**
31553 * <pre>
31554 * Named metadata values; keys should be distinct.
31555 * </pre>
31556 *
31557 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31558 */
31559 public Builder addMetadataProps(
31560 int index, onnx.OnnxMl.StringStringEntryProto value) {
31561 if (metadataPropsBuilder_ == null) {
31562 if (value == null) {
31563 throw new NullPointerException();
31564 }
31565 ensureMetadataPropsIsMutable();
31566 metadataProps_.add(index, value);
31567 onChanged();
31568 } else {
31569 metadataPropsBuilder_.addMessage(index, value);
31570 }
31571 return this;
31572 }
31573 /**
31574 * <pre>
31575 * Named metadata values; keys should be distinct.
31576 * </pre>
31577 *
31578 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31579 */
31580 public Builder addMetadataProps(
31581 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
31582 if (metadataPropsBuilder_ == null) {
31583 ensureMetadataPropsIsMutable();
31584 metadataProps_.add(builderForValue.build());
31585 onChanged();
31586 } else {
31587 metadataPropsBuilder_.addMessage(builderForValue.build());
31588 }
31589 return this;
31590 }
31591 /**
31592 * <pre>
31593 * Named metadata values; keys should be distinct.
31594 * </pre>
31595 *
31596 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31597 */
31598 public Builder addMetadataProps(
31599 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
31600 if (metadataPropsBuilder_ == null) {
31601 ensureMetadataPropsIsMutable();
31602 metadataProps_.add(index, builderForValue.build());
31603 onChanged();
31604 } else {
31605 metadataPropsBuilder_.addMessage(index, builderForValue.build());
31606 }
31607 return this;
31608 }
31609 /**
31610 * <pre>
31611 * Named metadata values; keys should be distinct.
31612 * </pre>
31613 *
31614 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31615 */
31616 public Builder addAllMetadataProps(
31617 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
31618 if (metadataPropsBuilder_ == null) {
31619 ensureMetadataPropsIsMutable();
31620 com.google.protobuf.AbstractMessageLite.Builder.addAll(
31621 values, metadataProps_);
31622 onChanged();
31623 } else {
31624 metadataPropsBuilder_.addAllMessages(values);
31625 }
31626 return this;
31627 }
31628 /**
31629 * <pre>
31630 * Named metadata values; keys should be distinct.
31631 * </pre>
31632 *
31633 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31634 */
31635 public Builder clearMetadataProps() {
31636 if (metadataPropsBuilder_ == null) {
31637 metadataProps_ = java.util.Collections.emptyList();
31638 bitField0_ = (bitField0_ & ~0x00004000);
31639 onChanged();
31640 } else {
31641 metadataPropsBuilder_.clear();
31642 }
31643 return this;
31644 }
31645 /**
31646 * <pre>
31647 * Named metadata values; keys should be distinct.
31648 * </pre>
31649 *
31650 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31651 */
31652 public Builder removeMetadataProps(int index) {
31653 if (metadataPropsBuilder_ == null) {
31654 ensureMetadataPropsIsMutable();
31655 metadataProps_.remove(index);
31656 onChanged();
31657 } else {
31658 metadataPropsBuilder_.remove(index);
31659 }
31660 return this;
31661 }
31662 /**
31663 * <pre>
31664 * Named metadata values; keys should be distinct.
31665 * </pre>
31666 *
31667 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31668 */
31669 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
31670 int index) {
31671 return getMetadataPropsFieldBuilder().getBuilder(index);
31672 }
31673 /**
31674 * <pre>
31675 * Named metadata values; keys should be distinct.
31676 * </pre>
31677 *
31678 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31679 */
31680 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
31681 int index) {
31682 if (metadataPropsBuilder_ == null) {
31683 return metadataProps_.get(index); } else {
31684 return metadataPropsBuilder_.getMessageOrBuilder(index);
31685 }
31686 }
31687 /**
31688 * <pre>
31689 * Named metadata values; keys should be distinct.
31690 * </pre>
31691 *
31692 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31693 */
31694 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
31695 getMetadataPropsOrBuilderList() {
31696 if (metadataPropsBuilder_ != null) {
31697 return metadataPropsBuilder_.getMessageOrBuilderList();
31698 } else {
31699 return java.util.Collections.unmodifiableList(metadataProps_);
31700 }
31701 }
31702 /**
31703 * <pre>
31704 * Named metadata values; keys should be distinct.
31705 * </pre>
31706 *
31707 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31708 */
31709 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
31710 return getMetadataPropsFieldBuilder().addBuilder(
31711 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
31712 }
31713 /**
31714 * <pre>
31715 * Named metadata values; keys should be distinct.
31716 * </pre>
31717 *
31718 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31719 */
31720 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
31721 int index) {
31722 return getMetadataPropsFieldBuilder().addBuilder(
31723 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
31724 }
31725 /**
31726 * <pre>
31727 * Named metadata values; keys should be distinct.
31728 * </pre>
31729 *
31730 * <code>repeated .onnx.StringStringEntryProto metadata_props = 16;</code>
31731 */
31732 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
31733 getMetadataPropsBuilderList() {
31734 return getMetadataPropsFieldBuilder().getBuilderList();
31735 }
31736 private com.google.protobuf.RepeatedFieldBuilder<
31737 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
31738 getMetadataPropsFieldBuilder() {
31739 if (metadataPropsBuilder_ == null) {
31740 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
31741 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
31742 metadataProps_,
31743 ((bitField0_ & 0x00004000) != 0),
31744 getParentForChildren(),
31745 isClean());
31746 metadataProps_ = null;
31747 }
31748 return metadataPropsBuilder_;
31749 }
31750
31751 // @@protoc_insertion_point(builder_scope:onnx.TensorProto)
31752 }
31753
31754 // @@protoc_insertion_point(class_scope:onnx.TensorProto)
31755 private static final onnx.OnnxMl.TensorProto DEFAULT_INSTANCE;
31756 static {
31757 DEFAULT_INSTANCE = new onnx.OnnxMl.TensorProto();
31758 }
31759
31760 public static onnx.OnnxMl.TensorProto getDefaultInstance() {
31761 return DEFAULT_INSTANCE;
31762 }
31763
31764 private static final com.google.protobuf.Parser<TensorProto>
31765 PARSER = new com.google.protobuf.AbstractParser<TensorProto>() {
31766 @java.lang.Override
31767 public TensorProto parsePartialFrom(
31768 com.google.protobuf.CodedInputStream input,
31769 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
31770 throws com.google.protobuf.InvalidProtocolBufferException {
31771 Builder builder = newBuilder();
31772 try {
31773 builder.mergeFrom(input, extensionRegistry);
31774 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
31775 throw e.setUnfinishedMessage(builder.buildPartial());
31776 } catch (com.google.protobuf.UninitializedMessageException e) {
31777 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
31778 } catch (java.io.IOException e) {
31779 throw new com.google.protobuf.InvalidProtocolBufferException(e)
31780 .setUnfinishedMessage(builder.buildPartial());
31781 }
31782 return builder.buildPartial();
31783 }
31784 };
31785
31786 public static com.google.protobuf.Parser<TensorProto> parser() {
31787 return PARSER;
31788 }
31789
31790 @java.lang.Override
31791 public com.google.protobuf.Parser<TensorProto> getParserForType() {
31792 return PARSER;
31793 }
31794
31795 @java.lang.Override
31796 public onnx.OnnxMl.TensorProto getDefaultInstanceForType() {
31797 return DEFAULT_INSTANCE;
31798 }
31799
31800 }
31801
31802 public interface SparseTensorProtoOrBuilder extends
31803 // @@protoc_insertion_point(interface_extends:onnx.SparseTensorProto)
31804 com.google.protobuf.MessageOrBuilder {
31805
31806 /**
31807 * <pre>
31808 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
31809 * The default-value is zero for numeric tensors, and empty-string for string tensors.
31810 * values must have a non-empty name present which serves as a name for SparseTensorProto
31811 * when used in sparse_initializer list.
31812 * </pre>
31813 *
31814 * <code>optional .onnx.TensorProto values = 1;</code>
31815 * @return Whether the values field is set.
31816 */
31817 boolean hasValues();
31818 /**
31819 * <pre>
31820 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
31821 * The default-value is zero for numeric tensors, and empty-string for string tensors.
31822 * values must have a non-empty name present which serves as a name for SparseTensorProto
31823 * when used in sparse_initializer list.
31824 * </pre>
31825 *
31826 * <code>optional .onnx.TensorProto values = 1;</code>
31827 * @return The values.
31828 */
31829 onnx.OnnxMl.TensorProto getValues();
31830 /**
31831 * <pre>
31832 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
31833 * The default-value is zero for numeric tensors, and empty-string for string tensors.
31834 * values must have a non-empty name present which serves as a name for SparseTensorProto
31835 * when used in sparse_initializer list.
31836 * </pre>
31837 *
31838 * <code>optional .onnx.TensorProto values = 1;</code>
31839 */
31840 onnx.OnnxMl.TensorProtoOrBuilder getValuesOrBuilder();
31841
31842 /**
31843 * <pre>
31844 * The indices of the non-default values, which may be stored in one of two formats.
31845 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
31846 * corresponding to the j-th index of the i-th value (in the values tensor).
31847 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
31848 * must be the linearized-index of the i-th value (in the values tensor).
31849 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
31850 * using the shape provided below.
31851 * The indices must appear in ascending order without duplication.
31852 * In the first format, the ordering is lexicographic-ordering:
31853 * e.g., index-value [1,4] must appear before [2,1]
31854 * </pre>
31855 *
31856 * <code>optional .onnx.TensorProto indices = 2;</code>
31857 * @return Whether the indices field is set.
31858 */
31859 boolean hasIndices();
31860 /**
31861 * <pre>
31862 * The indices of the non-default values, which may be stored in one of two formats.
31863 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
31864 * corresponding to the j-th index of the i-th value (in the values tensor).
31865 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
31866 * must be the linearized-index of the i-th value (in the values tensor).
31867 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
31868 * using the shape provided below.
31869 * The indices must appear in ascending order without duplication.
31870 * In the first format, the ordering is lexicographic-ordering:
31871 * e.g., index-value [1,4] must appear before [2,1]
31872 * </pre>
31873 *
31874 * <code>optional .onnx.TensorProto indices = 2;</code>
31875 * @return The indices.
31876 */
31877 onnx.OnnxMl.TensorProto getIndices();
31878 /**
31879 * <pre>
31880 * The indices of the non-default values, which may be stored in one of two formats.
31881 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
31882 * corresponding to the j-th index of the i-th value (in the values tensor).
31883 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
31884 * must be the linearized-index of the i-th value (in the values tensor).
31885 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
31886 * using the shape provided below.
31887 * The indices must appear in ascending order without duplication.
31888 * In the first format, the ordering is lexicographic-ordering:
31889 * e.g., index-value [1,4] must appear before [2,1]
31890 * </pre>
31891 *
31892 * <code>optional .onnx.TensorProto indices = 2;</code>
31893 */
31894 onnx.OnnxMl.TensorProtoOrBuilder getIndicesOrBuilder();
31895
31896 /**
31897 * <pre>
31898 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
31899 * </pre>
31900 *
31901 * <code>repeated int64 dims = 3;</code>
31902 * @return A list containing the dims.
31903 */
31904 java.util.List<java.lang.Long> getDimsList();
31905 /**
31906 * <pre>
31907 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
31908 * </pre>
31909 *
31910 * <code>repeated int64 dims = 3;</code>
31911 * @return The count of dims.
31912 */
31913 int getDimsCount();
31914 /**
31915 * <pre>
31916 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
31917 * </pre>
31918 *
31919 * <code>repeated int64 dims = 3;</code>
31920 * @param index The index of the element to return.
31921 * @return The dims at the given index.
31922 */
31923 long getDims(int index);
31924 }
31925 /**
31926 * <pre>
31927 * A serialized sparse-tensor value
31928 * </pre>
31929 *
31930 * Protobuf type {@code onnx.SparseTensorProto}
31931 */
31932 public static final class SparseTensorProto extends
31933 com.google.protobuf.GeneratedMessage implements
31934 // @@protoc_insertion_point(message_implements:onnx.SparseTensorProto)
31935 SparseTensorProtoOrBuilder {
31936 private static final long serialVersionUID = 0L;
31937 static {
31938 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
31939 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
31940 /* major= */ 4,
31941 /* minor= */ 29,
31942 /* patch= */ 3,
31943 /* suffix= */ "",
31944 SparseTensorProto.class.getName());
31945 }
31946 // Use SparseTensorProto.newBuilder() to construct.
31947 private SparseTensorProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31948 super(builder);
31949 }
31950 private SparseTensorProto() {
31951 dims_ = emptyLongList();
31952 }
31953
31954 public static final com.google.protobuf.Descriptors.Descriptor
31955 getDescriptor() {
31956 return onnx.OnnxMl.internal_static_onnx_SparseTensorProto_descriptor;
31957 }
31958
31959 @java.lang.Override
31960 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
31961 internalGetFieldAccessorTable() {
31962 return onnx.OnnxMl.internal_static_onnx_SparseTensorProto_fieldAccessorTable
31963 .ensureFieldAccessorsInitialized(
31964 onnx.OnnxMl.SparseTensorProto.class, onnx.OnnxMl.SparseTensorProto.Builder.class);
31965 }
31966
31967 private int bitField0_;
31968 public static final int VALUES_FIELD_NUMBER = 1;
31969 private onnx.OnnxMl.TensorProto values_;
31970 /**
31971 * <pre>
31972 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
31973 * The default-value is zero for numeric tensors, and empty-string for string tensors.
31974 * values must have a non-empty name present which serves as a name for SparseTensorProto
31975 * when used in sparse_initializer list.
31976 * </pre>
31977 *
31978 * <code>optional .onnx.TensorProto values = 1;</code>
31979 * @return Whether the values field is set.
31980 */
31981 @java.lang.Override
31982 public boolean hasValues() {
31983 return ((bitField0_ & 0x00000001) != 0);
31984 }
31985 /**
31986 * <pre>
31987 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
31988 * The default-value is zero for numeric tensors, and empty-string for string tensors.
31989 * values must have a non-empty name present which serves as a name for SparseTensorProto
31990 * when used in sparse_initializer list.
31991 * </pre>
31992 *
31993 * <code>optional .onnx.TensorProto values = 1;</code>
31994 * @return The values.
31995 */
31996 @java.lang.Override
31997 public onnx.OnnxMl.TensorProto getValues() {
31998 return values_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : values_;
31999 }
32000 /**
32001 * <pre>
32002 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32003 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32004 * values must have a non-empty name present which serves as a name for SparseTensorProto
32005 * when used in sparse_initializer list.
32006 * </pre>
32007 *
32008 * <code>optional .onnx.TensorProto values = 1;</code>
32009 */
32010 @java.lang.Override
32011 public onnx.OnnxMl.TensorProtoOrBuilder getValuesOrBuilder() {
32012 return values_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : values_;
32013 }
32014
32015 public static final int INDICES_FIELD_NUMBER = 2;
32016 private onnx.OnnxMl.TensorProto indices_;
32017 /**
32018 * <pre>
32019 * The indices of the non-default values, which may be stored in one of two formats.
32020 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32021 * corresponding to the j-th index of the i-th value (in the values tensor).
32022 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32023 * must be the linearized-index of the i-th value (in the values tensor).
32024 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32025 * using the shape provided below.
32026 * The indices must appear in ascending order without duplication.
32027 * In the first format, the ordering is lexicographic-ordering:
32028 * e.g., index-value [1,4] must appear before [2,1]
32029 * </pre>
32030 *
32031 * <code>optional .onnx.TensorProto indices = 2;</code>
32032 * @return Whether the indices field is set.
32033 */
32034 @java.lang.Override
32035 public boolean hasIndices() {
32036 return ((bitField0_ & 0x00000002) != 0);
32037 }
32038 /**
32039 * <pre>
32040 * The indices of the non-default values, which may be stored in one of two formats.
32041 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32042 * corresponding to the j-th index of the i-th value (in the values tensor).
32043 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32044 * must be the linearized-index of the i-th value (in the values tensor).
32045 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32046 * using the shape provided below.
32047 * The indices must appear in ascending order without duplication.
32048 * In the first format, the ordering is lexicographic-ordering:
32049 * e.g., index-value [1,4] must appear before [2,1]
32050 * </pre>
32051 *
32052 * <code>optional .onnx.TensorProto indices = 2;</code>
32053 * @return The indices.
32054 */
32055 @java.lang.Override
32056 public onnx.OnnxMl.TensorProto getIndices() {
32057 return indices_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : indices_;
32058 }
32059 /**
32060 * <pre>
32061 * The indices of the non-default values, which may be stored in one of two formats.
32062 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32063 * corresponding to the j-th index of the i-th value (in the values tensor).
32064 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32065 * must be the linearized-index of the i-th value (in the values tensor).
32066 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32067 * using the shape provided below.
32068 * The indices must appear in ascending order without duplication.
32069 * In the first format, the ordering is lexicographic-ordering:
32070 * e.g., index-value [1,4] must appear before [2,1]
32071 * </pre>
32072 *
32073 * <code>optional .onnx.TensorProto indices = 2;</code>
32074 */
32075 @java.lang.Override
32076 public onnx.OnnxMl.TensorProtoOrBuilder getIndicesOrBuilder() {
32077 return indices_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : indices_;
32078 }
32079
32080 public static final int DIMS_FIELD_NUMBER = 3;
32081 @SuppressWarnings("serial")
32082 private com.google.protobuf.Internal.LongList dims_ =
32083 emptyLongList();
32084 /**
32085 * <pre>
32086 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32087 * </pre>
32088 *
32089 * <code>repeated int64 dims = 3;</code>
32090 * @return A list containing the dims.
32091 */
32092 @java.lang.Override
32093 public java.util.List<java.lang.Long>
32094 getDimsList() {
32095 return dims_;
32096 }
32097 /**
32098 * <pre>
32099 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32100 * </pre>
32101 *
32102 * <code>repeated int64 dims = 3;</code>
32103 * @return The count of dims.
32104 */
32105 public int getDimsCount() {
32106 return dims_.size();
32107 }
32108 /**
32109 * <pre>
32110 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32111 * </pre>
32112 *
32113 * <code>repeated int64 dims = 3;</code>
32114 * @param index The index of the element to return.
32115 * @return The dims at the given index.
32116 */
32117 public long getDims(int index) {
32118 return dims_.getLong(index);
32119 }
32120
32121 private byte memoizedIsInitialized = -1;
32122 @java.lang.Override
32123 public final boolean isInitialized() {
32124 byte isInitialized = memoizedIsInitialized;
32125 if (isInitialized == 1) return true;
32126 if (isInitialized == 0) return false;
32127
32128 memoizedIsInitialized = 1;
32129 return true;
32130 }
32131
32132 @java.lang.Override
32133 public void writeTo(com.google.protobuf.CodedOutputStream output)
32134 throws java.io.IOException {
32135 if (((bitField0_ & 0x00000001) != 0)) {
32136 output.writeMessage(1, getValues());
32137 }
32138 if (((bitField0_ & 0x00000002) != 0)) {
32139 output.writeMessage(2, getIndices());
32140 }
32141 for (int i = 0; i < dims_.size(); i++) {
32142 output.writeInt64(3, dims_.getLong(i));
32143 }
32144 getUnknownFields().writeTo(output);
32145 }
32146
32147 @java.lang.Override
32148 public int getSerializedSize() {
32149 int size = memoizedSize;
32150 if (size != -1) return size;
32151
32152 size = 0;
32153 if (((bitField0_ & 0x00000001) != 0)) {
32154 size += com.google.protobuf.CodedOutputStream
32155 .computeMessageSize(1, getValues());
32156 }
32157 if (((bitField0_ & 0x00000002) != 0)) {
32158 size += com.google.protobuf.CodedOutputStream
32159 .computeMessageSize(2, getIndices());
32160 }
32161 {
32162 int dataSize = 0;
32163 for (int i = 0; i < dims_.size(); i++) {
32164 dataSize += com.google.protobuf.CodedOutputStream
32165 .computeInt64SizeNoTag(dims_.getLong(i));
32166 }
32167 size += dataSize;
32168 size += 1 * getDimsList().size();
32169 }
32170 size += getUnknownFields().getSerializedSize();
32171 memoizedSize = size;
32172 return size;
32173 }
32174
32175 @java.lang.Override
32176 public boolean equals(final java.lang.Object obj) {
32177 if (obj == this) {
32178 return true;
32179 }
32180 if (!(obj instanceof onnx.OnnxMl.SparseTensorProto)) {
32181 return super.equals(obj);
32182 }
32183 onnx.OnnxMl.SparseTensorProto other = (onnx.OnnxMl.SparseTensorProto) obj;
32184
32185 if (hasValues() != other.hasValues()) return false;
32186 if (hasValues()) {
32187 if (!getValues()
32188 .equals(other.getValues())) return false;
32189 }
32190 if (hasIndices() != other.hasIndices()) return false;
32191 if (hasIndices()) {
32192 if (!getIndices()
32193 .equals(other.getIndices())) return false;
32194 }
32195 if (!getDimsList()
32196 .equals(other.getDimsList())) return false;
32197 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
32198 return true;
32199 }
32200
32201 @java.lang.Override
32202 public int hashCode() {
32203 if (memoizedHashCode != 0) {
32204 return memoizedHashCode;
32205 }
32206 int hash = 41;
32207 hash = (19 * hash) + getDescriptor().hashCode();
32208 if (hasValues()) {
32209 hash = (37 * hash) + VALUES_FIELD_NUMBER;
32210 hash = (53 * hash) + getValues().hashCode();
32211 }
32212 if (hasIndices()) {
32213 hash = (37 * hash) + INDICES_FIELD_NUMBER;
32214 hash = (53 * hash) + getIndices().hashCode();
32215 }
32216 if (getDimsCount() > 0) {
32217 hash = (37 * hash) + DIMS_FIELD_NUMBER;
32218 hash = (53 * hash) + getDimsList().hashCode();
32219 }
32220 hash = (29 * hash) + getUnknownFields().hashCode();
32221 memoizedHashCode = hash;
32222 return hash;
32223 }
32224
32225 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32226 java.nio.ByteBuffer data)
32227 throws com.google.protobuf.InvalidProtocolBufferException {
32228 return PARSER.parseFrom(data);
32229 }
32230 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32231 java.nio.ByteBuffer data,
32232 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32233 throws com.google.protobuf.InvalidProtocolBufferException {
32234 return PARSER.parseFrom(data, extensionRegistry);
32235 }
32236 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32237 com.google.protobuf.ByteString data)
32238 throws com.google.protobuf.InvalidProtocolBufferException {
32239 return PARSER.parseFrom(data);
32240 }
32241 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32242 com.google.protobuf.ByteString data,
32243 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32244 throws com.google.protobuf.InvalidProtocolBufferException {
32245 return PARSER.parseFrom(data, extensionRegistry);
32246 }
32247 public static onnx.OnnxMl.SparseTensorProto parseFrom(byte[] data)
32248 throws com.google.protobuf.InvalidProtocolBufferException {
32249 return PARSER.parseFrom(data);
32250 }
32251 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32252 byte[] data,
32253 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32254 throws com.google.protobuf.InvalidProtocolBufferException {
32255 return PARSER.parseFrom(data, extensionRegistry);
32256 }
32257 public static onnx.OnnxMl.SparseTensorProto parseFrom(java.io.InputStream input)
32258 throws java.io.IOException {
32259 return com.google.protobuf.GeneratedMessage
32260 .parseWithIOException(PARSER, input);
32261 }
32262 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32263 java.io.InputStream input,
32264 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32265 throws java.io.IOException {
32266 return com.google.protobuf.GeneratedMessage
32267 .parseWithIOException(PARSER, input, extensionRegistry);
32268 }
32269
32270 public static onnx.OnnxMl.SparseTensorProto parseDelimitedFrom(java.io.InputStream input)
32271 throws java.io.IOException {
32272 return com.google.protobuf.GeneratedMessage
32273 .parseDelimitedWithIOException(PARSER, input);
32274 }
32275
32276 public static onnx.OnnxMl.SparseTensorProto parseDelimitedFrom(
32277 java.io.InputStream input,
32278 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32279 throws java.io.IOException {
32280 return com.google.protobuf.GeneratedMessage
32281 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
32282 }
32283 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32284 com.google.protobuf.CodedInputStream input)
32285 throws java.io.IOException {
32286 return com.google.protobuf.GeneratedMessage
32287 .parseWithIOException(PARSER, input);
32288 }
32289 public static onnx.OnnxMl.SparseTensorProto parseFrom(
32290 com.google.protobuf.CodedInputStream input,
32291 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32292 throws java.io.IOException {
32293 return com.google.protobuf.GeneratedMessage
32294 .parseWithIOException(PARSER, input, extensionRegistry);
32295 }
32296
32297 @java.lang.Override
32298 public Builder newBuilderForType() { return newBuilder(); }
32299 public static Builder newBuilder() {
32300 return DEFAULT_INSTANCE.toBuilder();
32301 }
32302 public static Builder newBuilder(onnx.OnnxMl.SparseTensorProto prototype) {
32303 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
32304 }
32305 @java.lang.Override
32306 public Builder toBuilder() {
32307 return this == DEFAULT_INSTANCE
32308 ? new Builder() : new Builder().mergeFrom(this);
32309 }
32310
32311 @java.lang.Override
32312 protected Builder newBuilderForType(
32313 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
32314 Builder builder = new Builder(parent);
32315 return builder;
32316 }
32317 /**
32318 * <pre>
32319 * A serialized sparse-tensor value
32320 * </pre>
32321 *
32322 * Protobuf type {@code onnx.SparseTensorProto}
32323 */
32324 public static final class Builder extends
32325 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
32326 // @@protoc_insertion_point(builder_implements:onnx.SparseTensorProto)
32327 onnx.OnnxMl.SparseTensorProtoOrBuilder {
32328 public static final com.google.protobuf.Descriptors.Descriptor
32329 getDescriptor() {
32330 return onnx.OnnxMl.internal_static_onnx_SparseTensorProto_descriptor;
32331 }
32332
32333 @java.lang.Override
32334 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
32335 internalGetFieldAccessorTable() {
32336 return onnx.OnnxMl.internal_static_onnx_SparseTensorProto_fieldAccessorTable
32337 .ensureFieldAccessorsInitialized(
32338 onnx.OnnxMl.SparseTensorProto.class, onnx.OnnxMl.SparseTensorProto.Builder.class);
32339 }
32340
32341 // Construct using onnx.OnnxMl.SparseTensorProto.newBuilder()
32342 private Builder() {
32343 maybeForceBuilderInitialization();
32344 }
32345
32346 private Builder(
32347 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
32348 super(parent);
32349 maybeForceBuilderInitialization();
32350 }
32351 private void maybeForceBuilderInitialization() {
32352 if (com.google.protobuf.GeneratedMessage
32353 .alwaysUseFieldBuilders) {
32354 getValuesFieldBuilder();
32355 getIndicesFieldBuilder();
32356 }
32357 }
32358 @java.lang.Override
32359 public Builder clear() {
32360 super.clear();
32361 bitField0_ = 0;
32362 values_ = null;
32363 if (valuesBuilder_ != null) {
32364 valuesBuilder_.dispose();
32365 valuesBuilder_ = null;
32366 }
32367 indices_ = null;
32368 if (indicesBuilder_ != null) {
32369 indicesBuilder_.dispose();
32370 indicesBuilder_ = null;
32371 }
32372 dims_ = emptyLongList();
32373 return this;
32374 }
32375
32376 @java.lang.Override
32377 public com.google.protobuf.Descriptors.Descriptor
32378 getDescriptorForType() {
32379 return onnx.OnnxMl.internal_static_onnx_SparseTensorProto_descriptor;
32380 }
32381
32382 @java.lang.Override
32383 public onnx.OnnxMl.SparseTensorProto getDefaultInstanceForType() {
32384 return onnx.OnnxMl.SparseTensorProto.getDefaultInstance();
32385 }
32386
32387 @java.lang.Override
32388 public onnx.OnnxMl.SparseTensorProto build() {
32389 onnx.OnnxMl.SparseTensorProto result = buildPartial();
32390 if (!result.isInitialized()) {
32391 throw newUninitializedMessageException(result);
32392 }
32393 return result;
32394 }
32395
32396 @java.lang.Override
32397 public onnx.OnnxMl.SparseTensorProto buildPartial() {
32398 onnx.OnnxMl.SparseTensorProto result = new onnx.OnnxMl.SparseTensorProto(this);
32399 if (bitField0_ != 0) { buildPartial0(result); }
32400 onBuilt();
32401 return result;
32402 }
32403
32404 private void buildPartial0(onnx.OnnxMl.SparseTensorProto result) {
32405 int from_bitField0_ = bitField0_;
32406 int to_bitField0_ = 0;
32407 if (((from_bitField0_ & 0x00000001) != 0)) {
32408 result.values_ = valuesBuilder_ == null
32409 ? values_
32410 : valuesBuilder_.build();
32411 to_bitField0_ |= 0x00000001;
32412 }
32413 if (((from_bitField0_ & 0x00000002) != 0)) {
32414 result.indices_ = indicesBuilder_ == null
32415 ? indices_
32416 : indicesBuilder_.build();
32417 to_bitField0_ |= 0x00000002;
32418 }
32419 if (((from_bitField0_ & 0x00000004) != 0)) {
32420 dims_.makeImmutable();
32421 result.dims_ = dims_;
32422 }
32423 result.bitField0_ |= to_bitField0_;
32424 }
32425
32426 @java.lang.Override
32427 public Builder mergeFrom(com.google.protobuf.Message other) {
32428 if (other instanceof onnx.OnnxMl.SparseTensorProto) {
32429 return mergeFrom((onnx.OnnxMl.SparseTensorProto)other);
32430 } else {
32431 super.mergeFrom(other);
32432 return this;
32433 }
32434 }
32435
32436 public Builder mergeFrom(onnx.OnnxMl.SparseTensorProto other) {
32437 if (other == onnx.OnnxMl.SparseTensorProto.getDefaultInstance()) return this;
32438 if (other.hasValues()) {
32439 mergeValues(other.getValues());
32440 }
32441 if (other.hasIndices()) {
32442 mergeIndices(other.getIndices());
32443 }
32444 if (!other.dims_.isEmpty()) {
32445 if (dims_.isEmpty()) {
32446 dims_ = other.dims_;
32447 dims_.makeImmutable();
32448 bitField0_ |= 0x00000004;
32449 } else {
32450 ensureDimsIsMutable();
32451 dims_.addAll(other.dims_);
32452 }
32453 onChanged();
32454 }
32455 this.mergeUnknownFields(other.getUnknownFields());
32456 onChanged();
32457 return this;
32458 }
32459
32460 @java.lang.Override
32461 public final boolean isInitialized() {
32462 return true;
32463 }
32464
32465 @java.lang.Override
32466 public Builder mergeFrom(
32467 com.google.protobuf.CodedInputStream input,
32468 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
32469 throws java.io.IOException {
32470 if (extensionRegistry == null) {
32471 throw new java.lang.NullPointerException();
32472 }
32473 try {
32474 boolean done = false;
32475 while (!done) {
32476 int tag = input.readTag();
32477 switch (tag) {
32478 case 0:
32479 done = true;
32480 break;
32481 case 10: {
32482 input.readMessage(
32483 getValuesFieldBuilder().getBuilder(),
32484 extensionRegistry);
32485 bitField0_ |= 0x00000001;
32486 break;
32487 } // case 10
32488 case 18: {
32489 input.readMessage(
32490 getIndicesFieldBuilder().getBuilder(),
32491 extensionRegistry);
32492 bitField0_ |= 0x00000002;
32493 break;
32494 } // case 18
32495 case 24: {
32496 long v = input.readInt64();
32497 ensureDimsIsMutable();
32498 dims_.addLong(v);
32499 break;
32500 } // case 24
32501 case 26: {
32502 int length = input.readRawVarint32();
32503 int limit = input.pushLimit(length);
32504 ensureDimsIsMutable();
32505 while (input.getBytesUntilLimit() > 0) {
32506 dims_.addLong(input.readInt64());
32507 }
32508 input.popLimit(limit);
32509 break;
32510 } // case 26
32511 default: {
32512 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
32513 done = true; // was an endgroup tag
32514 }
32515 break;
32516 } // default:
32517 } // switch (tag)
32518 } // while (!done)
32519 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
32520 throw e.unwrapIOException();
32521 } finally {
32522 onChanged();
32523 } // finally
32524 return this;
32525 }
32526 private int bitField0_;
32527
32528 private onnx.OnnxMl.TensorProto values_;
32529 private com.google.protobuf.SingleFieldBuilder<
32530 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder> valuesBuilder_;
32531 /**
32532 * <pre>
32533 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32534 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32535 * values must have a non-empty name present which serves as a name for SparseTensorProto
32536 * when used in sparse_initializer list.
32537 * </pre>
32538 *
32539 * <code>optional .onnx.TensorProto values = 1;</code>
32540 * @return Whether the values field is set.
32541 */
32542 public boolean hasValues() {
32543 return ((bitField0_ & 0x00000001) != 0);
32544 }
32545 /**
32546 * <pre>
32547 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32548 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32549 * values must have a non-empty name present which serves as a name for SparseTensorProto
32550 * when used in sparse_initializer list.
32551 * </pre>
32552 *
32553 * <code>optional .onnx.TensorProto values = 1;</code>
32554 * @return The values.
32555 */
32556 public onnx.OnnxMl.TensorProto getValues() {
32557 if (valuesBuilder_ == null) {
32558 return values_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : values_;
32559 } else {
32560 return valuesBuilder_.getMessage();
32561 }
32562 }
32563 /**
32564 * <pre>
32565 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32566 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32567 * values must have a non-empty name present which serves as a name for SparseTensorProto
32568 * when used in sparse_initializer list.
32569 * </pre>
32570 *
32571 * <code>optional .onnx.TensorProto values = 1;</code>
32572 */
32573 public Builder setValues(onnx.OnnxMl.TensorProto value) {
32574 if (valuesBuilder_ == null) {
32575 if (value == null) {
32576 throw new NullPointerException();
32577 }
32578 values_ = value;
32579 } else {
32580 valuesBuilder_.setMessage(value);
32581 }
32582 bitField0_ |= 0x00000001;
32583 onChanged();
32584 return this;
32585 }
32586 /**
32587 * <pre>
32588 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32589 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32590 * values must have a non-empty name present which serves as a name for SparseTensorProto
32591 * when used in sparse_initializer list.
32592 * </pre>
32593 *
32594 * <code>optional .onnx.TensorProto values = 1;</code>
32595 */
32596 public Builder setValues(
32597 onnx.OnnxMl.TensorProto.Builder builderForValue) {
32598 if (valuesBuilder_ == null) {
32599 values_ = builderForValue.build();
32600 } else {
32601 valuesBuilder_.setMessage(builderForValue.build());
32602 }
32603 bitField0_ |= 0x00000001;
32604 onChanged();
32605 return this;
32606 }
32607 /**
32608 * <pre>
32609 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32610 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32611 * values must have a non-empty name present which serves as a name for SparseTensorProto
32612 * when used in sparse_initializer list.
32613 * </pre>
32614 *
32615 * <code>optional .onnx.TensorProto values = 1;</code>
32616 */
32617 public Builder mergeValues(onnx.OnnxMl.TensorProto value) {
32618 if (valuesBuilder_ == null) {
32619 if (((bitField0_ & 0x00000001) != 0) &&
32620 values_ != null &&
32621 values_ != onnx.OnnxMl.TensorProto.getDefaultInstance()) {
32622 getValuesBuilder().mergeFrom(value);
32623 } else {
32624 values_ = value;
32625 }
32626 } else {
32627 valuesBuilder_.mergeFrom(value);
32628 }
32629 if (values_ != null) {
32630 bitField0_ |= 0x00000001;
32631 onChanged();
32632 }
32633 return this;
32634 }
32635 /**
32636 * <pre>
32637 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32638 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32639 * values must have a non-empty name present which serves as a name for SparseTensorProto
32640 * when used in sparse_initializer list.
32641 * </pre>
32642 *
32643 * <code>optional .onnx.TensorProto values = 1;</code>
32644 */
32645 public Builder clearValues() {
32646 bitField0_ = (bitField0_ & ~0x00000001);
32647 values_ = null;
32648 if (valuesBuilder_ != null) {
32649 valuesBuilder_.dispose();
32650 valuesBuilder_ = null;
32651 }
32652 onChanged();
32653 return this;
32654 }
32655 /**
32656 * <pre>
32657 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32658 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32659 * values must have a non-empty name present which serves as a name for SparseTensorProto
32660 * when used in sparse_initializer list.
32661 * </pre>
32662 *
32663 * <code>optional .onnx.TensorProto values = 1;</code>
32664 */
32665 public onnx.OnnxMl.TensorProto.Builder getValuesBuilder() {
32666 bitField0_ |= 0x00000001;
32667 onChanged();
32668 return getValuesFieldBuilder().getBuilder();
32669 }
32670 /**
32671 * <pre>
32672 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32673 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32674 * values must have a non-empty name present which serves as a name for SparseTensorProto
32675 * when used in sparse_initializer list.
32676 * </pre>
32677 *
32678 * <code>optional .onnx.TensorProto values = 1;</code>
32679 */
32680 public onnx.OnnxMl.TensorProtoOrBuilder getValuesOrBuilder() {
32681 if (valuesBuilder_ != null) {
32682 return valuesBuilder_.getMessageOrBuilder();
32683 } else {
32684 return values_ == null ?
32685 onnx.OnnxMl.TensorProto.getDefaultInstance() : values_;
32686 }
32687 }
32688 /**
32689 * <pre>
32690 * The sequence of non-default values are encoded as a tensor of shape [NNZ].
32691 * The default-value is zero for numeric tensors, and empty-string for string tensors.
32692 * values must have a non-empty name present which serves as a name for SparseTensorProto
32693 * when used in sparse_initializer list.
32694 * </pre>
32695 *
32696 * <code>optional .onnx.TensorProto values = 1;</code>
32697 */
32698 private com.google.protobuf.SingleFieldBuilder<
32699 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>
32700 getValuesFieldBuilder() {
32701 if (valuesBuilder_ == null) {
32702 valuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
32703 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>(
32704 getValues(),
32705 getParentForChildren(),
32706 isClean());
32707 values_ = null;
32708 }
32709 return valuesBuilder_;
32710 }
32711
32712 private onnx.OnnxMl.TensorProto indices_;
32713 private com.google.protobuf.SingleFieldBuilder<
32714 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder> indicesBuilder_;
32715 /**
32716 * <pre>
32717 * The indices of the non-default values, which may be stored in one of two formats.
32718 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32719 * corresponding to the j-th index of the i-th value (in the values tensor).
32720 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32721 * must be the linearized-index of the i-th value (in the values tensor).
32722 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32723 * using the shape provided below.
32724 * The indices must appear in ascending order without duplication.
32725 * In the first format, the ordering is lexicographic-ordering:
32726 * e.g., index-value [1,4] must appear before [2,1]
32727 * </pre>
32728 *
32729 * <code>optional .onnx.TensorProto indices = 2;</code>
32730 * @return Whether the indices field is set.
32731 */
32732 public boolean hasIndices() {
32733 return ((bitField0_ & 0x00000002) != 0);
32734 }
32735 /**
32736 * <pre>
32737 * The indices of the non-default values, which may be stored in one of two formats.
32738 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32739 * corresponding to the j-th index of the i-th value (in the values tensor).
32740 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32741 * must be the linearized-index of the i-th value (in the values tensor).
32742 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32743 * using the shape provided below.
32744 * The indices must appear in ascending order without duplication.
32745 * In the first format, the ordering is lexicographic-ordering:
32746 * e.g., index-value [1,4] must appear before [2,1]
32747 * </pre>
32748 *
32749 * <code>optional .onnx.TensorProto indices = 2;</code>
32750 * @return The indices.
32751 */
32752 public onnx.OnnxMl.TensorProto getIndices() {
32753 if (indicesBuilder_ == null) {
32754 return indices_ == null ? onnx.OnnxMl.TensorProto.getDefaultInstance() : indices_;
32755 } else {
32756 return indicesBuilder_.getMessage();
32757 }
32758 }
32759 /**
32760 * <pre>
32761 * The indices of the non-default values, which may be stored in one of two formats.
32762 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32763 * corresponding to the j-th index of the i-th value (in the values tensor).
32764 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32765 * must be the linearized-index of the i-th value (in the values tensor).
32766 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32767 * using the shape provided below.
32768 * The indices must appear in ascending order without duplication.
32769 * In the first format, the ordering is lexicographic-ordering:
32770 * e.g., index-value [1,4] must appear before [2,1]
32771 * </pre>
32772 *
32773 * <code>optional .onnx.TensorProto indices = 2;</code>
32774 */
32775 public Builder setIndices(onnx.OnnxMl.TensorProto value) {
32776 if (indicesBuilder_ == null) {
32777 if (value == null) {
32778 throw new NullPointerException();
32779 }
32780 indices_ = value;
32781 } else {
32782 indicesBuilder_.setMessage(value);
32783 }
32784 bitField0_ |= 0x00000002;
32785 onChanged();
32786 return this;
32787 }
32788 /**
32789 * <pre>
32790 * The indices of the non-default values, which may be stored in one of two formats.
32791 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32792 * corresponding to the j-th index of the i-th value (in the values tensor).
32793 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32794 * must be the linearized-index of the i-th value (in the values tensor).
32795 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32796 * using the shape provided below.
32797 * The indices must appear in ascending order without duplication.
32798 * In the first format, the ordering is lexicographic-ordering:
32799 * e.g., index-value [1,4] must appear before [2,1]
32800 * </pre>
32801 *
32802 * <code>optional .onnx.TensorProto indices = 2;</code>
32803 */
32804 public Builder setIndices(
32805 onnx.OnnxMl.TensorProto.Builder builderForValue) {
32806 if (indicesBuilder_ == null) {
32807 indices_ = builderForValue.build();
32808 } else {
32809 indicesBuilder_.setMessage(builderForValue.build());
32810 }
32811 bitField0_ |= 0x00000002;
32812 onChanged();
32813 return this;
32814 }
32815 /**
32816 * <pre>
32817 * The indices of the non-default values, which may be stored in one of two formats.
32818 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32819 * corresponding to the j-th index of the i-th value (in the values tensor).
32820 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32821 * must be the linearized-index of the i-th value (in the values tensor).
32822 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32823 * using the shape provided below.
32824 * The indices must appear in ascending order without duplication.
32825 * In the first format, the ordering is lexicographic-ordering:
32826 * e.g., index-value [1,4] must appear before [2,1]
32827 * </pre>
32828 *
32829 * <code>optional .onnx.TensorProto indices = 2;</code>
32830 */
32831 public Builder mergeIndices(onnx.OnnxMl.TensorProto value) {
32832 if (indicesBuilder_ == null) {
32833 if (((bitField0_ & 0x00000002) != 0) &&
32834 indices_ != null &&
32835 indices_ != onnx.OnnxMl.TensorProto.getDefaultInstance()) {
32836 getIndicesBuilder().mergeFrom(value);
32837 } else {
32838 indices_ = value;
32839 }
32840 } else {
32841 indicesBuilder_.mergeFrom(value);
32842 }
32843 if (indices_ != null) {
32844 bitField0_ |= 0x00000002;
32845 onChanged();
32846 }
32847 return this;
32848 }
32849 /**
32850 * <pre>
32851 * The indices of the non-default values, which may be stored in one of two formats.
32852 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32853 * corresponding to the j-th index of the i-th value (in the values tensor).
32854 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32855 * must be the linearized-index of the i-th value (in the values tensor).
32856 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32857 * using the shape provided below.
32858 * The indices must appear in ascending order without duplication.
32859 * In the first format, the ordering is lexicographic-ordering:
32860 * e.g., index-value [1,4] must appear before [2,1]
32861 * </pre>
32862 *
32863 * <code>optional .onnx.TensorProto indices = 2;</code>
32864 */
32865 public Builder clearIndices() {
32866 bitField0_ = (bitField0_ & ~0x00000002);
32867 indices_ = null;
32868 if (indicesBuilder_ != null) {
32869 indicesBuilder_.dispose();
32870 indicesBuilder_ = null;
32871 }
32872 onChanged();
32873 return this;
32874 }
32875 /**
32876 * <pre>
32877 * The indices of the non-default values, which may be stored in one of two formats.
32878 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32879 * corresponding to the j-th index of the i-th value (in the values tensor).
32880 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32881 * must be the linearized-index of the i-th value (in the values tensor).
32882 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32883 * using the shape provided below.
32884 * The indices must appear in ascending order without duplication.
32885 * In the first format, the ordering is lexicographic-ordering:
32886 * e.g., index-value [1,4] must appear before [2,1]
32887 * </pre>
32888 *
32889 * <code>optional .onnx.TensorProto indices = 2;</code>
32890 */
32891 public onnx.OnnxMl.TensorProto.Builder getIndicesBuilder() {
32892 bitField0_ |= 0x00000002;
32893 onChanged();
32894 return getIndicesFieldBuilder().getBuilder();
32895 }
32896 /**
32897 * <pre>
32898 * The indices of the non-default values, which may be stored in one of two formats.
32899 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32900 * corresponding to the j-th index of the i-th value (in the values tensor).
32901 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32902 * must be the linearized-index of the i-th value (in the values tensor).
32903 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32904 * using the shape provided below.
32905 * The indices must appear in ascending order without duplication.
32906 * In the first format, the ordering is lexicographic-ordering:
32907 * e.g., index-value [1,4] must appear before [2,1]
32908 * </pre>
32909 *
32910 * <code>optional .onnx.TensorProto indices = 2;</code>
32911 */
32912 public onnx.OnnxMl.TensorProtoOrBuilder getIndicesOrBuilder() {
32913 if (indicesBuilder_ != null) {
32914 return indicesBuilder_.getMessageOrBuilder();
32915 } else {
32916 return indices_ == null ?
32917 onnx.OnnxMl.TensorProto.getDefaultInstance() : indices_;
32918 }
32919 }
32920 /**
32921 * <pre>
32922 * The indices of the non-default values, which may be stored in one of two formats.
32923 * (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
32924 * corresponding to the j-th index of the i-th value (in the values tensor).
32925 * (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
32926 * must be the linearized-index of the i-th value (in the values tensor).
32927 * The linearized-index can be converted into an index tuple (k_1,...,k_rank)
32928 * using the shape provided below.
32929 * The indices must appear in ascending order without duplication.
32930 * In the first format, the ordering is lexicographic-ordering:
32931 * e.g., index-value [1,4] must appear before [2,1]
32932 * </pre>
32933 *
32934 * <code>optional .onnx.TensorProto indices = 2;</code>
32935 */
32936 private com.google.protobuf.SingleFieldBuilder<
32937 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>
32938 getIndicesFieldBuilder() {
32939 if (indicesBuilder_ == null) {
32940 indicesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
32941 onnx.OnnxMl.TensorProto, onnx.OnnxMl.TensorProto.Builder, onnx.OnnxMl.TensorProtoOrBuilder>(
32942 getIndices(),
32943 getParentForChildren(),
32944 isClean());
32945 indices_ = null;
32946 }
32947 return indicesBuilder_;
32948 }
32949
32950 private com.google.protobuf.Internal.LongList dims_ = emptyLongList();
32951 private void ensureDimsIsMutable() {
32952 if (!dims_.isModifiable()) {
32953 dims_ = makeMutableCopy(dims_);
32954 }
32955 bitField0_ |= 0x00000004;
32956 }
32957 /**
32958 * <pre>
32959 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32960 * </pre>
32961 *
32962 * <code>repeated int64 dims = 3;</code>
32963 * @return A list containing the dims.
32964 */
32965 public java.util.List<java.lang.Long>
32966 getDimsList() {
32967 dims_.makeImmutable();
32968 return dims_;
32969 }
32970 /**
32971 * <pre>
32972 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32973 * </pre>
32974 *
32975 * <code>repeated int64 dims = 3;</code>
32976 * @return The count of dims.
32977 */
32978 public int getDimsCount() {
32979 return dims_.size();
32980 }
32981 /**
32982 * <pre>
32983 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32984 * </pre>
32985 *
32986 * <code>repeated int64 dims = 3;</code>
32987 * @param index The index of the element to return.
32988 * @return The dims at the given index.
32989 */
32990 public long getDims(int index) {
32991 return dims_.getLong(index);
32992 }
32993 /**
32994 * <pre>
32995 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
32996 * </pre>
32997 *
32998 * <code>repeated int64 dims = 3;</code>
32999 * @param index The index to set the value at.
33000 * @param value The dims to set.
33001 * @return This builder for chaining.
33002 */
33003 public Builder setDims(
33004 int index, long value) {
33005
33006 ensureDimsIsMutable();
33007 dims_.setLong(index, value);
33008 bitField0_ |= 0x00000004;
33009 onChanged();
33010 return this;
33011 }
33012 /**
33013 * <pre>
33014 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
33015 * </pre>
33016 *
33017 * <code>repeated int64 dims = 3;</code>
33018 * @param value The dims to add.
33019 * @return This builder for chaining.
33020 */
33021 public Builder addDims(long value) {
33022
33023 ensureDimsIsMutable();
33024 dims_.addLong(value);
33025 bitField0_ |= 0x00000004;
33026 onChanged();
33027 return this;
33028 }
33029 /**
33030 * <pre>
33031 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
33032 * </pre>
33033 *
33034 * <code>repeated int64 dims = 3;</code>
33035 * @param values The dims to add.
33036 * @return This builder for chaining.
33037 */
33038 public Builder addAllDims(
33039 java.lang.Iterable<? extends java.lang.Long> values) {
33040 ensureDimsIsMutable();
33041 com.google.protobuf.AbstractMessageLite.Builder.addAll(
33042 values, dims_);
33043 bitField0_ |= 0x00000004;
33044 onChanged();
33045 return this;
33046 }
33047 /**
33048 * <pre>
33049 * The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
33050 * </pre>
33051 *
33052 * <code>repeated int64 dims = 3;</code>
33053 * @return This builder for chaining.
33054 */
33055 public Builder clearDims() {
33056 dims_ = emptyLongList();
33057 bitField0_ = (bitField0_ & ~0x00000004);
33058 onChanged();
33059 return this;
33060 }
33061
33062 // @@protoc_insertion_point(builder_scope:onnx.SparseTensorProto)
33063 }
33064
33065 // @@protoc_insertion_point(class_scope:onnx.SparseTensorProto)
33066 private static final onnx.OnnxMl.SparseTensorProto DEFAULT_INSTANCE;
33067 static {
33068 DEFAULT_INSTANCE = new onnx.OnnxMl.SparseTensorProto();
33069 }
33070
33071 public static onnx.OnnxMl.SparseTensorProto getDefaultInstance() {
33072 return DEFAULT_INSTANCE;
33073 }
33074
33075 private static final com.google.protobuf.Parser<SparseTensorProto>
33076 PARSER = new com.google.protobuf.AbstractParser<SparseTensorProto>() {
33077 @java.lang.Override
33078 public SparseTensorProto parsePartialFrom(
33079 com.google.protobuf.CodedInputStream input,
33080 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33081 throws com.google.protobuf.InvalidProtocolBufferException {
33082 Builder builder = newBuilder();
33083 try {
33084 builder.mergeFrom(input, extensionRegistry);
33085 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
33086 throw e.setUnfinishedMessage(builder.buildPartial());
33087 } catch (com.google.protobuf.UninitializedMessageException e) {
33088 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
33089 } catch (java.io.IOException e) {
33090 throw new com.google.protobuf.InvalidProtocolBufferException(e)
33091 .setUnfinishedMessage(builder.buildPartial());
33092 }
33093 return builder.buildPartial();
33094 }
33095 };
33096
33097 public static com.google.protobuf.Parser<SparseTensorProto> parser() {
33098 return PARSER;
33099 }
33100
33101 @java.lang.Override
33102 public com.google.protobuf.Parser<SparseTensorProto> getParserForType() {
33103 return PARSER;
33104 }
33105
33106 @java.lang.Override
33107 public onnx.OnnxMl.SparseTensorProto getDefaultInstanceForType() {
33108 return DEFAULT_INSTANCE;
33109 }
33110
33111 }
33112
33113 public interface TensorShapeProtoOrBuilder extends
33114 // @@protoc_insertion_point(interface_extends:onnx.TensorShapeProto)
33115 com.google.protobuf.MessageOrBuilder {
33116
33117 /**
33118 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
33119 */
33120 java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension>
33121 getDimList();
33122 /**
33123 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
33124 */
33125 onnx.OnnxMl.TensorShapeProto.Dimension getDim(int index);
33126 /**
33127 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
33128 */
33129 int getDimCount();
33130 /**
33131 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
33132 */
33133 java.util.List<? extends onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder>
33134 getDimOrBuilderList();
33135 /**
33136 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
33137 */
33138 onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
33139 int index);
33140 }
33141 /**
33142 * <pre>
33143 * Defines a tensor shape. A dimension can be either an integer value
33144 * or a symbolic variable. A symbolic variable represents an unknown
33145 * dimension.
33146 * </pre>
33147 *
33148 * Protobuf type {@code onnx.TensorShapeProto}
33149 */
33150 public static final class TensorShapeProto extends
33151 com.google.protobuf.GeneratedMessage implements
33152 // @@protoc_insertion_point(message_implements:onnx.TensorShapeProto)
33153 TensorShapeProtoOrBuilder {
33154 private static final long serialVersionUID = 0L;
33155 static {
33156 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
33157 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
33158 /* major= */ 4,
33159 /* minor= */ 29,
33160 /* patch= */ 3,
33161 /* suffix= */ "",
33162 TensorShapeProto.class.getName());
33163 }
33164 // Use TensorShapeProto.newBuilder() to construct.
33165 private TensorShapeProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33166 super(builder);
33167 }
33168 private TensorShapeProto() {
33169 dim_ = java.util.Collections.emptyList();
33170 }
33171
33172 public static final com.google.protobuf.Descriptors.Descriptor
33173 getDescriptor() {
33174 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_descriptor;
33175 }
33176
33177 @java.lang.Override
33178 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
33179 internalGetFieldAccessorTable() {
33180 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_fieldAccessorTable
33181 .ensureFieldAccessorsInitialized(
33182 onnx.OnnxMl.TensorShapeProto.class, onnx.OnnxMl.TensorShapeProto.Builder.class);
33183 }
33184
33185 public interface DimensionOrBuilder extends
33186 // @@protoc_insertion_point(interface_extends:onnx.TensorShapeProto.Dimension)
33187 com.google.protobuf.MessageOrBuilder {
33188
33189 /**
33190 * <code>int64 dim_value = 1;</code>
33191 * @return Whether the dimValue field is set.
33192 */
33193 boolean hasDimValue();
33194 /**
33195 * <code>int64 dim_value = 1;</code>
33196 * @return The dimValue.
33197 */
33198 long getDimValue();
33199
33200 /**
33201 * <pre>
33202 * namespace Shape
33203 * </pre>
33204 *
33205 * <code>string dim_param = 2;</code>
33206 * @return Whether the dimParam field is set.
33207 */
33208 boolean hasDimParam();
33209 /**
33210 * <pre>
33211 * namespace Shape
33212 * </pre>
33213 *
33214 * <code>string dim_param = 2;</code>
33215 * @return The dimParam.
33216 */
33217 java.lang.String getDimParam();
33218 /**
33219 * <pre>
33220 * namespace Shape
33221 * </pre>
33222 *
33223 * <code>string dim_param = 2;</code>
33224 * @return The bytes for dimParam.
33225 */
33226 com.google.protobuf.ByteString
33227 getDimParamBytes();
33228
33229 /**
33230 * <pre>
33231 * Standard denotation can optionally be used to denote tensor
33232 * dimensions with standard semantic descriptions to ensure
33233 * that operations are applied to the correct axis of a tensor.
33234 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33235 * for pre-defined dimension denotations.
33236 * </pre>
33237 *
33238 * <code>optional string denotation = 3;</code>
33239 * @return Whether the denotation field is set.
33240 */
33241 boolean hasDenotation();
33242 /**
33243 * <pre>
33244 * Standard denotation can optionally be used to denote tensor
33245 * dimensions with standard semantic descriptions to ensure
33246 * that operations are applied to the correct axis of a tensor.
33247 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33248 * for pre-defined dimension denotations.
33249 * </pre>
33250 *
33251 * <code>optional string denotation = 3;</code>
33252 * @return The denotation.
33253 */
33254 java.lang.String getDenotation();
33255 /**
33256 * <pre>
33257 * Standard denotation can optionally be used to denote tensor
33258 * dimensions with standard semantic descriptions to ensure
33259 * that operations are applied to the correct axis of a tensor.
33260 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33261 * for pre-defined dimension denotations.
33262 * </pre>
33263 *
33264 * <code>optional string denotation = 3;</code>
33265 * @return The bytes for denotation.
33266 */
33267 com.google.protobuf.ByteString
33268 getDenotationBytes();
33269
33270 onnx.OnnxMl.TensorShapeProto.Dimension.ValueCase getValueCase();
33271 }
33272 /**
33273 * Protobuf type {@code onnx.TensorShapeProto.Dimension}
33274 */
33275 public static final class Dimension extends
33276 com.google.protobuf.GeneratedMessage implements
33277 // @@protoc_insertion_point(message_implements:onnx.TensorShapeProto.Dimension)
33278 DimensionOrBuilder {
33279 private static final long serialVersionUID = 0L;
33280 static {
33281 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
33282 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
33283 /* major= */ 4,
33284 /* minor= */ 29,
33285 /* patch= */ 3,
33286 /* suffix= */ "",
33287 Dimension.class.getName());
33288 }
33289 // Use Dimension.newBuilder() to construct.
33290 private Dimension(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33291 super(builder);
33292 }
33293 private Dimension() {
33294 denotation_ = "";
33295 }
33296
33297 public static final com.google.protobuf.Descriptors.Descriptor
33298 getDescriptor() {
33299 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_Dimension_descriptor;
33300 }
33301
33302 @java.lang.Override
33303 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
33304 internalGetFieldAccessorTable() {
33305 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_Dimension_fieldAccessorTable
33306 .ensureFieldAccessorsInitialized(
33307 onnx.OnnxMl.TensorShapeProto.Dimension.class, onnx.OnnxMl.TensorShapeProto.Dimension.Builder.class);
33308 }
33309
33310 private int bitField0_;
33311 private int valueCase_ = 0;
33312 @SuppressWarnings("serial")
33313 private java.lang.Object value_;
33314 public enum ValueCase
33315 implements com.google.protobuf.Internal.EnumLite,
33316 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
33317 DIM_VALUE(1),
33318 DIM_PARAM(2),
33319 VALUE_NOT_SET(0);
33320 private final int value;
33321 private ValueCase(int value) {
33322 this.value = value;
33323 }
33324 /**
33325 * @param value The number of the enum to look for.
33326 * @return The enum associated with the given number.
33327 * @deprecated Use {@link #forNumber(int)} instead.
33328 */
33329 @java.lang.Deprecated
33330 public static ValueCase valueOf(int value) {
33331 return forNumber(value);
33332 }
33333
33334 public static ValueCase forNumber(int value) {
33335 switch (value) {
33336 case 1: return DIM_VALUE;
33337 case 2: return DIM_PARAM;
33338 case 0: return VALUE_NOT_SET;
33339 default: return null;
33340 }
33341 }
33342 public int getNumber() {
33343 return this.value;
33344 }
33345 };
33346
33347 public ValueCase
33348 getValueCase() {
33349 return ValueCase.forNumber(
33350 valueCase_);
33351 }
33352
33353 public static final int DIM_VALUE_FIELD_NUMBER = 1;
33354 /**
33355 * <code>int64 dim_value = 1;</code>
33356 * @return Whether the dimValue field is set.
33357 */
33358 @java.lang.Override
33359 public boolean hasDimValue() {
33360 return valueCase_ == 1;
33361 }
33362 /**
33363 * <code>int64 dim_value = 1;</code>
33364 * @return The dimValue.
33365 */
33366 @java.lang.Override
33367 public long getDimValue() {
33368 if (valueCase_ == 1) {
33369 return (java.lang.Long) value_;
33370 }
33371 return 0L;
33372 }
33373
33374 public static final int DIM_PARAM_FIELD_NUMBER = 2;
33375 /**
33376 * <pre>
33377 * namespace Shape
33378 * </pre>
33379 *
33380 * <code>string dim_param = 2;</code>
33381 * @return Whether the dimParam field is set.
33382 */
33383 public boolean hasDimParam() {
33384 return valueCase_ == 2;
33385 }
33386 /**
33387 * <pre>
33388 * namespace Shape
33389 * </pre>
33390 *
33391 * <code>string dim_param = 2;</code>
33392 * @return The dimParam.
33393 */
33394 public java.lang.String getDimParam() {
33395 java.lang.Object ref = "";
33396 if (valueCase_ == 2) {
33397 ref = value_;
33398 }
33399 if (ref instanceof java.lang.String) {
33400 return (java.lang.String) ref;
33401 } else {
33402 com.google.protobuf.ByteString bs =
33403 (com.google.protobuf.ByteString) ref;
33404 java.lang.String s = bs.toStringUtf8();
33405 if (bs.isValidUtf8() && (valueCase_ == 2)) {
33406 value_ = s;
33407 }
33408 return s;
33409 }
33410 }
33411 /**
33412 * <pre>
33413 * namespace Shape
33414 * </pre>
33415 *
33416 * <code>string dim_param = 2;</code>
33417 * @return The bytes for dimParam.
33418 */
33419 public com.google.protobuf.ByteString
33420 getDimParamBytes() {
33421 java.lang.Object ref = "";
33422 if (valueCase_ == 2) {
33423 ref = value_;
33424 }
33425 if (ref instanceof java.lang.String) {
33426 com.google.protobuf.ByteString b =
33427 com.google.protobuf.ByteString.copyFromUtf8(
33428 (java.lang.String) ref);
33429 if (valueCase_ == 2) {
33430 value_ = b;
33431 }
33432 return b;
33433 } else {
33434 return (com.google.protobuf.ByteString) ref;
33435 }
33436 }
33437
33438 public static final int DENOTATION_FIELD_NUMBER = 3;
33439 @SuppressWarnings("serial")
33440 private volatile java.lang.Object denotation_ = "";
33441 /**
33442 * <pre>
33443 * Standard denotation can optionally be used to denote tensor
33444 * dimensions with standard semantic descriptions to ensure
33445 * that operations are applied to the correct axis of a tensor.
33446 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33447 * for pre-defined dimension denotations.
33448 * </pre>
33449 *
33450 * <code>optional string denotation = 3;</code>
33451 * @return Whether the denotation field is set.
33452 */
33453 @java.lang.Override
33454 public boolean hasDenotation() {
33455 return ((bitField0_ & 0x00000001) != 0);
33456 }
33457 /**
33458 * <pre>
33459 * Standard denotation can optionally be used to denote tensor
33460 * dimensions with standard semantic descriptions to ensure
33461 * that operations are applied to the correct axis of a tensor.
33462 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33463 * for pre-defined dimension denotations.
33464 * </pre>
33465 *
33466 * <code>optional string denotation = 3;</code>
33467 * @return The denotation.
33468 */
33469 @java.lang.Override
33470 public java.lang.String getDenotation() {
33471 java.lang.Object ref = denotation_;
33472 if (ref instanceof java.lang.String) {
33473 return (java.lang.String) ref;
33474 } else {
33475 com.google.protobuf.ByteString bs =
33476 (com.google.protobuf.ByteString) ref;
33477 java.lang.String s = bs.toStringUtf8();
33478 if (bs.isValidUtf8()) {
33479 denotation_ = s;
33480 }
33481 return s;
33482 }
33483 }
33484 /**
33485 * <pre>
33486 * Standard denotation can optionally be used to denote tensor
33487 * dimensions with standard semantic descriptions to ensure
33488 * that operations are applied to the correct axis of a tensor.
33489 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
33490 * for pre-defined dimension denotations.
33491 * </pre>
33492 *
33493 * <code>optional string denotation = 3;</code>
33494 * @return The bytes for denotation.
33495 */
33496 @java.lang.Override
33497 public com.google.protobuf.ByteString
33498 getDenotationBytes() {
33499 java.lang.Object ref = denotation_;
33500 if (ref instanceof java.lang.String) {
33501 com.google.protobuf.ByteString b =
33502 com.google.protobuf.ByteString.copyFromUtf8(
33503 (java.lang.String) ref);
33504 denotation_ = b;
33505 return b;
33506 } else {
33507 return (com.google.protobuf.ByteString) ref;
33508 }
33509 }
33510
33511 private byte memoizedIsInitialized = -1;
33512 @java.lang.Override
33513 public final boolean isInitialized() {
33514 byte isInitialized = memoizedIsInitialized;
33515 if (isInitialized == 1) return true;
33516 if (isInitialized == 0) return false;
33517
33518 memoizedIsInitialized = 1;
33519 return true;
33520 }
33521
33522 @java.lang.Override
33523 public void writeTo(com.google.protobuf.CodedOutputStream output)
33524 throws java.io.IOException {
33525 if (valueCase_ == 1) {
33526 output.writeInt64(
33527 1, (long)((java.lang.Long) value_));
33528 }
33529 if (valueCase_ == 2) {
33530 com.google.protobuf.GeneratedMessage.writeString(output, 2, value_);
33531 }
33532 if (((bitField0_ & 0x00000001) != 0)) {
33533 com.google.protobuf.GeneratedMessage.writeString(output, 3, denotation_);
33534 }
33535 getUnknownFields().writeTo(output);
33536 }
33537
33538 @java.lang.Override
33539 public int getSerializedSize() {
33540 int size = memoizedSize;
33541 if (size != -1) return size;
33542
33543 size = 0;
33544 if (valueCase_ == 1) {
33545 size += com.google.protobuf.CodedOutputStream
33546 .computeInt64Size(
33547 1, (long)((java.lang.Long) value_));
33548 }
33549 if (valueCase_ == 2) {
33550 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_);
33551 }
33552 if (((bitField0_ & 0x00000001) != 0)) {
33553 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, denotation_);
33554 }
33555 size += getUnknownFields().getSerializedSize();
33556 memoizedSize = size;
33557 return size;
33558 }
33559
33560 @java.lang.Override
33561 public boolean equals(final java.lang.Object obj) {
33562 if (obj == this) {
33563 return true;
33564 }
33565 if (!(obj instanceof onnx.OnnxMl.TensorShapeProto.Dimension)) {
33566 return super.equals(obj);
33567 }
33568 onnx.OnnxMl.TensorShapeProto.Dimension other = (onnx.OnnxMl.TensorShapeProto.Dimension) obj;
33569
33570 if (hasDenotation() != other.hasDenotation()) return false;
33571 if (hasDenotation()) {
33572 if (!getDenotation()
33573 .equals(other.getDenotation())) return false;
33574 }
33575 if (!getValueCase().equals(other.getValueCase())) return false;
33576 switch (valueCase_) {
33577 case 1:
33578 if (getDimValue()
33579 != other.getDimValue()) return false;
33580 break;
33581 case 2:
33582 if (!getDimParam()
33583 .equals(other.getDimParam())) return false;
33584 break;
33585 case 0:
33586 default:
33587 }
33588 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
33589 return true;
33590 }
33591
33592 @java.lang.Override
33593 public int hashCode() {
33594 if (memoizedHashCode != 0) {
33595 return memoizedHashCode;
33596 }
33597 int hash = 41;
33598 hash = (19 * hash) + getDescriptor().hashCode();
33599 if (hasDenotation()) {
33600 hash = (37 * hash) + DENOTATION_FIELD_NUMBER;
33601 hash = (53 * hash) + getDenotation().hashCode();
33602 }
33603 switch (valueCase_) {
33604 case 1:
33605 hash = (37 * hash) + DIM_VALUE_FIELD_NUMBER;
33606 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
33607 getDimValue());
33608 break;
33609 case 2:
33610 hash = (37 * hash) + DIM_PARAM_FIELD_NUMBER;
33611 hash = (53 * hash) + getDimParam().hashCode();
33612 break;
33613 case 0:
33614 default:
33615 }
33616 hash = (29 * hash) + getUnknownFields().hashCode();
33617 memoizedHashCode = hash;
33618 return hash;
33619 }
33620
33621 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33622 java.nio.ByteBuffer data)
33623 throws com.google.protobuf.InvalidProtocolBufferException {
33624 return PARSER.parseFrom(data);
33625 }
33626 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33627 java.nio.ByteBuffer data,
33628 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33629 throws com.google.protobuf.InvalidProtocolBufferException {
33630 return PARSER.parseFrom(data, extensionRegistry);
33631 }
33632 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33633 com.google.protobuf.ByteString data)
33634 throws com.google.protobuf.InvalidProtocolBufferException {
33635 return PARSER.parseFrom(data);
33636 }
33637 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33638 com.google.protobuf.ByteString data,
33639 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33640 throws com.google.protobuf.InvalidProtocolBufferException {
33641 return PARSER.parseFrom(data, extensionRegistry);
33642 }
33643 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(byte[] data)
33644 throws com.google.protobuf.InvalidProtocolBufferException {
33645 return PARSER.parseFrom(data);
33646 }
33647 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33648 byte[] data,
33649 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33650 throws com.google.protobuf.InvalidProtocolBufferException {
33651 return PARSER.parseFrom(data, extensionRegistry);
33652 }
33653 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(java.io.InputStream input)
33654 throws java.io.IOException {
33655 return com.google.protobuf.GeneratedMessage
33656 .parseWithIOException(PARSER, input);
33657 }
33658 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33659 java.io.InputStream input,
33660 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33661 throws java.io.IOException {
33662 return com.google.protobuf.GeneratedMessage
33663 .parseWithIOException(PARSER, input, extensionRegistry);
33664 }
33665
33666 public static onnx.OnnxMl.TensorShapeProto.Dimension parseDelimitedFrom(java.io.InputStream input)
33667 throws java.io.IOException {
33668 return com.google.protobuf.GeneratedMessage
33669 .parseDelimitedWithIOException(PARSER, input);
33670 }
33671
33672 public static onnx.OnnxMl.TensorShapeProto.Dimension parseDelimitedFrom(
33673 java.io.InputStream input,
33674 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33675 throws java.io.IOException {
33676 return com.google.protobuf.GeneratedMessage
33677 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
33678 }
33679 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33680 com.google.protobuf.CodedInputStream input)
33681 throws java.io.IOException {
33682 return com.google.protobuf.GeneratedMessage
33683 .parseWithIOException(PARSER, input);
33684 }
33685 public static onnx.OnnxMl.TensorShapeProto.Dimension parseFrom(
33686 com.google.protobuf.CodedInputStream input,
33687 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33688 throws java.io.IOException {
33689 return com.google.protobuf.GeneratedMessage
33690 .parseWithIOException(PARSER, input, extensionRegistry);
33691 }
33692
33693 @java.lang.Override
33694 public Builder newBuilderForType() { return newBuilder(); }
33695 public static Builder newBuilder() {
33696 return DEFAULT_INSTANCE.toBuilder();
33697 }
33698 public static Builder newBuilder(onnx.OnnxMl.TensorShapeProto.Dimension prototype) {
33699 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
33700 }
33701 @java.lang.Override
33702 public Builder toBuilder() {
33703 return this == DEFAULT_INSTANCE
33704 ? new Builder() : new Builder().mergeFrom(this);
33705 }
33706
33707 @java.lang.Override
33708 protected Builder newBuilderForType(
33709 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
33710 Builder builder = new Builder(parent);
33711 return builder;
33712 }
33713 /**
33714 * Protobuf type {@code onnx.TensorShapeProto.Dimension}
33715 */
33716 public static final class Builder extends
33717 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
33718 // @@protoc_insertion_point(builder_implements:onnx.TensorShapeProto.Dimension)
33719 onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder {
33720 public static final com.google.protobuf.Descriptors.Descriptor
33721 getDescriptor() {
33722 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_Dimension_descriptor;
33723 }
33724
33725 @java.lang.Override
33726 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
33727 internalGetFieldAccessorTable() {
33728 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_Dimension_fieldAccessorTable
33729 .ensureFieldAccessorsInitialized(
33730 onnx.OnnxMl.TensorShapeProto.Dimension.class, onnx.OnnxMl.TensorShapeProto.Dimension.Builder.class);
33731 }
33732
33733 // Construct using onnx.OnnxMl.TensorShapeProto.Dimension.newBuilder()
33734 private Builder() {
33735
33736 }
33737
33738 private Builder(
33739 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
33740 super(parent);
33741
33742 }
33743 @java.lang.Override
33744 public Builder clear() {
33745 super.clear();
33746 bitField0_ = 0;
33747 denotation_ = "";
33748 valueCase_ = 0;
33749 value_ = null;
33750 return this;
33751 }
33752
33753 @java.lang.Override
33754 public com.google.protobuf.Descriptors.Descriptor
33755 getDescriptorForType() {
33756 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_Dimension_descriptor;
33757 }
33758
33759 @java.lang.Override
33760 public onnx.OnnxMl.TensorShapeProto.Dimension getDefaultInstanceForType() {
33761 return onnx.OnnxMl.TensorShapeProto.Dimension.getDefaultInstance();
33762 }
33763
33764 @java.lang.Override
33765 public onnx.OnnxMl.TensorShapeProto.Dimension build() {
33766 onnx.OnnxMl.TensorShapeProto.Dimension result = buildPartial();
33767 if (!result.isInitialized()) {
33768 throw newUninitializedMessageException(result);
33769 }
33770 return result;
33771 }
33772
33773 @java.lang.Override
33774 public onnx.OnnxMl.TensorShapeProto.Dimension buildPartial() {
33775 onnx.OnnxMl.TensorShapeProto.Dimension result = new onnx.OnnxMl.TensorShapeProto.Dimension(this);
33776 if (bitField0_ != 0) { buildPartial0(result); }
33777 buildPartialOneofs(result);
33778 onBuilt();
33779 return result;
33780 }
33781
33782 private void buildPartial0(onnx.OnnxMl.TensorShapeProto.Dimension result) {
33783 int from_bitField0_ = bitField0_;
33784 int to_bitField0_ = 0;
33785 if (((from_bitField0_ & 0x00000004) != 0)) {
33786 result.denotation_ = denotation_;
33787 to_bitField0_ |= 0x00000001;
33788 }
33789 result.bitField0_ |= to_bitField0_;
33790 }
33791
33792 private void buildPartialOneofs(onnx.OnnxMl.TensorShapeProto.Dimension result) {
33793 result.valueCase_ = valueCase_;
33794 result.value_ = this.value_;
33795 }
33796
33797 @java.lang.Override
33798 public Builder mergeFrom(com.google.protobuf.Message other) {
33799 if (other instanceof onnx.OnnxMl.TensorShapeProto.Dimension) {
33800 return mergeFrom((onnx.OnnxMl.TensorShapeProto.Dimension)other);
33801 } else {
33802 super.mergeFrom(other);
33803 return this;
33804 }
33805 }
33806
33807 public Builder mergeFrom(onnx.OnnxMl.TensorShapeProto.Dimension other) {
33808 if (other == onnx.OnnxMl.TensorShapeProto.Dimension.getDefaultInstance()) return this;
33809 if (other.hasDenotation()) {
33810 denotation_ = other.denotation_;
33811 bitField0_ |= 0x00000004;
33812 onChanged();
33813 }
33814 switch (other.getValueCase()) {
33815 case DIM_VALUE: {
33816 setDimValue(other.getDimValue());
33817 break;
33818 }
33819 case DIM_PARAM: {
33820 valueCase_ = 2;
33821 value_ = other.value_;
33822 onChanged();
33823 break;
33824 }
33825 case VALUE_NOT_SET: {
33826 break;
33827 }
33828 }
33829 this.mergeUnknownFields(other.getUnknownFields());
33830 onChanged();
33831 return this;
33832 }
33833
33834 @java.lang.Override
33835 public final boolean isInitialized() {
33836 return true;
33837 }
33838
33839 @java.lang.Override
33840 public Builder mergeFrom(
33841 com.google.protobuf.CodedInputStream input,
33842 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
33843 throws java.io.IOException {
33844 if (extensionRegistry == null) {
33845 throw new java.lang.NullPointerException();
33846 }
33847 try {
33848 boolean done = false;
33849 while (!done) {
33850 int tag = input.readTag();
33851 switch (tag) {
33852 case 0:
33853 done = true;
33854 break;
33855 case 8: {
33856 value_ = input.readInt64();
33857 valueCase_ = 1;
33858 break;
33859 } // case 8
33860 case 18: {
33861 com.google.protobuf.ByteString bs = input.readBytes();
33862 valueCase_ = 2;
33863 value_ = bs;
33864 break;
33865 } // case 18
33866 case 26: {
33867 denotation_ = input.readBytes();
33868 bitField0_ |= 0x00000004;
33869 break;
33870 } // case 26
33871 default: {
33872 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
33873 done = true; // was an endgroup tag
33874 }
33875 break;
33876 } // default:
33877 } // switch (tag)
33878 } // while (!done)
33879 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
33880 throw e.unwrapIOException();
33881 } finally {
33882 onChanged();
33883 } // finally
33884 return this;
33885 }
33886 private int valueCase_ = 0;
33887 private java.lang.Object value_;
33888 public ValueCase
33889 getValueCase() {
33890 return ValueCase.forNumber(
33891 valueCase_);
33892 }
33893
33894 public Builder clearValue() {
33895 valueCase_ = 0;
33896 value_ = null;
33897 onChanged();
33898 return this;
33899 }
33900
33901 private int bitField0_;
33902
33903 /**
33904 * <code>int64 dim_value = 1;</code>
33905 * @return Whether the dimValue field is set.
33906 */
33907 public boolean hasDimValue() {
33908 return valueCase_ == 1;
33909 }
33910 /**
33911 * <code>int64 dim_value = 1;</code>
33912 * @return The dimValue.
33913 */
33914 public long getDimValue() {
33915 if (valueCase_ == 1) {
33916 return (java.lang.Long) value_;
33917 }
33918 return 0L;
33919 }
33920 /**
33921 * <code>int64 dim_value = 1;</code>
33922 * @param value The dimValue to set.
33923 * @return This builder for chaining.
33924 */
33925 public Builder setDimValue(long value) {
33926
33927 valueCase_ = 1;
33928 value_ = value;
33929 onChanged();
33930 return this;
33931 }
33932 /**
33933 * <code>int64 dim_value = 1;</code>
33934 * @return This builder for chaining.
33935 */
33936 public Builder clearDimValue() {
33937 if (valueCase_ == 1) {
33938 valueCase_ = 0;
33939 value_ = null;
33940 onChanged();
33941 }
33942 return this;
33943 }
33944
33945 /**
33946 * <pre>
33947 * namespace Shape
33948 * </pre>
33949 *
33950 * <code>string dim_param = 2;</code>
33951 * @return Whether the dimParam field is set.
33952 */
33953 @java.lang.Override
33954 public boolean hasDimParam() {
33955 return valueCase_ == 2;
33956 }
33957 /**
33958 * <pre>
33959 * namespace Shape
33960 * </pre>
33961 *
33962 * <code>string dim_param = 2;</code>
33963 * @return The dimParam.
33964 */
33965 @java.lang.Override
33966 public java.lang.String getDimParam() {
33967 java.lang.Object ref = "";
33968 if (valueCase_ == 2) {
33969 ref = value_;
33970 }
33971 if (!(ref instanceof java.lang.String)) {
33972 com.google.protobuf.ByteString bs =
33973 (com.google.protobuf.ByteString) ref;
33974 java.lang.String s = bs.toStringUtf8();
33975 if (valueCase_ == 2) {
33976 if (bs.isValidUtf8()) {
33977 value_ = s;
33978 }
33979 }
33980 return s;
33981 } else {
33982 return (java.lang.String) ref;
33983 }
33984 }
33985 /**
33986 * <pre>
33987 * namespace Shape
33988 * </pre>
33989 *
33990 * <code>string dim_param = 2;</code>
33991 * @return The bytes for dimParam.
33992 */
33993 @java.lang.Override
33994 public com.google.protobuf.ByteString
33995 getDimParamBytes() {
33996 java.lang.Object ref = "";
33997 if (valueCase_ == 2) {
33998 ref = value_;
33999 }
34000 if (ref instanceof String) {
34001 com.google.protobuf.ByteString b =
34002 com.google.protobuf.ByteString.copyFromUtf8(
34003 (java.lang.String) ref);
34004 if (valueCase_ == 2) {
34005 value_ = b;
34006 }
34007 return b;
34008 } else {
34009 return (com.google.protobuf.ByteString) ref;
34010 }
34011 }
34012 /**
34013 * <pre>
34014 * namespace Shape
34015 * </pre>
34016 *
34017 * <code>string dim_param = 2;</code>
34018 * @param value The dimParam to set.
34019 * @return This builder for chaining.
34020 */
34021 public Builder setDimParam(
34022 java.lang.String value) {
34023 if (value == null) { throw new NullPointerException(); }
34024 valueCase_ = 2;
34025 value_ = value;
34026 onChanged();
34027 return this;
34028 }
34029 /**
34030 * <pre>
34031 * namespace Shape
34032 * </pre>
34033 *
34034 * <code>string dim_param = 2;</code>
34035 * @return This builder for chaining.
34036 */
34037 public Builder clearDimParam() {
34038 if (valueCase_ == 2) {
34039 valueCase_ = 0;
34040 value_ = null;
34041 onChanged();
34042 }
34043 return this;
34044 }
34045 /**
34046 * <pre>
34047 * namespace Shape
34048 * </pre>
34049 *
34050 * <code>string dim_param = 2;</code>
34051 * @param value The bytes for dimParam to set.
34052 * @return This builder for chaining.
34053 */
34054 public Builder setDimParamBytes(
34055 com.google.protobuf.ByteString value) {
34056 if (value == null) { throw new NullPointerException(); }
34057 valueCase_ = 2;
34058 value_ = value;
34059 onChanged();
34060 return this;
34061 }
34062
34063 private java.lang.Object denotation_ = "";
34064 /**
34065 * <pre>
34066 * Standard denotation can optionally be used to denote tensor
34067 * dimensions with standard semantic descriptions to ensure
34068 * that operations are applied to the correct axis of a tensor.
34069 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34070 * for pre-defined dimension denotations.
34071 * </pre>
34072 *
34073 * <code>optional string denotation = 3;</code>
34074 * @return Whether the denotation field is set.
34075 */
34076 public boolean hasDenotation() {
34077 return ((bitField0_ & 0x00000004) != 0);
34078 }
34079 /**
34080 * <pre>
34081 * Standard denotation can optionally be used to denote tensor
34082 * dimensions with standard semantic descriptions to ensure
34083 * that operations are applied to the correct axis of a tensor.
34084 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34085 * for pre-defined dimension denotations.
34086 * </pre>
34087 *
34088 * <code>optional string denotation = 3;</code>
34089 * @return The denotation.
34090 */
34091 public java.lang.String getDenotation() {
34092 java.lang.Object ref = denotation_;
34093 if (!(ref instanceof java.lang.String)) {
34094 com.google.protobuf.ByteString bs =
34095 (com.google.protobuf.ByteString) ref;
34096 java.lang.String s = bs.toStringUtf8();
34097 if (bs.isValidUtf8()) {
34098 denotation_ = s;
34099 }
34100 return s;
34101 } else {
34102 return (java.lang.String) ref;
34103 }
34104 }
34105 /**
34106 * <pre>
34107 * Standard denotation can optionally be used to denote tensor
34108 * dimensions with standard semantic descriptions to ensure
34109 * that operations are applied to the correct axis of a tensor.
34110 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34111 * for pre-defined dimension denotations.
34112 * </pre>
34113 *
34114 * <code>optional string denotation = 3;</code>
34115 * @return The bytes for denotation.
34116 */
34117 public com.google.protobuf.ByteString
34118 getDenotationBytes() {
34119 java.lang.Object ref = denotation_;
34120 if (ref instanceof String) {
34121 com.google.protobuf.ByteString b =
34122 com.google.protobuf.ByteString.copyFromUtf8(
34123 (java.lang.String) ref);
34124 denotation_ = b;
34125 return b;
34126 } else {
34127 return (com.google.protobuf.ByteString) ref;
34128 }
34129 }
34130 /**
34131 * <pre>
34132 * Standard denotation can optionally be used to denote tensor
34133 * dimensions with standard semantic descriptions to ensure
34134 * that operations are applied to the correct axis of a tensor.
34135 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34136 * for pre-defined dimension denotations.
34137 * </pre>
34138 *
34139 * <code>optional string denotation = 3;</code>
34140 * @param value The denotation to set.
34141 * @return This builder for chaining.
34142 */
34143 public Builder setDenotation(
34144 java.lang.String value) {
34145 if (value == null) { throw new NullPointerException(); }
34146 denotation_ = value;
34147 bitField0_ |= 0x00000004;
34148 onChanged();
34149 return this;
34150 }
34151 /**
34152 * <pre>
34153 * Standard denotation can optionally be used to denote tensor
34154 * dimensions with standard semantic descriptions to ensure
34155 * that operations are applied to the correct axis of a tensor.
34156 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34157 * for pre-defined dimension denotations.
34158 * </pre>
34159 *
34160 * <code>optional string denotation = 3;</code>
34161 * @return This builder for chaining.
34162 */
34163 public Builder clearDenotation() {
34164 denotation_ = getDefaultInstance().getDenotation();
34165 bitField0_ = (bitField0_ & ~0x00000004);
34166 onChanged();
34167 return this;
34168 }
34169 /**
34170 * <pre>
34171 * Standard denotation can optionally be used to denote tensor
34172 * dimensions with standard semantic descriptions to ensure
34173 * that operations are applied to the correct axis of a tensor.
34174 * Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
34175 * for pre-defined dimension denotations.
34176 * </pre>
34177 *
34178 * <code>optional string denotation = 3;</code>
34179 * @param value The bytes for denotation to set.
34180 * @return This builder for chaining.
34181 */
34182 public Builder setDenotationBytes(
34183 com.google.protobuf.ByteString value) {
34184 if (value == null) { throw new NullPointerException(); }
34185 denotation_ = value;
34186 bitField0_ |= 0x00000004;
34187 onChanged();
34188 return this;
34189 }
34190
34191 // @@protoc_insertion_point(builder_scope:onnx.TensorShapeProto.Dimension)
34192 }
34193
34194 // @@protoc_insertion_point(class_scope:onnx.TensorShapeProto.Dimension)
34195 private static final onnx.OnnxMl.TensorShapeProto.Dimension DEFAULT_INSTANCE;
34196 static {
34197 DEFAULT_INSTANCE = new onnx.OnnxMl.TensorShapeProto.Dimension();
34198 }
34199
34200 public static onnx.OnnxMl.TensorShapeProto.Dimension getDefaultInstance() {
34201 return DEFAULT_INSTANCE;
34202 }
34203
34204 private static final com.google.protobuf.Parser<Dimension>
34205 PARSER = new com.google.protobuf.AbstractParser<Dimension>() {
34206 @java.lang.Override
34207 public Dimension parsePartialFrom(
34208 com.google.protobuf.CodedInputStream input,
34209 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34210 throws com.google.protobuf.InvalidProtocolBufferException {
34211 Builder builder = newBuilder();
34212 try {
34213 builder.mergeFrom(input, extensionRegistry);
34214 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
34215 throw e.setUnfinishedMessage(builder.buildPartial());
34216 } catch (com.google.protobuf.UninitializedMessageException e) {
34217 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
34218 } catch (java.io.IOException e) {
34219 throw new com.google.protobuf.InvalidProtocolBufferException(e)
34220 .setUnfinishedMessage(builder.buildPartial());
34221 }
34222 return builder.buildPartial();
34223 }
34224 };
34225
34226 public static com.google.protobuf.Parser<Dimension> parser() {
34227 return PARSER;
34228 }
34229
34230 @java.lang.Override
34231 public com.google.protobuf.Parser<Dimension> getParserForType() {
34232 return PARSER;
34233 }
34234
34235 @java.lang.Override
34236 public onnx.OnnxMl.TensorShapeProto.Dimension getDefaultInstanceForType() {
34237 return DEFAULT_INSTANCE;
34238 }
34239
34240 }
34241
34242 public static final int DIM_FIELD_NUMBER = 1;
34243 @SuppressWarnings("serial")
34244 private java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension> dim_;
34245 /**
34246 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34247 */
34248 @java.lang.Override
34249 public java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension> getDimList() {
34250 return dim_;
34251 }
34252 /**
34253 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34254 */
34255 @java.lang.Override
34256 public java.util.List<? extends onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder>
34257 getDimOrBuilderList() {
34258 return dim_;
34259 }
34260 /**
34261 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34262 */
34263 @java.lang.Override
34264 public int getDimCount() {
34265 return dim_.size();
34266 }
34267 /**
34268 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34269 */
34270 @java.lang.Override
34271 public onnx.OnnxMl.TensorShapeProto.Dimension getDim(int index) {
34272 return dim_.get(index);
34273 }
34274 /**
34275 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34276 */
34277 @java.lang.Override
34278 public onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
34279 int index) {
34280 return dim_.get(index);
34281 }
34282
34283 private byte memoizedIsInitialized = -1;
34284 @java.lang.Override
34285 public final boolean isInitialized() {
34286 byte isInitialized = memoizedIsInitialized;
34287 if (isInitialized == 1) return true;
34288 if (isInitialized == 0) return false;
34289
34290 memoizedIsInitialized = 1;
34291 return true;
34292 }
34293
34294 @java.lang.Override
34295 public void writeTo(com.google.protobuf.CodedOutputStream output)
34296 throws java.io.IOException {
34297 for (int i = 0; i < dim_.size(); i++) {
34298 output.writeMessage(1, dim_.get(i));
34299 }
34300 getUnknownFields().writeTo(output);
34301 }
34302
34303 @java.lang.Override
34304 public int getSerializedSize() {
34305 int size = memoizedSize;
34306 if (size != -1) return size;
34307
34308 size = 0;
34309 for (int i = 0; i < dim_.size(); i++) {
34310 size += com.google.protobuf.CodedOutputStream
34311 .computeMessageSize(1, dim_.get(i));
34312 }
34313 size += getUnknownFields().getSerializedSize();
34314 memoizedSize = size;
34315 return size;
34316 }
34317
34318 @java.lang.Override
34319 public boolean equals(final java.lang.Object obj) {
34320 if (obj == this) {
34321 return true;
34322 }
34323 if (!(obj instanceof onnx.OnnxMl.TensorShapeProto)) {
34324 return super.equals(obj);
34325 }
34326 onnx.OnnxMl.TensorShapeProto other = (onnx.OnnxMl.TensorShapeProto) obj;
34327
34328 if (!getDimList()
34329 .equals(other.getDimList())) return false;
34330 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
34331 return true;
34332 }
34333
34334 @java.lang.Override
34335 public int hashCode() {
34336 if (memoizedHashCode != 0) {
34337 return memoizedHashCode;
34338 }
34339 int hash = 41;
34340 hash = (19 * hash) + getDescriptor().hashCode();
34341 if (getDimCount() > 0) {
34342 hash = (37 * hash) + DIM_FIELD_NUMBER;
34343 hash = (53 * hash) + getDimList().hashCode();
34344 }
34345 hash = (29 * hash) + getUnknownFields().hashCode();
34346 memoizedHashCode = hash;
34347 return hash;
34348 }
34349
34350 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34351 java.nio.ByteBuffer data)
34352 throws com.google.protobuf.InvalidProtocolBufferException {
34353 return PARSER.parseFrom(data);
34354 }
34355 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34356 java.nio.ByteBuffer data,
34357 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34358 throws com.google.protobuf.InvalidProtocolBufferException {
34359 return PARSER.parseFrom(data, extensionRegistry);
34360 }
34361 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34362 com.google.protobuf.ByteString data)
34363 throws com.google.protobuf.InvalidProtocolBufferException {
34364 return PARSER.parseFrom(data);
34365 }
34366 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34367 com.google.protobuf.ByteString data,
34368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34369 throws com.google.protobuf.InvalidProtocolBufferException {
34370 return PARSER.parseFrom(data, extensionRegistry);
34371 }
34372 public static onnx.OnnxMl.TensorShapeProto parseFrom(byte[] data)
34373 throws com.google.protobuf.InvalidProtocolBufferException {
34374 return PARSER.parseFrom(data);
34375 }
34376 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34377 byte[] data,
34378 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34379 throws com.google.protobuf.InvalidProtocolBufferException {
34380 return PARSER.parseFrom(data, extensionRegistry);
34381 }
34382 public static onnx.OnnxMl.TensorShapeProto parseFrom(java.io.InputStream input)
34383 throws java.io.IOException {
34384 return com.google.protobuf.GeneratedMessage
34385 .parseWithIOException(PARSER, input);
34386 }
34387 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34388 java.io.InputStream input,
34389 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34390 throws java.io.IOException {
34391 return com.google.protobuf.GeneratedMessage
34392 .parseWithIOException(PARSER, input, extensionRegistry);
34393 }
34394
34395 public static onnx.OnnxMl.TensorShapeProto parseDelimitedFrom(java.io.InputStream input)
34396 throws java.io.IOException {
34397 return com.google.protobuf.GeneratedMessage
34398 .parseDelimitedWithIOException(PARSER, input);
34399 }
34400
34401 public static onnx.OnnxMl.TensorShapeProto parseDelimitedFrom(
34402 java.io.InputStream input,
34403 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34404 throws java.io.IOException {
34405 return com.google.protobuf.GeneratedMessage
34406 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
34407 }
34408 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34409 com.google.protobuf.CodedInputStream input)
34410 throws java.io.IOException {
34411 return com.google.protobuf.GeneratedMessage
34412 .parseWithIOException(PARSER, input);
34413 }
34414 public static onnx.OnnxMl.TensorShapeProto parseFrom(
34415 com.google.protobuf.CodedInputStream input,
34416 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34417 throws java.io.IOException {
34418 return com.google.protobuf.GeneratedMessage
34419 .parseWithIOException(PARSER, input, extensionRegistry);
34420 }
34421
34422 @java.lang.Override
34423 public Builder newBuilderForType() { return newBuilder(); }
34424 public static Builder newBuilder() {
34425 return DEFAULT_INSTANCE.toBuilder();
34426 }
34427 public static Builder newBuilder(onnx.OnnxMl.TensorShapeProto prototype) {
34428 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
34429 }
34430 @java.lang.Override
34431 public Builder toBuilder() {
34432 return this == DEFAULT_INSTANCE
34433 ? new Builder() : new Builder().mergeFrom(this);
34434 }
34435
34436 @java.lang.Override
34437 protected Builder newBuilderForType(
34438 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
34439 Builder builder = new Builder(parent);
34440 return builder;
34441 }
34442 /**
34443 * <pre>
34444 * Defines a tensor shape. A dimension can be either an integer value
34445 * or a symbolic variable. A symbolic variable represents an unknown
34446 * dimension.
34447 * </pre>
34448 *
34449 * Protobuf type {@code onnx.TensorShapeProto}
34450 */
34451 public static final class Builder extends
34452 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
34453 // @@protoc_insertion_point(builder_implements:onnx.TensorShapeProto)
34454 onnx.OnnxMl.TensorShapeProtoOrBuilder {
34455 public static final com.google.protobuf.Descriptors.Descriptor
34456 getDescriptor() {
34457 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_descriptor;
34458 }
34459
34460 @java.lang.Override
34461 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
34462 internalGetFieldAccessorTable() {
34463 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_fieldAccessorTable
34464 .ensureFieldAccessorsInitialized(
34465 onnx.OnnxMl.TensorShapeProto.class, onnx.OnnxMl.TensorShapeProto.Builder.class);
34466 }
34467
34468 // Construct using onnx.OnnxMl.TensorShapeProto.newBuilder()
34469 private Builder() {
34470
34471 }
34472
34473 private Builder(
34474 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
34475 super(parent);
34476
34477 }
34478 @java.lang.Override
34479 public Builder clear() {
34480 super.clear();
34481 bitField0_ = 0;
34482 if (dimBuilder_ == null) {
34483 dim_ = java.util.Collections.emptyList();
34484 } else {
34485 dim_ = null;
34486 dimBuilder_.clear();
34487 }
34488 bitField0_ = (bitField0_ & ~0x00000001);
34489 return this;
34490 }
34491
34492 @java.lang.Override
34493 public com.google.protobuf.Descriptors.Descriptor
34494 getDescriptorForType() {
34495 return onnx.OnnxMl.internal_static_onnx_TensorShapeProto_descriptor;
34496 }
34497
34498 @java.lang.Override
34499 public onnx.OnnxMl.TensorShapeProto getDefaultInstanceForType() {
34500 return onnx.OnnxMl.TensorShapeProto.getDefaultInstance();
34501 }
34502
34503 @java.lang.Override
34504 public onnx.OnnxMl.TensorShapeProto build() {
34505 onnx.OnnxMl.TensorShapeProto result = buildPartial();
34506 if (!result.isInitialized()) {
34507 throw newUninitializedMessageException(result);
34508 }
34509 return result;
34510 }
34511
34512 @java.lang.Override
34513 public onnx.OnnxMl.TensorShapeProto buildPartial() {
34514 onnx.OnnxMl.TensorShapeProto result = new onnx.OnnxMl.TensorShapeProto(this);
34515 buildPartialRepeatedFields(result);
34516 if (bitField0_ != 0) { buildPartial0(result); }
34517 onBuilt();
34518 return result;
34519 }
34520
34521 private void buildPartialRepeatedFields(onnx.OnnxMl.TensorShapeProto result) {
34522 if (dimBuilder_ == null) {
34523 if (((bitField0_ & 0x00000001) != 0)) {
34524 dim_ = java.util.Collections.unmodifiableList(dim_);
34525 bitField0_ = (bitField0_ & ~0x00000001);
34526 }
34527 result.dim_ = dim_;
34528 } else {
34529 result.dim_ = dimBuilder_.build();
34530 }
34531 }
34532
34533 private void buildPartial0(onnx.OnnxMl.TensorShapeProto result) {
34534 int from_bitField0_ = bitField0_;
34535 }
34536
34537 @java.lang.Override
34538 public Builder mergeFrom(com.google.protobuf.Message other) {
34539 if (other instanceof onnx.OnnxMl.TensorShapeProto) {
34540 return mergeFrom((onnx.OnnxMl.TensorShapeProto)other);
34541 } else {
34542 super.mergeFrom(other);
34543 return this;
34544 }
34545 }
34546
34547 public Builder mergeFrom(onnx.OnnxMl.TensorShapeProto other) {
34548 if (other == onnx.OnnxMl.TensorShapeProto.getDefaultInstance()) return this;
34549 if (dimBuilder_ == null) {
34550 if (!other.dim_.isEmpty()) {
34551 if (dim_.isEmpty()) {
34552 dim_ = other.dim_;
34553 bitField0_ = (bitField0_ & ~0x00000001);
34554 } else {
34555 ensureDimIsMutable();
34556 dim_.addAll(other.dim_);
34557 }
34558 onChanged();
34559 }
34560 } else {
34561 if (!other.dim_.isEmpty()) {
34562 if (dimBuilder_.isEmpty()) {
34563 dimBuilder_.dispose();
34564 dimBuilder_ = null;
34565 dim_ = other.dim_;
34566 bitField0_ = (bitField0_ & ~0x00000001);
34567 dimBuilder_ =
34568 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
34569 getDimFieldBuilder() : null;
34570 } else {
34571 dimBuilder_.addAllMessages(other.dim_);
34572 }
34573 }
34574 }
34575 this.mergeUnknownFields(other.getUnknownFields());
34576 onChanged();
34577 return this;
34578 }
34579
34580 @java.lang.Override
34581 public final boolean isInitialized() {
34582 return true;
34583 }
34584
34585 @java.lang.Override
34586 public Builder mergeFrom(
34587 com.google.protobuf.CodedInputStream input,
34588 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34589 throws java.io.IOException {
34590 if (extensionRegistry == null) {
34591 throw new java.lang.NullPointerException();
34592 }
34593 try {
34594 boolean done = false;
34595 while (!done) {
34596 int tag = input.readTag();
34597 switch (tag) {
34598 case 0:
34599 done = true;
34600 break;
34601 case 10: {
34602 onnx.OnnxMl.TensorShapeProto.Dimension m =
34603 input.readMessage(
34604 onnx.OnnxMl.TensorShapeProto.Dimension.parser(),
34605 extensionRegistry);
34606 if (dimBuilder_ == null) {
34607 ensureDimIsMutable();
34608 dim_.add(m);
34609 } else {
34610 dimBuilder_.addMessage(m);
34611 }
34612 break;
34613 } // case 10
34614 default: {
34615 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
34616 done = true; // was an endgroup tag
34617 }
34618 break;
34619 } // default:
34620 } // switch (tag)
34621 } // while (!done)
34622 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
34623 throw e.unwrapIOException();
34624 } finally {
34625 onChanged();
34626 } // finally
34627 return this;
34628 }
34629 private int bitField0_;
34630
34631 private java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension> dim_ =
34632 java.util.Collections.emptyList();
34633 private void ensureDimIsMutable() {
34634 if (!((bitField0_ & 0x00000001) != 0)) {
34635 dim_ = new java.util.ArrayList<onnx.OnnxMl.TensorShapeProto.Dimension>(dim_);
34636 bitField0_ |= 0x00000001;
34637 }
34638 }
34639
34640 private com.google.protobuf.RepeatedFieldBuilder<
34641 onnx.OnnxMl.TensorShapeProto.Dimension, onnx.OnnxMl.TensorShapeProto.Dimension.Builder, onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder> dimBuilder_;
34642
34643 /**
34644 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34645 */
34646 public java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension> getDimList() {
34647 if (dimBuilder_ == null) {
34648 return java.util.Collections.unmodifiableList(dim_);
34649 } else {
34650 return dimBuilder_.getMessageList();
34651 }
34652 }
34653 /**
34654 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34655 */
34656 public int getDimCount() {
34657 if (dimBuilder_ == null) {
34658 return dim_.size();
34659 } else {
34660 return dimBuilder_.getCount();
34661 }
34662 }
34663 /**
34664 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34665 */
34666 public onnx.OnnxMl.TensorShapeProto.Dimension getDim(int index) {
34667 if (dimBuilder_ == null) {
34668 return dim_.get(index);
34669 } else {
34670 return dimBuilder_.getMessage(index);
34671 }
34672 }
34673 /**
34674 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34675 */
34676 public Builder setDim(
34677 int index, onnx.OnnxMl.TensorShapeProto.Dimension value) {
34678 if (dimBuilder_ == null) {
34679 if (value == null) {
34680 throw new NullPointerException();
34681 }
34682 ensureDimIsMutable();
34683 dim_.set(index, value);
34684 onChanged();
34685 } else {
34686 dimBuilder_.setMessage(index, value);
34687 }
34688 return this;
34689 }
34690 /**
34691 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34692 */
34693 public Builder setDim(
34694 int index, onnx.OnnxMl.TensorShapeProto.Dimension.Builder builderForValue) {
34695 if (dimBuilder_ == null) {
34696 ensureDimIsMutable();
34697 dim_.set(index, builderForValue.build());
34698 onChanged();
34699 } else {
34700 dimBuilder_.setMessage(index, builderForValue.build());
34701 }
34702 return this;
34703 }
34704 /**
34705 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34706 */
34707 public Builder addDim(onnx.OnnxMl.TensorShapeProto.Dimension value) {
34708 if (dimBuilder_ == null) {
34709 if (value == null) {
34710 throw new NullPointerException();
34711 }
34712 ensureDimIsMutable();
34713 dim_.add(value);
34714 onChanged();
34715 } else {
34716 dimBuilder_.addMessage(value);
34717 }
34718 return this;
34719 }
34720 /**
34721 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34722 */
34723 public Builder addDim(
34724 int index, onnx.OnnxMl.TensorShapeProto.Dimension value) {
34725 if (dimBuilder_ == null) {
34726 if (value == null) {
34727 throw new NullPointerException();
34728 }
34729 ensureDimIsMutable();
34730 dim_.add(index, value);
34731 onChanged();
34732 } else {
34733 dimBuilder_.addMessage(index, value);
34734 }
34735 return this;
34736 }
34737 /**
34738 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34739 */
34740 public Builder addDim(
34741 onnx.OnnxMl.TensorShapeProto.Dimension.Builder builderForValue) {
34742 if (dimBuilder_ == null) {
34743 ensureDimIsMutable();
34744 dim_.add(builderForValue.build());
34745 onChanged();
34746 } else {
34747 dimBuilder_.addMessage(builderForValue.build());
34748 }
34749 return this;
34750 }
34751 /**
34752 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34753 */
34754 public Builder addDim(
34755 int index, onnx.OnnxMl.TensorShapeProto.Dimension.Builder builderForValue) {
34756 if (dimBuilder_ == null) {
34757 ensureDimIsMutable();
34758 dim_.add(index, builderForValue.build());
34759 onChanged();
34760 } else {
34761 dimBuilder_.addMessage(index, builderForValue.build());
34762 }
34763 return this;
34764 }
34765 /**
34766 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34767 */
34768 public Builder addAllDim(
34769 java.lang.Iterable<? extends onnx.OnnxMl.TensorShapeProto.Dimension> values) {
34770 if (dimBuilder_ == null) {
34771 ensureDimIsMutable();
34772 com.google.protobuf.AbstractMessageLite.Builder.addAll(
34773 values, dim_);
34774 onChanged();
34775 } else {
34776 dimBuilder_.addAllMessages(values);
34777 }
34778 return this;
34779 }
34780 /**
34781 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34782 */
34783 public Builder clearDim() {
34784 if (dimBuilder_ == null) {
34785 dim_ = java.util.Collections.emptyList();
34786 bitField0_ = (bitField0_ & ~0x00000001);
34787 onChanged();
34788 } else {
34789 dimBuilder_.clear();
34790 }
34791 return this;
34792 }
34793 /**
34794 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34795 */
34796 public Builder removeDim(int index) {
34797 if (dimBuilder_ == null) {
34798 ensureDimIsMutable();
34799 dim_.remove(index);
34800 onChanged();
34801 } else {
34802 dimBuilder_.remove(index);
34803 }
34804 return this;
34805 }
34806 /**
34807 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34808 */
34809 public onnx.OnnxMl.TensorShapeProto.Dimension.Builder getDimBuilder(
34810 int index) {
34811 return getDimFieldBuilder().getBuilder(index);
34812 }
34813 /**
34814 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34815 */
34816 public onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
34817 int index) {
34818 if (dimBuilder_ == null) {
34819 return dim_.get(index); } else {
34820 return dimBuilder_.getMessageOrBuilder(index);
34821 }
34822 }
34823 /**
34824 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34825 */
34826 public java.util.List<? extends onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder>
34827 getDimOrBuilderList() {
34828 if (dimBuilder_ != null) {
34829 return dimBuilder_.getMessageOrBuilderList();
34830 } else {
34831 return java.util.Collections.unmodifiableList(dim_);
34832 }
34833 }
34834 /**
34835 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34836 */
34837 public onnx.OnnxMl.TensorShapeProto.Dimension.Builder addDimBuilder() {
34838 return getDimFieldBuilder().addBuilder(
34839 onnx.OnnxMl.TensorShapeProto.Dimension.getDefaultInstance());
34840 }
34841 /**
34842 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34843 */
34844 public onnx.OnnxMl.TensorShapeProto.Dimension.Builder addDimBuilder(
34845 int index) {
34846 return getDimFieldBuilder().addBuilder(
34847 index, onnx.OnnxMl.TensorShapeProto.Dimension.getDefaultInstance());
34848 }
34849 /**
34850 * <code>repeated .onnx.TensorShapeProto.Dimension dim = 1;</code>
34851 */
34852 public java.util.List<onnx.OnnxMl.TensorShapeProto.Dimension.Builder>
34853 getDimBuilderList() {
34854 return getDimFieldBuilder().getBuilderList();
34855 }
34856 private com.google.protobuf.RepeatedFieldBuilder<
34857 onnx.OnnxMl.TensorShapeProto.Dimension, onnx.OnnxMl.TensorShapeProto.Dimension.Builder, onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder>
34858 getDimFieldBuilder() {
34859 if (dimBuilder_ == null) {
34860 dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
34861 onnx.OnnxMl.TensorShapeProto.Dimension, onnx.OnnxMl.TensorShapeProto.Dimension.Builder, onnx.OnnxMl.TensorShapeProto.DimensionOrBuilder>(
34862 dim_,
34863 ((bitField0_ & 0x00000001) != 0),
34864 getParentForChildren(),
34865 isClean());
34866 dim_ = null;
34867 }
34868 return dimBuilder_;
34869 }
34870
34871 // @@protoc_insertion_point(builder_scope:onnx.TensorShapeProto)
34872 }
34873
34874 // @@protoc_insertion_point(class_scope:onnx.TensorShapeProto)
34875 private static final onnx.OnnxMl.TensorShapeProto DEFAULT_INSTANCE;
34876 static {
34877 DEFAULT_INSTANCE = new onnx.OnnxMl.TensorShapeProto();
34878 }
34879
34880 public static onnx.OnnxMl.TensorShapeProto getDefaultInstance() {
34881 return DEFAULT_INSTANCE;
34882 }
34883
34884 private static final com.google.protobuf.Parser<TensorShapeProto>
34885 PARSER = new com.google.protobuf.AbstractParser<TensorShapeProto>() {
34886 @java.lang.Override
34887 public TensorShapeProto parsePartialFrom(
34888 com.google.protobuf.CodedInputStream input,
34889 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
34890 throws com.google.protobuf.InvalidProtocolBufferException {
34891 Builder builder = newBuilder();
34892 try {
34893 builder.mergeFrom(input, extensionRegistry);
34894 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
34895 throw e.setUnfinishedMessage(builder.buildPartial());
34896 } catch (com.google.protobuf.UninitializedMessageException e) {
34897 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
34898 } catch (java.io.IOException e) {
34899 throw new com.google.protobuf.InvalidProtocolBufferException(e)
34900 .setUnfinishedMessage(builder.buildPartial());
34901 }
34902 return builder.buildPartial();
34903 }
34904 };
34905
34906 public static com.google.protobuf.Parser<TensorShapeProto> parser() {
34907 return PARSER;
34908 }
34909
34910 @java.lang.Override
34911 public com.google.protobuf.Parser<TensorShapeProto> getParserForType() {
34912 return PARSER;
34913 }
34914
34915 @java.lang.Override
34916 public onnx.OnnxMl.TensorShapeProto getDefaultInstanceForType() {
34917 return DEFAULT_INSTANCE;
34918 }
34919
34920 }
34921
34922 public interface TypeProtoOrBuilder extends
34923 // @@protoc_insertion_point(interface_extends:onnx.TypeProto)
34924 com.google.protobuf.MessageOrBuilder {
34925
34926 /**
34927 * <pre>
34928 * The type of a tensor.
34929 * </pre>
34930 *
34931 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
34932 * @return Whether the tensorType field is set.
34933 */
34934 boolean hasTensorType();
34935 /**
34936 * <pre>
34937 * The type of a tensor.
34938 * </pre>
34939 *
34940 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
34941 * @return The tensorType.
34942 */
34943 onnx.OnnxMl.TypeProto.Tensor getTensorType();
34944 /**
34945 * <pre>
34946 * The type of a tensor.
34947 * </pre>
34948 *
34949 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
34950 */
34951 onnx.OnnxMl.TypeProto.TensorOrBuilder getTensorTypeOrBuilder();
34952
34953 /**
34954 * <pre>
34955 * The type of a sequence.
34956 * </pre>
34957 *
34958 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
34959 * @return Whether the sequenceType field is set.
34960 */
34961 boolean hasSequenceType();
34962 /**
34963 * <pre>
34964 * The type of a sequence.
34965 * </pre>
34966 *
34967 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
34968 * @return The sequenceType.
34969 */
34970 onnx.OnnxMl.TypeProto.Sequence getSequenceType();
34971 /**
34972 * <pre>
34973 * The type of a sequence.
34974 * </pre>
34975 *
34976 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
34977 */
34978 onnx.OnnxMl.TypeProto.SequenceOrBuilder getSequenceTypeOrBuilder();
34979
34980 /**
34981 * <pre>
34982 * The type of a map.
34983 * </pre>
34984 *
34985 * <code>.onnx.TypeProto.Map map_type = 5;</code>
34986 * @return Whether the mapType field is set.
34987 */
34988 boolean hasMapType();
34989 /**
34990 * <pre>
34991 * The type of a map.
34992 * </pre>
34993 *
34994 * <code>.onnx.TypeProto.Map map_type = 5;</code>
34995 * @return The mapType.
34996 */
34997 onnx.OnnxMl.TypeProto.Map getMapType();
34998 /**
34999 * <pre>
35000 * The type of a map.
35001 * </pre>
35002 *
35003 * <code>.onnx.TypeProto.Map map_type = 5;</code>
35004 */
35005 onnx.OnnxMl.TypeProto.MapOrBuilder getMapTypeOrBuilder();
35006
35007 /**
35008 * <pre>
35009 * The type of an optional.
35010 * </pre>
35011 *
35012 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
35013 * @return Whether the optionalType field is set.
35014 */
35015 boolean hasOptionalType();
35016 /**
35017 * <pre>
35018 * The type of an optional.
35019 * </pre>
35020 *
35021 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
35022 * @return The optionalType.
35023 */
35024 onnx.OnnxMl.TypeProto.Optional getOptionalType();
35025 /**
35026 * <pre>
35027 * The type of an optional.
35028 * </pre>
35029 *
35030 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
35031 */
35032 onnx.OnnxMl.TypeProto.OptionalOrBuilder getOptionalTypeOrBuilder();
35033
35034 /**
35035 * <pre>
35036 * Type of the sparse tensor
35037 * </pre>
35038 *
35039 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
35040 * @return Whether the sparseTensorType field is set.
35041 */
35042 boolean hasSparseTensorType();
35043 /**
35044 * <pre>
35045 * Type of the sparse tensor
35046 * </pre>
35047 *
35048 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
35049 * @return The sparseTensorType.
35050 */
35051 onnx.OnnxMl.TypeProto.SparseTensor getSparseTensorType();
35052 /**
35053 * <pre>
35054 * Type of the sparse tensor
35055 * </pre>
35056 *
35057 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
35058 */
35059 onnx.OnnxMl.TypeProto.SparseTensorOrBuilder getSparseTensorTypeOrBuilder();
35060
35061 /**
35062 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
35063 * @return Whether the opaqueType field is set.
35064 */
35065 boolean hasOpaqueType();
35066 /**
35067 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
35068 * @return The opaqueType.
35069 */
35070 onnx.OnnxMl.TypeProto.Opaque getOpaqueType();
35071 /**
35072 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
35073 */
35074 onnx.OnnxMl.TypeProto.OpaqueOrBuilder getOpaqueTypeOrBuilder();
35075
35076 /**
35077 * <pre>
35078 * An optional denotation can be used to denote the whole
35079 * type with a standard semantic description as to what is
35080 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
35081 * for pre-defined type denotations.
35082 * </pre>
35083 *
35084 * <code>optional string denotation = 6;</code>
35085 * @return Whether the denotation field is set.
35086 */
35087 boolean hasDenotation();
35088 /**
35089 * <pre>
35090 * An optional denotation can be used to denote the whole
35091 * type with a standard semantic description as to what is
35092 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
35093 * for pre-defined type denotations.
35094 * </pre>
35095 *
35096 * <code>optional string denotation = 6;</code>
35097 * @return The denotation.
35098 */
35099 java.lang.String getDenotation();
35100 /**
35101 * <pre>
35102 * An optional denotation can be used to denote the whole
35103 * type with a standard semantic description as to what is
35104 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
35105 * for pre-defined type denotations.
35106 * </pre>
35107 *
35108 * <code>optional string denotation = 6;</code>
35109 * @return The bytes for denotation.
35110 */
35111 com.google.protobuf.ByteString
35112 getDenotationBytes();
35113
35114 onnx.OnnxMl.TypeProto.ValueCase getValueCase();
35115 }
35116 /**
35117 * <pre>
35118 * Types
35119 *
35120 * The standard ONNX data types.
35121 * </pre>
35122 *
35123 * Protobuf type {@code onnx.TypeProto}
35124 */
35125 public static final class TypeProto extends
35126 com.google.protobuf.GeneratedMessage implements
35127 // @@protoc_insertion_point(message_implements:onnx.TypeProto)
35128 TypeProtoOrBuilder {
35129 private static final long serialVersionUID = 0L;
35130 static {
35131 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
35132 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35133 /* major= */ 4,
35134 /* minor= */ 29,
35135 /* patch= */ 3,
35136 /* suffix= */ "",
35137 TypeProto.class.getName());
35138 }
35139 // Use TypeProto.newBuilder() to construct.
35140 private TypeProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35141 super(builder);
35142 }
35143 private TypeProto() {
35144 denotation_ = "";
35145 }
35146
35147 public static final com.google.protobuf.Descriptors.Descriptor
35148 getDescriptor() {
35149 return onnx.OnnxMl.internal_static_onnx_TypeProto_descriptor;
35150 }
35151
35152 @java.lang.Override
35153 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
35154 internalGetFieldAccessorTable() {
35155 return onnx.OnnxMl.internal_static_onnx_TypeProto_fieldAccessorTable
35156 .ensureFieldAccessorsInitialized(
35157 onnx.OnnxMl.TypeProto.class, onnx.OnnxMl.TypeProto.Builder.class);
35158 }
35159
35160 public interface TensorOrBuilder extends
35161 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.Tensor)
35162 com.google.protobuf.MessageOrBuilder {
35163
35164 /**
35165 * <pre>
35166 * This field MUST NOT have the value of UNDEFINED
35167 * This field MUST have a valid TensorProto.DataType value
35168 * This field MUST be present for this version of the IR.
35169 * </pre>
35170 *
35171 * <code>optional int32 elem_type = 1;</code>
35172 * @return Whether the elemType field is set.
35173 */
35174 boolean hasElemType();
35175 /**
35176 * <pre>
35177 * This field MUST NOT have the value of UNDEFINED
35178 * This field MUST have a valid TensorProto.DataType value
35179 * This field MUST be present for this version of the IR.
35180 * </pre>
35181 *
35182 * <code>optional int32 elem_type = 1;</code>
35183 * @return The elemType.
35184 */
35185 int getElemType();
35186
35187 /**
35188 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35189 * @return Whether the shape field is set.
35190 */
35191 boolean hasShape();
35192 /**
35193 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35194 * @return The shape.
35195 */
35196 onnx.OnnxMl.TensorShapeProto getShape();
35197 /**
35198 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35199 */
35200 onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder();
35201 }
35202 /**
35203 * Protobuf type {@code onnx.TypeProto.Tensor}
35204 */
35205 public static final class Tensor extends
35206 com.google.protobuf.GeneratedMessage implements
35207 // @@protoc_insertion_point(message_implements:onnx.TypeProto.Tensor)
35208 TensorOrBuilder {
35209 private static final long serialVersionUID = 0L;
35210 static {
35211 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
35212 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35213 /* major= */ 4,
35214 /* minor= */ 29,
35215 /* patch= */ 3,
35216 /* suffix= */ "",
35217 Tensor.class.getName());
35218 }
35219 // Use Tensor.newBuilder() to construct.
35220 private Tensor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35221 super(builder);
35222 }
35223 private Tensor() {
35224 }
35225
35226 public static final com.google.protobuf.Descriptors.Descriptor
35227 getDescriptor() {
35228 return onnx.OnnxMl.internal_static_onnx_TypeProto_Tensor_descriptor;
35229 }
35230
35231 @java.lang.Override
35232 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
35233 internalGetFieldAccessorTable() {
35234 return onnx.OnnxMl.internal_static_onnx_TypeProto_Tensor_fieldAccessorTable
35235 .ensureFieldAccessorsInitialized(
35236 onnx.OnnxMl.TypeProto.Tensor.class, onnx.OnnxMl.TypeProto.Tensor.Builder.class);
35237 }
35238
35239 private int bitField0_;
35240 public static final int ELEM_TYPE_FIELD_NUMBER = 1;
35241 private int elemType_ = 0;
35242 /**
35243 * <pre>
35244 * This field MUST NOT have the value of UNDEFINED
35245 * This field MUST have a valid TensorProto.DataType value
35246 * This field MUST be present for this version of the IR.
35247 * </pre>
35248 *
35249 * <code>optional int32 elem_type = 1;</code>
35250 * @return Whether the elemType field is set.
35251 */
35252 @java.lang.Override
35253 public boolean hasElemType() {
35254 return ((bitField0_ & 0x00000001) != 0);
35255 }
35256 /**
35257 * <pre>
35258 * This field MUST NOT have the value of UNDEFINED
35259 * This field MUST have a valid TensorProto.DataType value
35260 * This field MUST be present for this version of the IR.
35261 * </pre>
35262 *
35263 * <code>optional int32 elem_type = 1;</code>
35264 * @return The elemType.
35265 */
35266 @java.lang.Override
35267 public int getElemType() {
35268 return elemType_;
35269 }
35270
35271 public static final int SHAPE_FIELD_NUMBER = 2;
35272 private onnx.OnnxMl.TensorShapeProto shape_;
35273 /**
35274 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35275 * @return Whether the shape field is set.
35276 */
35277 @java.lang.Override
35278 public boolean hasShape() {
35279 return ((bitField0_ & 0x00000002) != 0);
35280 }
35281 /**
35282 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35283 * @return The shape.
35284 */
35285 @java.lang.Override
35286 public onnx.OnnxMl.TensorShapeProto getShape() {
35287 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
35288 }
35289 /**
35290 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35291 */
35292 @java.lang.Override
35293 public onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder() {
35294 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
35295 }
35296
35297 private byte memoizedIsInitialized = -1;
35298 @java.lang.Override
35299 public final boolean isInitialized() {
35300 byte isInitialized = memoizedIsInitialized;
35301 if (isInitialized == 1) return true;
35302 if (isInitialized == 0) return false;
35303
35304 memoizedIsInitialized = 1;
35305 return true;
35306 }
35307
35308 @java.lang.Override
35309 public void writeTo(com.google.protobuf.CodedOutputStream output)
35310 throws java.io.IOException {
35311 if (((bitField0_ & 0x00000001) != 0)) {
35312 output.writeInt32(1, elemType_);
35313 }
35314 if (((bitField0_ & 0x00000002) != 0)) {
35315 output.writeMessage(2, getShape());
35316 }
35317 getUnknownFields().writeTo(output);
35318 }
35319
35320 @java.lang.Override
35321 public int getSerializedSize() {
35322 int size = memoizedSize;
35323 if (size != -1) return size;
35324
35325 size = 0;
35326 if (((bitField0_ & 0x00000001) != 0)) {
35327 size += com.google.protobuf.CodedOutputStream
35328 .computeInt32Size(1, elemType_);
35329 }
35330 if (((bitField0_ & 0x00000002) != 0)) {
35331 size += com.google.protobuf.CodedOutputStream
35332 .computeMessageSize(2, getShape());
35333 }
35334 size += getUnknownFields().getSerializedSize();
35335 memoizedSize = size;
35336 return size;
35337 }
35338
35339 @java.lang.Override
35340 public boolean equals(final java.lang.Object obj) {
35341 if (obj == this) {
35342 return true;
35343 }
35344 if (!(obj instanceof onnx.OnnxMl.TypeProto.Tensor)) {
35345 return super.equals(obj);
35346 }
35347 onnx.OnnxMl.TypeProto.Tensor other = (onnx.OnnxMl.TypeProto.Tensor) obj;
35348
35349 if (hasElemType() != other.hasElemType()) return false;
35350 if (hasElemType()) {
35351 if (getElemType()
35352 != other.getElemType()) return false;
35353 }
35354 if (hasShape() != other.hasShape()) return false;
35355 if (hasShape()) {
35356 if (!getShape()
35357 .equals(other.getShape())) return false;
35358 }
35359 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
35360 return true;
35361 }
35362
35363 @java.lang.Override
35364 public int hashCode() {
35365 if (memoizedHashCode != 0) {
35366 return memoizedHashCode;
35367 }
35368 int hash = 41;
35369 hash = (19 * hash) + getDescriptor().hashCode();
35370 if (hasElemType()) {
35371 hash = (37 * hash) + ELEM_TYPE_FIELD_NUMBER;
35372 hash = (53 * hash) + getElemType();
35373 }
35374 if (hasShape()) {
35375 hash = (37 * hash) + SHAPE_FIELD_NUMBER;
35376 hash = (53 * hash) + getShape().hashCode();
35377 }
35378 hash = (29 * hash) + getUnknownFields().hashCode();
35379 memoizedHashCode = hash;
35380 return hash;
35381 }
35382
35383 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35384 java.nio.ByteBuffer data)
35385 throws com.google.protobuf.InvalidProtocolBufferException {
35386 return PARSER.parseFrom(data);
35387 }
35388 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35389 java.nio.ByteBuffer data,
35390 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35391 throws com.google.protobuf.InvalidProtocolBufferException {
35392 return PARSER.parseFrom(data, extensionRegistry);
35393 }
35394 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35395 com.google.protobuf.ByteString data)
35396 throws com.google.protobuf.InvalidProtocolBufferException {
35397 return PARSER.parseFrom(data);
35398 }
35399 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35400 com.google.protobuf.ByteString data,
35401 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35402 throws com.google.protobuf.InvalidProtocolBufferException {
35403 return PARSER.parseFrom(data, extensionRegistry);
35404 }
35405 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(byte[] data)
35406 throws com.google.protobuf.InvalidProtocolBufferException {
35407 return PARSER.parseFrom(data);
35408 }
35409 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35410 byte[] data,
35411 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35412 throws com.google.protobuf.InvalidProtocolBufferException {
35413 return PARSER.parseFrom(data, extensionRegistry);
35414 }
35415 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(java.io.InputStream input)
35416 throws java.io.IOException {
35417 return com.google.protobuf.GeneratedMessage
35418 .parseWithIOException(PARSER, input);
35419 }
35420 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35421 java.io.InputStream input,
35422 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35423 throws java.io.IOException {
35424 return com.google.protobuf.GeneratedMessage
35425 .parseWithIOException(PARSER, input, extensionRegistry);
35426 }
35427
35428 public static onnx.OnnxMl.TypeProto.Tensor parseDelimitedFrom(java.io.InputStream input)
35429 throws java.io.IOException {
35430 return com.google.protobuf.GeneratedMessage
35431 .parseDelimitedWithIOException(PARSER, input);
35432 }
35433
35434 public static onnx.OnnxMl.TypeProto.Tensor parseDelimitedFrom(
35435 java.io.InputStream input,
35436 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35437 throws java.io.IOException {
35438 return com.google.protobuf.GeneratedMessage
35439 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
35440 }
35441 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35442 com.google.protobuf.CodedInputStream input)
35443 throws java.io.IOException {
35444 return com.google.protobuf.GeneratedMessage
35445 .parseWithIOException(PARSER, input);
35446 }
35447 public static onnx.OnnxMl.TypeProto.Tensor parseFrom(
35448 com.google.protobuf.CodedInputStream input,
35449 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35450 throws java.io.IOException {
35451 return com.google.protobuf.GeneratedMessage
35452 .parseWithIOException(PARSER, input, extensionRegistry);
35453 }
35454
35455 @java.lang.Override
35456 public Builder newBuilderForType() { return newBuilder(); }
35457 public static Builder newBuilder() {
35458 return DEFAULT_INSTANCE.toBuilder();
35459 }
35460 public static Builder newBuilder(onnx.OnnxMl.TypeProto.Tensor prototype) {
35461 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
35462 }
35463 @java.lang.Override
35464 public Builder toBuilder() {
35465 return this == DEFAULT_INSTANCE
35466 ? new Builder() : new Builder().mergeFrom(this);
35467 }
35468
35469 @java.lang.Override
35470 protected Builder newBuilderForType(
35471 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
35472 Builder builder = new Builder(parent);
35473 return builder;
35474 }
35475 /**
35476 * Protobuf type {@code onnx.TypeProto.Tensor}
35477 */
35478 public static final class Builder extends
35479 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
35480 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.Tensor)
35481 onnx.OnnxMl.TypeProto.TensorOrBuilder {
35482 public static final com.google.protobuf.Descriptors.Descriptor
35483 getDescriptor() {
35484 return onnx.OnnxMl.internal_static_onnx_TypeProto_Tensor_descriptor;
35485 }
35486
35487 @java.lang.Override
35488 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
35489 internalGetFieldAccessorTable() {
35490 return onnx.OnnxMl.internal_static_onnx_TypeProto_Tensor_fieldAccessorTable
35491 .ensureFieldAccessorsInitialized(
35492 onnx.OnnxMl.TypeProto.Tensor.class, onnx.OnnxMl.TypeProto.Tensor.Builder.class);
35493 }
35494
35495 // Construct using onnx.OnnxMl.TypeProto.Tensor.newBuilder()
35496 private Builder() {
35497 maybeForceBuilderInitialization();
35498 }
35499
35500 private Builder(
35501 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
35502 super(parent);
35503 maybeForceBuilderInitialization();
35504 }
35505 private void maybeForceBuilderInitialization() {
35506 if (com.google.protobuf.GeneratedMessage
35507 .alwaysUseFieldBuilders) {
35508 getShapeFieldBuilder();
35509 }
35510 }
35511 @java.lang.Override
35512 public Builder clear() {
35513 super.clear();
35514 bitField0_ = 0;
35515 elemType_ = 0;
35516 shape_ = null;
35517 if (shapeBuilder_ != null) {
35518 shapeBuilder_.dispose();
35519 shapeBuilder_ = null;
35520 }
35521 return this;
35522 }
35523
35524 @java.lang.Override
35525 public com.google.protobuf.Descriptors.Descriptor
35526 getDescriptorForType() {
35527 return onnx.OnnxMl.internal_static_onnx_TypeProto_Tensor_descriptor;
35528 }
35529
35530 @java.lang.Override
35531 public onnx.OnnxMl.TypeProto.Tensor getDefaultInstanceForType() {
35532 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
35533 }
35534
35535 @java.lang.Override
35536 public onnx.OnnxMl.TypeProto.Tensor build() {
35537 onnx.OnnxMl.TypeProto.Tensor result = buildPartial();
35538 if (!result.isInitialized()) {
35539 throw newUninitializedMessageException(result);
35540 }
35541 return result;
35542 }
35543
35544 @java.lang.Override
35545 public onnx.OnnxMl.TypeProto.Tensor buildPartial() {
35546 onnx.OnnxMl.TypeProto.Tensor result = new onnx.OnnxMl.TypeProto.Tensor(this);
35547 if (bitField0_ != 0) { buildPartial0(result); }
35548 onBuilt();
35549 return result;
35550 }
35551
35552 private void buildPartial0(onnx.OnnxMl.TypeProto.Tensor result) {
35553 int from_bitField0_ = bitField0_;
35554 int to_bitField0_ = 0;
35555 if (((from_bitField0_ & 0x00000001) != 0)) {
35556 result.elemType_ = elemType_;
35557 to_bitField0_ |= 0x00000001;
35558 }
35559 if (((from_bitField0_ & 0x00000002) != 0)) {
35560 result.shape_ = shapeBuilder_ == null
35561 ? shape_
35562 : shapeBuilder_.build();
35563 to_bitField0_ |= 0x00000002;
35564 }
35565 result.bitField0_ |= to_bitField0_;
35566 }
35567
35568 @java.lang.Override
35569 public Builder mergeFrom(com.google.protobuf.Message other) {
35570 if (other instanceof onnx.OnnxMl.TypeProto.Tensor) {
35571 return mergeFrom((onnx.OnnxMl.TypeProto.Tensor)other);
35572 } else {
35573 super.mergeFrom(other);
35574 return this;
35575 }
35576 }
35577
35578 public Builder mergeFrom(onnx.OnnxMl.TypeProto.Tensor other) {
35579 if (other == onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance()) return this;
35580 if (other.hasElemType()) {
35581 setElemType(other.getElemType());
35582 }
35583 if (other.hasShape()) {
35584 mergeShape(other.getShape());
35585 }
35586 this.mergeUnknownFields(other.getUnknownFields());
35587 onChanged();
35588 return this;
35589 }
35590
35591 @java.lang.Override
35592 public final boolean isInitialized() {
35593 return true;
35594 }
35595
35596 @java.lang.Override
35597 public Builder mergeFrom(
35598 com.google.protobuf.CodedInputStream input,
35599 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35600 throws java.io.IOException {
35601 if (extensionRegistry == null) {
35602 throw new java.lang.NullPointerException();
35603 }
35604 try {
35605 boolean done = false;
35606 while (!done) {
35607 int tag = input.readTag();
35608 switch (tag) {
35609 case 0:
35610 done = true;
35611 break;
35612 case 8: {
35613 elemType_ = input.readInt32();
35614 bitField0_ |= 0x00000001;
35615 break;
35616 } // case 8
35617 case 18: {
35618 input.readMessage(
35619 getShapeFieldBuilder().getBuilder(),
35620 extensionRegistry);
35621 bitField0_ |= 0x00000002;
35622 break;
35623 } // case 18
35624 default: {
35625 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
35626 done = true; // was an endgroup tag
35627 }
35628 break;
35629 } // default:
35630 } // switch (tag)
35631 } // while (!done)
35632 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
35633 throw e.unwrapIOException();
35634 } finally {
35635 onChanged();
35636 } // finally
35637 return this;
35638 }
35639 private int bitField0_;
35640
35641 private int elemType_ ;
35642 /**
35643 * <pre>
35644 * This field MUST NOT have the value of UNDEFINED
35645 * This field MUST have a valid TensorProto.DataType value
35646 * This field MUST be present for this version of the IR.
35647 * </pre>
35648 *
35649 * <code>optional int32 elem_type = 1;</code>
35650 * @return Whether the elemType field is set.
35651 */
35652 @java.lang.Override
35653 public boolean hasElemType() {
35654 return ((bitField0_ & 0x00000001) != 0);
35655 }
35656 /**
35657 * <pre>
35658 * This field MUST NOT have the value of UNDEFINED
35659 * This field MUST have a valid TensorProto.DataType value
35660 * This field MUST be present for this version of the IR.
35661 * </pre>
35662 *
35663 * <code>optional int32 elem_type = 1;</code>
35664 * @return The elemType.
35665 */
35666 @java.lang.Override
35667 public int getElemType() {
35668 return elemType_;
35669 }
35670 /**
35671 * <pre>
35672 * This field MUST NOT have the value of UNDEFINED
35673 * This field MUST have a valid TensorProto.DataType value
35674 * This field MUST be present for this version of the IR.
35675 * </pre>
35676 *
35677 * <code>optional int32 elem_type = 1;</code>
35678 * @param value The elemType to set.
35679 * @return This builder for chaining.
35680 */
35681 public Builder setElemType(int value) {
35682
35683 elemType_ = value;
35684 bitField0_ |= 0x00000001;
35685 onChanged();
35686 return this;
35687 }
35688 /**
35689 * <pre>
35690 * This field MUST NOT have the value of UNDEFINED
35691 * This field MUST have a valid TensorProto.DataType value
35692 * This field MUST be present for this version of the IR.
35693 * </pre>
35694 *
35695 * <code>optional int32 elem_type = 1;</code>
35696 * @return This builder for chaining.
35697 */
35698 public Builder clearElemType() {
35699 bitField0_ = (bitField0_ & ~0x00000001);
35700 elemType_ = 0;
35701 onChanged();
35702 return this;
35703 }
35704
35705 private onnx.OnnxMl.TensorShapeProto shape_;
35706 private com.google.protobuf.SingleFieldBuilder<
35707 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder> shapeBuilder_;
35708 /**
35709 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35710 * @return Whether the shape field is set.
35711 */
35712 public boolean hasShape() {
35713 return ((bitField0_ & 0x00000002) != 0);
35714 }
35715 /**
35716 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35717 * @return The shape.
35718 */
35719 public onnx.OnnxMl.TensorShapeProto getShape() {
35720 if (shapeBuilder_ == null) {
35721 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
35722 } else {
35723 return shapeBuilder_.getMessage();
35724 }
35725 }
35726 /**
35727 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35728 */
35729 public Builder setShape(onnx.OnnxMl.TensorShapeProto value) {
35730 if (shapeBuilder_ == null) {
35731 if (value == null) {
35732 throw new NullPointerException();
35733 }
35734 shape_ = value;
35735 } else {
35736 shapeBuilder_.setMessage(value);
35737 }
35738 bitField0_ |= 0x00000002;
35739 onChanged();
35740 return this;
35741 }
35742 /**
35743 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35744 */
35745 public Builder setShape(
35746 onnx.OnnxMl.TensorShapeProto.Builder builderForValue) {
35747 if (shapeBuilder_ == null) {
35748 shape_ = builderForValue.build();
35749 } else {
35750 shapeBuilder_.setMessage(builderForValue.build());
35751 }
35752 bitField0_ |= 0x00000002;
35753 onChanged();
35754 return this;
35755 }
35756 /**
35757 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35758 */
35759 public Builder mergeShape(onnx.OnnxMl.TensorShapeProto value) {
35760 if (shapeBuilder_ == null) {
35761 if (((bitField0_ & 0x00000002) != 0) &&
35762 shape_ != null &&
35763 shape_ != onnx.OnnxMl.TensorShapeProto.getDefaultInstance()) {
35764 getShapeBuilder().mergeFrom(value);
35765 } else {
35766 shape_ = value;
35767 }
35768 } else {
35769 shapeBuilder_.mergeFrom(value);
35770 }
35771 if (shape_ != null) {
35772 bitField0_ |= 0x00000002;
35773 onChanged();
35774 }
35775 return this;
35776 }
35777 /**
35778 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35779 */
35780 public Builder clearShape() {
35781 bitField0_ = (bitField0_ & ~0x00000002);
35782 shape_ = null;
35783 if (shapeBuilder_ != null) {
35784 shapeBuilder_.dispose();
35785 shapeBuilder_ = null;
35786 }
35787 onChanged();
35788 return this;
35789 }
35790 /**
35791 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35792 */
35793 public onnx.OnnxMl.TensorShapeProto.Builder getShapeBuilder() {
35794 bitField0_ |= 0x00000002;
35795 onChanged();
35796 return getShapeFieldBuilder().getBuilder();
35797 }
35798 /**
35799 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35800 */
35801 public onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder() {
35802 if (shapeBuilder_ != null) {
35803 return shapeBuilder_.getMessageOrBuilder();
35804 } else {
35805 return shape_ == null ?
35806 onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
35807 }
35808 }
35809 /**
35810 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
35811 */
35812 private com.google.protobuf.SingleFieldBuilder<
35813 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder>
35814 getShapeFieldBuilder() {
35815 if (shapeBuilder_ == null) {
35816 shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
35817 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder>(
35818 getShape(),
35819 getParentForChildren(),
35820 isClean());
35821 shape_ = null;
35822 }
35823 return shapeBuilder_;
35824 }
35825
35826 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.Tensor)
35827 }
35828
35829 // @@protoc_insertion_point(class_scope:onnx.TypeProto.Tensor)
35830 private static final onnx.OnnxMl.TypeProto.Tensor DEFAULT_INSTANCE;
35831 static {
35832 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.Tensor();
35833 }
35834
35835 public static onnx.OnnxMl.TypeProto.Tensor getDefaultInstance() {
35836 return DEFAULT_INSTANCE;
35837 }
35838
35839 private static final com.google.protobuf.Parser<Tensor>
35840 PARSER = new com.google.protobuf.AbstractParser<Tensor>() {
35841 @java.lang.Override
35842 public Tensor parsePartialFrom(
35843 com.google.protobuf.CodedInputStream input,
35844 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
35845 throws com.google.protobuf.InvalidProtocolBufferException {
35846 Builder builder = newBuilder();
35847 try {
35848 builder.mergeFrom(input, extensionRegistry);
35849 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
35850 throw e.setUnfinishedMessage(builder.buildPartial());
35851 } catch (com.google.protobuf.UninitializedMessageException e) {
35852 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
35853 } catch (java.io.IOException e) {
35854 throw new com.google.protobuf.InvalidProtocolBufferException(e)
35855 .setUnfinishedMessage(builder.buildPartial());
35856 }
35857 return builder.buildPartial();
35858 }
35859 };
35860
35861 public static com.google.protobuf.Parser<Tensor> parser() {
35862 return PARSER;
35863 }
35864
35865 @java.lang.Override
35866 public com.google.protobuf.Parser<Tensor> getParserForType() {
35867 return PARSER;
35868 }
35869
35870 @java.lang.Override
35871 public onnx.OnnxMl.TypeProto.Tensor getDefaultInstanceForType() {
35872 return DEFAULT_INSTANCE;
35873 }
35874
35875 }
35876
35877 public interface SequenceOrBuilder extends
35878 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.Sequence)
35879 com.google.protobuf.MessageOrBuilder {
35880
35881 /**
35882 * <pre>
35883 * The type and optional shape of each element of the sequence.
35884 * This field MUST be present for this version of the IR.
35885 * </pre>
35886 *
35887 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35888 * @return Whether the elemType field is set.
35889 */
35890 boolean hasElemType();
35891 /**
35892 * <pre>
35893 * The type and optional shape of each element of the sequence.
35894 * This field MUST be present for this version of the IR.
35895 * </pre>
35896 *
35897 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35898 * @return The elemType.
35899 */
35900 onnx.OnnxMl.TypeProto getElemType();
35901 /**
35902 * <pre>
35903 * The type and optional shape of each element of the sequence.
35904 * This field MUST be present for this version of the IR.
35905 * </pre>
35906 *
35907 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35908 */
35909 onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder();
35910 }
35911 /**
35912 * <pre>
35913 * repeated T
35914 * </pre>
35915 *
35916 * Protobuf type {@code onnx.TypeProto.Sequence}
35917 */
35918 public static final class Sequence extends
35919 com.google.protobuf.GeneratedMessage implements
35920 // @@protoc_insertion_point(message_implements:onnx.TypeProto.Sequence)
35921 SequenceOrBuilder {
35922 private static final long serialVersionUID = 0L;
35923 static {
35924 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
35925 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35926 /* major= */ 4,
35927 /* minor= */ 29,
35928 /* patch= */ 3,
35929 /* suffix= */ "",
35930 Sequence.class.getName());
35931 }
35932 // Use Sequence.newBuilder() to construct.
35933 private Sequence(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35934 super(builder);
35935 }
35936 private Sequence() {
35937 }
35938
35939 public static final com.google.protobuf.Descriptors.Descriptor
35940 getDescriptor() {
35941 return onnx.OnnxMl.internal_static_onnx_TypeProto_Sequence_descriptor;
35942 }
35943
35944 @java.lang.Override
35945 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
35946 internalGetFieldAccessorTable() {
35947 return onnx.OnnxMl.internal_static_onnx_TypeProto_Sequence_fieldAccessorTable
35948 .ensureFieldAccessorsInitialized(
35949 onnx.OnnxMl.TypeProto.Sequence.class, onnx.OnnxMl.TypeProto.Sequence.Builder.class);
35950 }
35951
35952 private int bitField0_;
35953 public static final int ELEM_TYPE_FIELD_NUMBER = 1;
35954 private onnx.OnnxMl.TypeProto elemType_;
35955 /**
35956 * <pre>
35957 * The type and optional shape of each element of the sequence.
35958 * This field MUST be present for this version of the IR.
35959 * </pre>
35960 *
35961 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35962 * @return Whether the elemType field is set.
35963 */
35964 @java.lang.Override
35965 public boolean hasElemType() {
35966 return ((bitField0_ & 0x00000001) != 0);
35967 }
35968 /**
35969 * <pre>
35970 * The type and optional shape of each element of the sequence.
35971 * This field MUST be present for this version of the IR.
35972 * </pre>
35973 *
35974 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35975 * @return The elemType.
35976 */
35977 @java.lang.Override
35978 public onnx.OnnxMl.TypeProto getElemType() {
35979 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
35980 }
35981 /**
35982 * <pre>
35983 * The type and optional shape of each element of the sequence.
35984 * This field MUST be present for this version of the IR.
35985 * </pre>
35986 *
35987 * <code>optional .onnx.TypeProto elem_type = 1;</code>
35988 */
35989 @java.lang.Override
35990 public onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder() {
35991 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
35992 }
35993
35994 private byte memoizedIsInitialized = -1;
35995 @java.lang.Override
35996 public final boolean isInitialized() {
35997 byte isInitialized = memoizedIsInitialized;
35998 if (isInitialized == 1) return true;
35999 if (isInitialized == 0) return false;
36000
36001 memoizedIsInitialized = 1;
36002 return true;
36003 }
36004
36005 @java.lang.Override
36006 public void writeTo(com.google.protobuf.CodedOutputStream output)
36007 throws java.io.IOException {
36008 if (((bitField0_ & 0x00000001) != 0)) {
36009 output.writeMessage(1, getElemType());
36010 }
36011 getUnknownFields().writeTo(output);
36012 }
36013
36014 @java.lang.Override
36015 public int getSerializedSize() {
36016 int size = memoizedSize;
36017 if (size != -1) return size;
36018
36019 size = 0;
36020 if (((bitField0_ & 0x00000001) != 0)) {
36021 size += com.google.protobuf.CodedOutputStream
36022 .computeMessageSize(1, getElemType());
36023 }
36024 size += getUnknownFields().getSerializedSize();
36025 memoizedSize = size;
36026 return size;
36027 }
36028
36029 @java.lang.Override
36030 public boolean equals(final java.lang.Object obj) {
36031 if (obj == this) {
36032 return true;
36033 }
36034 if (!(obj instanceof onnx.OnnxMl.TypeProto.Sequence)) {
36035 return super.equals(obj);
36036 }
36037 onnx.OnnxMl.TypeProto.Sequence other = (onnx.OnnxMl.TypeProto.Sequence) obj;
36038
36039 if (hasElemType() != other.hasElemType()) return false;
36040 if (hasElemType()) {
36041 if (!getElemType()
36042 .equals(other.getElemType())) return false;
36043 }
36044 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
36045 return true;
36046 }
36047
36048 @java.lang.Override
36049 public int hashCode() {
36050 if (memoizedHashCode != 0) {
36051 return memoizedHashCode;
36052 }
36053 int hash = 41;
36054 hash = (19 * hash) + getDescriptor().hashCode();
36055 if (hasElemType()) {
36056 hash = (37 * hash) + ELEM_TYPE_FIELD_NUMBER;
36057 hash = (53 * hash) + getElemType().hashCode();
36058 }
36059 hash = (29 * hash) + getUnknownFields().hashCode();
36060 memoizedHashCode = hash;
36061 return hash;
36062 }
36063
36064 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36065 java.nio.ByteBuffer data)
36066 throws com.google.protobuf.InvalidProtocolBufferException {
36067 return PARSER.parseFrom(data);
36068 }
36069 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36070 java.nio.ByteBuffer data,
36071 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36072 throws com.google.protobuf.InvalidProtocolBufferException {
36073 return PARSER.parseFrom(data, extensionRegistry);
36074 }
36075 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36076 com.google.protobuf.ByteString data)
36077 throws com.google.protobuf.InvalidProtocolBufferException {
36078 return PARSER.parseFrom(data);
36079 }
36080 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36081 com.google.protobuf.ByteString data,
36082 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36083 throws com.google.protobuf.InvalidProtocolBufferException {
36084 return PARSER.parseFrom(data, extensionRegistry);
36085 }
36086 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(byte[] data)
36087 throws com.google.protobuf.InvalidProtocolBufferException {
36088 return PARSER.parseFrom(data);
36089 }
36090 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36091 byte[] data,
36092 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36093 throws com.google.protobuf.InvalidProtocolBufferException {
36094 return PARSER.parseFrom(data, extensionRegistry);
36095 }
36096 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(java.io.InputStream input)
36097 throws java.io.IOException {
36098 return com.google.protobuf.GeneratedMessage
36099 .parseWithIOException(PARSER, input);
36100 }
36101 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36102 java.io.InputStream input,
36103 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36104 throws java.io.IOException {
36105 return com.google.protobuf.GeneratedMessage
36106 .parseWithIOException(PARSER, input, extensionRegistry);
36107 }
36108
36109 public static onnx.OnnxMl.TypeProto.Sequence parseDelimitedFrom(java.io.InputStream input)
36110 throws java.io.IOException {
36111 return com.google.protobuf.GeneratedMessage
36112 .parseDelimitedWithIOException(PARSER, input);
36113 }
36114
36115 public static onnx.OnnxMl.TypeProto.Sequence parseDelimitedFrom(
36116 java.io.InputStream input,
36117 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36118 throws java.io.IOException {
36119 return com.google.protobuf.GeneratedMessage
36120 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
36121 }
36122 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36123 com.google.protobuf.CodedInputStream input)
36124 throws java.io.IOException {
36125 return com.google.protobuf.GeneratedMessage
36126 .parseWithIOException(PARSER, input);
36127 }
36128 public static onnx.OnnxMl.TypeProto.Sequence parseFrom(
36129 com.google.protobuf.CodedInputStream input,
36130 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36131 throws java.io.IOException {
36132 return com.google.protobuf.GeneratedMessage
36133 .parseWithIOException(PARSER, input, extensionRegistry);
36134 }
36135
36136 @java.lang.Override
36137 public Builder newBuilderForType() { return newBuilder(); }
36138 public static Builder newBuilder() {
36139 return DEFAULT_INSTANCE.toBuilder();
36140 }
36141 public static Builder newBuilder(onnx.OnnxMl.TypeProto.Sequence prototype) {
36142 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
36143 }
36144 @java.lang.Override
36145 public Builder toBuilder() {
36146 return this == DEFAULT_INSTANCE
36147 ? new Builder() : new Builder().mergeFrom(this);
36148 }
36149
36150 @java.lang.Override
36151 protected Builder newBuilderForType(
36152 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
36153 Builder builder = new Builder(parent);
36154 return builder;
36155 }
36156 /**
36157 * <pre>
36158 * repeated T
36159 * </pre>
36160 *
36161 * Protobuf type {@code onnx.TypeProto.Sequence}
36162 */
36163 public static final class Builder extends
36164 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
36165 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.Sequence)
36166 onnx.OnnxMl.TypeProto.SequenceOrBuilder {
36167 public static final com.google.protobuf.Descriptors.Descriptor
36168 getDescriptor() {
36169 return onnx.OnnxMl.internal_static_onnx_TypeProto_Sequence_descriptor;
36170 }
36171
36172 @java.lang.Override
36173 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
36174 internalGetFieldAccessorTable() {
36175 return onnx.OnnxMl.internal_static_onnx_TypeProto_Sequence_fieldAccessorTable
36176 .ensureFieldAccessorsInitialized(
36177 onnx.OnnxMl.TypeProto.Sequence.class, onnx.OnnxMl.TypeProto.Sequence.Builder.class);
36178 }
36179
36180 // Construct using onnx.OnnxMl.TypeProto.Sequence.newBuilder()
36181 private Builder() {
36182 maybeForceBuilderInitialization();
36183 }
36184
36185 private Builder(
36186 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
36187 super(parent);
36188 maybeForceBuilderInitialization();
36189 }
36190 private void maybeForceBuilderInitialization() {
36191 if (com.google.protobuf.GeneratedMessage
36192 .alwaysUseFieldBuilders) {
36193 getElemTypeFieldBuilder();
36194 }
36195 }
36196 @java.lang.Override
36197 public Builder clear() {
36198 super.clear();
36199 bitField0_ = 0;
36200 elemType_ = null;
36201 if (elemTypeBuilder_ != null) {
36202 elemTypeBuilder_.dispose();
36203 elemTypeBuilder_ = null;
36204 }
36205 return this;
36206 }
36207
36208 @java.lang.Override
36209 public com.google.protobuf.Descriptors.Descriptor
36210 getDescriptorForType() {
36211 return onnx.OnnxMl.internal_static_onnx_TypeProto_Sequence_descriptor;
36212 }
36213
36214 @java.lang.Override
36215 public onnx.OnnxMl.TypeProto.Sequence getDefaultInstanceForType() {
36216 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
36217 }
36218
36219 @java.lang.Override
36220 public onnx.OnnxMl.TypeProto.Sequence build() {
36221 onnx.OnnxMl.TypeProto.Sequence result = buildPartial();
36222 if (!result.isInitialized()) {
36223 throw newUninitializedMessageException(result);
36224 }
36225 return result;
36226 }
36227
36228 @java.lang.Override
36229 public onnx.OnnxMl.TypeProto.Sequence buildPartial() {
36230 onnx.OnnxMl.TypeProto.Sequence result = new onnx.OnnxMl.TypeProto.Sequence(this);
36231 if (bitField0_ != 0) { buildPartial0(result); }
36232 onBuilt();
36233 return result;
36234 }
36235
36236 private void buildPartial0(onnx.OnnxMl.TypeProto.Sequence result) {
36237 int from_bitField0_ = bitField0_;
36238 int to_bitField0_ = 0;
36239 if (((from_bitField0_ & 0x00000001) != 0)) {
36240 result.elemType_ = elemTypeBuilder_ == null
36241 ? elemType_
36242 : elemTypeBuilder_.build();
36243 to_bitField0_ |= 0x00000001;
36244 }
36245 result.bitField0_ |= to_bitField0_;
36246 }
36247
36248 @java.lang.Override
36249 public Builder mergeFrom(com.google.protobuf.Message other) {
36250 if (other instanceof onnx.OnnxMl.TypeProto.Sequence) {
36251 return mergeFrom((onnx.OnnxMl.TypeProto.Sequence)other);
36252 } else {
36253 super.mergeFrom(other);
36254 return this;
36255 }
36256 }
36257
36258 public Builder mergeFrom(onnx.OnnxMl.TypeProto.Sequence other) {
36259 if (other == onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance()) return this;
36260 if (other.hasElemType()) {
36261 mergeElemType(other.getElemType());
36262 }
36263 this.mergeUnknownFields(other.getUnknownFields());
36264 onChanged();
36265 return this;
36266 }
36267
36268 @java.lang.Override
36269 public final boolean isInitialized() {
36270 return true;
36271 }
36272
36273 @java.lang.Override
36274 public Builder mergeFrom(
36275 com.google.protobuf.CodedInputStream input,
36276 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36277 throws java.io.IOException {
36278 if (extensionRegistry == null) {
36279 throw new java.lang.NullPointerException();
36280 }
36281 try {
36282 boolean done = false;
36283 while (!done) {
36284 int tag = input.readTag();
36285 switch (tag) {
36286 case 0:
36287 done = true;
36288 break;
36289 case 10: {
36290 input.readMessage(
36291 getElemTypeFieldBuilder().getBuilder(),
36292 extensionRegistry);
36293 bitField0_ |= 0x00000001;
36294 break;
36295 } // case 10
36296 default: {
36297 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
36298 done = true; // was an endgroup tag
36299 }
36300 break;
36301 } // default:
36302 } // switch (tag)
36303 } // while (!done)
36304 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
36305 throw e.unwrapIOException();
36306 } finally {
36307 onChanged();
36308 } // finally
36309 return this;
36310 }
36311 private int bitField0_;
36312
36313 private onnx.OnnxMl.TypeProto elemType_;
36314 private com.google.protobuf.SingleFieldBuilder<
36315 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> elemTypeBuilder_;
36316 /**
36317 * <pre>
36318 * The type and optional shape of each element of the sequence.
36319 * This field MUST be present for this version of the IR.
36320 * </pre>
36321 *
36322 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36323 * @return Whether the elemType field is set.
36324 */
36325 public boolean hasElemType() {
36326 return ((bitField0_ & 0x00000001) != 0);
36327 }
36328 /**
36329 * <pre>
36330 * The type and optional shape of each element of the sequence.
36331 * This field MUST be present for this version of the IR.
36332 * </pre>
36333 *
36334 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36335 * @return The elemType.
36336 */
36337 public onnx.OnnxMl.TypeProto getElemType() {
36338 if (elemTypeBuilder_ == null) {
36339 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
36340 } else {
36341 return elemTypeBuilder_.getMessage();
36342 }
36343 }
36344 /**
36345 * <pre>
36346 * The type and optional shape of each element of the sequence.
36347 * This field MUST be present for this version of the IR.
36348 * </pre>
36349 *
36350 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36351 */
36352 public Builder setElemType(onnx.OnnxMl.TypeProto value) {
36353 if (elemTypeBuilder_ == null) {
36354 if (value == null) {
36355 throw new NullPointerException();
36356 }
36357 elemType_ = value;
36358 } else {
36359 elemTypeBuilder_.setMessage(value);
36360 }
36361 bitField0_ |= 0x00000001;
36362 onChanged();
36363 return this;
36364 }
36365 /**
36366 * <pre>
36367 * The type and optional shape of each element of the sequence.
36368 * This field MUST be present for this version of the IR.
36369 * </pre>
36370 *
36371 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36372 */
36373 public Builder setElemType(
36374 onnx.OnnxMl.TypeProto.Builder builderForValue) {
36375 if (elemTypeBuilder_ == null) {
36376 elemType_ = builderForValue.build();
36377 } else {
36378 elemTypeBuilder_.setMessage(builderForValue.build());
36379 }
36380 bitField0_ |= 0x00000001;
36381 onChanged();
36382 return this;
36383 }
36384 /**
36385 * <pre>
36386 * The type and optional shape of each element of the sequence.
36387 * This field MUST be present for this version of the IR.
36388 * </pre>
36389 *
36390 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36391 */
36392 public Builder mergeElemType(onnx.OnnxMl.TypeProto value) {
36393 if (elemTypeBuilder_ == null) {
36394 if (((bitField0_ & 0x00000001) != 0) &&
36395 elemType_ != null &&
36396 elemType_ != onnx.OnnxMl.TypeProto.getDefaultInstance()) {
36397 getElemTypeBuilder().mergeFrom(value);
36398 } else {
36399 elemType_ = value;
36400 }
36401 } else {
36402 elemTypeBuilder_.mergeFrom(value);
36403 }
36404 if (elemType_ != null) {
36405 bitField0_ |= 0x00000001;
36406 onChanged();
36407 }
36408 return this;
36409 }
36410 /**
36411 * <pre>
36412 * The type and optional shape of each element of the sequence.
36413 * This field MUST be present for this version of the IR.
36414 * </pre>
36415 *
36416 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36417 */
36418 public Builder clearElemType() {
36419 bitField0_ = (bitField0_ & ~0x00000001);
36420 elemType_ = null;
36421 if (elemTypeBuilder_ != null) {
36422 elemTypeBuilder_.dispose();
36423 elemTypeBuilder_ = null;
36424 }
36425 onChanged();
36426 return this;
36427 }
36428 /**
36429 * <pre>
36430 * The type and optional shape of each element of the sequence.
36431 * This field MUST be present for this version of the IR.
36432 * </pre>
36433 *
36434 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36435 */
36436 public onnx.OnnxMl.TypeProto.Builder getElemTypeBuilder() {
36437 bitField0_ |= 0x00000001;
36438 onChanged();
36439 return getElemTypeFieldBuilder().getBuilder();
36440 }
36441 /**
36442 * <pre>
36443 * The type and optional shape of each element of the sequence.
36444 * This field MUST be present for this version of the IR.
36445 * </pre>
36446 *
36447 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36448 */
36449 public onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder() {
36450 if (elemTypeBuilder_ != null) {
36451 return elemTypeBuilder_.getMessageOrBuilder();
36452 } else {
36453 return elemType_ == null ?
36454 onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
36455 }
36456 }
36457 /**
36458 * <pre>
36459 * The type and optional shape of each element of the sequence.
36460 * This field MUST be present for this version of the IR.
36461 * </pre>
36462 *
36463 * <code>optional .onnx.TypeProto elem_type = 1;</code>
36464 */
36465 private com.google.protobuf.SingleFieldBuilder<
36466 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
36467 getElemTypeFieldBuilder() {
36468 if (elemTypeBuilder_ == null) {
36469 elemTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
36470 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
36471 getElemType(),
36472 getParentForChildren(),
36473 isClean());
36474 elemType_ = null;
36475 }
36476 return elemTypeBuilder_;
36477 }
36478
36479 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.Sequence)
36480 }
36481
36482 // @@protoc_insertion_point(class_scope:onnx.TypeProto.Sequence)
36483 private static final onnx.OnnxMl.TypeProto.Sequence DEFAULT_INSTANCE;
36484 static {
36485 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.Sequence();
36486 }
36487
36488 public static onnx.OnnxMl.TypeProto.Sequence getDefaultInstance() {
36489 return DEFAULT_INSTANCE;
36490 }
36491
36492 private static final com.google.protobuf.Parser<Sequence>
36493 PARSER = new com.google.protobuf.AbstractParser<Sequence>() {
36494 @java.lang.Override
36495 public Sequence parsePartialFrom(
36496 com.google.protobuf.CodedInputStream input,
36497 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36498 throws com.google.protobuf.InvalidProtocolBufferException {
36499 Builder builder = newBuilder();
36500 try {
36501 builder.mergeFrom(input, extensionRegistry);
36502 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
36503 throw e.setUnfinishedMessage(builder.buildPartial());
36504 } catch (com.google.protobuf.UninitializedMessageException e) {
36505 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
36506 } catch (java.io.IOException e) {
36507 throw new com.google.protobuf.InvalidProtocolBufferException(e)
36508 .setUnfinishedMessage(builder.buildPartial());
36509 }
36510 return builder.buildPartial();
36511 }
36512 };
36513
36514 public static com.google.protobuf.Parser<Sequence> parser() {
36515 return PARSER;
36516 }
36517
36518 @java.lang.Override
36519 public com.google.protobuf.Parser<Sequence> getParserForType() {
36520 return PARSER;
36521 }
36522
36523 @java.lang.Override
36524 public onnx.OnnxMl.TypeProto.Sequence getDefaultInstanceForType() {
36525 return DEFAULT_INSTANCE;
36526 }
36527
36528 }
36529
36530 public interface MapOrBuilder extends
36531 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.Map)
36532 com.google.protobuf.MessageOrBuilder {
36533
36534 /**
36535 * <pre>
36536 * This field MUST have a valid TensorProto.DataType value
36537 * This field MUST be present for this version of the IR.
36538 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
36539 * </pre>
36540 *
36541 * <code>optional int32 key_type = 1;</code>
36542 * @return Whether the keyType field is set.
36543 */
36544 boolean hasKeyType();
36545 /**
36546 * <pre>
36547 * This field MUST have a valid TensorProto.DataType value
36548 * This field MUST be present for this version of the IR.
36549 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
36550 * </pre>
36551 *
36552 * <code>optional int32 key_type = 1;</code>
36553 * @return The keyType.
36554 */
36555 int getKeyType();
36556
36557 /**
36558 * <pre>
36559 * This field MUST be present for this version of the IR.
36560 * </pre>
36561 *
36562 * <code>optional .onnx.TypeProto value_type = 2;</code>
36563 * @return Whether the valueType field is set.
36564 */
36565 boolean hasValueType();
36566 /**
36567 * <pre>
36568 * This field MUST be present for this version of the IR.
36569 * </pre>
36570 *
36571 * <code>optional .onnx.TypeProto value_type = 2;</code>
36572 * @return The valueType.
36573 */
36574 onnx.OnnxMl.TypeProto getValueType();
36575 /**
36576 * <pre>
36577 * This field MUST be present for this version of the IR.
36578 * </pre>
36579 *
36580 * <code>optional .onnx.TypeProto value_type = 2;</code>
36581 */
36582 onnx.OnnxMl.TypeProtoOrBuilder getValueTypeOrBuilder();
36583 }
36584 /**
36585 * <pre>
36586 * map<K,V>
36587 * </pre>
36588 *
36589 * Protobuf type {@code onnx.TypeProto.Map}
36590 */
36591 public static final class Map extends
36592 com.google.protobuf.GeneratedMessage implements
36593 // @@protoc_insertion_point(message_implements:onnx.TypeProto.Map)
36594 MapOrBuilder {
36595 private static final long serialVersionUID = 0L;
36596 static {
36597 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
36598 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
36599 /* major= */ 4,
36600 /* minor= */ 29,
36601 /* patch= */ 3,
36602 /* suffix= */ "",
36603 Map.class.getName());
36604 }
36605 // Use Map.newBuilder() to construct.
36606 private Map(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
36607 super(builder);
36608 }
36609 private Map() {
36610 }
36611
36612 public static final com.google.protobuf.Descriptors.Descriptor
36613 getDescriptor() {
36614 return onnx.OnnxMl.internal_static_onnx_TypeProto_Map_descriptor;
36615 }
36616
36617 @java.lang.Override
36618 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
36619 internalGetFieldAccessorTable() {
36620 return onnx.OnnxMl.internal_static_onnx_TypeProto_Map_fieldAccessorTable
36621 .ensureFieldAccessorsInitialized(
36622 onnx.OnnxMl.TypeProto.Map.class, onnx.OnnxMl.TypeProto.Map.Builder.class);
36623 }
36624
36625 private int bitField0_;
36626 public static final int KEY_TYPE_FIELD_NUMBER = 1;
36627 private int keyType_ = 0;
36628 /**
36629 * <pre>
36630 * This field MUST have a valid TensorProto.DataType value
36631 * This field MUST be present for this version of the IR.
36632 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
36633 * </pre>
36634 *
36635 * <code>optional int32 key_type = 1;</code>
36636 * @return Whether the keyType field is set.
36637 */
36638 @java.lang.Override
36639 public boolean hasKeyType() {
36640 return ((bitField0_ & 0x00000001) != 0);
36641 }
36642 /**
36643 * <pre>
36644 * This field MUST have a valid TensorProto.DataType value
36645 * This field MUST be present for this version of the IR.
36646 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
36647 * </pre>
36648 *
36649 * <code>optional int32 key_type = 1;</code>
36650 * @return The keyType.
36651 */
36652 @java.lang.Override
36653 public int getKeyType() {
36654 return keyType_;
36655 }
36656
36657 public static final int VALUE_TYPE_FIELD_NUMBER = 2;
36658 private onnx.OnnxMl.TypeProto valueType_;
36659 /**
36660 * <pre>
36661 * This field MUST be present for this version of the IR.
36662 * </pre>
36663 *
36664 * <code>optional .onnx.TypeProto value_type = 2;</code>
36665 * @return Whether the valueType field is set.
36666 */
36667 @java.lang.Override
36668 public boolean hasValueType() {
36669 return ((bitField0_ & 0x00000002) != 0);
36670 }
36671 /**
36672 * <pre>
36673 * This field MUST be present for this version of the IR.
36674 * </pre>
36675 *
36676 * <code>optional .onnx.TypeProto value_type = 2;</code>
36677 * @return The valueType.
36678 */
36679 @java.lang.Override
36680 public onnx.OnnxMl.TypeProto getValueType() {
36681 return valueType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : valueType_;
36682 }
36683 /**
36684 * <pre>
36685 * This field MUST be present for this version of the IR.
36686 * </pre>
36687 *
36688 * <code>optional .onnx.TypeProto value_type = 2;</code>
36689 */
36690 @java.lang.Override
36691 public onnx.OnnxMl.TypeProtoOrBuilder getValueTypeOrBuilder() {
36692 return valueType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : valueType_;
36693 }
36694
36695 private byte memoizedIsInitialized = -1;
36696 @java.lang.Override
36697 public final boolean isInitialized() {
36698 byte isInitialized = memoizedIsInitialized;
36699 if (isInitialized == 1) return true;
36700 if (isInitialized == 0) return false;
36701
36702 memoizedIsInitialized = 1;
36703 return true;
36704 }
36705
36706 @java.lang.Override
36707 public void writeTo(com.google.protobuf.CodedOutputStream output)
36708 throws java.io.IOException {
36709 if (((bitField0_ & 0x00000001) != 0)) {
36710 output.writeInt32(1, keyType_);
36711 }
36712 if (((bitField0_ & 0x00000002) != 0)) {
36713 output.writeMessage(2, getValueType());
36714 }
36715 getUnknownFields().writeTo(output);
36716 }
36717
36718 @java.lang.Override
36719 public int getSerializedSize() {
36720 int size = memoizedSize;
36721 if (size != -1) return size;
36722
36723 size = 0;
36724 if (((bitField0_ & 0x00000001) != 0)) {
36725 size += com.google.protobuf.CodedOutputStream
36726 .computeInt32Size(1, keyType_);
36727 }
36728 if (((bitField0_ & 0x00000002) != 0)) {
36729 size += com.google.protobuf.CodedOutputStream
36730 .computeMessageSize(2, getValueType());
36731 }
36732 size += getUnknownFields().getSerializedSize();
36733 memoizedSize = size;
36734 return size;
36735 }
36736
36737 @java.lang.Override
36738 public boolean equals(final java.lang.Object obj) {
36739 if (obj == this) {
36740 return true;
36741 }
36742 if (!(obj instanceof onnx.OnnxMl.TypeProto.Map)) {
36743 return super.equals(obj);
36744 }
36745 onnx.OnnxMl.TypeProto.Map other = (onnx.OnnxMl.TypeProto.Map) obj;
36746
36747 if (hasKeyType() != other.hasKeyType()) return false;
36748 if (hasKeyType()) {
36749 if (getKeyType()
36750 != other.getKeyType()) return false;
36751 }
36752 if (hasValueType() != other.hasValueType()) return false;
36753 if (hasValueType()) {
36754 if (!getValueType()
36755 .equals(other.getValueType())) return false;
36756 }
36757 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
36758 return true;
36759 }
36760
36761 @java.lang.Override
36762 public int hashCode() {
36763 if (memoizedHashCode != 0) {
36764 return memoizedHashCode;
36765 }
36766 int hash = 41;
36767 hash = (19 * hash) + getDescriptor().hashCode();
36768 if (hasKeyType()) {
36769 hash = (37 * hash) + KEY_TYPE_FIELD_NUMBER;
36770 hash = (53 * hash) + getKeyType();
36771 }
36772 if (hasValueType()) {
36773 hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER;
36774 hash = (53 * hash) + getValueType().hashCode();
36775 }
36776 hash = (29 * hash) + getUnknownFields().hashCode();
36777 memoizedHashCode = hash;
36778 return hash;
36779 }
36780
36781 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36782 java.nio.ByteBuffer data)
36783 throws com.google.protobuf.InvalidProtocolBufferException {
36784 return PARSER.parseFrom(data);
36785 }
36786 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36787 java.nio.ByteBuffer data,
36788 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36789 throws com.google.protobuf.InvalidProtocolBufferException {
36790 return PARSER.parseFrom(data, extensionRegistry);
36791 }
36792 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36793 com.google.protobuf.ByteString data)
36794 throws com.google.protobuf.InvalidProtocolBufferException {
36795 return PARSER.parseFrom(data);
36796 }
36797 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36798 com.google.protobuf.ByteString data,
36799 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36800 throws com.google.protobuf.InvalidProtocolBufferException {
36801 return PARSER.parseFrom(data, extensionRegistry);
36802 }
36803 public static onnx.OnnxMl.TypeProto.Map parseFrom(byte[] data)
36804 throws com.google.protobuf.InvalidProtocolBufferException {
36805 return PARSER.parseFrom(data);
36806 }
36807 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36808 byte[] data,
36809 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36810 throws com.google.protobuf.InvalidProtocolBufferException {
36811 return PARSER.parseFrom(data, extensionRegistry);
36812 }
36813 public static onnx.OnnxMl.TypeProto.Map parseFrom(java.io.InputStream input)
36814 throws java.io.IOException {
36815 return com.google.protobuf.GeneratedMessage
36816 .parseWithIOException(PARSER, input);
36817 }
36818 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36819 java.io.InputStream input,
36820 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36821 throws java.io.IOException {
36822 return com.google.protobuf.GeneratedMessage
36823 .parseWithIOException(PARSER, input, extensionRegistry);
36824 }
36825
36826 public static onnx.OnnxMl.TypeProto.Map parseDelimitedFrom(java.io.InputStream input)
36827 throws java.io.IOException {
36828 return com.google.protobuf.GeneratedMessage
36829 .parseDelimitedWithIOException(PARSER, input);
36830 }
36831
36832 public static onnx.OnnxMl.TypeProto.Map parseDelimitedFrom(
36833 java.io.InputStream input,
36834 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36835 throws java.io.IOException {
36836 return com.google.protobuf.GeneratedMessage
36837 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
36838 }
36839 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36840 com.google.protobuf.CodedInputStream input)
36841 throws java.io.IOException {
36842 return com.google.protobuf.GeneratedMessage
36843 .parseWithIOException(PARSER, input);
36844 }
36845 public static onnx.OnnxMl.TypeProto.Map parseFrom(
36846 com.google.protobuf.CodedInputStream input,
36847 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
36848 throws java.io.IOException {
36849 return com.google.protobuf.GeneratedMessage
36850 .parseWithIOException(PARSER, input, extensionRegistry);
36851 }
36852
36853 @java.lang.Override
36854 public Builder newBuilderForType() { return newBuilder(); }
36855 public static Builder newBuilder() {
36856 return DEFAULT_INSTANCE.toBuilder();
36857 }
36858 public static Builder newBuilder(onnx.OnnxMl.TypeProto.Map prototype) {
36859 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
36860 }
36861 @java.lang.Override
36862 public Builder toBuilder() {
36863 return this == DEFAULT_INSTANCE
36864 ? new Builder() : new Builder().mergeFrom(this);
36865 }
36866
36867 @java.lang.Override
36868 protected Builder newBuilderForType(
36869 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
36870 Builder builder = new Builder(parent);
36871 return builder;
36872 }
36873 /**
36874 * <pre>
36875 * map<K,V>
36876 * </pre>
36877 *
36878 * Protobuf type {@code onnx.TypeProto.Map}
36879 */
36880 public static final class Builder extends
36881 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
36882 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.Map)
36883 onnx.OnnxMl.TypeProto.MapOrBuilder {
36884 public static final com.google.protobuf.Descriptors.Descriptor
36885 getDescriptor() {
36886 return onnx.OnnxMl.internal_static_onnx_TypeProto_Map_descriptor;
36887 }
36888
36889 @java.lang.Override
36890 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
36891 internalGetFieldAccessorTable() {
36892 return onnx.OnnxMl.internal_static_onnx_TypeProto_Map_fieldAccessorTable
36893 .ensureFieldAccessorsInitialized(
36894 onnx.OnnxMl.TypeProto.Map.class, onnx.OnnxMl.TypeProto.Map.Builder.class);
36895 }
36896
36897 // Construct using onnx.OnnxMl.TypeProto.Map.newBuilder()
36898 private Builder() {
36899 maybeForceBuilderInitialization();
36900 }
36901
36902 private Builder(
36903 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
36904 super(parent);
36905 maybeForceBuilderInitialization();
36906 }
36907 private void maybeForceBuilderInitialization() {
36908 if (com.google.protobuf.GeneratedMessage
36909 .alwaysUseFieldBuilders) {
36910 getValueTypeFieldBuilder();
36911 }
36912 }
36913 @java.lang.Override
36914 public Builder clear() {
36915 super.clear();
36916 bitField0_ = 0;
36917 keyType_ = 0;
36918 valueType_ = null;
36919 if (valueTypeBuilder_ != null) {
36920 valueTypeBuilder_.dispose();
36921 valueTypeBuilder_ = null;
36922 }
36923 return this;
36924 }
36925
36926 @java.lang.Override
36927 public com.google.protobuf.Descriptors.Descriptor
36928 getDescriptorForType() {
36929 return onnx.OnnxMl.internal_static_onnx_TypeProto_Map_descriptor;
36930 }
36931
36932 @java.lang.Override
36933 public onnx.OnnxMl.TypeProto.Map getDefaultInstanceForType() {
36934 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
36935 }
36936
36937 @java.lang.Override
36938 public onnx.OnnxMl.TypeProto.Map build() {
36939 onnx.OnnxMl.TypeProto.Map result = buildPartial();
36940 if (!result.isInitialized()) {
36941 throw newUninitializedMessageException(result);
36942 }
36943 return result;
36944 }
36945
36946 @java.lang.Override
36947 public onnx.OnnxMl.TypeProto.Map buildPartial() {
36948 onnx.OnnxMl.TypeProto.Map result = new onnx.OnnxMl.TypeProto.Map(this);
36949 if (bitField0_ != 0) { buildPartial0(result); }
36950 onBuilt();
36951 return result;
36952 }
36953
36954 private void buildPartial0(onnx.OnnxMl.TypeProto.Map result) {
36955 int from_bitField0_ = bitField0_;
36956 int to_bitField0_ = 0;
36957 if (((from_bitField0_ & 0x00000001) != 0)) {
36958 result.keyType_ = keyType_;
36959 to_bitField0_ |= 0x00000001;
36960 }
36961 if (((from_bitField0_ & 0x00000002) != 0)) {
36962 result.valueType_ = valueTypeBuilder_ == null
36963 ? valueType_
36964 : valueTypeBuilder_.build();
36965 to_bitField0_ |= 0x00000002;
36966 }
36967 result.bitField0_ |= to_bitField0_;
36968 }
36969
36970 @java.lang.Override
36971 public Builder mergeFrom(com.google.protobuf.Message other) {
36972 if (other instanceof onnx.OnnxMl.TypeProto.Map) {
36973 return mergeFrom((onnx.OnnxMl.TypeProto.Map)other);
36974 } else {
36975 super.mergeFrom(other);
36976 return this;
36977 }
36978 }
36979
36980 public Builder mergeFrom(onnx.OnnxMl.TypeProto.Map other) {
36981 if (other == onnx.OnnxMl.TypeProto.Map.getDefaultInstance()) return this;
36982 if (other.hasKeyType()) {
36983 setKeyType(other.getKeyType());
36984 }
36985 if (other.hasValueType()) {
36986 mergeValueType(other.getValueType());
36987 }
36988 this.mergeUnknownFields(other.getUnknownFields());
36989 onChanged();
36990 return this;
36991 }
36992
36993 @java.lang.Override
36994 public final boolean isInitialized() {
36995 return true;
36996 }
36997
36998 @java.lang.Override
36999 public Builder mergeFrom(
37000 com.google.protobuf.CodedInputStream input,
37001 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37002 throws java.io.IOException {
37003 if (extensionRegistry == null) {
37004 throw new java.lang.NullPointerException();
37005 }
37006 try {
37007 boolean done = false;
37008 while (!done) {
37009 int tag = input.readTag();
37010 switch (tag) {
37011 case 0:
37012 done = true;
37013 break;
37014 case 8: {
37015 keyType_ = input.readInt32();
37016 bitField0_ |= 0x00000001;
37017 break;
37018 } // case 8
37019 case 18: {
37020 input.readMessage(
37021 getValueTypeFieldBuilder().getBuilder(),
37022 extensionRegistry);
37023 bitField0_ |= 0x00000002;
37024 break;
37025 } // case 18
37026 default: {
37027 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
37028 done = true; // was an endgroup tag
37029 }
37030 break;
37031 } // default:
37032 } // switch (tag)
37033 } // while (!done)
37034 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
37035 throw e.unwrapIOException();
37036 } finally {
37037 onChanged();
37038 } // finally
37039 return this;
37040 }
37041 private int bitField0_;
37042
37043 private int keyType_ ;
37044 /**
37045 * <pre>
37046 * This field MUST have a valid TensorProto.DataType value
37047 * This field MUST be present for this version of the IR.
37048 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
37049 * </pre>
37050 *
37051 * <code>optional int32 key_type = 1;</code>
37052 * @return Whether the keyType field is set.
37053 */
37054 @java.lang.Override
37055 public boolean hasKeyType() {
37056 return ((bitField0_ & 0x00000001) != 0);
37057 }
37058 /**
37059 * <pre>
37060 * This field MUST have a valid TensorProto.DataType value
37061 * This field MUST be present for this version of the IR.
37062 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
37063 * </pre>
37064 *
37065 * <code>optional int32 key_type = 1;</code>
37066 * @return The keyType.
37067 */
37068 @java.lang.Override
37069 public int getKeyType() {
37070 return keyType_;
37071 }
37072 /**
37073 * <pre>
37074 * This field MUST have a valid TensorProto.DataType value
37075 * This field MUST be present for this version of the IR.
37076 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
37077 * </pre>
37078 *
37079 * <code>optional int32 key_type = 1;</code>
37080 * @param value The keyType to set.
37081 * @return This builder for chaining.
37082 */
37083 public Builder setKeyType(int value) {
37084
37085 keyType_ = value;
37086 bitField0_ |= 0x00000001;
37087 onChanged();
37088 return this;
37089 }
37090 /**
37091 * <pre>
37092 * This field MUST have a valid TensorProto.DataType value
37093 * This field MUST be present for this version of the IR.
37094 * This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING
37095 * </pre>
37096 *
37097 * <code>optional int32 key_type = 1;</code>
37098 * @return This builder for chaining.
37099 */
37100 public Builder clearKeyType() {
37101 bitField0_ = (bitField0_ & ~0x00000001);
37102 keyType_ = 0;
37103 onChanged();
37104 return this;
37105 }
37106
37107 private onnx.OnnxMl.TypeProto valueType_;
37108 private com.google.protobuf.SingleFieldBuilder<
37109 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> valueTypeBuilder_;
37110 /**
37111 * <pre>
37112 * This field MUST be present for this version of the IR.
37113 * </pre>
37114 *
37115 * <code>optional .onnx.TypeProto value_type = 2;</code>
37116 * @return Whether the valueType field is set.
37117 */
37118 public boolean hasValueType() {
37119 return ((bitField0_ & 0x00000002) != 0);
37120 }
37121 /**
37122 * <pre>
37123 * This field MUST be present for this version of the IR.
37124 * </pre>
37125 *
37126 * <code>optional .onnx.TypeProto value_type = 2;</code>
37127 * @return The valueType.
37128 */
37129 public onnx.OnnxMl.TypeProto getValueType() {
37130 if (valueTypeBuilder_ == null) {
37131 return valueType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : valueType_;
37132 } else {
37133 return valueTypeBuilder_.getMessage();
37134 }
37135 }
37136 /**
37137 * <pre>
37138 * This field MUST be present for this version of the IR.
37139 * </pre>
37140 *
37141 * <code>optional .onnx.TypeProto value_type = 2;</code>
37142 */
37143 public Builder setValueType(onnx.OnnxMl.TypeProto value) {
37144 if (valueTypeBuilder_ == null) {
37145 if (value == null) {
37146 throw new NullPointerException();
37147 }
37148 valueType_ = value;
37149 } else {
37150 valueTypeBuilder_.setMessage(value);
37151 }
37152 bitField0_ |= 0x00000002;
37153 onChanged();
37154 return this;
37155 }
37156 /**
37157 * <pre>
37158 * This field MUST be present for this version of the IR.
37159 * </pre>
37160 *
37161 * <code>optional .onnx.TypeProto value_type = 2;</code>
37162 */
37163 public Builder setValueType(
37164 onnx.OnnxMl.TypeProto.Builder builderForValue) {
37165 if (valueTypeBuilder_ == null) {
37166 valueType_ = builderForValue.build();
37167 } else {
37168 valueTypeBuilder_.setMessage(builderForValue.build());
37169 }
37170 bitField0_ |= 0x00000002;
37171 onChanged();
37172 return this;
37173 }
37174 /**
37175 * <pre>
37176 * This field MUST be present for this version of the IR.
37177 * </pre>
37178 *
37179 * <code>optional .onnx.TypeProto value_type = 2;</code>
37180 */
37181 public Builder mergeValueType(onnx.OnnxMl.TypeProto value) {
37182 if (valueTypeBuilder_ == null) {
37183 if (((bitField0_ & 0x00000002) != 0) &&
37184 valueType_ != null &&
37185 valueType_ != onnx.OnnxMl.TypeProto.getDefaultInstance()) {
37186 getValueTypeBuilder().mergeFrom(value);
37187 } else {
37188 valueType_ = value;
37189 }
37190 } else {
37191 valueTypeBuilder_.mergeFrom(value);
37192 }
37193 if (valueType_ != null) {
37194 bitField0_ |= 0x00000002;
37195 onChanged();
37196 }
37197 return this;
37198 }
37199 /**
37200 * <pre>
37201 * This field MUST be present for this version of the IR.
37202 * </pre>
37203 *
37204 * <code>optional .onnx.TypeProto value_type = 2;</code>
37205 */
37206 public Builder clearValueType() {
37207 bitField0_ = (bitField0_ & ~0x00000002);
37208 valueType_ = null;
37209 if (valueTypeBuilder_ != null) {
37210 valueTypeBuilder_.dispose();
37211 valueTypeBuilder_ = null;
37212 }
37213 onChanged();
37214 return this;
37215 }
37216 /**
37217 * <pre>
37218 * This field MUST be present for this version of the IR.
37219 * </pre>
37220 *
37221 * <code>optional .onnx.TypeProto value_type = 2;</code>
37222 */
37223 public onnx.OnnxMl.TypeProto.Builder getValueTypeBuilder() {
37224 bitField0_ |= 0x00000002;
37225 onChanged();
37226 return getValueTypeFieldBuilder().getBuilder();
37227 }
37228 /**
37229 * <pre>
37230 * This field MUST be present for this version of the IR.
37231 * </pre>
37232 *
37233 * <code>optional .onnx.TypeProto value_type = 2;</code>
37234 */
37235 public onnx.OnnxMl.TypeProtoOrBuilder getValueTypeOrBuilder() {
37236 if (valueTypeBuilder_ != null) {
37237 return valueTypeBuilder_.getMessageOrBuilder();
37238 } else {
37239 return valueType_ == null ?
37240 onnx.OnnxMl.TypeProto.getDefaultInstance() : valueType_;
37241 }
37242 }
37243 /**
37244 * <pre>
37245 * This field MUST be present for this version of the IR.
37246 * </pre>
37247 *
37248 * <code>optional .onnx.TypeProto value_type = 2;</code>
37249 */
37250 private com.google.protobuf.SingleFieldBuilder<
37251 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
37252 getValueTypeFieldBuilder() {
37253 if (valueTypeBuilder_ == null) {
37254 valueTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
37255 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
37256 getValueType(),
37257 getParentForChildren(),
37258 isClean());
37259 valueType_ = null;
37260 }
37261 return valueTypeBuilder_;
37262 }
37263
37264 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.Map)
37265 }
37266
37267 // @@protoc_insertion_point(class_scope:onnx.TypeProto.Map)
37268 private static final onnx.OnnxMl.TypeProto.Map DEFAULT_INSTANCE;
37269 static {
37270 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.Map();
37271 }
37272
37273 public static onnx.OnnxMl.TypeProto.Map getDefaultInstance() {
37274 return DEFAULT_INSTANCE;
37275 }
37276
37277 private static final com.google.protobuf.Parser<Map>
37278 PARSER = new com.google.protobuf.AbstractParser<Map>() {
37279 @java.lang.Override
37280 public Map parsePartialFrom(
37281 com.google.protobuf.CodedInputStream input,
37282 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37283 throws com.google.protobuf.InvalidProtocolBufferException {
37284 Builder builder = newBuilder();
37285 try {
37286 builder.mergeFrom(input, extensionRegistry);
37287 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
37288 throw e.setUnfinishedMessage(builder.buildPartial());
37289 } catch (com.google.protobuf.UninitializedMessageException e) {
37290 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
37291 } catch (java.io.IOException e) {
37292 throw new com.google.protobuf.InvalidProtocolBufferException(e)
37293 .setUnfinishedMessage(builder.buildPartial());
37294 }
37295 return builder.buildPartial();
37296 }
37297 };
37298
37299 public static com.google.protobuf.Parser<Map> parser() {
37300 return PARSER;
37301 }
37302
37303 @java.lang.Override
37304 public com.google.protobuf.Parser<Map> getParserForType() {
37305 return PARSER;
37306 }
37307
37308 @java.lang.Override
37309 public onnx.OnnxMl.TypeProto.Map getDefaultInstanceForType() {
37310 return DEFAULT_INSTANCE;
37311 }
37312
37313 }
37314
37315 public interface OptionalOrBuilder extends
37316 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.Optional)
37317 com.google.protobuf.MessageOrBuilder {
37318
37319 /**
37320 * <pre>
37321 * The type and optional shape of the element wrapped.
37322 * This field MUST be present for this version of the IR.
37323 * Possible values correspond to OptionalProto.DataType enum
37324 * </pre>
37325 *
37326 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37327 * @return Whether the elemType field is set.
37328 */
37329 boolean hasElemType();
37330 /**
37331 * <pre>
37332 * The type and optional shape of the element wrapped.
37333 * This field MUST be present for this version of the IR.
37334 * Possible values correspond to OptionalProto.DataType enum
37335 * </pre>
37336 *
37337 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37338 * @return The elemType.
37339 */
37340 onnx.OnnxMl.TypeProto getElemType();
37341 /**
37342 * <pre>
37343 * The type and optional shape of the element wrapped.
37344 * This field MUST be present for this version of the IR.
37345 * Possible values correspond to OptionalProto.DataType enum
37346 * </pre>
37347 *
37348 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37349 */
37350 onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder();
37351 }
37352 /**
37353 * <pre>
37354 * wrapper for Tensor, Sequence, or Map
37355 * </pre>
37356 *
37357 * Protobuf type {@code onnx.TypeProto.Optional}
37358 */
37359 public static final class Optional extends
37360 com.google.protobuf.GeneratedMessage implements
37361 // @@protoc_insertion_point(message_implements:onnx.TypeProto.Optional)
37362 OptionalOrBuilder {
37363 private static final long serialVersionUID = 0L;
37364 static {
37365 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
37366 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
37367 /* major= */ 4,
37368 /* minor= */ 29,
37369 /* patch= */ 3,
37370 /* suffix= */ "",
37371 Optional.class.getName());
37372 }
37373 // Use Optional.newBuilder() to construct.
37374 private Optional(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
37375 super(builder);
37376 }
37377 private Optional() {
37378 }
37379
37380 public static final com.google.protobuf.Descriptors.Descriptor
37381 getDescriptor() {
37382 return onnx.OnnxMl.internal_static_onnx_TypeProto_Optional_descriptor;
37383 }
37384
37385 @java.lang.Override
37386 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
37387 internalGetFieldAccessorTable() {
37388 return onnx.OnnxMl.internal_static_onnx_TypeProto_Optional_fieldAccessorTable
37389 .ensureFieldAccessorsInitialized(
37390 onnx.OnnxMl.TypeProto.Optional.class, onnx.OnnxMl.TypeProto.Optional.Builder.class);
37391 }
37392
37393 private int bitField0_;
37394 public static final int ELEM_TYPE_FIELD_NUMBER = 1;
37395 private onnx.OnnxMl.TypeProto elemType_;
37396 /**
37397 * <pre>
37398 * The type and optional shape of the element wrapped.
37399 * This field MUST be present for this version of the IR.
37400 * Possible values correspond to OptionalProto.DataType enum
37401 * </pre>
37402 *
37403 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37404 * @return Whether the elemType field is set.
37405 */
37406 @java.lang.Override
37407 public boolean hasElemType() {
37408 return ((bitField0_ & 0x00000001) != 0);
37409 }
37410 /**
37411 * <pre>
37412 * The type and optional shape of the element wrapped.
37413 * This field MUST be present for this version of the IR.
37414 * Possible values correspond to OptionalProto.DataType enum
37415 * </pre>
37416 *
37417 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37418 * @return The elemType.
37419 */
37420 @java.lang.Override
37421 public onnx.OnnxMl.TypeProto getElemType() {
37422 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
37423 }
37424 /**
37425 * <pre>
37426 * The type and optional shape of the element wrapped.
37427 * This field MUST be present for this version of the IR.
37428 * Possible values correspond to OptionalProto.DataType enum
37429 * </pre>
37430 *
37431 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37432 */
37433 @java.lang.Override
37434 public onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder() {
37435 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
37436 }
37437
37438 private byte memoizedIsInitialized = -1;
37439 @java.lang.Override
37440 public final boolean isInitialized() {
37441 byte isInitialized = memoizedIsInitialized;
37442 if (isInitialized == 1) return true;
37443 if (isInitialized == 0) return false;
37444
37445 memoizedIsInitialized = 1;
37446 return true;
37447 }
37448
37449 @java.lang.Override
37450 public void writeTo(com.google.protobuf.CodedOutputStream output)
37451 throws java.io.IOException {
37452 if (((bitField0_ & 0x00000001) != 0)) {
37453 output.writeMessage(1, getElemType());
37454 }
37455 getUnknownFields().writeTo(output);
37456 }
37457
37458 @java.lang.Override
37459 public int getSerializedSize() {
37460 int size = memoizedSize;
37461 if (size != -1) return size;
37462
37463 size = 0;
37464 if (((bitField0_ & 0x00000001) != 0)) {
37465 size += com.google.protobuf.CodedOutputStream
37466 .computeMessageSize(1, getElemType());
37467 }
37468 size += getUnknownFields().getSerializedSize();
37469 memoizedSize = size;
37470 return size;
37471 }
37472
37473 @java.lang.Override
37474 public boolean equals(final java.lang.Object obj) {
37475 if (obj == this) {
37476 return true;
37477 }
37478 if (!(obj instanceof onnx.OnnxMl.TypeProto.Optional)) {
37479 return super.equals(obj);
37480 }
37481 onnx.OnnxMl.TypeProto.Optional other = (onnx.OnnxMl.TypeProto.Optional) obj;
37482
37483 if (hasElemType() != other.hasElemType()) return false;
37484 if (hasElemType()) {
37485 if (!getElemType()
37486 .equals(other.getElemType())) return false;
37487 }
37488 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
37489 return true;
37490 }
37491
37492 @java.lang.Override
37493 public int hashCode() {
37494 if (memoizedHashCode != 0) {
37495 return memoizedHashCode;
37496 }
37497 int hash = 41;
37498 hash = (19 * hash) + getDescriptor().hashCode();
37499 if (hasElemType()) {
37500 hash = (37 * hash) + ELEM_TYPE_FIELD_NUMBER;
37501 hash = (53 * hash) + getElemType().hashCode();
37502 }
37503 hash = (29 * hash) + getUnknownFields().hashCode();
37504 memoizedHashCode = hash;
37505 return hash;
37506 }
37507
37508 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37509 java.nio.ByteBuffer data)
37510 throws com.google.protobuf.InvalidProtocolBufferException {
37511 return PARSER.parseFrom(data);
37512 }
37513 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37514 java.nio.ByteBuffer data,
37515 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37516 throws com.google.protobuf.InvalidProtocolBufferException {
37517 return PARSER.parseFrom(data, extensionRegistry);
37518 }
37519 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37520 com.google.protobuf.ByteString data)
37521 throws com.google.protobuf.InvalidProtocolBufferException {
37522 return PARSER.parseFrom(data);
37523 }
37524 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37525 com.google.protobuf.ByteString data,
37526 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37527 throws com.google.protobuf.InvalidProtocolBufferException {
37528 return PARSER.parseFrom(data, extensionRegistry);
37529 }
37530 public static onnx.OnnxMl.TypeProto.Optional parseFrom(byte[] data)
37531 throws com.google.protobuf.InvalidProtocolBufferException {
37532 return PARSER.parseFrom(data);
37533 }
37534 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37535 byte[] data,
37536 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37537 throws com.google.protobuf.InvalidProtocolBufferException {
37538 return PARSER.parseFrom(data, extensionRegistry);
37539 }
37540 public static onnx.OnnxMl.TypeProto.Optional parseFrom(java.io.InputStream input)
37541 throws java.io.IOException {
37542 return com.google.protobuf.GeneratedMessage
37543 .parseWithIOException(PARSER, input);
37544 }
37545 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37546 java.io.InputStream input,
37547 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37548 throws java.io.IOException {
37549 return com.google.protobuf.GeneratedMessage
37550 .parseWithIOException(PARSER, input, extensionRegistry);
37551 }
37552
37553 public static onnx.OnnxMl.TypeProto.Optional parseDelimitedFrom(java.io.InputStream input)
37554 throws java.io.IOException {
37555 return com.google.protobuf.GeneratedMessage
37556 .parseDelimitedWithIOException(PARSER, input);
37557 }
37558
37559 public static onnx.OnnxMl.TypeProto.Optional parseDelimitedFrom(
37560 java.io.InputStream input,
37561 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37562 throws java.io.IOException {
37563 return com.google.protobuf.GeneratedMessage
37564 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
37565 }
37566 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37567 com.google.protobuf.CodedInputStream input)
37568 throws java.io.IOException {
37569 return com.google.protobuf.GeneratedMessage
37570 .parseWithIOException(PARSER, input);
37571 }
37572 public static onnx.OnnxMl.TypeProto.Optional parseFrom(
37573 com.google.protobuf.CodedInputStream input,
37574 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37575 throws java.io.IOException {
37576 return com.google.protobuf.GeneratedMessage
37577 .parseWithIOException(PARSER, input, extensionRegistry);
37578 }
37579
37580 @java.lang.Override
37581 public Builder newBuilderForType() { return newBuilder(); }
37582 public static Builder newBuilder() {
37583 return DEFAULT_INSTANCE.toBuilder();
37584 }
37585 public static Builder newBuilder(onnx.OnnxMl.TypeProto.Optional prototype) {
37586 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
37587 }
37588 @java.lang.Override
37589 public Builder toBuilder() {
37590 return this == DEFAULT_INSTANCE
37591 ? new Builder() : new Builder().mergeFrom(this);
37592 }
37593
37594 @java.lang.Override
37595 protected Builder newBuilderForType(
37596 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
37597 Builder builder = new Builder(parent);
37598 return builder;
37599 }
37600 /**
37601 * <pre>
37602 * wrapper for Tensor, Sequence, or Map
37603 * </pre>
37604 *
37605 * Protobuf type {@code onnx.TypeProto.Optional}
37606 */
37607 public static final class Builder extends
37608 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
37609 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.Optional)
37610 onnx.OnnxMl.TypeProto.OptionalOrBuilder {
37611 public static final com.google.protobuf.Descriptors.Descriptor
37612 getDescriptor() {
37613 return onnx.OnnxMl.internal_static_onnx_TypeProto_Optional_descriptor;
37614 }
37615
37616 @java.lang.Override
37617 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
37618 internalGetFieldAccessorTable() {
37619 return onnx.OnnxMl.internal_static_onnx_TypeProto_Optional_fieldAccessorTable
37620 .ensureFieldAccessorsInitialized(
37621 onnx.OnnxMl.TypeProto.Optional.class, onnx.OnnxMl.TypeProto.Optional.Builder.class);
37622 }
37623
37624 // Construct using onnx.OnnxMl.TypeProto.Optional.newBuilder()
37625 private Builder() {
37626 maybeForceBuilderInitialization();
37627 }
37628
37629 private Builder(
37630 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
37631 super(parent);
37632 maybeForceBuilderInitialization();
37633 }
37634 private void maybeForceBuilderInitialization() {
37635 if (com.google.protobuf.GeneratedMessage
37636 .alwaysUseFieldBuilders) {
37637 getElemTypeFieldBuilder();
37638 }
37639 }
37640 @java.lang.Override
37641 public Builder clear() {
37642 super.clear();
37643 bitField0_ = 0;
37644 elemType_ = null;
37645 if (elemTypeBuilder_ != null) {
37646 elemTypeBuilder_.dispose();
37647 elemTypeBuilder_ = null;
37648 }
37649 return this;
37650 }
37651
37652 @java.lang.Override
37653 public com.google.protobuf.Descriptors.Descriptor
37654 getDescriptorForType() {
37655 return onnx.OnnxMl.internal_static_onnx_TypeProto_Optional_descriptor;
37656 }
37657
37658 @java.lang.Override
37659 public onnx.OnnxMl.TypeProto.Optional getDefaultInstanceForType() {
37660 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
37661 }
37662
37663 @java.lang.Override
37664 public onnx.OnnxMl.TypeProto.Optional build() {
37665 onnx.OnnxMl.TypeProto.Optional result = buildPartial();
37666 if (!result.isInitialized()) {
37667 throw newUninitializedMessageException(result);
37668 }
37669 return result;
37670 }
37671
37672 @java.lang.Override
37673 public onnx.OnnxMl.TypeProto.Optional buildPartial() {
37674 onnx.OnnxMl.TypeProto.Optional result = new onnx.OnnxMl.TypeProto.Optional(this);
37675 if (bitField0_ != 0) { buildPartial0(result); }
37676 onBuilt();
37677 return result;
37678 }
37679
37680 private void buildPartial0(onnx.OnnxMl.TypeProto.Optional result) {
37681 int from_bitField0_ = bitField0_;
37682 int to_bitField0_ = 0;
37683 if (((from_bitField0_ & 0x00000001) != 0)) {
37684 result.elemType_ = elemTypeBuilder_ == null
37685 ? elemType_
37686 : elemTypeBuilder_.build();
37687 to_bitField0_ |= 0x00000001;
37688 }
37689 result.bitField0_ |= to_bitField0_;
37690 }
37691
37692 @java.lang.Override
37693 public Builder mergeFrom(com.google.protobuf.Message other) {
37694 if (other instanceof onnx.OnnxMl.TypeProto.Optional) {
37695 return mergeFrom((onnx.OnnxMl.TypeProto.Optional)other);
37696 } else {
37697 super.mergeFrom(other);
37698 return this;
37699 }
37700 }
37701
37702 public Builder mergeFrom(onnx.OnnxMl.TypeProto.Optional other) {
37703 if (other == onnx.OnnxMl.TypeProto.Optional.getDefaultInstance()) return this;
37704 if (other.hasElemType()) {
37705 mergeElemType(other.getElemType());
37706 }
37707 this.mergeUnknownFields(other.getUnknownFields());
37708 onChanged();
37709 return this;
37710 }
37711
37712 @java.lang.Override
37713 public final boolean isInitialized() {
37714 return true;
37715 }
37716
37717 @java.lang.Override
37718 public Builder mergeFrom(
37719 com.google.protobuf.CodedInputStream input,
37720 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37721 throws java.io.IOException {
37722 if (extensionRegistry == null) {
37723 throw new java.lang.NullPointerException();
37724 }
37725 try {
37726 boolean done = false;
37727 while (!done) {
37728 int tag = input.readTag();
37729 switch (tag) {
37730 case 0:
37731 done = true;
37732 break;
37733 case 10: {
37734 input.readMessage(
37735 getElemTypeFieldBuilder().getBuilder(),
37736 extensionRegistry);
37737 bitField0_ |= 0x00000001;
37738 break;
37739 } // case 10
37740 default: {
37741 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
37742 done = true; // was an endgroup tag
37743 }
37744 break;
37745 } // default:
37746 } // switch (tag)
37747 } // while (!done)
37748 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
37749 throw e.unwrapIOException();
37750 } finally {
37751 onChanged();
37752 } // finally
37753 return this;
37754 }
37755 private int bitField0_;
37756
37757 private onnx.OnnxMl.TypeProto elemType_;
37758 private com.google.protobuf.SingleFieldBuilder<
37759 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder> elemTypeBuilder_;
37760 /**
37761 * <pre>
37762 * The type and optional shape of the element wrapped.
37763 * This field MUST be present for this version of the IR.
37764 * Possible values correspond to OptionalProto.DataType enum
37765 * </pre>
37766 *
37767 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37768 * @return Whether the elemType field is set.
37769 */
37770 public boolean hasElemType() {
37771 return ((bitField0_ & 0x00000001) != 0);
37772 }
37773 /**
37774 * <pre>
37775 * The type and optional shape of the element wrapped.
37776 * This field MUST be present for this version of the IR.
37777 * Possible values correspond to OptionalProto.DataType enum
37778 * </pre>
37779 *
37780 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37781 * @return The elemType.
37782 */
37783 public onnx.OnnxMl.TypeProto getElemType() {
37784 if (elemTypeBuilder_ == null) {
37785 return elemType_ == null ? onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
37786 } else {
37787 return elemTypeBuilder_.getMessage();
37788 }
37789 }
37790 /**
37791 * <pre>
37792 * The type and optional shape of the element wrapped.
37793 * This field MUST be present for this version of the IR.
37794 * Possible values correspond to OptionalProto.DataType enum
37795 * </pre>
37796 *
37797 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37798 */
37799 public Builder setElemType(onnx.OnnxMl.TypeProto value) {
37800 if (elemTypeBuilder_ == null) {
37801 if (value == null) {
37802 throw new NullPointerException();
37803 }
37804 elemType_ = value;
37805 } else {
37806 elemTypeBuilder_.setMessage(value);
37807 }
37808 bitField0_ |= 0x00000001;
37809 onChanged();
37810 return this;
37811 }
37812 /**
37813 * <pre>
37814 * The type and optional shape of the element wrapped.
37815 * This field MUST be present for this version of the IR.
37816 * Possible values correspond to OptionalProto.DataType enum
37817 * </pre>
37818 *
37819 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37820 */
37821 public Builder setElemType(
37822 onnx.OnnxMl.TypeProto.Builder builderForValue) {
37823 if (elemTypeBuilder_ == null) {
37824 elemType_ = builderForValue.build();
37825 } else {
37826 elemTypeBuilder_.setMessage(builderForValue.build());
37827 }
37828 bitField0_ |= 0x00000001;
37829 onChanged();
37830 return this;
37831 }
37832 /**
37833 * <pre>
37834 * The type and optional shape of the element wrapped.
37835 * This field MUST be present for this version of the IR.
37836 * Possible values correspond to OptionalProto.DataType enum
37837 * </pre>
37838 *
37839 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37840 */
37841 public Builder mergeElemType(onnx.OnnxMl.TypeProto value) {
37842 if (elemTypeBuilder_ == null) {
37843 if (((bitField0_ & 0x00000001) != 0) &&
37844 elemType_ != null &&
37845 elemType_ != onnx.OnnxMl.TypeProto.getDefaultInstance()) {
37846 getElemTypeBuilder().mergeFrom(value);
37847 } else {
37848 elemType_ = value;
37849 }
37850 } else {
37851 elemTypeBuilder_.mergeFrom(value);
37852 }
37853 if (elemType_ != null) {
37854 bitField0_ |= 0x00000001;
37855 onChanged();
37856 }
37857 return this;
37858 }
37859 /**
37860 * <pre>
37861 * The type and optional shape of the element wrapped.
37862 * This field MUST be present for this version of the IR.
37863 * Possible values correspond to OptionalProto.DataType enum
37864 * </pre>
37865 *
37866 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37867 */
37868 public Builder clearElemType() {
37869 bitField0_ = (bitField0_ & ~0x00000001);
37870 elemType_ = null;
37871 if (elemTypeBuilder_ != null) {
37872 elemTypeBuilder_.dispose();
37873 elemTypeBuilder_ = null;
37874 }
37875 onChanged();
37876 return this;
37877 }
37878 /**
37879 * <pre>
37880 * The type and optional shape of the element wrapped.
37881 * This field MUST be present for this version of the IR.
37882 * Possible values correspond to OptionalProto.DataType enum
37883 * </pre>
37884 *
37885 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37886 */
37887 public onnx.OnnxMl.TypeProto.Builder getElemTypeBuilder() {
37888 bitField0_ |= 0x00000001;
37889 onChanged();
37890 return getElemTypeFieldBuilder().getBuilder();
37891 }
37892 /**
37893 * <pre>
37894 * The type and optional shape of the element wrapped.
37895 * This field MUST be present for this version of the IR.
37896 * Possible values correspond to OptionalProto.DataType enum
37897 * </pre>
37898 *
37899 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37900 */
37901 public onnx.OnnxMl.TypeProtoOrBuilder getElemTypeOrBuilder() {
37902 if (elemTypeBuilder_ != null) {
37903 return elemTypeBuilder_.getMessageOrBuilder();
37904 } else {
37905 return elemType_ == null ?
37906 onnx.OnnxMl.TypeProto.getDefaultInstance() : elemType_;
37907 }
37908 }
37909 /**
37910 * <pre>
37911 * The type and optional shape of the element wrapped.
37912 * This field MUST be present for this version of the IR.
37913 * Possible values correspond to OptionalProto.DataType enum
37914 * </pre>
37915 *
37916 * <code>optional .onnx.TypeProto elem_type = 1;</code>
37917 */
37918 private com.google.protobuf.SingleFieldBuilder<
37919 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>
37920 getElemTypeFieldBuilder() {
37921 if (elemTypeBuilder_ == null) {
37922 elemTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
37923 onnx.OnnxMl.TypeProto, onnx.OnnxMl.TypeProto.Builder, onnx.OnnxMl.TypeProtoOrBuilder>(
37924 getElemType(),
37925 getParentForChildren(),
37926 isClean());
37927 elemType_ = null;
37928 }
37929 return elemTypeBuilder_;
37930 }
37931
37932 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.Optional)
37933 }
37934
37935 // @@protoc_insertion_point(class_scope:onnx.TypeProto.Optional)
37936 private static final onnx.OnnxMl.TypeProto.Optional DEFAULT_INSTANCE;
37937 static {
37938 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.Optional();
37939 }
37940
37941 public static onnx.OnnxMl.TypeProto.Optional getDefaultInstance() {
37942 return DEFAULT_INSTANCE;
37943 }
37944
37945 private static final com.google.protobuf.Parser<Optional>
37946 PARSER = new com.google.protobuf.AbstractParser<Optional>() {
37947 @java.lang.Override
37948 public Optional parsePartialFrom(
37949 com.google.protobuf.CodedInputStream input,
37950 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
37951 throws com.google.protobuf.InvalidProtocolBufferException {
37952 Builder builder = newBuilder();
37953 try {
37954 builder.mergeFrom(input, extensionRegistry);
37955 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
37956 throw e.setUnfinishedMessage(builder.buildPartial());
37957 } catch (com.google.protobuf.UninitializedMessageException e) {
37958 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
37959 } catch (java.io.IOException e) {
37960 throw new com.google.protobuf.InvalidProtocolBufferException(e)
37961 .setUnfinishedMessage(builder.buildPartial());
37962 }
37963 return builder.buildPartial();
37964 }
37965 };
37966
37967 public static com.google.protobuf.Parser<Optional> parser() {
37968 return PARSER;
37969 }
37970
37971 @java.lang.Override
37972 public com.google.protobuf.Parser<Optional> getParserForType() {
37973 return PARSER;
37974 }
37975
37976 @java.lang.Override
37977 public onnx.OnnxMl.TypeProto.Optional getDefaultInstanceForType() {
37978 return DEFAULT_INSTANCE;
37979 }
37980
37981 }
37982
37983 public interface SparseTensorOrBuilder extends
37984 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.SparseTensor)
37985 com.google.protobuf.MessageOrBuilder {
37986
37987 /**
37988 * <pre>
37989 * This field MUST NOT have the value of UNDEFINED
37990 * This field MUST have a valid TensorProto.DataType value
37991 * This field MUST be present for this version of the IR.
37992 * </pre>
37993 *
37994 * <code>optional int32 elem_type = 1;</code>
37995 * @return Whether the elemType field is set.
37996 */
37997 boolean hasElemType();
37998 /**
37999 * <pre>
38000 * This field MUST NOT have the value of UNDEFINED
38001 * This field MUST have a valid TensorProto.DataType value
38002 * This field MUST be present for this version of the IR.
38003 * </pre>
38004 *
38005 * <code>optional int32 elem_type = 1;</code>
38006 * @return The elemType.
38007 */
38008 int getElemType();
38009
38010 /**
38011 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38012 * @return Whether the shape field is set.
38013 */
38014 boolean hasShape();
38015 /**
38016 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38017 * @return The shape.
38018 */
38019 onnx.OnnxMl.TensorShapeProto getShape();
38020 /**
38021 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38022 */
38023 onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder();
38024 }
38025 /**
38026 * Protobuf type {@code onnx.TypeProto.SparseTensor}
38027 */
38028 public static final class SparseTensor extends
38029 com.google.protobuf.GeneratedMessage implements
38030 // @@protoc_insertion_point(message_implements:onnx.TypeProto.SparseTensor)
38031 SparseTensorOrBuilder {
38032 private static final long serialVersionUID = 0L;
38033 static {
38034 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
38035 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
38036 /* major= */ 4,
38037 /* minor= */ 29,
38038 /* patch= */ 3,
38039 /* suffix= */ "",
38040 SparseTensor.class.getName());
38041 }
38042 // Use SparseTensor.newBuilder() to construct.
38043 private SparseTensor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
38044 super(builder);
38045 }
38046 private SparseTensor() {
38047 }
38048
38049 public static final com.google.protobuf.Descriptors.Descriptor
38050 getDescriptor() {
38051 return onnx.OnnxMl.internal_static_onnx_TypeProto_SparseTensor_descriptor;
38052 }
38053
38054 @java.lang.Override
38055 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
38056 internalGetFieldAccessorTable() {
38057 return onnx.OnnxMl.internal_static_onnx_TypeProto_SparseTensor_fieldAccessorTable
38058 .ensureFieldAccessorsInitialized(
38059 onnx.OnnxMl.TypeProto.SparseTensor.class, onnx.OnnxMl.TypeProto.SparseTensor.Builder.class);
38060 }
38061
38062 private int bitField0_;
38063 public static final int ELEM_TYPE_FIELD_NUMBER = 1;
38064 private int elemType_ = 0;
38065 /**
38066 * <pre>
38067 * This field MUST NOT have the value of UNDEFINED
38068 * This field MUST have a valid TensorProto.DataType value
38069 * This field MUST be present for this version of the IR.
38070 * </pre>
38071 *
38072 * <code>optional int32 elem_type = 1;</code>
38073 * @return Whether the elemType field is set.
38074 */
38075 @java.lang.Override
38076 public boolean hasElemType() {
38077 return ((bitField0_ & 0x00000001) != 0);
38078 }
38079 /**
38080 * <pre>
38081 * This field MUST NOT have the value of UNDEFINED
38082 * This field MUST have a valid TensorProto.DataType value
38083 * This field MUST be present for this version of the IR.
38084 * </pre>
38085 *
38086 * <code>optional int32 elem_type = 1;</code>
38087 * @return The elemType.
38088 */
38089 @java.lang.Override
38090 public int getElemType() {
38091 return elemType_;
38092 }
38093
38094 public static final int SHAPE_FIELD_NUMBER = 2;
38095 private onnx.OnnxMl.TensorShapeProto shape_;
38096 /**
38097 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38098 * @return Whether the shape field is set.
38099 */
38100 @java.lang.Override
38101 public boolean hasShape() {
38102 return ((bitField0_ & 0x00000002) != 0);
38103 }
38104 /**
38105 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38106 * @return The shape.
38107 */
38108 @java.lang.Override
38109 public onnx.OnnxMl.TensorShapeProto getShape() {
38110 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
38111 }
38112 /**
38113 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38114 */
38115 @java.lang.Override
38116 public onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder() {
38117 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
38118 }
38119
38120 private byte memoizedIsInitialized = -1;
38121 @java.lang.Override
38122 public final boolean isInitialized() {
38123 byte isInitialized = memoizedIsInitialized;
38124 if (isInitialized == 1) return true;
38125 if (isInitialized == 0) return false;
38126
38127 memoizedIsInitialized = 1;
38128 return true;
38129 }
38130
38131 @java.lang.Override
38132 public void writeTo(com.google.protobuf.CodedOutputStream output)
38133 throws java.io.IOException {
38134 if (((bitField0_ & 0x00000001) != 0)) {
38135 output.writeInt32(1, elemType_);
38136 }
38137 if (((bitField0_ & 0x00000002) != 0)) {
38138 output.writeMessage(2, getShape());
38139 }
38140 getUnknownFields().writeTo(output);
38141 }
38142
38143 @java.lang.Override
38144 public int getSerializedSize() {
38145 int size = memoizedSize;
38146 if (size != -1) return size;
38147
38148 size = 0;
38149 if (((bitField0_ & 0x00000001) != 0)) {
38150 size += com.google.protobuf.CodedOutputStream
38151 .computeInt32Size(1, elemType_);
38152 }
38153 if (((bitField0_ & 0x00000002) != 0)) {
38154 size += com.google.protobuf.CodedOutputStream
38155 .computeMessageSize(2, getShape());
38156 }
38157 size += getUnknownFields().getSerializedSize();
38158 memoizedSize = size;
38159 return size;
38160 }
38161
38162 @java.lang.Override
38163 public boolean equals(final java.lang.Object obj) {
38164 if (obj == this) {
38165 return true;
38166 }
38167 if (!(obj instanceof onnx.OnnxMl.TypeProto.SparseTensor)) {
38168 return super.equals(obj);
38169 }
38170 onnx.OnnxMl.TypeProto.SparseTensor other = (onnx.OnnxMl.TypeProto.SparseTensor) obj;
38171
38172 if (hasElemType() != other.hasElemType()) return false;
38173 if (hasElemType()) {
38174 if (getElemType()
38175 != other.getElemType()) return false;
38176 }
38177 if (hasShape() != other.hasShape()) return false;
38178 if (hasShape()) {
38179 if (!getShape()
38180 .equals(other.getShape())) return false;
38181 }
38182 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
38183 return true;
38184 }
38185
38186 @java.lang.Override
38187 public int hashCode() {
38188 if (memoizedHashCode != 0) {
38189 return memoizedHashCode;
38190 }
38191 int hash = 41;
38192 hash = (19 * hash) + getDescriptor().hashCode();
38193 if (hasElemType()) {
38194 hash = (37 * hash) + ELEM_TYPE_FIELD_NUMBER;
38195 hash = (53 * hash) + getElemType();
38196 }
38197 if (hasShape()) {
38198 hash = (37 * hash) + SHAPE_FIELD_NUMBER;
38199 hash = (53 * hash) + getShape().hashCode();
38200 }
38201 hash = (29 * hash) + getUnknownFields().hashCode();
38202 memoizedHashCode = hash;
38203 return hash;
38204 }
38205
38206 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38207 java.nio.ByteBuffer data)
38208 throws com.google.protobuf.InvalidProtocolBufferException {
38209 return PARSER.parseFrom(data);
38210 }
38211 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38212 java.nio.ByteBuffer data,
38213 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38214 throws com.google.protobuf.InvalidProtocolBufferException {
38215 return PARSER.parseFrom(data, extensionRegistry);
38216 }
38217 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38218 com.google.protobuf.ByteString data)
38219 throws com.google.protobuf.InvalidProtocolBufferException {
38220 return PARSER.parseFrom(data);
38221 }
38222 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38223 com.google.protobuf.ByteString data,
38224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38225 throws com.google.protobuf.InvalidProtocolBufferException {
38226 return PARSER.parseFrom(data, extensionRegistry);
38227 }
38228 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(byte[] data)
38229 throws com.google.protobuf.InvalidProtocolBufferException {
38230 return PARSER.parseFrom(data);
38231 }
38232 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38233 byte[] data,
38234 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38235 throws com.google.protobuf.InvalidProtocolBufferException {
38236 return PARSER.parseFrom(data, extensionRegistry);
38237 }
38238 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(java.io.InputStream input)
38239 throws java.io.IOException {
38240 return com.google.protobuf.GeneratedMessage
38241 .parseWithIOException(PARSER, input);
38242 }
38243 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38244 java.io.InputStream input,
38245 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38246 throws java.io.IOException {
38247 return com.google.protobuf.GeneratedMessage
38248 .parseWithIOException(PARSER, input, extensionRegistry);
38249 }
38250
38251 public static onnx.OnnxMl.TypeProto.SparseTensor parseDelimitedFrom(java.io.InputStream input)
38252 throws java.io.IOException {
38253 return com.google.protobuf.GeneratedMessage
38254 .parseDelimitedWithIOException(PARSER, input);
38255 }
38256
38257 public static onnx.OnnxMl.TypeProto.SparseTensor parseDelimitedFrom(
38258 java.io.InputStream input,
38259 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38260 throws java.io.IOException {
38261 return com.google.protobuf.GeneratedMessage
38262 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
38263 }
38264 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38265 com.google.protobuf.CodedInputStream input)
38266 throws java.io.IOException {
38267 return com.google.protobuf.GeneratedMessage
38268 .parseWithIOException(PARSER, input);
38269 }
38270 public static onnx.OnnxMl.TypeProto.SparseTensor parseFrom(
38271 com.google.protobuf.CodedInputStream input,
38272 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38273 throws java.io.IOException {
38274 return com.google.protobuf.GeneratedMessage
38275 .parseWithIOException(PARSER, input, extensionRegistry);
38276 }
38277
38278 @java.lang.Override
38279 public Builder newBuilderForType() { return newBuilder(); }
38280 public static Builder newBuilder() {
38281 return DEFAULT_INSTANCE.toBuilder();
38282 }
38283 public static Builder newBuilder(onnx.OnnxMl.TypeProto.SparseTensor prototype) {
38284 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
38285 }
38286 @java.lang.Override
38287 public Builder toBuilder() {
38288 return this == DEFAULT_INSTANCE
38289 ? new Builder() : new Builder().mergeFrom(this);
38290 }
38291
38292 @java.lang.Override
38293 protected Builder newBuilderForType(
38294 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
38295 Builder builder = new Builder(parent);
38296 return builder;
38297 }
38298 /**
38299 * Protobuf type {@code onnx.TypeProto.SparseTensor}
38300 */
38301 public static final class Builder extends
38302 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
38303 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.SparseTensor)
38304 onnx.OnnxMl.TypeProto.SparseTensorOrBuilder {
38305 public static final com.google.protobuf.Descriptors.Descriptor
38306 getDescriptor() {
38307 return onnx.OnnxMl.internal_static_onnx_TypeProto_SparseTensor_descriptor;
38308 }
38309
38310 @java.lang.Override
38311 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
38312 internalGetFieldAccessorTable() {
38313 return onnx.OnnxMl.internal_static_onnx_TypeProto_SparseTensor_fieldAccessorTable
38314 .ensureFieldAccessorsInitialized(
38315 onnx.OnnxMl.TypeProto.SparseTensor.class, onnx.OnnxMl.TypeProto.SparseTensor.Builder.class);
38316 }
38317
38318 // Construct using onnx.OnnxMl.TypeProto.SparseTensor.newBuilder()
38319 private Builder() {
38320 maybeForceBuilderInitialization();
38321 }
38322
38323 private Builder(
38324 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
38325 super(parent);
38326 maybeForceBuilderInitialization();
38327 }
38328 private void maybeForceBuilderInitialization() {
38329 if (com.google.protobuf.GeneratedMessage
38330 .alwaysUseFieldBuilders) {
38331 getShapeFieldBuilder();
38332 }
38333 }
38334 @java.lang.Override
38335 public Builder clear() {
38336 super.clear();
38337 bitField0_ = 0;
38338 elemType_ = 0;
38339 shape_ = null;
38340 if (shapeBuilder_ != null) {
38341 shapeBuilder_.dispose();
38342 shapeBuilder_ = null;
38343 }
38344 return this;
38345 }
38346
38347 @java.lang.Override
38348 public com.google.protobuf.Descriptors.Descriptor
38349 getDescriptorForType() {
38350 return onnx.OnnxMl.internal_static_onnx_TypeProto_SparseTensor_descriptor;
38351 }
38352
38353 @java.lang.Override
38354 public onnx.OnnxMl.TypeProto.SparseTensor getDefaultInstanceForType() {
38355 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
38356 }
38357
38358 @java.lang.Override
38359 public onnx.OnnxMl.TypeProto.SparseTensor build() {
38360 onnx.OnnxMl.TypeProto.SparseTensor result = buildPartial();
38361 if (!result.isInitialized()) {
38362 throw newUninitializedMessageException(result);
38363 }
38364 return result;
38365 }
38366
38367 @java.lang.Override
38368 public onnx.OnnxMl.TypeProto.SparseTensor buildPartial() {
38369 onnx.OnnxMl.TypeProto.SparseTensor result = new onnx.OnnxMl.TypeProto.SparseTensor(this);
38370 if (bitField0_ != 0) { buildPartial0(result); }
38371 onBuilt();
38372 return result;
38373 }
38374
38375 private void buildPartial0(onnx.OnnxMl.TypeProto.SparseTensor result) {
38376 int from_bitField0_ = bitField0_;
38377 int to_bitField0_ = 0;
38378 if (((from_bitField0_ & 0x00000001) != 0)) {
38379 result.elemType_ = elemType_;
38380 to_bitField0_ |= 0x00000001;
38381 }
38382 if (((from_bitField0_ & 0x00000002) != 0)) {
38383 result.shape_ = shapeBuilder_ == null
38384 ? shape_
38385 : shapeBuilder_.build();
38386 to_bitField0_ |= 0x00000002;
38387 }
38388 result.bitField0_ |= to_bitField0_;
38389 }
38390
38391 @java.lang.Override
38392 public Builder mergeFrom(com.google.protobuf.Message other) {
38393 if (other instanceof onnx.OnnxMl.TypeProto.SparseTensor) {
38394 return mergeFrom((onnx.OnnxMl.TypeProto.SparseTensor)other);
38395 } else {
38396 super.mergeFrom(other);
38397 return this;
38398 }
38399 }
38400
38401 public Builder mergeFrom(onnx.OnnxMl.TypeProto.SparseTensor other) {
38402 if (other == onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance()) return this;
38403 if (other.hasElemType()) {
38404 setElemType(other.getElemType());
38405 }
38406 if (other.hasShape()) {
38407 mergeShape(other.getShape());
38408 }
38409 this.mergeUnknownFields(other.getUnknownFields());
38410 onChanged();
38411 return this;
38412 }
38413
38414 @java.lang.Override
38415 public final boolean isInitialized() {
38416 return true;
38417 }
38418
38419 @java.lang.Override
38420 public Builder mergeFrom(
38421 com.google.protobuf.CodedInputStream input,
38422 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38423 throws java.io.IOException {
38424 if (extensionRegistry == null) {
38425 throw new java.lang.NullPointerException();
38426 }
38427 try {
38428 boolean done = false;
38429 while (!done) {
38430 int tag = input.readTag();
38431 switch (tag) {
38432 case 0:
38433 done = true;
38434 break;
38435 case 8: {
38436 elemType_ = input.readInt32();
38437 bitField0_ |= 0x00000001;
38438 break;
38439 } // case 8
38440 case 18: {
38441 input.readMessage(
38442 getShapeFieldBuilder().getBuilder(),
38443 extensionRegistry);
38444 bitField0_ |= 0x00000002;
38445 break;
38446 } // case 18
38447 default: {
38448 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
38449 done = true; // was an endgroup tag
38450 }
38451 break;
38452 } // default:
38453 } // switch (tag)
38454 } // while (!done)
38455 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
38456 throw e.unwrapIOException();
38457 } finally {
38458 onChanged();
38459 } // finally
38460 return this;
38461 }
38462 private int bitField0_;
38463
38464 private int elemType_ ;
38465 /**
38466 * <pre>
38467 * This field MUST NOT have the value of UNDEFINED
38468 * This field MUST have a valid TensorProto.DataType value
38469 * This field MUST be present for this version of the IR.
38470 * </pre>
38471 *
38472 * <code>optional int32 elem_type = 1;</code>
38473 * @return Whether the elemType field is set.
38474 */
38475 @java.lang.Override
38476 public boolean hasElemType() {
38477 return ((bitField0_ & 0x00000001) != 0);
38478 }
38479 /**
38480 * <pre>
38481 * This field MUST NOT have the value of UNDEFINED
38482 * This field MUST have a valid TensorProto.DataType value
38483 * This field MUST be present for this version of the IR.
38484 * </pre>
38485 *
38486 * <code>optional int32 elem_type = 1;</code>
38487 * @return The elemType.
38488 */
38489 @java.lang.Override
38490 public int getElemType() {
38491 return elemType_;
38492 }
38493 /**
38494 * <pre>
38495 * This field MUST NOT have the value of UNDEFINED
38496 * This field MUST have a valid TensorProto.DataType value
38497 * This field MUST be present for this version of the IR.
38498 * </pre>
38499 *
38500 * <code>optional int32 elem_type = 1;</code>
38501 * @param value The elemType to set.
38502 * @return This builder for chaining.
38503 */
38504 public Builder setElemType(int value) {
38505
38506 elemType_ = value;
38507 bitField0_ |= 0x00000001;
38508 onChanged();
38509 return this;
38510 }
38511 /**
38512 * <pre>
38513 * This field MUST NOT have the value of UNDEFINED
38514 * This field MUST have a valid TensorProto.DataType value
38515 * This field MUST be present for this version of the IR.
38516 * </pre>
38517 *
38518 * <code>optional int32 elem_type = 1;</code>
38519 * @return This builder for chaining.
38520 */
38521 public Builder clearElemType() {
38522 bitField0_ = (bitField0_ & ~0x00000001);
38523 elemType_ = 0;
38524 onChanged();
38525 return this;
38526 }
38527
38528 private onnx.OnnxMl.TensorShapeProto shape_;
38529 private com.google.protobuf.SingleFieldBuilder<
38530 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder> shapeBuilder_;
38531 /**
38532 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38533 * @return Whether the shape field is set.
38534 */
38535 public boolean hasShape() {
38536 return ((bitField0_ & 0x00000002) != 0);
38537 }
38538 /**
38539 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38540 * @return The shape.
38541 */
38542 public onnx.OnnxMl.TensorShapeProto getShape() {
38543 if (shapeBuilder_ == null) {
38544 return shape_ == null ? onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
38545 } else {
38546 return shapeBuilder_.getMessage();
38547 }
38548 }
38549 /**
38550 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38551 */
38552 public Builder setShape(onnx.OnnxMl.TensorShapeProto value) {
38553 if (shapeBuilder_ == null) {
38554 if (value == null) {
38555 throw new NullPointerException();
38556 }
38557 shape_ = value;
38558 } else {
38559 shapeBuilder_.setMessage(value);
38560 }
38561 bitField0_ |= 0x00000002;
38562 onChanged();
38563 return this;
38564 }
38565 /**
38566 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38567 */
38568 public Builder setShape(
38569 onnx.OnnxMl.TensorShapeProto.Builder builderForValue) {
38570 if (shapeBuilder_ == null) {
38571 shape_ = builderForValue.build();
38572 } else {
38573 shapeBuilder_.setMessage(builderForValue.build());
38574 }
38575 bitField0_ |= 0x00000002;
38576 onChanged();
38577 return this;
38578 }
38579 /**
38580 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38581 */
38582 public Builder mergeShape(onnx.OnnxMl.TensorShapeProto value) {
38583 if (shapeBuilder_ == null) {
38584 if (((bitField0_ & 0x00000002) != 0) &&
38585 shape_ != null &&
38586 shape_ != onnx.OnnxMl.TensorShapeProto.getDefaultInstance()) {
38587 getShapeBuilder().mergeFrom(value);
38588 } else {
38589 shape_ = value;
38590 }
38591 } else {
38592 shapeBuilder_.mergeFrom(value);
38593 }
38594 if (shape_ != null) {
38595 bitField0_ |= 0x00000002;
38596 onChanged();
38597 }
38598 return this;
38599 }
38600 /**
38601 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38602 */
38603 public Builder clearShape() {
38604 bitField0_ = (bitField0_ & ~0x00000002);
38605 shape_ = null;
38606 if (shapeBuilder_ != null) {
38607 shapeBuilder_.dispose();
38608 shapeBuilder_ = null;
38609 }
38610 onChanged();
38611 return this;
38612 }
38613 /**
38614 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38615 */
38616 public onnx.OnnxMl.TensorShapeProto.Builder getShapeBuilder() {
38617 bitField0_ |= 0x00000002;
38618 onChanged();
38619 return getShapeFieldBuilder().getBuilder();
38620 }
38621 /**
38622 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38623 */
38624 public onnx.OnnxMl.TensorShapeProtoOrBuilder getShapeOrBuilder() {
38625 if (shapeBuilder_ != null) {
38626 return shapeBuilder_.getMessageOrBuilder();
38627 } else {
38628 return shape_ == null ?
38629 onnx.OnnxMl.TensorShapeProto.getDefaultInstance() : shape_;
38630 }
38631 }
38632 /**
38633 * <code>optional .onnx.TensorShapeProto shape = 2;</code>
38634 */
38635 private com.google.protobuf.SingleFieldBuilder<
38636 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder>
38637 getShapeFieldBuilder() {
38638 if (shapeBuilder_ == null) {
38639 shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
38640 onnx.OnnxMl.TensorShapeProto, onnx.OnnxMl.TensorShapeProto.Builder, onnx.OnnxMl.TensorShapeProtoOrBuilder>(
38641 getShape(),
38642 getParentForChildren(),
38643 isClean());
38644 shape_ = null;
38645 }
38646 return shapeBuilder_;
38647 }
38648
38649 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.SparseTensor)
38650 }
38651
38652 // @@protoc_insertion_point(class_scope:onnx.TypeProto.SparseTensor)
38653 private static final onnx.OnnxMl.TypeProto.SparseTensor DEFAULT_INSTANCE;
38654 static {
38655 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.SparseTensor();
38656 }
38657
38658 public static onnx.OnnxMl.TypeProto.SparseTensor getDefaultInstance() {
38659 return DEFAULT_INSTANCE;
38660 }
38661
38662 private static final com.google.protobuf.Parser<SparseTensor>
38663 PARSER = new com.google.protobuf.AbstractParser<SparseTensor>() {
38664 @java.lang.Override
38665 public SparseTensor parsePartialFrom(
38666 com.google.protobuf.CodedInputStream input,
38667 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38668 throws com.google.protobuf.InvalidProtocolBufferException {
38669 Builder builder = newBuilder();
38670 try {
38671 builder.mergeFrom(input, extensionRegistry);
38672 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
38673 throw e.setUnfinishedMessage(builder.buildPartial());
38674 } catch (com.google.protobuf.UninitializedMessageException e) {
38675 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
38676 } catch (java.io.IOException e) {
38677 throw new com.google.protobuf.InvalidProtocolBufferException(e)
38678 .setUnfinishedMessage(builder.buildPartial());
38679 }
38680 return builder.buildPartial();
38681 }
38682 };
38683
38684 public static com.google.protobuf.Parser<SparseTensor> parser() {
38685 return PARSER;
38686 }
38687
38688 @java.lang.Override
38689 public com.google.protobuf.Parser<SparseTensor> getParserForType() {
38690 return PARSER;
38691 }
38692
38693 @java.lang.Override
38694 public onnx.OnnxMl.TypeProto.SparseTensor getDefaultInstanceForType() {
38695 return DEFAULT_INSTANCE;
38696 }
38697
38698 }
38699
38700 public interface OpaqueOrBuilder extends
38701 // @@protoc_insertion_point(interface_extends:onnx.TypeProto.Opaque)
38702 com.google.protobuf.MessageOrBuilder {
38703
38704 /**
38705 * <pre>
38706 * When missing, the domain is the same as the model's.
38707 * </pre>
38708 *
38709 * <code>optional string domain = 1;</code>
38710 * @return Whether the domain field is set.
38711 */
38712 boolean hasDomain();
38713 /**
38714 * <pre>
38715 * When missing, the domain is the same as the model's.
38716 * </pre>
38717 *
38718 * <code>optional string domain = 1;</code>
38719 * @return The domain.
38720 */
38721 java.lang.String getDomain();
38722 /**
38723 * <pre>
38724 * When missing, the domain is the same as the model's.
38725 * </pre>
38726 *
38727 * <code>optional string domain = 1;</code>
38728 * @return The bytes for domain.
38729 */
38730 com.google.protobuf.ByteString
38731 getDomainBytes();
38732
38733 /**
38734 * <pre>
38735 * The name is optional but significant when provided.
38736 * </pre>
38737 *
38738 * <code>optional string name = 2;</code>
38739 * @return Whether the name field is set.
38740 */
38741 boolean hasName();
38742 /**
38743 * <pre>
38744 * The name is optional but significant when provided.
38745 * </pre>
38746 *
38747 * <code>optional string name = 2;</code>
38748 * @return The name.
38749 */
38750 java.lang.String getName();
38751 /**
38752 * <pre>
38753 * The name is optional but significant when provided.
38754 * </pre>
38755 *
38756 * <code>optional string name = 2;</code>
38757 * @return The bytes for name.
38758 */
38759 com.google.protobuf.ByteString
38760 getNameBytes();
38761 }
38762 /**
38763 * Protobuf type {@code onnx.TypeProto.Opaque}
38764 */
38765 public static final class Opaque extends
38766 com.google.protobuf.GeneratedMessage implements
38767 // @@protoc_insertion_point(message_implements:onnx.TypeProto.Opaque)
38768 OpaqueOrBuilder {
38769 private static final long serialVersionUID = 0L;
38770 static {
38771 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
38772 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
38773 /* major= */ 4,
38774 /* minor= */ 29,
38775 /* patch= */ 3,
38776 /* suffix= */ "",
38777 Opaque.class.getName());
38778 }
38779 // Use Opaque.newBuilder() to construct.
38780 private Opaque(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
38781 super(builder);
38782 }
38783 private Opaque() {
38784 domain_ = "";
38785 name_ = "";
38786 }
38787
38788 public static final com.google.protobuf.Descriptors.Descriptor
38789 getDescriptor() {
38790 return onnx.OnnxMl.internal_static_onnx_TypeProto_Opaque_descriptor;
38791 }
38792
38793 @java.lang.Override
38794 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
38795 internalGetFieldAccessorTable() {
38796 return onnx.OnnxMl.internal_static_onnx_TypeProto_Opaque_fieldAccessorTable
38797 .ensureFieldAccessorsInitialized(
38798 onnx.OnnxMl.TypeProto.Opaque.class, onnx.OnnxMl.TypeProto.Opaque.Builder.class);
38799 }
38800
38801 private int bitField0_;
38802 public static final int DOMAIN_FIELD_NUMBER = 1;
38803 @SuppressWarnings("serial")
38804 private volatile java.lang.Object domain_ = "";
38805 /**
38806 * <pre>
38807 * When missing, the domain is the same as the model's.
38808 * </pre>
38809 *
38810 * <code>optional string domain = 1;</code>
38811 * @return Whether the domain field is set.
38812 */
38813 @java.lang.Override
38814 public boolean hasDomain() {
38815 return ((bitField0_ & 0x00000001) != 0);
38816 }
38817 /**
38818 * <pre>
38819 * When missing, the domain is the same as the model's.
38820 * </pre>
38821 *
38822 * <code>optional string domain = 1;</code>
38823 * @return The domain.
38824 */
38825 @java.lang.Override
38826 public java.lang.String getDomain() {
38827 java.lang.Object ref = domain_;
38828 if (ref instanceof java.lang.String) {
38829 return (java.lang.String) ref;
38830 } else {
38831 com.google.protobuf.ByteString bs =
38832 (com.google.protobuf.ByteString) ref;
38833 java.lang.String s = bs.toStringUtf8();
38834 if (bs.isValidUtf8()) {
38835 domain_ = s;
38836 }
38837 return s;
38838 }
38839 }
38840 /**
38841 * <pre>
38842 * When missing, the domain is the same as the model's.
38843 * </pre>
38844 *
38845 * <code>optional string domain = 1;</code>
38846 * @return The bytes for domain.
38847 */
38848 @java.lang.Override
38849 public com.google.protobuf.ByteString
38850 getDomainBytes() {
38851 java.lang.Object ref = domain_;
38852 if (ref instanceof java.lang.String) {
38853 com.google.protobuf.ByteString b =
38854 com.google.protobuf.ByteString.copyFromUtf8(
38855 (java.lang.String) ref);
38856 domain_ = b;
38857 return b;
38858 } else {
38859 return (com.google.protobuf.ByteString) ref;
38860 }
38861 }
38862
38863 public static final int NAME_FIELD_NUMBER = 2;
38864 @SuppressWarnings("serial")
38865 private volatile java.lang.Object name_ = "";
38866 /**
38867 * <pre>
38868 * The name is optional but significant when provided.
38869 * </pre>
38870 *
38871 * <code>optional string name = 2;</code>
38872 * @return Whether the name field is set.
38873 */
38874 @java.lang.Override
38875 public boolean hasName() {
38876 return ((bitField0_ & 0x00000002) != 0);
38877 }
38878 /**
38879 * <pre>
38880 * The name is optional but significant when provided.
38881 * </pre>
38882 *
38883 * <code>optional string name = 2;</code>
38884 * @return The name.
38885 */
38886 @java.lang.Override
38887 public java.lang.String getName() {
38888 java.lang.Object ref = name_;
38889 if (ref instanceof java.lang.String) {
38890 return (java.lang.String) ref;
38891 } else {
38892 com.google.protobuf.ByteString bs =
38893 (com.google.protobuf.ByteString) ref;
38894 java.lang.String s = bs.toStringUtf8();
38895 if (bs.isValidUtf8()) {
38896 name_ = s;
38897 }
38898 return s;
38899 }
38900 }
38901 /**
38902 * <pre>
38903 * The name is optional but significant when provided.
38904 * </pre>
38905 *
38906 * <code>optional string name = 2;</code>
38907 * @return The bytes for name.
38908 */
38909 @java.lang.Override
38910 public com.google.protobuf.ByteString
38911 getNameBytes() {
38912 java.lang.Object ref = name_;
38913 if (ref instanceof java.lang.String) {
38914 com.google.protobuf.ByteString b =
38915 com.google.protobuf.ByteString.copyFromUtf8(
38916 (java.lang.String) ref);
38917 name_ = b;
38918 return b;
38919 } else {
38920 return (com.google.protobuf.ByteString) ref;
38921 }
38922 }
38923
38924 private byte memoizedIsInitialized = -1;
38925 @java.lang.Override
38926 public final boolean isInitialized() {
38927 byte isInitialized = memoizedIsInitialized;
38928 if (isInitialized == 1) return true;
38929 if (isInitialized == 0) return false;
38930
38931 memoizedIsInitialized = 1;
38932 return true;
38933 }
38934
38935 @java.lang.Override
38936 public void writeTo(com.google.protobuf.CodedOutputStream output)
38937 throws java.io.IOException {
38938 if (((bitField0_ & 0x00000001) != 0)) {
38939 com.google.protobuf.GeneratedMessage.writeString(output, 1, domain_);
38940 }
38941 if (((bitField0_ & 0x00000002) != 0)) {
38942 com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
38943 }
38944 getUnknownFields().writeTo(output);
38945 }
38946
38947 @java.lang.Override
38948 public int getSerializedSize() {
38949 int size = memoizedSize;
38950 if (size != -1) return size;
38951
38952 size = 0;
38953 if (((bitField0_ & 0x00000001) != 0)) {
38954 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, domain_);
38955 }
38956 if (((bitField0_ & 0x00000002) != 0)) {
38957 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
38958 }
38959 size += getUnknownFields().getSerializedSize();
38960 memoizedSize = size;
38961 return size;
38962 }
38963
38964 @java.lang.Override
38965 public boolean equals(final java.lang.Object obj) {
38966 if (obj == this) {
38967 return true;
38968 }
38969 if (!(obj instanceof onnx.OnnxMl.TypeProto.Opaque)) {
38970 return super.equals(obj);
38971 }
38972 onnx.OnnxMl.TypeProto.Opaque other = (onnx.OnnxMl.TypeProto.Opaque) obj;
38973
38974 if (hasDomain() != other.hasDomain()) return false;
38975 if (hasDomain()) {
38976 if (!getDomain()
38977 .equals(other.getDomain())) return false;
38978 }
38979 if (hasName() != other.hasName()) return false;
38980 if (hasName()) {
38981 if (!getName()
38982 .equals(other.getName())) return false;
38983 }
38984 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
38985 return true;
38986 }
38987
38988 @java.lang.Override
38989 public int hashCode() {
38990 if (memoizedHashCode != 0) {
38991 return memoizedHashCode;
38992 }
38993 int hash = 41;
38994 hash = (19 * hash) + getDescriptor().hashCode();
38995 if (hasDomain()) {
38996 hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
38997 hash = (53 * hash) + getDomain().hashCode();
38998 }
38999 if (hasName()) {
39000 hash = (37 * hash) + NAME_FIELD_NUMBER;
39001 hash = (53 * hash) + getName().hashCode();
39002 }
39003 hash = (29 * hash) + getUnknownFields().hashCode();
39004 memoizedHashCode = hash;
39005 return hash;
39006 }
39007
39008 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39009 java.nio.ByteBuffer data)
39010 throws com.google.protobuf.InvalidProtocolBufferException {
39011 return PARSER.parseFrom(data);
39012 }
39013 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39014 java.nio.ByteBuffer data,
39015 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39016 throws com.google.protobuf.InvalidProtocolBufferException {
39017 return PARSER.parseFrom(data, extensionRegistry);
39018 }
39019 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39020 com.google.protobuf.ByteString data)
39021 throws com.google.protobuf.InvalidProtocolBufferException {
39022 return PARSER.parseFrom(data);
39023 }
39024 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39025 com.google.protobuf.ByteString data,
39026 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39027 throws com.google.protobuf.InvalidProtocolBufferException {
39028 return PARSER.parseFrom(data, extensionRegistry);
39029 }
39030 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(byte[] data)
39031 throws com.google.protobuf.InvalidProtocolBufferException {
39032 return PARSER.parseFrom(data);
39033 }
39034 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39035 byte[] data,
39036 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39037 throws com.google.protobuf.InvalidProtocolBufferException {
39038 return PARSER.parseFrom(data, extensionRegistry);
39039 }
39040 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(java.io.InputStream input)
39041 throws java.io.IOException {
39042 return com.google.protobuf.GeneratedMessage
39043 .parseWithIOException(PARSER, input);
39044 }
39045 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39046 java.io.InputStream input,
39047 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39048 throws java.io.IOException {
39049 return com.google.protobuf.GeneratedMessage
39050 .parseWithIOException(PARSER, input, extensionRegistry);
39051 }
39052
39053 public static onnx.OnnxMl.TypeProto.Opaque parseDelimitedFrom(java.io.InputStream input)
39054 throws java.io.IOException {
39055 return com.google.protobuf.GeneratedMessage
39056 .parseDelimitedWithIOException(PARSER, input);
39057 }
39058
39059 public static onnx.OnnxMl.TypeProto.Opaque parseDelimitedFrom(
39060 java.io.InputStream input,
39061 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39062 throws java.io.IOException {
39063 return com.google.protobuf.GeneratedMessage
39064 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
39065 }
39066 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39067 com.google.protobuf.CodedInputStream input)
39068 throws java.io.IOException {
39069 return com.google.protobuf.GeneratedMessage
39070 .parseWithIOException(PARSER, input);
39071 }
39072 public static onnx.OnnxMl.TypeProto.Opaque parseFrom(
39073 com.google.protobuf.CodedInputStream input,
39074 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39075 throws java.io.IOException {
39076 return com.google.protobuf.GeneratedMessage
39077 .parseWithIOException(PARSER, input, extensionRegistry);
39078 }
39079
39080 @java.lang.Override
39081 public Builder newBuilderForType() { return newBuilder(); }
39082 public static Builder newBuilder() {
39083 return DEFAULT_INSTANCE.toBuilder();
39084 }
39085 public static Builder newBuilder(onnx.OnnxMl.TypeProto.Opaque prototype) {
39086 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
39087 }
39088 @java.lang.Override
39089 public Builder toBuilder() {
39090 return this == DEFAULT_INSTANCE
39091 ? new Builder() : new Builder().mergeFrom(this);
39092 }
39093
39094 @java.lang.Override
39095 protected Builder newBuilderForType(
39096 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
39097 Builder builder = new Builder(parent);
39098 return builder;
39099 }
39100 /**
39101 * Protobuf type {@code onnx.TypeProto.Opaque}
39102 */
39103 public static final class Builder extends
39104 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
39105 // @@protoc_insertion_point(builder_implements:onnx.TypeProto.Opaque)
39106 onnx.OnnxMl.TypeProto.OpaqueOrBuilder {
39107 public static final com.google.protobuf.Descriptors.Descriptor
39108 getDescriptor() {
39109 return onnx.OnnxMl.internal_static_onnx_TypeProto_Opaque_descriptor;
39110 }
39111
39112 @java.lang.Override
39113 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
39114 internalGetFieldAccessorTable() {
39115 return onnx.OnnxMl.internal_static_onnx_TypeProto_Opaque_fieldAccessorTable
39116 .ensureFieldAccessorsInitialized(
39117 onnx.OnnxMl.TypeProto.Opaque.class, onnx.OnnxMl.TypeProto.Opaque.Builder.class);
39118 }
39119
39120 // Construct using onnx.OnnxMl.TypeProto.Opaque.newBuilder()
39121 private Builder() {
39122
39123 }
39124
39125 private Builder(
39126 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
39127 super(parent);
39128
39129 }
39130 @java.lang.Override
39131 public Builder clear() {
39132 super.clear();
39133 bitField0_ = 0;
39134 domain_ = "";
39135 name_ = "";
39136 return this;
39137 }
39138
39139 @java.lang.Override
39140 public com.google.protobuf.Descriptors.Descriptor
39141 getDescriptorForType() {
39142 return onnx.OnnxMl.internal_static_onnx_TypeProto_Opaque_descriptor;
39143 }
39144
39145 @java.lang.Override
39146 public onnx.OnnxMl.TypeProto.Opaque getDefaultInstanceForType() {
39147 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
39148 }
39149
39150 @java.lang.Override
39151 public onnx.OnnxMl.TypeProto.Opaque build() {
39152 onnx.OnnxMl.TypeProto.Opaque result = buildPartial();
39153 if (!result.isInitialized()) {
39154 throw newUninitializedMessageException(result);
39155 }
39156 return result;
39157 }
39158
39159 @java.lang.Override
39160 public onnx.OnnxMl.TypeProto.Opaque buildPartial() {
39161 onnx.OnnxMl.TypeProto.Opaque result = new onnx.OnnxMl.TypeProto.Opaque(this);
39162 if (bitField0_ != 0) { buildPartial0(result); }
39163 onBuilt();
39164 return result;
39165 }
39166
39167 private void buildPartial0(onnx.OnnxMl.TypeProto.Opaque result) {
39168 int from_bitField0_ = bitField0_;
39169 int to_bitField0_ = 0;
39170 if (((from_bitField0_ & 0x00000001) != 0)) {
39171 result.domain_ = domain_;
39172 to_bitField0_ |= 0x00000001;
39173 }
39174 if (((from_bitField0_ & 0x00000002) != 0)) {
39175 result.name_ = name_;
39176 to_bitField0_ |= 0x00000002;
39177 }
39178 result.bitField0_ |= to_bitField0_;
39179 }
39180
39181 @java.lang.Override
39182 public Builder mergeFrom(com.google.protobuf.Message other) {
39183 if (other instanceof onnx.OnnxMl.TypeProto.Opaque) {
39184 return mergeFrom((onnx.OnnxMl.TypeProto.Opaque)other);
39185 } else {
39186 super.mergeFrom(other);
39187 return this;
39188 }
39189 }
39190
39191 public Builder mergeFrom(onnx.OnnxMl.TypeProto.Opaque other) {
39192 if (other == onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance()) return this;
39193 if (other.hasDomain()) {
39194 domain_ = other.domain_;
39195 bitField0_ |= 0x00000001;
39196 onChanged();
39197 }
39198 if (other.hasName()) {
39199 name_ = other.name_;
39200 bitField0_ |= 0x00000002;
39201 onChanged();
39202 }
39203 this.mergeUnknownFields(other.getUnknownFields());
39204 onChanged();
39205 return this;
39206 }
39207
39208 @java.lang.Override
39209 public final boolean isInitialized() {
39210 return true;
39211 }
39212
39213 @java.lang.Override
39214 public Builder mergeFrom(
39215 com.google.protobuf.CodedInputStream input,
39216 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39217 throws java.io.IOException {
39218 if (extensionRegistry == null) {
39219 throw new java.lang.NullPointerException();
39220 }
39221 try {
39222 boolean done = false;
39223 while (!done) {
39224 int tag = input.readTag();
39225 switch (tag) {
39226 case 0:
39227 done = true;
39228 break;
39229 case 10: {
39230 domain_ = input.readBytes();
39231 bitField0_ |= 0x00000001;
39232 break;
39233 } // case 10
39234 case 18: {
39235 name_ = input.readBytes();
39236 bitField0_ |= 0x00000002;
39237 break;
39238 } // case 18
39239 default: {
39240 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
39241 done = true; // was an endgroup tag
39242 }
39243 break;
39244 } // default:
39245 } // switch (tag)
39246 } // while (!done)
39247 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
39248 throw e.unwrapIOException();
39249 } finally {
39250 onChanged();
39251 } // finally
39252 return this;
39253 }
39254 private int bitField0_;
39255
39256 private java.lang.Object domain_ = "";
39257 /**
39258 * <pre>
39259 * When missing, the domain is the same as the model's.
39260 * </pre>
39261 *
39262 * <code>optional string domain = 1;</code>
39263 * @return Whether the domain field is set.
39264 */
39265 public boolean hasDomain() {
39266 return ((bitField0_ & 0x00000001) != 0);
39267 }
39268 /**
39269 * <pre>
39270 * When missing, the domain is the same as the model's.
39271 * </pre>
39272 *
39273 * <code>optional string domain = 1;</code>
39274 * @return The domain.
39275 */
39276 public java.lang.String getDomain() {
39277 java.lang.Object ref = domain_;
39278 if (!(ref instanceof java.lang.String)) {
39279 com.google.protobuf.ByteString bs =
39280 (com.google.protobuf.ByteString) ref;
39281 java.lang.String s = bs.toStringUtf8();
39282 if (bs.isValidUtf8()) {
39283 domain_ = s;
39284 }
39285 return s;
39286 } else {
39287 return (java.lang.String) ref;
39288 }
39289 }
39290 /**
39291 * <pre>
39292 * When missing, the domain is the same as the model's.
39293 * </pre>
39294 *
39295 * <code>optional string domain = 1;</code>
39296 * @return The bytes for domain.
39297 */
39298 public com.google.protobuf.ByteString
39299 getDomainBytes() {
39300 java.lang.Object ref = domain_;
39301 if (ref instanceof String) {
39302 com.google.protobuf.ByteString b =
39303 com.google.protobuf.ByteString.copyFromUtf8(
39304 (java.lang.String) ref);
39305 domain_ = b;
39306 return b;
39307 } else {
39308 return (com.google.protobuf.ByteString) ref;
39309 }
39310 }
39311 /**
39312 * <pre>
39313 * When missing, the domain is the same as the model's.
39314 * </pre>
39315 *
39316 * <code>optional string domain = 1;</code>
39317 * @param value The domain to set.
39318 * @return This builder for chaining.
39319 */
39320 public Builder setDomain(
39321 java.lang.String value) {
39322 if (value == null) { throw new NullPointerException(); }
39323 domain_ = value;
39324 bitField0_ |= 0x00000001;
39325 onChanged();
39326 return this;
39327 }
39328 /**
39329 * <pre>
39330 * When missing, the domain is the same as the model's.
39331 * </pre>
39332 *
39333 * <code>optional string domain = 1;</code>
39334 * @return This builder for chaining.
39335 */
39336 public Builder clearDomain() {
39337 domain_ = getDefaultInstance().getDomain();
39338 bitField0_ = (bitField0_ & ~0x00000001);
39339 onChanged();
39340 return this;
39341 }
39342 /**
39343 * <pre>
39344 * When missing, the domain is the same as the model's.
39345 * </pre>
39346 *
39347 * <code>optional string domain = 1;</code>
39348 * @param value The bytes for domain to set.
39349 * @return This builder for chaining.
39350 */
39351 public Builder setDomainBytes(
39352 com.google.protobuf.ByteString value) {
39353 if (value == null) { throw new NullPointerException(); }
39354 domain_ = value;
39355 bitField0_ |= 0x00000001;
39356 onChanged();
39357 return this;
39358 }
39359
39360 private java.lang.Object name_ = "";
39361 /**
39362 * <pre>
39363 * The name is optional but significant when provided.
39364 * </pre>
39365 *
39366 * <code>optional string name = 2;</code>
39367 * @return Whether the name field is set.
39368 */
39369 public boolean hasName() {
39370 return ((bitField0_ & 0x00000002) != 0);
39371 }
39372 /**
39373 * <pre>
39374 * The name is optional but significant when provided.
39375 * </pre>
39376 *
39377 * <code>optional string name = 2;</code>
39378 * @return The name.
39379 */
39380 public java.lang.String getName() {
39381 java.lang.Object ref = name_;
39382 if (!(ref instanceof java.lang.String)) {
39383 com.google.protobuf.ByteString bs =
39384 (com.google.protobuf.ByteString) ref;
39385 java.lang.String s = bs.toStringUtf8();
39386 if (bs.isValidUtf8()) {
39387 name_ = s;
39388 }
39389 return s;
39390 } else {
39391 return (java.lang.String) ref;
39392 }
39393 }
39394 /**
39395 * <pre>
39396 * The name is optional but significant when provided.
39397 * </pre>
39398 *
39399 * <code>optional string name = 2;</code>
39400 * @return The bytes for name.
39401 */
39402 public com.google.protobuf.ByteString
39403 getNameBytes() {
39404 java.lang.Object ref = name_;
39405 if (ref instanceof String) {
39406 com.google.protobuf.ByteString b =
39407 com.google.protobuf.ByteString.copyFromUtf8(
39408 (java.lang.String) ref);
39409 name_ = b;
39410 return b;
39411 } else {
39412 return (com.google.protobuf.ByteString) ref;
39413 }
39414 }
39415 /**
39416 * <pre>
39417 * The name is optional but significant when provided.
39418 * </pre>
39419 *
39420 * <code>optional string name = 2;</code>
39421 * @param value The name to set.
39422 * @return This builder for chaining.
39423 */
39424 public Builder setName(
39425 java.lang.String value) {
39426 if (value == null) { throw new NullPointerException(); }
39427 name_ = value;
39428 bitField0_ |= 0x00000002;
39429 onChanged();
39430 return this;
39431 }
39432 /**
39433 * <pre>
39434 * The name is optional but significant when provided.
39435 * </pre>
39436 *
39437 * <code>optional string name = 2;</code>
39438 * @return This builder for chaining.
39439 */
39440 public Builder clearName() {
39441 name_ = getDefaultInstance().getName();
39442 bitField0_ = (bitField0_ & ~0x00000002);
39443 onChanged();
39444 return this;
39445 }
39446 /**
39447 * <pre>
39448 * The name is optional but significant when provided.
39449 * </pre>
39450 *
39451 * <code>optional string name = 2;</code>
39452 * @param value The bytes for name to set.
39453 * @return This builder for chaining.
39454 */
39455 public Builder setNameBytes(
39456 com.google.protobuf.ByteString value) {
39457 if (value == null) { throw new NullPointerException(); }
39458 name_ = value;
39459 bitField0_ |= 0x00000002;
39460 onChanged();
39461 return this;
39462 }
39463
39464 // @@protoc_insertion_point(builder_scope:onnx.TypeProto.Opaque)
39465 }
39466
39467 // @@protoc_insertion_point(class_scope:onnx.TypeProto.Opaque)
39468 private static final onnx.OnnxMl.TypeProto.Opaque DEFAULT_INSTANCE;
39469 static {
39470 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto.Opaque();
39471 }
39472
39473 public static onnx.OnnxMl.TypeProto.Opaque getDefaultInstance() {
39474 return DEFAULT_INSTANCE;
39475 }
39476
39477 private static final com.google.protobuf.Parser<Opaque>
39478 PARSER = new com.google.protobuf.AbstractParser<Opaque>() {
39479 @java.lang.Override
39480 public Opaque parsePartialFrom(
39481 com.google.protobuf.CodedInputStream input,
39482 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
39483 throws com.google.protobuf.InvalidProtocolBufferException {
39484 Builder builder = newBuilder();
39485 try {
39486 builder.mergeFrom(input, extensionRegistry);
39487 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
39488 throw e.setUnfinishedMessage(builder.buildPartial());
39489 } catch (com.google.protobuf.UninitializedMessageException e) {
39490 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
39491 } catch (java.io.IOException e) {
39492 throw new com.google.protobuf.InvalidProtocolBufferException(e)
39493 .setUnfinishedMessage(builder.buildPartial());
39494 }
39495 return builder.buildPartial();
39496 }
39497 };
39498
39499 public static com.google.protobuf.Parser<Opaque> parser() {
39500 return PARSER;
39501 }
39502
39503 @java.lang.Override
39504 public com.google.protobuf.Parser<Opaque> getParserForType() {
39505 return PARSER;
39506 }
39507
39508 @java.lang.Override
39509 public onnx.OnnxMl.TypeProto.Opaque getDefaultInstanceForType() {
39510 return DEFAULT_INSTANCE;
39511 }
39512
39513 }
39514
39515 private int bitField0_;
39516 private int valueCase_ = 0;
39517 @SuppressWarnings("serial")
39518 private java.lang.Object value_;
39519 public enum ValueCase
39520 implements com.google.protobuf.Internal.EnumLite,
39521 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
39522 TENSOR_TYPE(1),
39523 SEQUENCE_TYPE(4),
39524 MAP_TYPE(5),
39525 OPTIONAL_TYPE(9),
39526 SPARSE_TENSOR_TYPE(8),
39527 OPAQUE_TYPE(7),
39528 VALUE_NOT_SET(0);
39529 private final int value;
39530 private ValueCase(int value) {
39531 this.value = value;
39532 }
39533 /**
39534 * @param value The number of the enum to look for.
39535 * @return The enum associated with the given number.
39536 * @deprecated Use {@link #forNumber(int)} instead.
39537 */
39538 @java.lang.Deprecated
39539 public static ValueCase valueOf(int value) {
39540 return forNumber(value);
39541 }
39542
39543 public static ValueCase forNumber(int value) {
39544 switch (value) {
39545 case 1: return TENSOR_TYPE;
39546 case 4: return SEQUENCE_TYPE;
39547 case 5: return MAP_TYPE;
39548 case 9: return OPTIONAL_TYPE;
39549 case 8: return SPARSE_TENSOR_TYPE;
39550 case 7: return OPAQUE_TYPE;
39551 case 0: return VALUE_NOT_SET;
39552 default: return null;
39553 }
39554 }
39555 public int getNumber() {
39556 return this.value;
39557 }
39558 };
39559
39560 public ValueCase
39561 getValueCase() {
39562 return ValueCase.forNumber(
39563 valueCase_);
39564 }
39565
39566 public static final int TENSOR_TYPE_FIELD_NUMBER = 1;
39567 /**
39568 * <pre>
39569 * The type of a tensor.
39570 * </pre>
39571 *
39572 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
39573 * @return Whether the tensorType field is set.
39574 */
39575 @java.lang.Override
39576 public boolean hasTensorType() {
39577 return valueCase_ == 1;
39578 }
39579 /**
39580 * <pre>
39581 * The type of a tensor.
39582 * </pre>
39583 *
39584 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
39585 * @return The tensorType.
39586 */
39587 @java.lang.Override
39588 public onnx.OnnxMl.TypeProto.Tensor getTensorType() {
39589 if (valueCase_ == 1) {
39590 return (onnx.OnnxMl.TypeProto.Tensor) value_;
39591 }
39592 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
39593 }
39594 /**
39595 * <pre>
39596 * The type of a tensor.
39597 * </pre>
39598 *
39599 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
39600 */
39601 @java.lang.Override
39602 public onnx.OnnxMl.TypeProto.TensorOrBuilder getTensorTypeOrBuilder() {
39603 if (valueCase_ == 1) {
39604 return (onnx.OnnxMl.TypeProto.Tensor) value_;
39605 }
39606 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
39607 }
39608
39609 public static final int SEQUENCE_TYPE_FIELD_NUMBER = 4;
39610 /**
39611 * <pre>
39612 * The type of a sequence.
39613 * </pre>
39614 *
39615 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
39616 * @return Whether the sequenceType field is set.
39617 */
39618 @java.lang.Override
39619 public boolean hasSequenceType() {
39620 return valueCase_ == 4;
39621 }
39622 /**
39623 * <pre>
39624 * The type of a sequence.
39625 * </pre>
39626 *
39627 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
39628 * @return The sequenceType.
39629 */
39630 @java.lang.Override
39631 public onnx.OnnxMl.TypeProto.Sequence getSequenceType() {
39632 if (valueCase_ == 4) {
39633 return (onnx.OnnxMl.TypeProto.Sequence) value_;
39634 }
39635 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
39636 }
39637 /**
39638 * <pre>
39639 * The type of a sequence.
39640 * </pre>
39641 *
39642 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
39643 */
39644 @java.lang.Override
39645 public onnx.OnnxMl.TypeProto.SequenceOrBuilder getSequenceTypeOrBuilder() {
39646 if (valueCase_ == 4) {
39647 return (onnx.OnnxMl.TypeProto.Sequence) value_;
39648 }
39649 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
39650 }
39651
39652 public static final int MAP_TYPE_FIELD_NUMBER = 5;
39653 /**
39654 * <pre>
39655 * The type of a map.
39656 * </pre>
39657 *
39658 * <code>.onnx.TypeProto.Map map_type = 5;</code>
39659 * @return Whether the mapType field is set.
39660 */
39661 @java.lang.Override
39662 public boolean hasMapType() {
39663 return valueCase_ == 5;
39664 }
39665 /**
39666 * <pre>
39667 * The type of a map.
39668 * </pre>
39669 *
39670 * <code>.onnx.TypeProto.Map map_type = 5;</code>
39671 * @return The mapType.
39672 */
39673 @java.lang.Override
39674 public onnx.OnnxMl.TypeProto.Map getMapType() {
39675 if (valueCase_ == 5) {
39676 return (onnx.OnnxMl.TypeProto.Map) value_;
39677 }
39678 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
39679 }
39680 /**
39681 * <pre>
39682 * The type of a map.
39683 * </pre>
39684 *
39685 * <code>.onnx.TypeProto.Map map_type = 5;</code>
39686 */
39687 @java.lang.Override
39688 public onnx.OnnxMl.TypeProto.MapOrBuilder getMapTypeOrBuilder() {
39689 if (valueCase_ == 5) {
39690 return (onnx.OnnxMl.TypeProto.Map) value_;
39691 }
39692 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
39693 }
39694
39695 public static final int OPTIONAL_TYPE_FIELD_NUMBER = 9;
39696 /**
39697 * <pre>
39698 * The type of an optional.
39699 * </pre>
39700 *
39701 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
39702 * @return Whether the optionalType field is set.
39703 */
39704 @java.lang.Override
39705 public boolean hasOptionalType() {
39706 return valueCase_ == 9;
39707 }
39708 /**
39709 * <pre>
39710 * The type of an optional.
39711 * </pre>
39712 *
39713 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
39714 * @return The optionalType.
39715 */
39716 @java.lang.Override
39717 public onnx.OnnxMl.TypeProto.Optional getOptionalType() {
39718 if (valueCase_ == 9) {
39719 return (onnx.OnnxMl.TypeProto.Optional) value_;
39720 }
39721 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
39722 }
39723 /**
39724 * <pre>
39725 * The type of an optional.
39726 * </pre>
39727 *
39728 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
39729 */
39730 @java.lang.Override
39731 public onnx.OnnxMl.TypeProto.OptionalOrBuilder getOptionalTypeOrBuilder() {
39732 if (valueCase_ == 9) {
39733 return (onnx.OnnxMl.TypeProto.Optional) value_;
39734 }
39735 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
39736 }
39737
39738 public static final int SPARSE_TENSOR_TYPE_FIELD_NUMBER = 8;
39739 /**
39740 * <pre>
39741 * Type of the sparse tensor
39742 * </pre>
39743 *
39744 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
39745 * @return Whether the sparseTensorType field is set.
39746 */
39747 @java.lang.Override
39748 public boolean hasSparseTensorType() {
39749 return valueCase_ == 8;
39750 }
39751 /**
39752 * <pre>
39753 * Type of the sparse tensor
39754 * </pre>
39755 *
39756 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
39757 * @return The sparseTensorType.
39758 */
39759 @java.lang.Override
39760 public onnx.OnnxMl.TypeProto.SparseTensor getSparseTensorType() {
39761 if (valueCase_ == 8) {
39762 return (onnx.OnnxMl.TypeProto.SparseTensor) value_;
39763 }
39764 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
39765 }
39766 /**
39767 * <pre>
39768 * Type of the sparse tensor
39769 * </pre>
39770 *
39771 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
39772 */
39773 @java.lang.Override
39774 public onnx.OnnxMl.TypeProto.SparseTensorOrBuilder getSparseTensorTypeOrBuilder() {
39775 if (valueCase_ == 8) {
39776 return (onnx.OnnxMl.TypeProto.SparseTensor) value_;
39777 }
39778 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
39779 }
39780
39781 public static final int OPAQUE_TYPE_FIELD_NUMBER = 7;
39782 /**
39783 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
39784 * @return Whether the opaqueType field is set.
39785 */
39786 @java.lang.Override
39787 public boolean hasOpaqueType() {
39788 return valueCase_ == 7;
39789 }
39790 /**
39791 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
39792 * @return The opaqueType.
39793 */
39794 @java.lang.Override
39795 public onnx.OnnxMl.TypeProto.Opaque getOpaqueType() {
39796 if (valueCase_ == 7) {
39797 return (onnx.OnnxMl.TypeProto.Opaque) value_;
39798 }
39799 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
39800 }
39801 /**
39802 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
39803 */
39804 @java.lang.Override
39805 public onnx.OnnxMl.TypeProto.OpaqueOrBuilder getOpaqueTypeOrBuilder() {
39806 if (valueCase_ == 7) {
39807 return (onnx.OnnxMl.TypeProto.Opaque) value_;
39808 }
39809 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
39810 }
39811
39812 public static final int DENOTATION_FIELD_NUMBER = 6;
39813 @SuppressWarnings("serial")
39814 private volatile java.lang.Object denotation_ = "";
39815 /**
39816 * <pre>
39817 * An optional denotation can be used to denote the whole
39818 * type with a standard semantic description as to what is
39819 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
39820 * for pre-defined type denotations.
39821 * </pre>
39822 *
39823 * <code>optional string denotation = 6;</code>
39824 * @return Whether the denotation field is set.
39825 */
39826 @java.lang.Override
39827 public boolean hasDenotation() {
39828 return ((bitField0_ & 0x00000001) != 0);
39829 }
39830 /**
39831 * <pre>
39832 * An optional denotation can be used to denote the whole
39833 * type with a standard semantic description as to what is
39834 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
39835 * for pre-defined type denotations.
39836 * </pre>
39837 *
39838 * <code>optional string denotation = 6;</code>
39839 * @return The denotation.
39840 */
39841 @java.lang.Override
39842 public java.lang.String getDenotation() {
39843 java.lang.Object ref = denotation_;
39844 if (ref instanceof java.lang.String) {
39845 return (java.lang.String) ref;
39846 } else {
39847 com.google.protobuf.ByteString bs =
39848 (com.google.protobuf.ByteString) ref;
39849 java.lang.String s = bs.toStringUtf8();
39850 if (bs.isValidUtf8()) {
39851 denotation_ = s;
39852 }
39853 return s;
39854 }
39855 }
39856 /**
39857 * <pre>
39858 * An optional denotation can be used to denote the whole
39859 * type with a standard semantic description as to what is
39860 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
39861 * for pre-defined type denotations.
39862 * </pre>
39863 *
39864 * <code>optional string denotation = 6;</code>
39865 * @return The bytes for denotation.
39866 */
39867 @java.lang.Override
39868 public com.google.protobuf.ByteString
39869 getDenotationBytes() {
39870 java.lang.Object ref = denotation_;
39871 if (ref instanceof java.lang.String) {
39872 com.google.protobuf.ByteString b =
39873 com.google.protobuf.ByteString.copyFromUtf8(
39874 (java.lang.String) ref);
39875 denotation_ = b;
39876 return b;
39877 } else {
39878 return (com.google.protobuf.ByteString) ref;
39879 }
39880 }
39881
39882 private byte memoizedIsInitialized = -1;
39883 @java.lang.Override
39884 public final boolean isInitialized() {
39885 byte isInitialized = memoizedIsInitialized;
39886 if (isInitialized == 1) return true;
39887 if (isInitialized == 0) return false;
39888
39889 memoizedIsInitialized = 1;
39890 return true;
39891 }
39892
39893 @java.lang.Override
39894 public void writeTo(com.google.protobuf.CodedOutputStream output)
39895 throws java.io.IOException {
39896 if (valueCase_ == 1) {
39897 output.writeMessage(1, (onnx.OnnxMl.TypeProto.Tensor) value_);
39898 }
39899 if (valueCase_ == 4) {
39900 output.writeMessage(4, (onnx.OnnxMl.TypeProto.Sequence) value_);
39901 }
39902 if (valueCase_ == 5) {
39903 output.writeMessage(5, (onnx.OnnxMl.TypeProto.Map) value_);
39904 }
39905 if (((bitField0_ & 0x00000001) != 0)) {
39906 com.google.protobuf.GeneratedMessage.writeString(output, 6, denotation_);
39907 }
39908 if (valueCase_ == 7) {
39909 output.writeMessage(7, (onnx.OnnxMl.TypeProto.Opaque) value_);
39910 }
39911 if (valueCase_ == 8) {
39912 output.writeMessage(8, (onnx.OnnxMl.TypeProto.SparseTensor) value_);
39913 }
39914 if (valueCase_ == 9) {
39915 output.writeMessage(9, (onnx.OnnxMl.TypeProto.Optional) value_);
39916 }
39917 getUnknownFields().writeTo(output);
39918 }
39919
39920 @java.lang.Override
39921 public int getSerializedSize() {
39922 int size = memoizedSize;
39923 if (size != -1) return size;
39924
39925 size = 0;
39926 if (valueCase_ == 1) {
39927 size += com.google.protobuf.CodedOutputStream
39928 .computeMessageSize(1, (onnx.OnnxMl.TypeProto.Tensor) value_);
39929 }
39930 if (valueCase_ == 4) {
39931 size += com.google.protobuf.CodedOutputStream
39932 .computeMessageSize(4, (onnx.OnnxMl.TypeProto.Sequence) value_);
39933 }
39934 if (valueCase_ == 5) {
39935 size += com.google.protobuf.CodedOutputStream
39936 .computeMessageSize(5, (onnx.OnnxMl.TypeProto.Map) value_);
39937 }
39938 if (((bitField0_ & 0x00000001) != 0)) {
39939 size += com.google.protobuf.GeneratedMessage.computeStringSize(6, denotation_);
39940 }
39941 if (valueCase_ == 7) {
39942 size += com.google.protobuf.CodedOutputStream
39943 .computeMessageSize(7, (onnx.OnnxMl.TypeProto.Opaque) value_);
39944 }
39945 if (valueCase_ == 8) {
39946 size += com.google.protobuf.CodedOutputStream
39947 .computeMessageSize(8, (onnx.OnnxMl.TypeProto.SparseTensor) value_);
39948 }
39949 if (valueCase_ == 9) {
39950 size += com.google.protobuf.CodedOutputStream
39951 .computeMessageSize(9, (onnx.OnnxMl.TypeProto.Optional) value_);
39952 }
39953 size += getUnknownFields().getSerializedSize();
39954 memoizedSize = size;
39955 return size;
39956 }
39957
39958 @java.lang.Override
39959 public boolean equals(final java.lang.Object obj) {
39960 if (obj == this) {
39961 return true;
39962 }
39963 if (!(obj instanceof onnx.OnnxMl.TypeProto)) {
39964 return super.equals(obj);
39965 }
39966 onnx.OnnxMl.TypeProto other = (onnx.OnnxMl.TypeProto) obj;
39967
39968 if (hasDenotation() != other.hasDenotation()) return false;
39969 if (hasDenotation()) {
39970 if (!getDenotation()
39971 .equals(other.getDenotation())) return false;
39972 }
39973 if (!getValueCase().equals(other.getValueCase())) return false;
39974 switch (valueCase_) {
39975 case 1:
39976 if (!getTensorType()
39977 .equals(other.getTensorType())) return false;
39978 break;
39979 case 4:
39980 if (!getSequenceType()
39981 .equals(other.getSequenceType())) return false;
39982 break;
39983 case 5:
39984 if (!getMapType()
39985 .equals(other.getMapType())) return false;
39986 break;
39987 case 9:
39988 if (!getOptionalType()
39989 .equals(other.getOptionalType())) return false;
39990 break;
39991 case 8:
39992 if (!getSparseTensorType()
39993 .equals(other.getSparseTensorType())) return false;
39994 break;
39995 case 7:
39996 if (!getOpaqueType()
39997 .equals(other.getOpaqueType())) return false;
39998 break;
39999 case 0:
40000 default:
40001 }
40002 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
40003 return true;
40004 }
40005
40006 @java.lang.Override
40007 public int hashCode() {
40008 if (memoizedHashCode != 0) {
40009 return memoizedHashCode;
40010 }
40011 int hash = 41;
40012 hash = (19 * hash) + getDescriptor().hashCode();
40013 if (hasDenotation()) {
40014 hash = (37 * hash) + DENOTATION_FIELD_NUMBER;
40015 hash = (53 * hash) + getDenotation().hashCode();
40016 }
40017 switch (valueCase_) {
40018 case 1:
40019 hash = (37 * hash) + TENSOR_TYPE_FIELD_NUMBER;
40020 hash = (53 * hash) + getTensorType().hashCode();
40021 break;
40022 case 4:
40023 hash = (37 * hash) + SEQUENCE_TYPE_FIELD_NUMBER;
40024 hash = (53 * hash) + getSequenceType().hashCode();
40025 break;
40026 case 5:
40027 hash = (37 * hash) + MAP_TYPE_FIELD_NUMBER;
40028 hash = (53 * hash) + getMapType().hashCode();
40029 break;
40030 case 9:
40031 hash = (37 * hash) + OPTIONAL_TYPE_FIELD_NUMBER;
40032 hash = (53 * hash) + getOptionalType().hashCode();
40033 break;
40034 case 8:
40035 hash = (37 * hash) + SPARSE_TENSOR_TYPE_FIELD_NUMBER;
40036 hash = (53 * hash) + getSparseTensorType().hashCode();
40037 break;
40038 case 7:
40039 hash = (37 * hash) + OPAQUE_TYPE_FIELD_NUMBER;
40040 hash = (53 * hash) + getOpaqueType().hashCode();
40041 break;
40042 case 0:
40043 default:
40044 }
40045 hash = (29 * hash) + getUnknownFields().hashCode();
40046 memoizedHashCode = hash;
40047 return hash;
40048 }
40049
40050 public static onnx.OnnxMl.TypeProto parseFrom(
40051 java.nio.ByteBuffer data)
40052 throws com.google.protobuf.InvalidProtocolBufferException {
40053 return PARSER.parseFrom(data);
40054 }
40055 public static onnx.OnnxMl.TypeProto parseFrom(
40056 java.nio.ByteBuffer data,
40057 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40058 throws com.google.protobuf.InvalidProtocolBufferException {
40059 return PARSER.parseFrom(data, extensionRegistry);
40060 }
40061 public static onnx.OnnxMl.TypeProto parseFrom(
40062 com.google.protobuf.ByteString data)
40063 throws com.google.protobuf.InvalidProtocolBufferException {
40064 return PARSER.parseFrom(data);
40065 }
40066 public static onnx.OnnxMl.TypeProto parseFrom(
40067 com.google.protobuf.ByteString data,
40068 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40069 throws com.google.protobuf.InvalidProtocolBufferException {
40070 return PARSER.parseFrom(data, extensionRegistry);
40071 }
40072 public static onnx.OnnxMl.TypeProto parseFrom(byte[] data)
40073 throws com.google.protobuf.InvalidProtocolBufferException {
40074 return PARSER.parseFrom(data);
40075 }
40076 public static onnx.OnnxMl.TypeProto parseFrom(
40077 byte[] data,
40078 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40079 throws com.google.protobuf.InvalidProtocolBufferException {
40080 return PARSER.parseFrom(data, extensionRegistry);
40081 }
40082 public static onnx.OnnxMl.TypeProto parseFrom(java.io.InputStream input)
40083 throws java.io.IOException {
40084 return com.google.protobuf.GeneratedMessage
40085 .parseWithIOException(PARSER, input);
40086 }
40087 public static onnx.OnnxMl.TypeProto parseFrom(
40088 java.io.InputStream input,
40089 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40090 throws java.io.IOException {
40091 return com.google.protobuf.GeneratedMessage
40092 .parseWithIOException(PARSER, input, extensionRegistry);
40093 }
40094
40095 public static onnx.OnnxMl.TypeProto parseDelimitedFrom(java.io.InputStream input)
40096 throws java.io.IOException {
40097 return com.google.protobuf.GeneratedMessage
40098 .parseDelimitedWithIOException(PARSER, input);
40099 }
40100
40101 public static onnx.OnnxMl.TypeProto parseDelimitedFrom(
40102 java.io.InputStream input,
40103 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40104 throws java.io.IOException {
40105 return com.google.protobuf.GeneratedMessage
40106 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
40107 }
40108 public static onnx.OnnxMl.TypeProto parseFrom(
40109 com.google.protobuf.CodedInputStream input)
40110 throws java.io.IOException {
40111 return com.google.protobuf.GeneratedMessage
40112 .parseWithIOException(PARSER, input);
40113 }
40114 public static onnx.OnnxMl.TypeProto parseFrom(
40115 com.google.protobuf.CodedInputStream input,
40116 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40117 throws java.io.IOException {
40118 return com.google.protobuf.GeneratedMessage
40119 .parseWithIOException(PARSER, input, extensionRegistry);
40120 }
40121
40122 @java.lang.Override
40123 public Builder newBuilderForType() { return newBuilder(); }
40124 public static Builder newBuilder() {
40125 return DEFAULT_INSTANCE.toBuilder();
40126 }
40127 public static Builder newBuilder(onnx.OnnxMl.TypeProto prototype) {
40128 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
40129 }
40130 @java.lang.Override
40131 public Builder toBuilder() {
40132 return this == DEFAULT_INSTANCE
40133 ? new Builder() : new Builder().mergeFrom(this);
40134 }
40135
40136 @java.lang.Override
40137 protected Builder newBuilderForType(
40138 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
40139 Builder builder = new Builder(parent);
40140 return builder;
40141 }
40142 /**
40143 * <pre>
40144 * Types
40145 *
40146 * The standard ONNX data types.
40147 * </pre>
40148 *
40149 * Protobuf type {@code onnx.TypeProto}
40150 */
40151 public static final class Builder extends
40152 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
40153 // @@protoc_insertion_point(builder_implements:onnx.TypeProto)
40154 onnx.OnnxMl.TypeProtoOrBuilder {
40155 public static final com.google.protobuf.Descriptors.Descriptor
40156 getDescriptor() {
40157 return onnx.OnnxMl.internal_static_onnx_TypeProto_descriptor;
40158 }
40159
40160 @java.lang.Override
40161 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
40162 internalGetFieldAccessorTable() {
40163 return onnx.OnnxMl.internal_static_onnx_TypeProto_fieldAccessorTable
40164 .ensureFieldAccessorsInitialized(
40165 onnx.OnnxMl.TypeProto.class, onnx.OnnxMl.TypeProto.Builder.class);
40166 }
40167
40168 // Construct using onnx.OnnxMl.TypeProto.newBuilder()
40169 private Builder() {
40170
40171 }
40172
40173 private Builder(
40174 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
40175 super(parent);
40176
40177 }
40178 @java.lang.Override
40179 public Builder clear() {
40180 super.clear();
40181 bitField0_ = 0;
40182 if (tensorTypeBuilder_ != null) {
40183 tensorTypeBuilder_.clear();
40184 }
40185 if (sequenceTypeBuilder_ != null) {
40186 sequenceTypeBuilder_.clear();
40187 }
40188 if (mapTypeBuilder_ != null) {
40189 mapTypeBuilder_.clear();
40190 }
40191 if (optionalTypeBuilder_ != null) {
40192 optionalTypeBuilder_.clear();
40193 }
40194 if (sparseTensorTypeBuilder_ != null) {
40195 sparseTensorTypeBuilder_.clear();
40196 }
40197 if (opaqueTypeBuilder_ != null) {
40198 opaqueTypeBuilder_.clear();
40199 }
40200 denotation_ = "";
40201 valueCase_ = 0;
40202 value_ = null;
40203 return this;
40204 }
40205
40206 @java.lang.Override
40207 public com.google.protobuf.Descriptors.Descriptor
40208 getDescriptorForType() {
40209 return onnx.OnnxMl.internal_static_onnx_TypeProto_descriptor;
40210 }
40211
40212 @java.lang.Override
40213 public onnx.OnnxMl.TypeProto getDefaultInstanceForType() {
40214 return onnx.OnnxMl.TypeProto.getDefaultInstance();
40215 }
40216
40217 @java.lang.Override
40218 public onnx.OnnxMl.TypeProto build() {
40219 onnx.OnnxMl.TypeProto result = buildPartial();
40220 if (!result.isInitialized()) {
40221 throw newUninitializedMessageException(result);
40222 }
40223 return result;
40224 }
40225
40226 @java.lang.Override
40227 public onnx.OnnxMl.TypeProto buildPartial() {
40228 onnx.OnnxMl.TypeProto result = new onnx.OnnxMl.TypeProto(this);
40229 if (bitField0_ != 0) { buildPartial0(result); }
40230 buildPartialOneofs(result);
40231 onBuilt();
40232 return result;
40233 }
40234
40235 private void buildPartial0(onnx.OnnxMl.TypeProto result) {
40236 int from_bitField0_ = bitField0_;
40237 int to_bitField0_ = 0;
40238 if (((from_bitField0_ & 0x00000040) != 0)) {
40239 result.denotation_ = denotation_;
40240 to_bitField0_ |= 0x00000001;
40241 }
40242 result.bitField0_ |= to_bitField0_;
40243 }
40244
40245 private void buildPartialOneofs(onnx.OnnxMl.TypeProto result) {
40246 result.valueCase_ = valueCase_;
40247 result.value_ = this.value_;
40248 if (valueCase_ == 1 &&
40249 tensorTypeBuilder_ != null) {
40250 result.value_ = tensorTypeBuilder_.build();
40251 }
40252 if (valueCase_ == 4 &&
40253 sequenceTypeBuilder_ != null) {
40254 result.value_ = sequenceTypeBuilder_.build();
40255 }
40256 if (valueCase_ == 5 &&
40257 mapTypeBuilder_ != null) {
40258 result.value_ = mapTypeBuilder_.build();
40259 }
40260 if (valueCase_ == 9 &&
40261 optionalTypeBuilder_ != null) {
40262 result.value_ = optionalTypeBuilder_.build();
40263 }
40264 if (valueCase_ == 8 &&
40265 sparseTensorTypeBuilder_ != null) {
40266 result.value_ = sparseTensorTypeBuilder_.build();
40267 }
40268 if (valueCase_ == 7 &&
40269 opaqueTypeBuilder_ != null) {
40270 result.value_ = opaqueTypeBuilder_.build();
40271 }
40272 }
40273
40274 @java.lang.Override
40275 public Builder mergeFrom(com.google.protobuf.Message other) {
40276 if (other instanceof onnx.OnnxMl.TypeProto) {
40277 return mergeFrom((onnx.OnnxMl.TypeProto)other);
40278 } else {
40279 super.mergeFrom(other);
40280 return this;
40281 }
40282 }
40283
40284 public Builder mergeFrom(onnx.OnnxMl.TypeProto other) {
40285 if (other == onnx.OnnxMl.TypeProto.getDefaultInstance()) return this;
40286 if (other.hasDenotation()) {
40287 denotation_ = other.denotation_;
40288 bitField0_ |= 0x00000040;
40289 onChanged();
40290 }
40291 switch (other.getValueCase()) {
40292 case TENSOR_TYPE: {
40293 mergeTensorType(other.getTensorType());
40294 break;
40295 }
40296 case SEQUENCE_TYPE: {
40297 mergeSequenceType(other.getSequenceType());
40298 break;
40299 }
40300 case MAP_TYPE: {
40301 mergeMapType(other.getMapType());
40302 break;
40303 }
40304 case OPTIONAL_TYPE: {
40305 mergeOptionalType(other.getOptionalType());
40306 break;
40307 }
40308 case SPARSE_TENSOR_TYPE: {
40309 mergeSparseTensorType(other.getSparseTensorType());
40310 break;
40311 }
40312 case OPAQUE_TYPE: {
40313 mergeOpaqueType(other.getOpaqueType());
40314 break;
40315 }
40316 case VALUE_NOT_SET: {
40317 break;
40318 }
40319 }
40320 this.mergeUnknownFields(other.getUnknownFields());
40321 onChanged();
40322 return this;
40323 }
40324
40325 @java.lang.Override
40326 public final boolean isInitialized() {
40327 return true;
40328 }
40329
40330 @java.lang.Override
40331 public Builder mergeFrom(
40332 com.google.protobuf.CodedInputStream input,
40333 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40334 throws java.io.IOException {
40335 if (extensionRegistry == null) {
40336 throw new java.lang.NullPointerException();
40337 }
40338 try {
40339 boolean done = false;
40340 while (!done) {
40341 int tag = input.readTag();
40342 switch (tag) {
40343 case 0:
40344 done = true;
40345 break;
40346 case 10: {
40347 input.readMessage(
40348 getTensorTypeFieldBuilder().getBuilder(),
40349 extensionRegistry);
40350 valueCase_ = 1;
40351 break;
40352 } // case 10
40353 case 34: {
40354 input.readMessage(
40355 getSequenceTypeFieldBuilder().getBuilder(),
40356 extensionRegistry);
40357 valueCase_ = 4;
40358 break;
40359 } // case 34
40360 case 42: {
40361 input.readMessage(
40362 getMapTypeFieldBuilder().getBuilder(),
40363 extensionRegistry);
40364 valueCase_ = 5;
40365 break;
40366 } // case 42
40367 case 50: {
40368 denotation_ = input.readBytes();
40369 bitField0_ |= 0x00000040;
40370 break;
40371 } // case 50
40372 case 58: {
40373 input.readMessage(
40374 getOpaqueTypeFieldBuilder().getBuilder(),
40375 extensionRegistry);
40376 valueCase_ = 7;
40377 break;
40378 } // case 58
40379 case 66: {
40380 input.readMessage(
40381 getSparseTensorTypeFieldBuilder().getBuilder(),
40382 extensionRegistry);
40383 valueCase_ = 8;
40384 break;
40385 } // case 66
40386 case 74: {
40387 input.readMessage(
40388 getOptionalTypeFieldBuilder().getBuilder(),
40389 extensionRegistry);
40390 valueCase_ = 9;
40391 break;
40392 } // case 74
40393 default: {
40394 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
40395 done = true; // was an endgroup tag
40396 }
40397 break;
40398 } // default:
40399 } // switch (tag)
40400 } // while (!done)
40401 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
40402 throw e.unwrapIOException();
40403 } finally {
40404 onChanged();
40405 } // finally
40406 return this;
40407 }
40408 private int valueCase_ = 0;
40409 private java.lang.Object value_;
40410 public ValueCase
40411 getValueCase() {
40412 return ValueCase.forNumber(
40413 valueCase_);
40414 }
40415
40416 public Builder clearValue() {
40417 valueCase_ = 0;
40418 value_ = null;
40419 onChanged();
40420 return this;
40421 }
40422
40423 private int bitField0_;
40424
40425 private com.google.protobuf.SingleFieldBuilder<
40426 onnx.OnnxMl.TypeProto.Tensor, onnx.OnnxMl.TypeProto.Tensor.Builder, onnx.OnnxMl.TypeProto.TensorOrBuilder> tensorTypeBuilder_;
40427 /**
40428 * <pre>
40429 * The type of a tensor.
40430 * </pre>
40431 *
40432 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40433 * @return Whether the tensorType field is set.
40434 */
40435 @java.lang.Override
40436 public boolean hasTensorType() {
40437 return valueCase_ == 1;
40438 }
40439 /**
40440 * <pre>
40441 * The type of a tensor.
40442 * </pre>
40443 *
40444 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40445 * @return The tensorType.
40446 */
40447 @java.lang.Override
40448 public onnx.OnnxMl.TypeProto.Tensor getTensorType() {
40449 if (tensorTypeBuilder_ == null) {
40450 if (valueCase_ == 1) {
40451 return (onnx.OnnxMl.TypeProto.Tensor) value_;
40452 }
40453 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
40454 } else {
40455 if (valueCase_ == 1) {
40456 return tensorTypeBuilder_.getMessage();
40457 }
40458 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
40459 }
40460 }
40461 /**
40462 * <pre>
40463 * The type of a tensor.
40464 * </pre>
40465 *
40466 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40467 */
40468 public Builder setTensorType(onnx.OnnxMl.TypeProto.Tensor value) {
40469 if (tensorTypeBuilder_ == null) {
40470 if (value == null) {
40471 throw new NullPointerException();
40472 }
40473 value_ = value;
40474 onChanged();
40475 } else {
40476 tensorTypeBuilder_.setMessage(value);
40477 }
40478 valueCase_ = 1;
40479 return this;
40480 }
40481 /**
40482 * <pre>
40483 * The type of a tensor.
40484 * </pre>
40485 *
40486 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40487 */
40488 public Builder setTensorType(
40489 onnx.OnnxMl.TypeProto.Tensor.Builder builderForValue) {
40490 if (tensorTypeBuilder_ == null) {
40491 value_ = builderForValue.build();
40492 onChanged();
40493 } else {
40494 tensorTypeBuilder_.setMessage(builderForValue.build());
40495 }
40496 valueCase_ = 1;
40497 return this;
40498 }
40499 /**
40500 * <pre>
40501 * The type of a tensor.
40502 * </pre>
40503 *
40504 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40505 */
40506 public Builder mergeTensorType(onnx.OnnxMl.TypeProto.Tensor value) {
40507 if (tensorTypeBuilder_ == null) {
40508 if (valueCase_ == 1 &&
40509 value_ != onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance()) {
40510 value_ = onnx.OnnxMl.TypeProto.Tensor.newBuilder((onnx.OnnxMl.TypeProto.Tensor) value_)
40511 .mergeFrom(value).buildPartial();
40512 } else {
40513 value_ = value;
40514 }
40515 onChanged();
40516 } else {
40517 if (valueCase_ == 1) {
40518 tensorTypeBuilder_.mergeFrom(value);
40519 } else {
40520 tensorTypeBuilder_.setMessage(value);
40521 }
40522 }
40523 valueCase_ = 1;
40524 return this;
40525 }
40526 /**
40527 * <pre>
40528 * The type of a tensor.
40529 * </pre>
40530 *
40531 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40532 */
40533 public Builder clearTensorType() {
40534 if (tensorTypeBuilder_ == null) {
40535 if (valueCase_ == 1) {
40536 valueCase_ = 0;
40537 value_ = null;
40538 onChanged();
40539 }
40540 } else {
40541 if (valueCase_ == 1) {
40542 valueCase_ = 0;
40543 value_ = null;
40544 }
40545 tensorTypeBuilder_.clear();
40546 }
40547 return this;
40548 }
40549 /**
40550 * <pre>
40551 * The type of a tensor.
40552 * </pre>
40553 *
40554 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40555 */
40556 public onnx.OnnxMl.TypeProto.Tensor.Builder getTensorTypeBuilder() {
40557 return getTensorTypeFieldBuilder().getBuilder();
40558 }
40559 /**
40560 * <pre>
40561 * The type of a tensor.
40562 * </pre>
40563 *
40564 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40565 */
40566 @java.lang.Override
40567 public onnx.OnnxMl.TypeProto.TensorOrBuilder getTensorTypeOrBuilder() {
40568 if ((valueCase_ == 1) && (tensorTypeBuilder_ != null)) {
40569 return tensorTypeBuilder_.getMessageOrBuilder();
40570 } else {
40571 if (valueCase_ == 1) {
40572 return (onnx.OnnxMl.TypeProto.Tensor) value_;
40573 }
40574 return onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
40575 }
40576 }
40577 /**
40578 * <pre>
40579 * The type of a tensor.
40580 * </pre>
40581 *
40582 * <code>.onnx.TypeProto.Tensor tensor_type = 1;</code>
40583 */
40584 private com.google.protobuf.SingleFieldBuilder<
40585 onnx.OnnxMl.TypeProto.Tensor, onnx.OnnxMl.TypeProto.Tensor.Builder, onnx.OnnxMl.TypeProto.TensorOrBuilder>
40586 getTensorTypeFieldBuilder() {
40587 if (tensorTypeBuilder_ == null) {
40588 if (!(valueCase_ == 1)) {
40589 value_ = onnx.OnnxMl.TypeProto.Tensor.getDefaultInstance();
40590 }
40591 tensorTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
40592 onnx.OnnxMl.TypeProto.Tensor, onnx.OnnxMl.TypeProto.Tensor.Builder, onnx.OnnxMl.TypeProto.TensorOrBuilder>(
40593 (onnx.OnnxMl.TypeProto.Tensor) value_,
40594 getParentForChildren(),
40595 isClean());
40596 value_ = null;
40597 }
40598 valueCase_ = 1;
40599 onChanged();
40600 return tensorTypeBuilder_;
40601 }
40602
40603 private com.google.protobuf.SingleFieldBuilder<
40604 onnx.OnnxMl.TypeProto.Sequence, onnx.OnnxMl.TypeProto.Sequence.Builder, onnx.OnnxMl.TypeProto.SequenceOrBuilder> sequenceTypeBuilder_;
40605 /**
40606 * <pre>
40607 * The type of a sequence.
40608 * </pre>
40609 *
40610 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40611 * @return Whether the sequenceType field is set.
40612 */
40613 @java.lang.Override
40614 public boolean hasSequenceType() {
40615 return valueCase_ == 4;
40616 }
40617 /**
40618 * <pre>
40619 * The type of a sequence.
40620 * </pre>
40621 *
40622 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40623 * @return The sequenceType.
40624 */
40625 @java.lang.Override
40626 public onnx.OnnxMl.TypeProto.Sequence getSequenceType() {
40627 if (sequenceTypeBuilder_ == null) {
40628 if (valueCase_ == 4) {
40629 return (onnx.OnnxMl.TypeProto.Sequence) value_;
40630 }
40631 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
40632 } else {
40633 if (valueCase_ == 4) {
40634 return sequenceTypeBuilder_.getMessage();
40635 }
40636 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
40637 }
40638 }
40639 /**
40640 * <pre>
40641 * The type of a sequence.
40642 * </pre>
40643 *
40644 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40645 */
40646 public Builder setSequenceType(onnx.OnnxMl.TypeProto.Sequence value) {
40647 if (sequenceTypeBuilder_ == null) {
40648 if (value == null) {
40649 throw new NullPointerException();
40650 }
40651 value_ = value;
40652 onChanged();
40653 } else {
40654 sequenceTypeBuilder_.setMessage(value);
40655 }
40656 valueCase_ = 4;
40657 return this;
40658 }
40659 /**
40660 * <pre>
40661 * The type of a sequence.
40662 * </pre>
40663 *
40664 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40665 */
40666 public Builder setSequenceType(
40667 onnx.OnnxMl.TypeProto.Sequence.Builder builderForValue) {
40668 if (sequenceTypeBuilder_ == null) {
40669 value_ = builderForValue.build();
40670 onChanged();
40671 } else {
40672 sequenceTypeBuilder_.setMessage(builderForValue.build());
40673 }
40674 valueCase_ = 4;
40675 return this;
40676 }
40677 /**
40678 * <pre>
40679 * The type of a sequence.
40680 * </pre>
40681 *
40682 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40683 */
40684 public Builder mergeSequenceType(onnx.OnnxMl.TypeProto.Sequence value) {
40685 if (sequenceTypeBuilder_ == null) {
40686 if (valueCase_ == 4 &&
40687 value_ != onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance()) {
40688 value_ = onnx.OnnxMl.TypeProto.Sequence.newBuilder((onnx.OnnxMl.TypeProto.Sequence) value_)
40689 .mergeFrom(value).buildPartial();
40690 } else {
40691 value_ = value;
40692 }
40693 onChanged();
40694 } else {
40695 if (valueCase_ == 4) {
40696 sequenceTypeBuilder_.mergeFrom(value);
40697 } else {
40698 sequenceTypeBuilder_.setMessage(value);
40699 }
40700 }
40701 valueCase_ = 4;
40702 return this;
40703 }
40704 /**
40705 * <pre>
40706 * The type of a sequence.
40707 * </pre>
40708 *
40709 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40710 */
40711 public Builder clearSequenceType() {
40712 if (sequenceTypeBuilder_ == null) {
40713 if (valueCase_ == 4) {
40714 valueCase_ = 0;
40715 value_ = null;
40716 onChanged();
40717 }
40718 } else {
40719 if (valueCase_ == 4) {
40720 valueCase_ = 0;
40721 value_ = null;
40722 }
40723 sequenceTypeBuilder_.clear();
40724 }
40725 return this;
40726 }
40727 /**
40728 * <pre>
40729 * The type of a sequence.
40730 * </pre>
40731 *
40732 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40733 */
40734 public onnx.OnnxMl.TypeProto.Sequence.Builder getSequenceTypeBuilder() {
40735 return getSequenceTypeFieldBuilder().getBuilder();
40736 }
40737 /**
40738 * <pre>
40739 * The type of a sequence.
40740 * </pre>
40741 *
40742 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40743 */
40744 @java.lang.Override
40745 public onnx.OnnxMl.TypeProto.SequenceOrBuilder getSequenceTypeOrBuilder() {
40746 if ((valueCase_ == 4) && (sequenceTypeBuilder_ != null)) {
40747 return sequenceTypeBuilder_.getMessageOrBuilder();
40748 } else {
40749 if (valueCase_ == 4) {
40750 return (onnx.OnnxMl.TypeProto.Sequence) value_;
40751 }
40752 return onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
40753 }
40754 }
40755 /**
40756 * <pre>
40757 * The type of a sequence.
40758 * </pre>
40759 *
40760 * <code>.onnx.TypeProto.Sequence sequence_type = 4;</code>
40761 */
40762 private com.google.protobuf.SingleFieldBuilder<
40763 onnx.OnnxMl.TypeProto.Sequence, onnx.OnnxMl.TypeProto.Sequence.Builder, onnx.OnnxMl.TypeProto.SequenceOrBuilder>
40764 getSequenceTypeFieldBuilder() {
40765 if (sequenceTypeBuilder_ == null) {
40766 if (!(valueCase_ == 4)) {
40767 value_ = onnx.OnnxMl.TypeProto.Sequence.getDefaultInstance();
40768 }
40769 sequenceTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
40770 onnx.OnnxMl.TypeProto.Sequence, onnx.OnnxMl.TypeProto.Sequence.Builder, onnx.OnnxMl.TypeProto.SequenceOrBuilder>(
40771 (onnx.OnnxMl.TypeProto.Sequence) value_,
40772 getParentForChildren(),
40773 isClean());
40774 value_ = null;
40775 }
40776 valueCase_ = 4;
40777 onChanged();
40778 return sequenceTypeBuilder_;
40779 }
40780
40781 private com.google.protobuf.SingleFieldBuilder<
40782 onnx.OnnxMl.TypeProto.Map, onnx.OnnxMl.TypeProto.Map.Builder, onnx.OnnxMl.TypeProto.MapOrBuilder> mapTypeBuilder_;
40783 /**
40784 * <pre>
40785 * The type of a map.
40786 * </pre>
40787 *
40788 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40789 * @return Whether the mapType field is set.
40790 */
40791 @java.lang.Override
40792 public boolean hasMapType() {
40793 return valueCase_ == 5;
40794 }
40795 /**
40796 * <pre>
40797 * The type of a map.
40798 * </pre>
40799 *
40800 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40801 * @return The mapType.
40802 */
40803 @java.lang.Override
40804 public onnx.OnnxMl.TypeProto.Map getMapType() {
40805 if (mapTypeBuilder_ == null) {
40806 if (valueCase_ == 5) {
40807 return (onnx.OnnxMl.TypeProto.Map) value_;
40808 }
40809 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
40810 } else {
40811 if (valueCase_ == 5) {
40812 return mapTypeBuilder_.getMessage();
40813 }
40814 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
40815 }
40816 }
40817 /**
40818 * <pre>
40819 * The type of a map.
40820 * </pre>
40821 *
40822 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40823 */
40824 public Builder setMapType(onnx.OnnxMl.TypeProto.Map value) {
40825 if (mapTypeBuilder_ == null) {
40826 if (value == null) {
40827 throw new NullPointerException();
40828 }
40829 value_ = value;
40830 onChanged();
40831 } else {
40832 mapTypeBuilder_.setMessage(value);
40833 }
40834 valueCase_ = 5;
40835 return this;
40836 }
40837 /**
40838 * <pre>
40839 * The type of a map.
40840 * </pre>
40841 *
40842 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40843 */
40844 public Builder setMapType(
40845 onnx.OnnxMl.TypeProto.Map.Builder builderForValue) {
40846 if (mapTypeBuilder_ == null) {
40847 value_ = builderForValue.build();
40848 onChanged();
40849 } else {
40850 mapTypeBuilder_.setMessage(builderForValue.build());
40851 }
40852 valueCase_ = 5;
40853 return this;
40854 }
40855 /**
40856 * <pre>
40857 * The type of a map.
40858 * </pre>
40859 *
40860 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40861 */
40862 public Builder mergeMapType(onnx.OnnxMl.TypeProto.Map value) {
40863 if (mapTypeBuilder_ == null) {
40864 if (valueCase_ == 5 &&
40865 value_ != onnx.OnnxMl.TypeProto.Map.getDefaultInstance()) {
40866 value_ = onnx.OnnxMl.TypeProto.Map.newBuilder((onnx.OnnxMl.TypeProto.Map) value_)
40867 .mergeFrom(value).buildPartial();
40868 } else {
40869 value_ = value;
40870 }
40871 onChanged();
40872 } else {
40873 if (valueCase_ == 5) {
40874 mapTypeBuilder_.mergeFrom(value);
40875 } else {
40876 mapTypeBuilder_.setMessage(value);
40877 }
40878 }
40879 valueCase_ = 5;
40880 return this;
40881 }
40882 /**
40883 * <pre>
40884 * The type of a map.
40885 * </pre>
40886 *
40887 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40888 */
40889 public Builder clearMapType() {
40890 if (mapTypeBuilder_ == null) {
40891 if (valueCase_ == 5) {
40892 valueCase_ = 0;
40893 value_ = null;
40894 onChanged();
40895 }
40896 } else {
40897 if (valueCase_ == 5) {
40898 valueCase_ = 0;
40899 value_ = null;
40900 }
40901 mapTypeBuilder_.clear();
40902 }
40903 return this;
40904 }
40905 /**
40906 * <pre>
40907 * The type of a map.
40908 * </pre>
40909 *
40910 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40911 */
40912 public onnx.OnnxMl.TypeProto.Map.Builder getMapTypeBuilder() {
40913 return getMapTypeFieldBuilder().getBuilder();
40914 }
40915 /**
40916 * <pre>
40917 * The type of a map.
40918 * </pre>
40919 *
40920 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40921 */
40922 @java.lang.Override
40923 public onnx.OnnxMl.TypeProto.MapOrBuilder getMapTypeOrBuilder() {
40924 if ((valueCase_ == 5) && (mapTypeBuilder_ != null)) {
40925 return mapTypeBuilder_.getMessageOrBuilder();
40926 } else {
40927 if (valueCase_ == 5) {
40928 return (onnx.OnnxMl.TypeProto.Map) value_;
40929 }
40930 return onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
40931 }
40932 }
40933 /**
40934 * <pre>
40935 * The type of a map.
40936 * </pre>
40937 *
40938 * <code>.onnx.TypeProto.Map map_type = 5;</code>
40939 */
40940 private com.google.protobuf.SingleFieldBuilder<
40941 onnx.OnnxMl.TypeProto.Map, onnx.OnnxMl.TypeProto.Map.Builder, onnx.OnnxMl.TypeProto.MapOrBuilder>
40942 getMapTypeFieldBuilder() {
40943 if (mapTypeBuilder_ == null) {
40944 if (!(valueCase_ == 5)) {
40945 value_ = onnx.OnnxMl.TypeProto.Map.getDefaultInstance();
40946 }
40947 mapTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
40948 onnx.OnnxMl.TypeProto.Map, onnx.OnnxMl.TypeProto.Map.Builder, onnx.OnnxMl.TypeProto.MapOrBuilder>(
40949 (onnx.OnnxMl.TypeProto.Map) value_,
40950 getParentForChildren(),
40951 isClean());
40952 value_ = null;
40953 }
40954 valueCase_ = 5;
40955 onChanged();
40956 return mapTypeBuilder_;
40957 }
40958
40959 private com.google.protobuf.SingleFieldBuilder<
40960 onnx.OnnxMl.TypeProto.Optional, onnx.OnnxMl.TypeProto.Optional.Builder, onnx.OnnxMl.TypeProto.OptionalOrBuilder> optionalTypeBuilder_;
40961 /**
40962 * <pre>
40963 * The type of an optional.
40964 * </pre>
40965 *
40966 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
40967 * @return Whether the optionalType field is set.
40968 */
40969 @java.lang.Override
40970 public boolean hasOptionalType() {
40971 return valueCase_ == 9;
40972 }
40973 /**
40974 * <pre>
40975 * The type of an optional.
40976 * </pre>
40977 *
40978 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
40979 * @return The optionalType.
40980 */
40981 @java.lang.Override
40982 public onnx.OnnxMl.TypeProto.Optional getOptionalType() {
40983 if (optionalTypeBuilder_ == null) {
40984 if (valueCase_ == 9) {
40985 return (onnx.OnnxMl.TypeProto.Optional) value_;
40986 }
40987 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
40988 } else {
40989 if (valueCase_ == 9) {
40990 return optionalTypeBuilder_.getMessage();
40991 }
40992 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
40993 }
40994 }
40995 /**
40996 * <pre>
40997 * The type of an optional.
40998 * </pre>
40999 *
41000 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41001 */
41002 public Builder setOptionalType(onnx.OnnxMl.TypeProto.Optional value) {
41003 if (optionalTypeBuilder_ == null) {
41004 if (value == null) {
41005 throw new NullPointerException();
41006 }
41007 value_ = value;
41008 onChanged();
41009 } else {
41010 optionalTypeBuilder_.setMessage(value);
41011 }
41012 valueCase_ = 9;
41013 return this;
41014 }
41015 /**
41016 * <pre>
41017 * The type of an optional.
41018 * </pre>
41019 *
41020 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41021 */
41022 public Builder setOptionalType(
41023 onnx.OnnxMl.TypeProto.Optional.Builder builderForValue) {
41024 if (optionalTypeBuilder_ == null) {
41025 value_ = builderForValue.build();
41026 onChanged();
41027 } else {
41028 optionalTypeBuilder_.setMessage(builderForValue.build());
41029 }
41030 valueCase_ = 9;
41031 return this;
41032 }
41033 /**
41034 * <pre>
41035 * The type of an optional.
41036 * </pre>
41037 *
41038 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41039 */
41040 public Builder mergeOptionalType(onnx.OnnxMl.TypeProto.Optional value) {
41041 if (optionalTypeBuilder_ == null) {
41042 if (valueCase_ == 9 &&
41043 value_ != onnx.OnnxMl.TypeProto.Optional.getDefaultInstance()) {
41044 value_ = onnx.OnnxMl.TypeProto.Optional.newBuilder((onnx.OnnxMl.TypeProto.Optional) value_)
41045 .mergeFrom(value).buildPartial();
41046 } else {
41047 value_ = value;
41048 }
41049 onChanged();
41050 } else {
41051 if (valueCase_ == 9) {
41052 optionalTypeBuilder_.mergeFrom(value);
41053 } else {
41054 optionalTypeBuilder_.setMessage(value);
41055 }
41056 }
41057 valueCase_ = 9;
41058 return this;
41059 }
41060 /**
41061 * <pre>
41062 * The type of an optional.
41063 * </pre>
41064 *
41065 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41066 */
41067 public Builder clearOptionalType() {
41068 if (optionalTypeBuilder_ == null) {
41069 if (valueCase_ == 9) {
41070 valueCase_ = 0;
41071 value_ = null;
41072 onChanged();
41073 }
41074 } else {
41075 if (valueCase_ == 9) {
41076 valueCase_ = 0;
41077 value_ = null;
41078 }
41079 optionalTypeBuilder_.clear();
41080 }
41081 return this;
41082 }
41083 /**
41084 * <pre>
41085 * The type of an optional.
41086 * </pre>
41087 *
41088 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41089 */
41090 public onnx.OnnxMl.TypeProto.Optional.Builder getOptionalTypeBuilder() {
41091 return getOptionalTypeFieldBuilder().getBuilder();
41092 }
41093 /**
41094 * <pre>
41095 * The type of an optional.
41096 * </pre>
41097 *
41098 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41099 */
41100 @java.lang.Override
41101 public onnx.OnnxMl.TypeProto.OptionalOrBuilder getOptionalTypeOrBuilder() {
41102 if ((valueCase_ == 9) && (optionalTypeBuilder_ != null)) {
41103 return optionalTypeBuilder_.getMessageOrBuilder();
41104 } else {
41105 if (valueCase_ == 9) {
41106 return (onnx.OnnxMl.TypeProto.Optional) value_;
41107 }
41108 return onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
41109 }
41110 }
41111 /**
41112 * <pre>
41113 * The type of an optional.
41114 * </pre>
41115 *
41116 * <code>.onnx.TypeProto.Optional optional_type = 9;</code>
41117 */
41118 private com.google.protobuf.SingleFieldBuilder<
41119 onnx.OnnxMl.TypeProto.Optional, onnx.OnnxMl.TypeProto.Optional.Builder, onnx.OnnxMl.TypeProto.OptionalOrBuilder>
41120 getOptionalTypeFieldBuilder() {
41121 if (optionalTypeBuilder_ == null) {
41122 if (!(valueCase_ == 9)) {
41123 value_ = onnx.OnnxMl.TypeProto.Optional.getDefaultInstance();
41124 }
41125 optionalTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
41126 onnx.OnnxMl.TypeProto.Optional, onnx.OnnxMl.TypeProto.Optional.Builder, onnx.OnnxMl.TypeProto.OptionalOrBuilder>(
41127 (onnx.OnnxMl.TypeProto.Optional) value_,
41128 getParentForChildren(),
41129 isClean());
41130 value_ = null;
41131 }
41132 valueCase_ = 9;
41133 onChanged();
41134 return optionalTypeBuilder_;
41135 }
41136
41137 private com.google.protobuf.SingleFieldBuilder<
41138 onnx.OnnxMl.TypeProto.SparseTensor, onnx.OnnxMl.TypeProto.SparseTensor.Builder, onnx.OnnxMl.TypeProto.SparseTensorOrBuilder> sparseTensorTypeBuilder_;
41139 /**
41140 * <pre>
41141 * Type of the sparse tensor
41142 * </pre>
41143 *
41144 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41145 * @return Whether the sparseTensorType field is set.
41146 */
41147 @java.lang.Override
41148 public boolean hasSparseTensorType() {
41149 return valueCase_ == 8;
41150 }
41151 /**
41152 * <pre>
41153 * Type of the sparse tensor
41154 * </pre>
41155 *
41156 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41157 * @return The sparseTensorType.
41158 */
41159 @java.lang.Override
41160 public onnx.OnnxMl.TypeProto.SparseTensor getSparseTensorType() {
41161 if (sparseTensorTypeBuilder_ == null) {
41162 if (valueCase_ == 8) {
41163 return (onnx.OnnxMl.TypeProto.SparseTensor) value_;
41164 }
41165 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
41166 } else {
41167 if (valueCase_ == 8) {
41168 return sparseTensorTypeBuilder_.getMessage();
41169 }
41170 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
41171 }
41172 }
41173 /**
41174 * <pre>
41175 * Type of the sparse tensor
41176 * </pre>
41177 *
41178 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41179 */
41180 public Builder setSparseTensorType(onnx.OnnxMl.TypeProto.SparseTensor value) {
41181 if (sparseTensorTypeBuilder_ == null) {
41182 if (value == null) {
41183 throw new NullPointerException();
41184 }
41185 value_ = value;
41186 onChanged();
41187 } else {
41188 sparseTensorTypeBuilder_.setMessage(value);
41189 }
41190 valueCase_ = 8;
41191 return this;
41192 }
41193 /**
41194 * <pre>
41195 * Type of the sparse tensor
41196 * </pre>
41197 *
41198 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41199 */
41200 public Builder setSparseTensorType(
41201 onnx.OnnxMl.TypeProto.SparseTensor.Builder builderForValue) {
41202 if (sparseTensorTypeBuilder_ == null) {
41203 value_ = builderForValue.build();
41204 onChanged();
41205 } else {
41206 sparseTensorTypeBuilder_.setMessage(builderForValue.build());
41207 }
41208 valueCase_ = 8;
41209 return this;
41210 }
41211 /**
41212 * <pre>
41213 * Type of the sparse tensor
41214 * </pre>
41215 *
41216 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41217 */
41218 public Builder mergeSparseTensorType(onnx.OnnxMl.TypeProto.SparseTensor value) {
41219 if (sparseTensorTypeBuilder_ == null) {
41220 if (valueCase_ == 8 &&
41221 value_ != onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance()) {
41222 value_ = onnx.OnnxMl.TypeProto.SparseTensor.newBuilder((onnx.OnnxMl.TypeProto.SparseTensor) value_)
41223 .mergeFrom(value).buildPartial();
41224 } else {
41225 value_ = value;
41226 }
41227 onChanged();
41228 } else {
41229 if (valueCase_ == 8) {
41230 sparseTensorTypeBuilder_.mergeFrom(value);
41231 } else {
41232 sparseTensorTypeBuilder_.setMessage(value);
41233 }
41234 }
41235 valueCase_ = 8;
41236 return this;
41237 }
41238 /**
41239 * <pre>
41240 * Type of the sparse tensor
41241 * </pre>
41242 *
41243 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41244 */
41245 public Builder clearSparseTensorType() {
41246 if (sparseTensorTypeBuilder_ == null) {
41247 if (valueCase_ == 8) {
41248 valueCase_ = 0;
41249 value_ = null;
41250 onChanged();
41251 }
41252 } else {
41253 if (valueCase_ == 8) {
41254 valueCase_ = 0;
41255 value_ = null;
41256 }
41257 sparseTensorTypeBuilder_.clear();
41258 }
41259 return this;
41260 }
41261 /**
41262 * <pre>
41263 * Type of the sparse tensor
41264 * </pre>
41265 *
41266 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41267 */
41268 public onnx.OnnxMl.TypeProto.SparseTensor.Builder getSparseTensorTypeBuilder() {
41269 return getSparseTensorTypeFieldBuilder().getBuilder();
41270 }
41271 /**
41272 * <pre>
41273 * Type of the sparse tensor
41274 * </pre>
41275 *
41276 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41277 */
41278 @java.lang.Override
41279 public onnx.OnnxMl.TypeProto.SparseTensorOrBuilder getSparseTensorTypeOrBuilder() {
41280 if ((valueCase_ == 8) && (sparseTensorTypeBuilder_ != null)) {
41281 return sparseTensorTypeBuilder_.getMessageOrBuilder();
41282 } else {
41283 if (valueCase_ == 8) {
41284 return (onnx.OnnxMl.TypeProto.SparseTensor) value_;
41285 }
41286 return onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
41287 }
41288 }
41289 /**
41290 * <pre>
41291 * Type of the sparse tensor
41292 * </pre>
41293 *
41294 * <code>.onnx.TypeProto.SparseTensor sparse_tensor_type = 8;</code>
41295 */
41296 private com.google.protobuf.SingleFieldBuilder<
41297 onnx.OnnxMl.TypeProto.SparseTensor, onnx.OnnxMl.TypeProto.SparseTensor.Builder, onnx.OnnxMl.TypeProto.SparseTensorOrBuilder>
41298 getSparseTensorTypeFieldBuilder() {
41299 if (sparseTensorTypeBuilder_ == null) {
41300 if (!(valueCase_ == 8)) {
41301 value_ = onnx.OnnxMl.TypeProto.SparseTensor.getDefaultInstance();
41302 }
41303 sparseTensorTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
41304 onnx.OnnxMl.TypeProto.SparseTensor, onnx.OnnxMl.TypeProto.SparseTensor.Builder, onnx.OnnxMl.TypeProto.SparseTensorOrBuilder>(
41305 (onnx.OnnxMl.TypeProto.SparseTensor) value_,
41306 getParentForChildren(),
41307 isClean());
41308 value_ = null;
41309 }
41310 valueCase_ = 8;
41311 onChanged();
41312 return sparseTensorTypeBuilder_;
41313 }
41314
41315 private com.google.protobuf.SingleFieldBuilder<
41316 onnx.OnnxMl.TypeProto.Opaque, onnx.OnnxMl.TypeProto.Opaque.Builder, onnx.OnnxMl.TypeProto.OpaqueOrBuilder> opaqueTypeBuilder_;
41317 /**
41318 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41319 * @return Whether the opaqueType field is set.
41320 */
41321 @java.lang.Override
41322 public boolean hasOpaqueType() {
41323 return valueCase_ == 7;
41324 }
41325 /**
41326 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41327 * @return The opaqueType.
41328 */
41329 @java.lang.Override
41330 public onnx.OnnxMl.TypeProto.Opaque getOpaqueType() {
41331 if (opaqueTypeBuilder_ == null) {
41332 if (valueCase_ == 7) {
41333 return (onnx.OnnxMl.TypeProto.Opaque) value_;
41334 }
41335 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
41336 } else {
41337 if (valueCase_ == 7) {
41338 return opaqueTypeBuilder_.getMessage();
41339 }
41340 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
41341 }
41342 }
41343 /**
41344 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41345 */
41346 public Builder setOpaqueType(onnx.OnnxMl.TypeProto.Opaque value) {
41347 if (opaqueTypeBuilder_ == null) {
41348 if (value == null) {
41349 throw new NullPointerException();
41350 }
41351 value_ = value;
41352 onChanged();
41353 } else {
41354 opaqueTypeBuilder_.setMessage(value);
41355 }
41356 valueCase_ = 7;
41357 return this;
41358 }
41359 /**
41360 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41361 */
41362 public Builder setOpaqueType(
41363 onnx.OnnxMl.TypeProto.Opaque.Builder builderForValue) {
41364 if (opaqueTypeBuilder_ == null) {
41365 value_ = builderForValue.build();
41366 onChanged();
41367 } else {
41368 opaqueTypeBuilder_.setMessage(builderForValue.build());
41369 }
41370 valueCase_ = 7;
41371 return this;
41372 }
41373 /**
41374 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41375 */
41376 public Builder mergeOpaqueType(onnx.OnnxMl.TypeProto.Opaque value) {
41377 if (opaqueTypeBuilder_ == null) {
41378 if (valueCase_ == 7 &&
41379 value_ != onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance()) {
41380 value_ = onnx.OnnxMl.TypeProto.Opaque.newBuilder((onnx.OnnxMl.TypeProto.Opaque) value_)
41381 .mergeFrom(value).buildPartial();
41382 } else {
41383 value_ = value;
41384 }
41385 onChanged();
41386 } else {
41387 if (valueCase_ == 7) {
41388 opaqueTypeBuilder_.mergeFrom(value);
41389 } else {
41390 opaqueTypeBuilder_.setMessage(value);
41391 }
41392 }
41393 valueCase_ = 7;
41394 return this;
41395 }
41396 /**
41397 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41398 */
41399 public Builder clearOpaqueType() {
41400 if (opaqueTypeBuilder_ == null) {
41401 if (valueCase_ == 7) {
41402 valueCase_ = 0;
41403 value_ = null;
41404 onChanged();
41405 }
41406 } else {
41407 if (valueCase_ == 7) {
41408 valueCase_ = 0;
41409 value_ = null;
41410 }
41411 opaqueTypeBuilder_.clear();
41412 }
41413 return this;
41414 }
41415 /**
41416 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41417 */
41418 public onnx.OnnxMl.TypeProto.Opaque.Builder getOpaqueTypeBuilder() {
41419 return getOpaqueTypeFieldBuilder().getBuilder();
41420 }
41421 /**
41422 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41423 */
41424 @java.lang.Override
41425 public onnx.OnnxMl.TypeProto.OpaqueOrBuilder getOpaqueTypeOrBuilder() {
41426 if ((valueCase_ == 7) && (opaqueTypeBuilder_ != null)) {
41427 return opaqueTypeBuilder_.getMessageOrBuilder();
41428 } else {
41429 if (valueCase_ == 7) {
41430 return (onnx.OnnxMl.TypeProto.Opaque) value_;
41431 }
41432 return onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
41433 }
41434 }
41435 /**
41436 * <code>.onnx.TypeProto.Opaque opaque_type = 7;</code>
41437 */
41438 private com.google.protobuf.SingleFieldBuilder<
41439 onnx.OnnxMl.TypeProto.Opaque, onnx.OnnxMl.TypeProto.Opaque.Builder, onnx.OnnxMl.TypeProto.OpaqueOrBuilder>
41440 getOpaqueTypeFieldBuilder() {
41441 if (opaqueTypeBuilder_ == null) {
41442 if (!(valueCase_ == 7)) {
41443 value_ = onnx.OnnxMl.TypeProto.Opaque.getDefaultInstance();
41444 }
41445 opaqueTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
41446 onnx.OnnxMl.TypeProto.Opaque, onnx.OnnxMl.TypeProto.Opaque.Builder, onnx.OnnxMl.TypeProto.OpaqueOrBuilder>(
41447 (onnx.OnnxMl.TypeProto.Opaque) value_,
41448 getParentForChildren(),
41449 isClean());
41450 value_ = null;
41451 }
41452 valueCase_ = 7;
41453 onChanged();
41454 return opaqueTypeBuilder_;
41455 }
41456
41457 private java.lang.Object denotation_ = "";
41458 /**
41459 * <pre>
41460 * An optional denotation can be used to denote the whole
41461 * type with a standard semantic description as to what is
41462 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41463 * for pre-defined type denotations.
41464 * </pre>
41465 *
41466 * <code>optional string denotation = 6;</code>
41467 * @return Whether the denotation field is set.
41468 */
41469 public boolean hasDenotation() {
41470 return ((bitField0_ & 0x00000040) != 0);
41471 }
41472 /**
41473 * <pre>
41474 * An optional denotation can be used to denote the whole
41475 * type with a standard semantic description as to what is
41476 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41477 * for pre-defined type denotations.
41478 * </pre>
41479 *
41480 * <code>optional string denotation = 6;</code>
41481 * @return The denotation.
41482 */
41483 public java.lang.String getDenotation() {
41484 java.lang.Object ref = denotation_;
41485 if (!(ref instanceof java.lang.String)) {
41486 com.google.protobuf.ByteString bs =
41487 (com.google.protobuf.ByteString) ref;
41488 java.lang.String s = bs.toStringUtf8();
41489 if (bs.isValidUtf8()) {
41490 denotation_ = s;
41491 }
41492 return s;
41493 } else {
41494 return (java.lang.String) ref;
41495 }
41496 }
41497 /**
41498 * <pre>
41499 * An optional denotation can be used to denote the whole
41500 * type with a standard semantic description as to what is
41501 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41502 * for pre-defined type denotations.
41503 * </pre>
41504 *
41505 * <code>optional string denotation = 6;</code>
41506 * @return The bytes for denotation.
41507 */
41508 public com.google.protobuf.ByteString
41509 getDenotationBytes() {
41510 java.lang.Object ref = denotation_;
41511 if (ref instanceof String) {
41512 com.google.protobuf.ByteString b =
41513 com.google.protobuf.ByteString.copyFromUtf8(
41514 (java.lang.String) ref);
41515 denotation_ = b;
41516 return b;
41517 } else {
41518 return (com.google.protobuf.ByteString) ref;
41519 }
41520 }
41521 /**
41522 * <pre>
41523 * An optional denotation can be used to denote the whole
41524 * type with a standard semantic description as to what is
41525 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41526 * for pre-defined type denotations.
41527 * </pre>
41528 *
41529 * <code>optional string denotation = 6;</code>
41530 * @param value The denotation to set.
41531 * @return This builder for chaining.
41532 */
41533 public Builder setDenotation(
41534 java.lang.String value) {
41535 if (value == null) { throw new NullPointerException(); }
41536 denotation_ = value;
41537 bitField0_ |= 0x00000040;
41538 onChanged();
41539 return this;
41540 }
41541 /**
41542 * <pre>
41543 * An optional denotation can be used to denote the whole
41544 * type with a standard semantic description as to what is
41545 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41546 * for pre-defined type denotations.
41547 * </pre>
41548 *
41549 * <code>optional string denotation = 6;</code>
41550 * @return This builder for chaining.
41551 */
41552 public Builder clearDenotation() {
41553 denotation_ = getDefaultInstance().getDenotation();
41554 bitField0_ = (bitField0_ & ~0x00000040);
41555 onChanged();
41556 return this;
41557 }
41558 /**
41559 * <pre>
41560 * An optional denotation can be used to denote the whole
41561 * type with a standard semantic description as to what is
41562 * stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition
41563 * for pre-defined type denotations.
41564 * </pre>
41565 *
41566 * <code>optional string denotation = 6;</code>
41567 * @param value The bytes for denotation to set.
41568 * @return This builder for chaining.
41569 */
41570 public Builder setDenotationBytes(
41571 com.google.protobuf.ByteString value) {
41572 if (value == null) { throw new NullPointerException(); }
41573 denotation_ = value;
41574 bitField0_ |= 0x00000040;
41575 onChanged();
41576 return this;
41577 }
41578
41579 // @@protoc_insertion_point(builder_scope:onnx.TypeProto)
41580 }
41581
41582 // @@protoc_insertion_point(class_scope:onnx.TypeProto)
41583 private static final onnx.OnnxMl.TypeProto DEFAULT_INSTANCE;
41584 static {
41585 DEFAULT_INSTANCE = new onnx.OnnxMl.TypeProto();
41586 }
41587
41588 public static onnx.OnnxMl.TypeProto getDefaultInstance() {
41589 return DEFAULT_INSTANCE;
41590 }
41591
41592 private static final com.google.protobuf.Parser<TypeProto>
41593 PARSER = new com.google.protobuf.AbstractParser<TypeProto>() {
41594 @java.lang.Override
41595 public TypeProto parsePartialFrom(
41596 com.google.protobuf.CodedInputStream input,
41597 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41598 throws com.google.protobuf.InvalidProtocolBufferException {
41599 Builder builder = newBuilder();
41600 try {
41601 builder.mergeFrom(input, extensionRegistry);
41602 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
41603 throw e.setUnfinishedMessage(builder.buildPartial());
41604 } catch (com.google.protobuf.UninitializedMessageException e) {
41605 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
41606 } catch (java.io.IOException e) {
41607 throw new com.google.protobuf.InvalidProtocolBufferException(e)
41608 .setUnfinishedMessage(builder.buildPartial());
41609 }
41610 return builder.buildPartial();
41611 }
41612 };
41613
41614 public static com.google.protobuf.Parser<TypeProto> parser() {
41615 return PARSER;
41616 }
41617
41618 @java.lang.Override
41619 public com.google.protobuf.Parser<TypeProto> getParserForType() {
41620 return PARSER;
41621 }
41622
41623 @java.lang.Override
41624 public onnx.OnnxMl.TypeProto getDefaultInstanceForType() {
41625 return DEFAULT_INSTANCE;
41626 }
41627
41628 }
41629
41630 public interface OperatorSetIdProtoOrBuilder extends
41631 // @@protoc_insertion_point(interface_extends:onnx.OperatorSetIdProto)
41632 com.google.protobuf.MessageOrBuilder {
41633
41634 /**
41635 * <pre>
41636 * The domain of the operator set being identified.
41637 * The empty string ("") or absence of this field implies the operator
41638 * set that is defined as part of the ONNX specification.
41639 * This field MUST be present in this version of the IR when referring to any other operator set.
41640 * </pre>
41641 *
41642 * <code>optional string domain = 1;</code>
41643 * @return Whether the domain field is set.
41644 */
41645 boolean hasDomain();
41646 /**
41647 * <pre>
41648 * The domain of the operator set being identified.
41649 * The empty string ("") or absence of this field implies the operator
41650 * set that is defined as part of the ONNX specification.
41651 * This field MUST be present in this version of the IR when referring to any other operator set.
41652 * </pre>
41653 *
41654 * <code>optional string domain = 1;</code>
41655 * @return The domain.
41656 */
41657 java.lang.String getDomain();
41658 /**
41659 * <pre>
41660 * The domain of the operator set being identified.
41661 * The empty string ("") or absence of this field implies the operator
41662 * set that is defined as part of the ONNX specification.
41663 * This field MUST be present in this version of the IR when referring to any other operator set.
41664 * </pre>
41665 *
41666 * <code>optional string domain = 1;</code>
41667 * @return The bytes for domain.
41668 */
41669 com.google.protobuf.ByteString
41670 getDomainBytes();
41671
41672 /**
41673 * <pre>
41674 * The version of the operator set being identified.
41675 * This field MUST be present in this version of the IR.
41676 * </pre>
41677 *
41678 * <code>optional int64 version = 2;</code>
41679 * @return Whether the version field is set.
41680 */
41681 boolean hasVersion();
41682 /**
41683 * <pre>
41684 * The version of the operator set being identified.
41685 * This field MUST be present in this version of the IR.
41686 * </pre>
41687 *
41688 * <code>optional int64 version = 2;</code>
41689 * @return The version.
41690 */
41691 long getVersion();
41692 }
41693 /**
41694 * <pre>
41695 * Operator Sets
41696 *
41697 * OperatorSets are uniquely identified by a (domain, opset_version) pair.
41698 * </pre>
41699 *
41700 * Protobuf type {@code onnx.OperatorSetIdProto}
41701 */
41702 public static final class OperatorSetIdProto extends
41703 com.google.protobuf.GeneratedMessage implements
41704 // @@protoc_insertion_point(message_implements:onnx.OperatorSetIdProto)
41705 OperatorSetIdProtoOrBuilder {
41706 private static final long serialVersionUID = 0L;
41707 static {
41708 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
41709 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41710 /* major= */ 4,
41711 /* minor= */ 29,
41712 /* patch= */ 3,
41713 /* suffix= */ "",
41714 OperatorSetIdProto.class.getName());
41715 }
41716 // Use OperatorSetIdProto.newBuilder() to construct.
41717 private OperatorSetIdProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
41718 super(builder);
41719 }
41720 private OperatorSetIdProto() {
41721 domain_ = "";
41722 }
41723
41724 public static final com.google.protobuf.Descriptors.Descriptor
41725 getDescriptor() {
41726 return onnx.OnnxMl.internal_static_onnx_OperatorSetIdProto_descriptor;
41727 }
41728
41729 @java.lang.Override
41730 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
41731 internalGetFieldAccessorTable() {
41732 return onnx.OnnxMl.internal_static_onnx_OperatorSetIdProto_fieldAccessorTable
41733 .ensureFieldAccessorsInitialized(
41734 onnx.OnnxMl.OperatorSetIdProto.class, onnx.OnnxMl.OperatorSetIdProto.Builder.class);
41735 }
41736
41737 private int bitField0_;
41738 public static final int DOMAIN_FIELD_NUMBER = 1;
41739 @SuppressWarnings("serial")
41740 private volatile java.lang.Object domain_ = "";
41741 /**
41742 * <pre>
41743 * The domain of the operator set being identified.
41744 * The empty string ("") or absence of this field implies the operator
41745 * set that is defined as part of the ONNX specification.
41746 * This field MUST be present in this version of the IR when referring to any other operator set.
41747 * </pre>
41748 *
41749 * <code>optional string domain = 1;</code>
41750 * @return Whether the domain field is set.
41751 */
41752 @java.lang.Override
41753 public boolean hasDomain() {
41754 return ((bitField0_ & 0x00000001) != 0);
41755 }
41756 /**
41757 * <pre>
41758 * The domain of the operator set being identified.
41759 * The empty string ("") or absence of this field implies the operator
41760 * set that is defined as part of the ONNX specification.
41761 * This field MUST be present in this version of the IR when referring to any other operator set.
41762 * </pre>
41763 *
41764 * <code>optional string domain = 1;</code>
41765 * @return The domain.
41766 */
41767 @java.lang.Override
41768 public java.lang.String getDomain() {
41769 java.lang.Object ref = domain_;
41770 if (ref instanceof java.lang.String) {
41771 return (java.lang.String) ref;
41772 } else {
41773 com.google.protobuf.ByteString bs =
41774 (com.google.protobuf.ByteString) ref;
41775 java.lang.String s = bs.toStringUtf8();
41776 if (bs.isValidUtf8()) {
41777 domain_ = s;
41778 }
41779 return s;
41780 }
41781 }
41782 /**
41783 * <pre>
41784 * The domain of the operator set being identified.
41785 * The empty string ("") or absence of this field implies the operator
41786 * set that is defined as part of the ONNX specification.
41787 * This field MUST be present in this version of the IR when referring to any other operator set.
41788 * </pre>
41789 *
41790 * <code>optional string domain = 1;</code>
41791 * @return The bytes for domain.
41792 */
41793 @java.lang.Override
41794 public com.google.protobuf.ByteString
41795 getDomainBytes() {
41796 java.lang.Object ref = domain_;
41797 if (ref instanceof java.lang.String) {
41798 com.google.protobuf.ByteString b =
41799 com.google.protobuf.ByteString.copyFromUtf8(
41800 (java.lang.String) ref);
41801 domain_ = b;
41802 return b;
41803 } else {
41804 return (com.google.protobuf.ByteString) ref;
41805 }
41806 }
41807
41808 public static final int VERSION_FIELD_NUMBER = 2;
41809 private long version_ = 0L;
41810 /**
41811 * <pre>
41812 * The version of the operator set being identified.
41813 * This field MUST be present in this version of the IR.
41814 * </pre>
41815 *
41816 * <code>optional int64 version = 2;</code>
41817 * @return Whether the version field is set.
41818 */
41819 @java.lang.Override
41820 public boolean hasVersion() {
41821 return ((bitField0_ & 0x00000002) != 0);
41822 }
41823 /**
41824 * <pre>
41825 * The version of the operator set being identified.
41826 * This field MUST be present in this version of the IR.
41827 * </pre>
41828 *
41829 * <code>optional int64 version = 2;</code>
41830 * @return The version.
41831 */
41832 @java.lang.Override
41833 public long getVersion() {
41834 return version_;
41835 }
41836
41837 private byte memoizedIsInitialized = -1;
41838 @java.lang.Override
41839 public final boolean isInitialized() {
41840 byte isInitialized = memoizedIsInitialized;
41841 if (isInitialized == 1) return true;
41842 if (isInitialized == 0) return false;
41843
41844 memoizedIsInitialized = 1;
41845 return true;
41846 }
41847
41848 @java.lang.Override
41849 public void writeTo(com.google.protobuf.CodedOutputStream output)
41850 throws java.io.IOException {
41851 if (((bitField0_ & 0x00000001) != 0)) {
41852 com.google.protobuf.GeneratedMessage.writeString(output, 1, domain_);
41853 }
41854 if (((bitField0_ & 0x00000002) != 0)) {
41855 output.writeInt64(2, version_);
41856 }
41857 getUnknownFields().writeTo(output);
41858 }
41859
41860 @java.lang.Override
41861 public int getSerializedSize() {
41862 int size = memoizedSize;
41863 if (size != -1) return size;
41864
41865 size = 0;
41866 if (((bitField0_ & 0x00000001) != 0)) {
41867 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, domain_);
41868 }
41869 if (((bitField0_ & 0x00000002) != 0)) {
41870 size += com.google.protobuf.CodedOutputStream
41871 .computeInt64Size(2, version_);
41872 }
41873 size += getUnknownFields().getSerializedSize();
41874 memoizedSize = size;
41875 return size;
41876 }
41877
41878 @java.lang.Override
41879 public boolean equals(final java.lang.Object obj) {
41880 if (obj == this) {
41881 return true;
41882 }
41883 if (!(obj instanceof onnx.OnnxMl.OperatorSetIdProto)) {
41884 return super.equals(obj);
41885 }
41886 onnx.OnnxMl.OperatorSetIdProto other = (onnx.OnnxMl.OperatorSetIdProto) obj;
41887
41888 if (hasDomain() != other.hasDomain()) return false;
41889 if (hasDomain()) {
41890 if (!getDomain()
41891 .equals(other.getDomain())) return false;
41892 }
41893 if (hasVersion() != other.hasVersion()) return false;
41894 if (hasVersion()) {
41895 if (getVersion()
41896 != other.getVersion()) return false;
41897 }
41898 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
41899 return true;
41900 }
41901
41902 @java.lang.Override
41903 public int hashCode() {
41904 if (memoizedHashCode != 0) {
41905 return memoizedHashCode;
41906 }
41907 int hash = 41;
41908 hash = (19 * hash) + getDescriptor().hashCode();
41909 if (hasDomain()) {
41910 hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
41911 hash = (53 * hash) + getDomain().hashCode();
41912 }
41913 if (hasVersion()) {
41914 hash = (37 * hash) + VERSION_FIELD_NUMBER;
41915 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
41916 getVersion());
41917 }
41918 hash = (29 * hash) + getUnknownFields().hashCode();
41919 memoizedHashCode = hash;
41920 return hash;
41921 }
41922
41923 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41924 java.nio.ByteBuffer data)
41925 throws com.google.protobuf.InvalidProtocolBufferException {
41926 return PARSER.parseFrom(data);
41927 }
41928 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41929 java.nio.ByteBuffer data,
41930 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41931 throws com.google.protobuf.InvalidProtocolBufferException {
41932 return PARSER.parseFrom(data, extensionRegistry);
41933 }
41934 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41935 com.google.protobuf.ByteString data)
41936 throws com.google.protobuf.InvalidProtocolBufferException {
41937 return PARSER.parseFrom(data);
41938 }
41939 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41940 com.google.protobuf.ByteString data,
41941 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41942 throws com.google.protobuf.InvalidProtocolBufferException {
41943 return PARSER.parseFrom(data, extensionRegistry);
41944 }
41945 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(byte[] data)
41946 throws com.google.protobuf.InvalidProtocolBufferException {
41947 return PARSER.parseFrom(data);
41948 }
41949 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41950 byte[] data,
41951 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41952 throws com.google.protobuf.InvalidProtocolBufferException {
41953 return PARSER.parseFrom(data, extensionRegistry);
41954 }
41955 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(java.io.InputStream input)
41956 throws java.io.IOException {
41957 return com.google.protobuf.GeneratedMessage
41958 .parseWithIOException(PARSER, input);
41959 }
41960 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41961 java.io.InputStream input,
41962 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41963 throws java.io.IOException {
41964 return com.google.protobuf.GeneratedMessage
41965 .parseWithIOException(PARSER, input, extensionRegistry);
41966 }
41967
41968 public static onnx.OnnxMl.OperatorSetIdProto parseDelimitedFrom(java.io.InputStream input)
41969 throws java.io.IOException {
41970 return com.google.protobuf.GeneratedMessage
41971 .parseDelimitedWithIOException(PARSER, input);
41972 }
41973
41974 public static onnx.OnnxMl.OperatorSetIdProto parseDelimitedFrom(
41975 java.io.InputStream input,
41976 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41977 throws java.io.IOException {
41978 return com.google.protobuf.GeneratedMessage
41979 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
41980 }
41981 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41982 com.google.protobuf.CodedInputStream input)
41983 throws java.io.IOException {
41984 return com.google.protobuf.GeneratedMessage
41985 .parseWithIOException(PARSER, input);
41986 }
41987 public static onnx.OnnxMl.OperatorSetIdProto parseFrom(
41988 com.google.protobuf.CodedInputStream input,
41989 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41990 throws java.io.IOException {
41991 return com.google.protobuf.GeneratedMessage
41992 .parseWithIOException(PARSER, input, extensionRegistry);
41993 }
41994
41995 @java.lang.Override
41996 public Builder newBuilderForType() { return newBuilder(); }
41997 public static Builder newBuilder() {
41998 return DEFAULT_INSTANCE.toBuilder();
41999 }
42000 public static Builder newBuilder(onnx.OnnxMl.OperatorSetIdProto prototype) {
42001 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
42002 }
42003 @java.lang.Override
42004 public Builder toBuilder() {
42005 return this == DEFAULT_INSTANCE
42006 ? new Builder() : new Builder().mergeFrom(this);
42007 }
42008
42009 @java.lang.Override
42010 protected Builder newBuilderForType(
42011 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
42012 Builder builder = new Builder(parent);
42013 return builder;
42014 }
42015 /**
42016 * <pre>
42017 * Operator Sets
42018 *
42019 * OperatorSets are uniquely identified by a (domain, opset_version) pair.
42020 * </pre>
42021 *
42022 * Protobuf type {@code onnx.OperatorSetIdProto}
42023 */
42024 public static final class Builder extends
42025 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
42026 // @@protoc_insertion_point(builder_implements:onnx.OperatorSetIdProto)
42027 onnx.OnnxMl.OperatorSetIdProtoOrBuilder {
42028 public static final com.google.protobuf.Descriptors.Descriptor
42029 getDescriptor() {
42030 return onnx.OnnxMl.internal_static_onnx_OperatorSetIdProto_descriptor;
42031 }
42032
42033 @java.lang.Override
42034 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
42035 internalGetFieldAccessorTable() {
42036 return onnx.OnnxMl.internal_static_onnx_OperatorSetIdProto_fieldAccessorTable
42037 .ensureFieldAccessorsInitialized(
42038 onnx.OnnxMl.OperatorSetIdProto.class, onnx.OnnxMl.OperatorSetIdProto.Builder.class);
42039 }
42040
42041 // Construct using onnx.OnnxMl.OperatorSetIdProto.newBuilder()
42042 private Builder() {
42043
42044 }
42045
42046 private Builder(
42047 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
42048 super(parent);
42049
42050 }
42051 @java.lang.Override
42052 public Builder clear() {
42053 super.clear();
42054 bitField0_ = 0;
42055 domain_ = "";
42056 version_ = 0L;
42057 return this;
42058 }
42059
42060 @java.lang.Override
42061 public com.google.protobuf.Descriptors.Descriptor
42062 getDescriptorForType() {
42063 return onnx.OnnxMl.internal_static_onnx_OperatorSetIdProto_descriptor;
42064 }
42065
42066 @java.lang.Override
42067 public onnx.OnnxMl.OperatorSetIdProto getDefaultInstanceForType() {
42068 return onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance();
42069 }
42070
42071 @java.lang.Override
42072 public onnx.OnnxMl.OperatorSetIdProto build() {
42073 onnx.OnnxMl.OperatorSetIdProto result = buildPartial();
42074 if (!result.isInitialized()) {
42075 throw newUninitializedMessageException(result);
42076 }
42077 return result;
42078 }
42079
42080 @java.lang.Override
42081 public onnx.OnnxMl.OperatorSetIdProto buildPartial() {
42082 onnx.OnnxMl.OperatorSetIdProto result = new onnx.OnnxMl.OperatorSetIdProto(this);
42083 if (bitField0_ != 0) { buildPartial0(result); }
42084 onBuilt();
42085 return result;
42086 }
42087
42088 private void buildPartial0(onnx.OnnxMl.OperatorSetIdProto result) {
42089 int from_bitField0_ = bitField0_;
42090 int to_bitField0_ = 0;
42091 if (((from_bitField0_ & 0x00000001) != 0)) {
42092 result.domain_ = domain_;
42093 to_bitField0_ |= 0x00000001;
42094 }
42095 if (((from_bitField0_ & 0x00000002) != 0)) {
42096 result.version_ = version_;
42097 to_bitField0_ |= 0x00000002;
42098 }
42099 result.bitField0_ |= to_bitField0_;
42100 }
42101
42102 @java.lang.Override
42103 public Builder mergeFrom(com.google.protobuf.Message other) {
42104 if (other instanceof onnx.OnnxMl.OperatorSetIdProto) {
42105 return mergeFrom((onnx.OnnxMl.OperatorSetIdProto)other);
42106 } else {
42107 super.mergeFrom(other);
42108 return this;
42109 }
42110 }
42111
42112 public Builder mergeFrom(onnx.OnnxMl.OperatorSetIdProto other) {
42113 if (other == onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance()) return this;
42114 if (other.hasDomain()) {
42115 domain_ = other.domain_;
42116 bitField0_ |= 0x00000001;
42117 onChanged();
42118 }
42119 if (other.hasVersion()) {
42120 setVersion(other.getVersion());
42121 }
42122 this.mergeUnknownFields(other.getUnknownFields());
42123 onChanged();
42124 return this;
42125 }
42126
42127 @java.lang.Override
42128 public final boolean isInitialized() {
42129 return true;
42130 }
42131
42132 @java.lang.Override
42133 public Builder mergeFrom(
42134 com.google.protobuf.CodedInputStream input,
42135 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
42136 throws java.io.IOException {
42137 if (extensionRegistry == null) {
42138 throw new java.lang.NullPointerException();
42139 }
42140 try {
42141 boolean done = false;
42142 while (!done) {
42143 int tag = input.readTag();
42144 switch (tag) {
42145 case 0:
42146 done = true;
42147 break;
42148 case 10: {
42149 domain_ = input.readBytes();
42150 bitField0_ |= 0x00000001;
42151 break;
42152 } // case 10
42153 case 16: {
42154 version_ = input.readInt64();
42155 bitField0_ |= 0x00000002;
42156 break;
42157 } // case 16
42158 default: {
42159 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
42160 done = true; // was an endgroup tag
42161 }
42162 break;
42163 } // default:
42164 } // switch (tag)
42165 } // while (!done)
42166 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
42167 throw e.unwrapIOException();
42168 } finally {
42169 onChanged();
42170 } // finally
42171 return this;
42172 }
42173 private int bitField0_;
42174
42175 private java.lang.Object domain_ = "";
42176 /**
42177 * <pre>
42178 * The domain of the operator set being identified.
42179 * The empty string ("") or absence of this field implies the operator
42180 * set that is defined as part of the ONNX specification.
42181 * This field MUST be present in this version of the IR when referring to any other operator set.
42182 * </pre>
42183 *
42184 * <code>optional string domain = 1;</code>
42185 * @return Whether the domain field is set.
42186 */
42187 public boolean hasDomain() {
42188 return ((bitField0_ & 0x00000001) != 0);
42189 }
42190 /**
42191 * <pre>
42192 * The domain of the operator set being identified.
42193 * The empty string ("") or absence of this field implies the operator
42194 * set that is defined as part of the ONNX specification.
42195 * This field MUST be present in this version of the IR when referring to any other operator set.
42196 * </pre>
42197 *
42198 * <code>optional string domain = 1;</code>
42199 * @return The domain.
42200 */
42201 public java.lang.String getDomain() {
42202 java.lang.Object ref = domain_;
42203 if (!(ref instanceof java.lang.String)) {
42204 com.google.protobuf.ByteString bs =
42205 (com.google.protobuf.ByteString) ref;
42206 java.lang.String s = bs.toStringUtf8();
42207 if (bs.isValidUtf8()) {
42208 domain_ = s;
42209 }
42210 return s;
42211 } else {
42212 return (java.lang.String) ref;
42213 }
42214 }
42215 /**
42216 * <pre>
42217 * The domain of the operator set being identified.
42218 * The empty string ("") or absence of this field implies the operator
42219 * set that is defined as part of the ONNX specification.
42220 * This field MUST be present in this version of the IR when referring to any other operator set.
42221 * </pre>
42222 *
42223 * <code>optional string domain = 1;</code>
42224 * @return The bytes for domain.
42225 */
42226 public com.google.protobuf.ByteString
42227 getDomainBytes() {
42228 java.lang.Object ref = domain_;
42229 if (ref instanceof String) {
42230 com.google.protobuf.ByteString b =
42231 com.google.protobuf.ByteString.copyFromUtf8(
42232 (java.lang.String) ref);
42233 domain_ = b;
42234 return b;
42235 } else {
42236 return (com.google.protobuf.ByteString) ref;
42237 }
42238 }
42239 /**
42240 * <pre>
42241 * The domain of the operator set being identified.
42242 * The empty string ("") or absence of this field implies the operator
42243 * set that is defined as part of the ONNX specification.
42244 * This field MUST be present in this version of the IR when referring to any other operator set.
42245 * </pre>
42246 *
42247 * <code>optional string domain = 1;</code>
42248 * @param value The domain to set.
42249 * @return This builder for chaining.
42250 */
42251 public Builder setDomain(
42252 java.lang.String value) {
42253 if (value == null) { throw new NullPointerException(); }
42254 domain_ = value;
42255 bitField0_ |= 0x00000001;
42256 onChanged();
42257 return this;
42258 }
42259 /**
42260 * <pre>
42261 * The domain of the operator set being identified.
42262 * The empty string ("") or absence of this field implies the operator
42263 * set that is defined as part of the ONNX specification.
42264 * This field MUST be present in this version of the IR when referring to any other operator set.
42265 * </pre>
42266 *
42267 * <code>optional string domain = 1;</code>
42268 * @return This builder for chaining.
42269 */
42270 public Builder clearDomain() {
42271 domain_ = getDefaultInstance().getDomain();
42272 bitField0_ = (bitField0_ & ~0x00000001);
42273 onChanged();
42274 return this;
42275 }
42276 /**
42277 * <pre>
42278 * The domain of the operator set being identified.
42279 * The empty string ("") or absence of this field implies the operator
42280 * set that is defined as part of the ONNX specification.
42281 * This field MUST be present in this version of the IR when referring to any other operator set.
42282 * </pre>
42283 *
42284 * <code>optional string domain = 1;</code>
42285 * @param value The bytes for domain to set.
42286 * @return This builder for chaining.
42287 */
42288 public Builder setDomainBytes(
42289 com.google.protobuf.ByteString value) {
42290 if (value == null) { throw new NullPointerException(); }
42291 domain_ = value;
42292 bitField0_ |= 0x00000001;
42293 onChanged();
42294 return this;
42295 }
42296
42297 private long version_ ;
42298 /**
42299 * <pre>
42300 * The version of the operator set being identified.
42301 * This field MUST be present in this version of the IR.
42302 * </pre>
42303 *
42304 * <code>optional int64 version = 2;</code>
42305 * @return Whether the version field is set.
42306 */
42307 @java.lang.Override
42308 public boolean hasVersion() {
42309 return ((bitField0_ & 0x00000002) != 0);
42310 }
42311 /**
42312 * <pre>
42313 * The version of the operator set being identified.
42314 * This field MUST be present in this version of the IR.
42315 * </pre>
42316 *
42317 * <code>optional int64 version = 2;</code>
42318 * @return The version.
42319 */
42320 @java.lang.Override
42321 public long getVersion() {
42322 return version_;
42323 }
42324 /**
42325 * <pre>
42326 * The version of the operator set being identified.
42327 * This field MUST be present in this version of the IR.
42328 * </pre>
42329 *
42330 * <code>optional int64 version = 2;</code>
42331 * @param value The version to set.
42332 * @return This builder for chaining.
42333 */
42334 public Builder setVersion(long value) {
42335
42336 version_ = value;
42337 bitField0_ |= 0x00000002;
42338 onChanged();
42339 return this;
42340 }
42341 /**
42342 * <pre>
42343 * The version of the operator set being identified.
42344 * This field MUST be present in this version of the IR.
42345 * </pre>
42346 *
42347 * <code>optional int64 version = 2;</code>
42348 * @return This builder for chaining.
42349 */
42350 public Builder clearVersion() {
42351 bitField0_ = (bitField0_ & ~0x00000002);
42352 version_ = 0L;
42353 onChanged();
42354 return this;
42355 }
42356
42357 // @@protoc_insertion_point(builder_scope:onnx.OperatorSetIdProto)
42358 }
42359
42360 // @@protoc_insertion_point(class_scope:onnx.OperatorSetIdProto)
42361 private static final onnx.OnnxMl.OperatorSetIdProto DEFAULT_INSTANCE;
42362 static {
42363 DEFAULT_INSTANCE = new onnx.OnnxMl.OperatorSetIdProto();
42364 }
42365
42366 public static onnx.OnnxMl.OperatorSetIdProto getDefaultInstance() {
42367 return DEFAULT_INSTANCE;
42368 }
42369
42370 private static final com.google.protobuf.Parser<OperatorSetIdProto>
42371 PARSER = new com.google.protobuf.AbstractParser<OperatorSetIdProto>() {
42372 @java.lang.Override
42373 public OperatorSetIdProto parsePartialFrom(
42374 com.google.protobuf.CodedInputStream input,
42375 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
42376 throws com.google.protobuf.InvalidProtocolBufferException {
42377 Builder builder = newBuilder();
42378 try {
42379 builder.mergeFrom(input, extensionRegistry);
42380 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
42381 throw e.setUnfinishedMessage(builder.buildPartial());
42382 } catch (com.google.protobuf.UninitializedMessageException e) {
42383 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
42384 } catch (java.io.IOException e) {
42385 throw new com.google.protobuf.InvalidProtocolBufferException(e)
42386 .setUnfinishedMessage(builder.buildPartial());
42387 }
42388 return builder.buildPartial();
42389 }
42390 };
42391
42392 public static com.google.protobuf.Parser<OperatorSetIdProto> parser() {
42393 return PARSER;
42394 }
42395
42396 @java.lang.Override
42397 public com.google.protobuf.Parser<OperatorSetIdProto> getParserForType() {
42398 return PARSER;
42399 }
42400
42401 @java.lang.Override
42402 public onnx.OnnxMl.OperatorSetIdProto getDefaultInstanceForType() {
42403 return DEFAULT_INSTANCE;
42404 }
42405
42406 }
42407
42408 public interface FunctionProtoOrBuilder extends
42409 // @@protoc_insertion_point(interface_extends:onnx.FunctionProto)
42410 com.google.protobuf.MessageOrBuilder {
42411
42412 /**
42413 * <pre>
42414 * The name of the function, similar to op_type in NodeProto.
42415 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42416 * </pre>
42417 *
42418 * <code>optional string name = 1;</code>
42419 * @return Whether the name field is set.
42420 */
42421 boolean hasName();
42422 /**
42423 * <pre>
42424 * The name of the function, similar to op_type in NodeProto.
42425 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42426 * </pre>
42427 *
42428 * <code>optional string name = 1;</code>
42429 * @return The name.
42430 */
42431 java.lang.String getName();
42432 /**
42433 * <pre>
42434 * The name of the function, similar to op_type in NodeProto.
42435 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42436 * </pre>
42437 *
42438 * <code>optional string name = 1;</code>
42439 * @return The bytes for name.
42440 */
42441 com.google.protobuf.ByteString
42442 getNameBytes();
42443
42444 /**
42445 * <pre>
42446 * The inputs and outputs of the function.
42447 * </pre>
42448 *
42449 * <code>repeated string input = 4;</code>
42450 * @return A list containing the input.
42451 */
42452 java.util.List<java.lang.String>
42453 getInputList();
42454 /**
42455 * <pre>
42456 * The inputs and outputs of the function.
42457 * </pre>
42458 *
42459 * <code>repeated string input = 4;</code>
42460 * @return The count of input.
42461 */
42462 int getInputCount();
42463 /**
42464 * <pre>
42465 * The inputs and outputs of the function.
42466 * </pre>
42467 *
42468 * <code>repeated string input = 4;</code>
42469 * @param index The index of the element to return.
42470 * @return The input at the given index.
42471 */
42472 java.lang.String getInput(int index);
42473 /**
42474 * <pre>
42475 * The inputs and outputs of the function.
42476 * </pre>
42477 *
42478 * <code>repeated string input = 4;</code>
42479 * @param index The index of the value to return.
42480 * @return The bytes of the input at the given index.
42481 */
42482 com.google.protobuf.ByteString
42483 getInputBytes(int index);
42484
42485 /**
42486 * <code>repeated string output = 5;</code>
42487 * @return A list containing the output.
42488 */
42489 java.util.List<java.lang.String>
42490 getOutputList();
42491 /**
42492 * <code>repeated string output = 5;</code>
42493 * @return The count of output.
42494 */
42495 int getOutputCount();
42496 /**
42497 * <code>repeated string output = 5;</code>
42498 * @param index The index of the element to return.
42499 * @return The output at the given index.
42500 */
42501 java.lang.String getOutput(int index);
42502 /**
42503 * <code>repeated string output = 5;</code>
42504 * @param index The index of the value to return.
42505 * @return The bytes of the output at the given index.
42506 */
42507 com.google.protobuf.ByteString
42508 getOutputBytes(int index);
42509
42510 /**
42511 * <pre>
42512 * The attribute parameters of the function.
42513 * It is for function parameters without default values.
42514 * </pre>
42515 *
42516 * <code>repeated string attribute = 6;</code>
42517 * @return A list containing the attribute.
42518 */
42519 java.util.List<java.lang.String>
42520 getAttributeList();
42521 /**
42522 * <pre>
42523 * The attribute parameters of the function.
42524 * It is for function parameters without default values.
42525 * </pre>
42526 *
42527 * <code>repeated string attribute = 6;</code>
42528 * @return The count of attribute.
42529 */
42530 int getAttributeCount();
42531 /**
42532 * <pre>
42533 * The attribute parameters of the function.
42534 * It is for function parameters without default values.
42535 * </pre>
42536 *
42537 * <code>repeated string attribute = 6;</code>
42538 * @param index The index of the element to return.
42539 * @return The attribute at the given index.
42540 */
42541 java.lang.String getAttribute(int index);
42542 /**
42543 * <pre>
42544 * The attribute parameters of the function.
42545 * It is for function parameters without default values.
42546 * </pre>
42547 *
42548 * <code>repeated string attribute = 6;</code>
42549 * @param index The index of the value to return.
42550 * @return The bytes of the attribute at the given index.
42551 */
42552 com.google.protobuf.ByteString
42553 getAttributeBytes(int index);
42554
42555 /**
42556 * <pre>
42557 * The attribute protos of the function.
42558 * It is for function attributes with default values.
42559 * A function attribute shall be represented either as
42560 * a string attribute or an AttributeProto, not both.
42561 * </pre>
42562 *
42563 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
42564 */
42565 java.util.List<onnx.OnnxMl.AttributeProto>
42566 getAttributeProtoList();
42567 /**
42568 * <pre>
42569 * The attribute protos of the function.
42570 * It is for function attributes with default values.
42571 * A function attribute shall be represented either as
42572 * a string attribute or an AttributeProto, not both.
42573 * </pre>
42574 *
42575 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
42576 */
42577 onnx.OnnxMl.AttributeProto getAttributeProto(int index);
42578 /**
42579 * <pre>
42580 * The attribute protos of the function.
42581 * It is for function attributes with default values.
42582 * A function attribute shall be represented either as
42583 * a string attribute or an AttributeProto, not both.
42584 * </pre>
42585 *
42586 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
42587 */
42588 int getAttributeProtoCount();
42589 /**
42590 * <pre>
42591 * The attribute protos of the function.
42592 * It is for function attributes with default values.
42593 * A function attribute shall be represented either as
42594 * a string attribute or an AttributeProto, not both.
42595 * </pre>
42596 *
42597 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
42598 */
42599 java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
42600 getAttributeProtoOrBuilderList();
42601 /**
42602 * <pre>
42603 * The attribute protos of the function.
42604 * It is for function attributes with default values.
42605 * A function attribute shall be represented either as
42606 * a string attribute or an AttributeProto, not both.
42607 * </pre>
42608 *
42609 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
42610 */
42611 onnx.OnnxMl.AttributeProtoOrBuilder getAttributeProtoOrBuilder(
42612 int index);
42613
42614 /**
42615 * <pre>
42616 * The nodes in the function.
42617 * </pre>
42618 *
42619 * <code>repeated .onnx.NodeProto node = 7;</code>
42620 */
42621 java.util.List<onnx.OnnxMl.NodeProto>
42622 getNodeList();
42623 /**
42624 * <pre>
42625 * The nodes in the function.
42626 * </pre>
42627 *
42628 * <code>repeated .onnx.NodeProto node = 7;</code>
42629 */
42630 onnx.OnnxMl.NodeProto getNode(int index);
42631 /**
42632 * <pre>
42633 * The nodes in the function.
42634 * </pre>
42635 *
42636 * <code>repeated .onnx.NodeProto node = 7;</code>
42637 */
42638 int getNodeCount();
42639 /**
42640 * <pre>
42641 * The nodes in the function.
42642 * </pre>
42643 *
42644 * <code>repeated .onnx.NodeProto node = 7;</code>
42645 */
42646 java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
42647 getNodeOrBuilderList();
42648 /**
42649 * <pre>
42650 * The nodes in the function.
42651 * </pre>
42652 *
42653 * <code>repeated .onnx.NodeProto node = 7;</code>
42654 */
42655 onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
42656 int index);
42657
42658 /**
42659 * <pre>
42660 * A human-readable documentation for this function. Markdown is allowed.
42661 * </pre>
42662 *
42663 * <code>optional string doc_string = 8;</code>
42664 * @return Whether the docString field is set.
42665 */
42666 boolean hasDocString();
42667 /**
42668 * <pre>
42669 * A human-readable documentation for this function. Markdown is allowed.
42670 * </pre>
42671 *
42672 * <code>optional string doc_string = 8;</code>
42673 * @return The docString.
42674 */
42675 java.lang.String getDocString();
42676 /**
42677 * <pre>
42678 * A human-readable documentation for this function. Markdown is allowed.
42679 * </pre>
42680 *
42681 * <code>optional string doc_string = 8;</code>
42682 * @return The bytes for docString.
42683 */
42684 com.google.protobuf.ByteString
42685 getDocStringBytes();
42686
42687 /**
42688 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
42689 */
42690 java.util.List<onnx.OnnxMl.OperatorSetIdProto>
42691 getOpsetImportList();
42692 /**
42693 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
42694 */
42695 onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index);
42696 /**
42697 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
42698 */
42699 int getOpsetImportCount();
42700 /**
42701 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
42702 */
42703 java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
42704 getOpsetImportOrBuilderList();
42705 /**
42706 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
42707 */
42708 onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
42709 int index);
42710
42711 /**
42712 * <pre>
42713 * The domain which this function belongs to.
42714 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42715 * </pre>
42716 *
42717 * <code>optional string domain = 10;</code>
42718 * @return Whether the domain field is set.
42719 */
42720 boolean hasDomain();
42721 /**
42722 * <pre>
42723 * The domain which this function belongs to.
42724 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42725 * </pre>
42726 *
42727 * <code>optional string domain = 10;</code>
42728 * @return The domain.
42729 */
42730 java.lang.String getDomain();
42731 /**
42732 * <pre>
42733 * The domain which this function belongs to.
42734 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42735 * </pre>
42736 *
42737 * <code>optional string domain = 10;</code>
42738 * @return The bytes for domain.
42739 */
42740 com.google.protobuf.ByteString
42741 getDomainBytes();
42742
42743 /**
42744 * <pre>
42745 * The overload identifier of the function.
42746 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42747 * </pre>
42748 *
42749 * <code>optional string overload = 13;</code>
42750 * @return Whether the overload field is set.
42751 */
42752 boolean hasOverload();
42753 /**
42754 * <pre>
42755 * The overload identifier of the function.
42756 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42757 * </pre>
42758 *
42759 * <code>optional string overload = 13;</code>
42760 * @return The overload.
42761 */
42762 java.lang.String getOverload();
42763 /**
42764 * <pre>
42765 * The overload identifier of the function.
42766 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42767 * </pre>
42768 *
42769 * <code>optional string overload = 13;</code>
42770 * @return The bytes for overload.
42771 */
42772 com.google.protobuf.ByteString
42773 getOverloadBytes();
42774
42775 /**
42776 * <pre>
42777 * Information for the values in the function. The ValueInfoProto.name's
42778 * must be distinct and refer to names in the function (including inputs,
42779 * outputs, and intermediate values). It is optional for a value to appear
42780 * in value_info list.
42781 * </pre>
42782 *
42783 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
42784 */
42785 java.util.List<onnx.OnnxMl.ValueInfoProto>
42786 getValueInfoList();
42787 /**
42788 * <pre>
42789 * Information for the values in the function. The ValueInfoProto.name's
42790 * must be distinct and refer to names in the function (including inputs,
42791 * outputs, and intermediate values). It is optional for a value to appear
42792 * in value_info list.
42793 * </pre>
42794 *
42795 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
42796 */
42797 onnx.OnnxMl.ValueInfoProto getValueInfo(int index);
42798 /**
42799 * <pre>
42800 * Information for the values in the function. The ValueInfoProto.name's
42801 * must be distinct and refer to names in the function (including inputs,
42802 * outputs, and intermediate values). It is optional for a value to appear
42803 * in value_info list.
42804 * </pre>
42805 *
42806 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
42807 */
42808 int getValueInfoCount();
42809 /**
42810 * <pre>
42811 * Information for the values in the function. The ValueInfoProto.name's
42812 * must be distinct and refer to names in the function (including inputs,
42813 * outputs, and intermediate values). It is optional for a value to appear
42814 * in value_info list.
42815 * </pre>
42816 *
42817 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
42818 */
42819 java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
42820 getValueInfoOrBuilderList();
42821 /**
42822 * <pre>
42823 * Information for the values in the function. The ValueInfoProto.name's
42824 * must be distinct and refer to names in the function (including inputs,
42825 * outputs, and intermediate values). It is optional for a value to appear
42826 * in value_info list.
42827 * </pre>
42828 *
42829 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
42830 */
42831 onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
42832 int index);
42833
42834 /**
42835 * <pre>
42836 * Named metadata values; keys should be distinct.
42837 * </pre>
42838 *
42839 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
42840 */
42841 java.util.List<onnx.OnnxMl.StringStringEntryProto>
42842 getMetadataPropsList();
42843 /**
42844 * <pre>
42845 * Named metadata values; keys should be distinct.
42846 * </pre>
42847 *
42848 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
42849 */
42850 onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index);
42851 /**
42852 * <pre>
42853 * Named metadata values; keys should be distinct.
42854 * </pre>
42855 *
42856 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
42857 */
42858 int getMetadataPropsCount();
42859 /**
42860 * <pre>
42861 * Named metadata values; keys should be distinct.
42862 * </pre>
42863 *
42864 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
42865 */
42866 java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
42867 getMetadataPropsOrBuilderList();
42868 /**
42869 * <pre>
42870 * Named metadata values; keys should be distinct.
42871 * </pre>
42872 *
42873 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
42874 */
42875 onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
42876 int index);
42877 }
42878 /**
42879 * Protobuf type {@code onnx.FunctionProto}
42880 */
42881 public static final class FunctionProto extends
42882 com.google.protobuf.GeneratedMessage implements
42883 // @@protoc_insertion_point(message_implements:onnx.FunctionProto)
42884 FunctionProtoOrBuilder {
42885 private static final long serialVersionUID = 0L;
42886 static {
42887 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
42888 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
42889 /* major= */ 4,
42890 /* minor= */ 29,
42891 /* patch= */ 3,
42892 /* suffix= */ "",
42893 FunctionProto.class.getName());
42894 }
42895 // Use FunctionProto.newBuilder() to construct.
42896 private FunctionProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
42897 super(builder);
42898 }
42899 private FunctionProto() {
42900 name_ = "";
42901 input_ =
42902 com.google.protobuf.LazyStringArrayList.emptyList();
42903 output_ =
42904 com.google.protobuf.LazyStringArrayList.emptyList();
42905 attribute_ =
42906 com.google.protobuf.LazyStringArrayList.emptyList();
42907 attributeProto_ = java.util.Collections.emptyList();
42908 node_ = java.util.Collections.emptyList();
42909 docString_ = "";
42910 opsetImport_ = java.util.Collections.emptyList();
42911 domain_ = "";
42912 overload_ = "";
42913 valueInfo_ = java.util.Collections.emptyList();
42914 metadataProps_ = java.util.Collections.emptyList();
42915 }
42916
42917 public static final com.google.protobuf.Descriptors.Descriptor
42918 getDescriptor() {
42919 return onnx.OnnxMl.internal_static_onnx_FunctionProto_descriptor;
42920 }
42921
42922 @java.lang.Override
42923 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
42924 internalGetFieldAccessorTable() {
42925 return onnx.OnnxMl.internal_static_onnx_FunctionProto_fieldAccessorTable
42926 .ensureFieldAccessorsInitialized(
42927 onnx.OnnxMl.FunctionProto.class, onnx.OnnxMl.FunctionProto.Builder.class);
42928 }
42929
42930 private int bitField0_;
42931 public static final int NAME_FIELD_NUMBER = 1;
42932 @SuppressWarnings("serial")
42933 private volatile java.lang.Object name_ = "";
42934 /**
42935 * <pre>
42936 * The name of the function, similar to op_type in NodeProto.
42937 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42938 * </pre>
42939 *
42940 * <code>optional string name = 1;</code>
42941 * @return Whether the name field is set.
42942 */
42943 @java.lang.Override
42944 public boolean hasName() {
42945 return ((bitField0_ & 0x00000001) != 0);
42946 }
42947 /**
42948 * <pre>
42949 * The name of the function, similar to op_type in NodeProto.
42950 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42951 * </pre>
42952 *
42953 * <code>optional string name = 1;</code>
42954 * @return The name.
42955 */
42956 @java.lang.Override
42957 public java.lang.String getName() {
42958 java.lang.Object ref = name_;
42959 if (ref instanceof java.lang.String) {
42960 return (java.lang.String) ref;
42961 } else {
42962 com.google.protobuf.ByteString bs =
42963 (com.google.protobuf.ByteString) ref;
42964 java.lang.String s = bs.toStringUtf8();
42965 if (bs.isValidUtf8()) {
42966 name_ = s;
42967 }
42968 return s;
42969 }
42970 }
42971 /**
42972 * <pre>
42973 * The name of the function, similar to op_type in NodeProto.
42974 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
42975 * </pre>
42976 *
42977 * <code>optional string name = 1;</code>
42978 * @return The bytes for name.
42979 */
42980 @java.lang.Override
42981 public com.google.protobuf.ByteString
42982 getNameBytes() {
42983 java.lang.Object ref = name_;
42984 if (ref instanceof java.lang.String) {
42985 com.google.protobuf.ByteString b =
42986 com.google.protobuf.ByteString.copyFromUtf8(
42987 (java.lang.String) ref);
42988 name_ = b;
42989 return b;
42990 } else {
42991 return (com.google.protobuf.ByteString) ref;
42992 }
42993 }
42994
42995 public static final int INPUT_FIELD_NUMBER = 4;
42996 @SuppressWarnings("serial")
42997 private com.google.protobuf.LazyStringArrayList input_ =
42998 com.google.protobuf.LazyStringArrayList.emptyList();
42999 /**
43000 * <pre>
43001 * The inputs and outputs of the function.
43002 * </pre>
43003 *
43004 * <code>repeated string input = 4;</code>
43005 * @return A list containing the input.
43006 */
43007 public com.google.protobuf.ProtocolStringList
43008 getInputList() {
43009 return input_;
43010 }
43011 /**
43012 * <pre>
43013 * The inputs and outputs of the function.
43014 * </pre>
43015 *
43016 * <code>repeated string input = 4;</code>
43017 * @return The count of input.
43018 */
43019 public int getInputCount() {
43020 return input_.size();
43021 }
43022 /**
43023 * <pre>
43024 * The inputs and outputs of the function.
43025 * </pre>
43026 *
43027 * <code>repeated string input = 4;</code>
43028 * @param index The index of the element to return.
43029 * @return The input at the given index.
43030 */
43031 public java.lang.String getInput(int index) {
43032 return input_.get(index);
43033 }
43034 /**
43035 * <pre>
43036 * The inputs and outputs of the function.
43037 * </pre>
43038 *
43039 * <code>repeated string input = 4;</code>
43040 * @param index The index of the value to return.
43041 * @return The bytes of the input at the given index.
43042 */
43043 public com.google.protobuf.ByteString
43044 getInputBytes(int index) {
43045 return input_.getByteString(index);
43046 }
43047
43048 public static final int OUTPUT_FIELD_NUMBER = 5;
43049 @SuppressWarnings("serial")
43050 private com.google.protobuf.LazyStringArrayList output_ =
43051 com.google.protobuf.LazyStringArrayList.emptyList();
43052 /**
43053 * <code>repeated string output = 5;</code>
43054 * @return A list containing the output.
43055 */
43056 public com.google.protobuf.ProtocolStringList
43057 getOutputList() {
43058 return output_;
43059 }
43060 /**
43061 * <code>repeated string output = 5;</code>
43062 * @return The count of output.
43063 */
43064 public int getOutputCount() {
43065 return output_.size();
43066 }
43067 /**
43068 * <code>repeated string output = 5;</code>
43069 * @param index The index of the element to return.
43070 * @return The output at the given index.
43071 */
43072 public java.lang.String getOutput(int index) {
43073 return output_.get(index);
43074 }
43075 /**
43076 * <code>repeated string output = 5;</code>
43077 * @param index The index of the value to return.
43078 * @return The bytes of the output at the given index.
43079 */
43080 public com.google.protobuf.ByteString
43081 getOutputBytes(int index) {
43082 return output_.getByteString(index);
43083 }
43084
43085 public static final int ATTRIBUTE_FIELD_NUMBER = 6;
43086 @SuppressWarnings("serial")
43087 private com.google.protobuf.LazyStringArrayList attribute_ =
43088 com.google.protobuf.LazyStringArrayList.emptyList();
43089 /**
43090 * <pre>
43091 * The attribute parameters of the function.
43092 * It is for function parameters without default values.
43093 * </pre>
43094 *
43095 * <code>repeated string attribute = 6;</code>
43096 * @return A list containing the attribute.
43097 */
43098 public com.google.protobuf.ProtocolStringList
43099 getAttributeList() {
43100 return attribute_;
43101 }
43102 /**
43103 * <pre>
43104 * The attribute parameters of the function.
43105 * It is for function parameters without default values.
43106 * </pre>
43107 *
43108 * <code>repeated string attribute = 6;</code>
43109 * @return The count of attribute.
43110 */
43111 public int getAttributeCount() {
43112 return attribute_.size();
43113 }
43114 /**
43115 * <pre>
43116 * The attribute parameters of the function.
43117 * It is for function parameters without default values.
43118 * </pre>
43119 *
43120 * <code>repeated string attribute = 6;</code>
43121 * @param index The index of the element to return.
43122 * @return The attribute at the given index.
43123 */
43124 public java.lang.String getAttribute(int index) {
43125 return attribute_.get(index);
43126 }
43127 /**
43128 * <pre>
43129 * The attribute parameters of the function.
43130 * It is for function parameters without default values.
43131 * </pre>
43132 *
43133 * <code>repeated string attribute = 6;</code>
43134 * @param index The index of the value to return.
43135 * @return The bytes of the attribute at the given index.
43136 */
43137 public com.google.protobuf.ByteString
43138 getAttributeBytes(int index) {
43139 return attribute_.getByteString(index);
43140 }
43141
43142 public static final int ATTRIBUTE_PROTO_FIELD_NUMBER = 11;
43143 @SuppressWarnings("serial")
43144 private java.util.List<onnx.OnnxMl.AttributeProto> attributeProto_;
43145 /**
43146 * <pre>
43147 * The attribute protos of the function.
43148 * It is for function attributes with default values.
43149 * A function attribute shall be represented either as
43150 * a string attribute or an AttributeProto, not both.
43151 * </pre>
43152 *
43153 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
43154 */
43155 @java.lang.Override
43156 public java.util.List<onnx.OnnxMl.AttributeProto> getAttributeProtoList() {
43157 return attributeProto_;
43158 }
43159 /**
43160 * <pre>
43161 * The attribute protos of the function.
43162 * It is for function attributes with default values.
43163 * A function attribute shall be represented either as
43164 * a string attribute or an AttributeProto, not both.
43165 * </pre>
43166 *
43167 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
43168 */
43169 @java.lang.Override
43170 public java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
43171 getAttributeProtoOrBuilderList() {
43172 return attributeProto_;
43173 }
43174 /**
43175 * <pre>
43176 * The attribute protos of the function.
43177 * It is for function attributes with default values.
43178 * A function attribute shall be represented either as
43179 * a string attribute or an AttributeProto, not both.
43180 * </pre>
43181 *
43182 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
43183 */
43184 @java.lang.Override
43185 public int getAttributeProtoCount() {
43186 return attributeProto_.size();
43187 }
43188 /**
43189 * <pre>
43190 * The attribute protos of the function.
43191 * It is for function attributes with default values.
43192 * A function attribute shall be represented either as
43193 * a string attribute or an AttributeProto, not both.
43194 * </pre>
43195 *
43196 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
43197 */
43198 @java.lang.Override
43199 public onnx.OnnxMl.AttributeProto getAttributeProto(int index) {
43200 return attributeProto_.get(index);
43201 }
43202 /**
43203 * <pre>
43204 * The attribute protos of the function.
43205 * It is for function attributes with default values.
43206 * A function attribute shall be represented either as
43207 * a string attribute or an AttributeProto, not both.
43208 * </pre>
43209 *
43210 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
43211 */
43212 @java.lang.Override
43213 public onnx.OnnxMl.AttributeProtoOrBuilder getAttributeProtoOrBuilder(
43214 int index) {
43215 return attributeProto_.get(index);
43216 }
43217
43218 public static final int NODE_FIELD_NUMBER = 7;
43219 @SuppressWarnings("serial")
43220 private java.util.List<onnx.OnnxMl.NodeProto> node_;
43221 /**
43222 * <pre>
43223 * The nodes in the function.
43224 * </pre>
43225 *
43226 * <code>repeated .onnx.NodeProto node = 7;</code>
43227 */
43228 @java.lang.Override
43229 public java.util.List<onnx.OnnxMl.NodeProto> getNodeList() {
43230 return node_;
43231 }
43232 /**
43233 * <pre>
43234 * The nodes in the function.
43235 * </pre>
43236 *
43237 * <code>repeated .onnx.NodeProto node = 7;</code>
43238 */
43239 @java.lang.Override
43240 public java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
43241 getNodeOrBuilderList() {
43242 return node_;
43243 }
43244 /**
43245 * <pre>
43246 * The nodes in the function.
43247 * </pre>
43248 *
43249 * <code>repeated .onnx.NodeProto node = 7;</code>
43250 */
43251 @java.lang.Override
43252 public int getNodeCount() {
43253 return node_.size();
43254 }
43255 /**
43256 * <pre>
43257 * The nodes in the function.
43258 * </pre>
43259 *
43260 * <code>repeated .onnx.NodeProto node = 7;</code>
43261 */
43262 @java.lang.Override
43263 public onnx.OnnxMl.NodeProto getNode(int index) {
43264 return node_.get(index);
43265 }
43266 /**
43267 * <pre>
43268 * The nodes in the function.
43269 * </pre>
43270 *
43271 * <code>repeated .onnx.NodeProto node = 7;</code>
43272 */
43273 @java.lang.Override
43274 public onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
43275 int index) {
43276 return node_.get(index);
43277 }
43278
43279 public static final int DOC_STRING_FIELD_NUMBER = 8;
43280 @SuppressWarnings("serial")
43281 private volatile java.lang.Object docString_ = "";
43282 /**
43283 * <pre>
43284 * A human-readable documentation for this function. Markdown is allowed.
43285 * </pre>
43286 *
43287 * <code>optional string doc_string = 8;</code>
43288 * @return Whether the docString field is set.
43289 */
43290 @java.lang.Override
43291 public boolean hasDocString() {
43292 return ((bitField0_ & 0x00000002) != 0);
43293 }
43294 /**
43295 * <pre>
43296 * A human-readable documentation for this function. Markdown is allowed.
43297 * </pre>
43298 *
43299 * <code>optional string doc_string = 8;</code>
43300 * @return The docString.
43301 */
43302 @java.lang.Override
43303 public java.lang.String getDocString() {
43304 java.lang.Object ref = docString_;
43305 if (ref instanceof java.lang.String) {
43306 return (java.lang.String) ref;
43307 } else {
43308 com.google.protobuf.ByteString bs =
43309 (com.google.protobuf.ByteString) ref;
43310 java.lang.String s = bs.toStringUtf8();
43311 if (bs.isValidUtf8()) {
43312 docString_ = s;
43313 }
43314 return s;
43315 }
43316 }
43317 /**
43318 * <pre>
43319 * A human-readable documentation for this function. Markdown is allowed.
43320 * </pre>
43321 *
43322 * <code>optional string doc_string = 8;</code>
43323 * @return The bytes for docString.
43324 */
43325 @java.lang.Override
43326 public com.google.protobuf.ByteString
43327 getDocStringBytes() {
43328 java.lang.Object ref = docString_;
43329 if (ref instanceof java.lang.String) {
43330 com.google.protobuf.ByteString b =
43331 com.google.protobuf.ByteString.copyFromUtf8(
43332 (java.lang.String) ref);
43333 docString_ = b;
43334 return b;
43335 } else {
43336 return (com.google.protobuf.ByteString) ref;
43337 }
43338 }
43339
43340 public static final int OPSET_IMPORT_FIELD_NUMBER = 9;
43341 @SuppressWarnings("serial")
43342 private java.util.List<onnx.OnnxMl.OperatorSetIdProto> opsetImport_;
43343 /**
43344 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
43345 */
43346 @java.lang.Override
43347 public java.util.List<onnx.OnnxMl.OperatorSetIdProto> getOpsetImportList() {
43348 return opsetImport_;
43349 }
43350 /**
43351 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
43352 */
43353 @java.lang.Override
43354 public java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
43355 getOpsetImportOrBuilderList() {
43356 return opsetImport_;
43357 }
43358 /**
43359 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
43360 */
43361 @java.lang.Override
43362 public int getOpsetImportCount() {
43363 return opsetImport_.size();
43364 }
43365 /**
43366 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
43367 */
43368 @java.lang.Override
43369 public onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index) {
43370 return opsetImport_.get(index);
43371 }
43372 /**
43373 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
43374 */
43375 @java.lang.Override
43376 public onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
43377 int index) {
43378 return opsetImport_.get(index);
43379 }
43380
43381 public static final int DOMAIN_FIELD_NUMBER = 10;
43382 @SuppressWarnings("serial")
43383 private volatile java.lang.Object domain_ = "";
43384 /**
43385 * <pre>
43386 * The domain which this function belongs to.
43387 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43388 * </pre>
43389 *
43390 * <code>optional string domain = 10;</code>
43391 * @return Whether the domain field is set.
43392 */
43393 @java.lang.Override
43394 public boolean hasDomain() {
43395 return ((bitField0_ & 0x00000004) != 0);
43396 }
43397 /**
43398 * <pre>
43399 * The domain which this function belongs to.
43400 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43401 * </pre>
43402 *
43403 * <code>optional string domain = 10;</code>
43404 * @return The domain.
43405 */
43406 @java.lang.Override
43407 public java.lang.String getDomain() {
43408 java.lang.Object ref = domain_;
43409 if (ref instanceof java.lang.String) {
43410 return (java.lang.String) ref;
43411 } else {
43412 com.google.protobuf.ByteString bs =
43413 (com.google.protobuf.ByteString) ref;
43414 java.lang.String s = bs.toStringUtf8();
43415 if (bs.isValidUtf8()) {
43416 domain_ = s;
43417 }
43418 return s;
43419 }
43420 }
43421 /**
43422 * <pre>
43423 * The domain which this function belongs to.
43424 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43425 * </pre>
43426 *
43427 * <code>optional string domain = 10;</code>
43428 * @return The bytes for domain.
43429 */
43430 @java.lang.Override
43431 public com.google.protobuf.ByteString
43432 getDomainBytes() {
43433 java.lang.Object ref = domain_;
43434 if (ref instanceof java.lang.String) {
43435 com.google.protobuf.ByteString b =
43436 com.google.protobuf.ByteString.copyFromUtf8(
43437 (java.lang.String) ref);
43438 domain_ = b;
43439 return b;
43440 } else {
43441 return (com.google.protobuf.ByteString) ref;
43442 }
43443 }
43444
43445 public static final int OVERLOAD_FIELD_NUMBER = 13;
43446 @SuppressWarnings("serial")
43447 private volatile java.lang.Object overload_ = "";
43448 /**
43449 * <pre>
43450 * The overload identifier of the function.
43451 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43452 * </pre>
43453 *
43454 * <code>optional string overload = 13;</code>
43455 * @return Whether the overload field is set.
43456 */
43457 @java.lang.Override
43458 public boolean hasOverload() {
43459 return ((bitField0_ & 0x00000008) != 0);
43460 }
43461 /**
43462 * <pre>
43463 * The overload identifier of the function.
43464 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43465 * </pre>
43466 *
43467 * <code>optional string overload = 13;</code>
43468 * @return The overload.
43469 */
43470 @java.lang.Override
43471 public java.lang.String getOverload() {
43472 java.lang.Object ref = overload_;
43473 if (ref instanceof java.lang.String) {
43474 return (java.lang.String) ref;
43475 } else {
43476 com.google.protobuf.ByteString bs =
43477 (com.google.protobuf.ByteString) ref;
43478 java.lang.String s = bs.toStringUtf8();
43479 if (bs.isValidUtf8()) {
43480 overload_ = s;
43481 }
43482 return s;
43483 }
43484 }
43485 /**
43486 * <pre>
43487 * The overload identifier of the function.
43488 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
43489 * </pre>
43490 *
43491 * <code>optional string overload = 13;</code>
43492 * @return The bytes for overload.
43493 */
43494 @java.lang.Override
43495 public com.google.protobuf.ByteString
43496 getOverloadBytes() {
43497 java.lang.Object ref = overload_;
43498 if (ref instanceof java.lang.String) {
43499 com.google.protobuf.ByteString b =
43500 com.google.protobuf.ByteString.copyFromUtf8(
43501 (java.lang.String) ref);
43502 overload_ = b;
43503 return b;
43504 } else {
43505 return (com.google.protobuf.ByteString) ref;
43506 }
43507 }
43508
43509 public static final int VALUE_INFO_FIELD_NUMBER = 12;
43510 @SuppressWarnings("serial")
43511 private java.util.List<onnx.OnnxMl.ValueInfoProto> valueInfo_;
43512 /**
43513 * <pre>
43514 * Information for the values in the function. The ValueInfoProto.name's
43515 * must be distinct and refer to names in the function (including inputs,
43516 * outputs, and intermediate values). It is optional for a value to appear
43517 * in value_info list.
43518 * </pre>
43519 *
43520 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
43521 */
43522 @java.lang.Override
43523 public java.util.List<onnx.OnnxMl.ValueInfoProto> getValueInfoList() {
43524 return valueInfo_;
43525 }
43526 /**
43527 * <pre>
43528 * Information for the values in the function. The ValueInfoProto.name's
43529 * must be distinct and refer to names in the function (including inputs,
43530 * outputs, and intermediate values). It is optional for a value to appear
43531 * in value_info list.
43532 * </pre>
43533 *
43534 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
43535 */
43536 @java.lang.Override
43537 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
43538 getValueInfoOrBuilderList() {
43539 return valueInfo_;
43540 }
43541 /**
43542 * <pre>
43543 * Information for the values in the function. The ValueInfoProto.name's
43544 * must be distinct and refer to names in the function (including inputs,
43545 * outputs, and intermediate values). It is optional for a value to appear
43546 * in value_info list.
43547 * </pre>
43548 *
43549 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
43550 */
43551 @java.lang.Override
43552 public int getValueInfoCount() {
43553 return valueInfo_.size();
43554 }
43555 /**
43556 * <pre>
43557 * Information for the values in the function. The ValueInfoProto.name's
43558 * must be distinct and refer to names in the function (including inputs,
43559 * outputs, and intermediate values). It is optional for a value to appear
43560 * in value_info list.
43561 * </pre>
43562 *
43563 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
43564 */
43565 @java.lang.Override
43566 public onnx.OnnxMl.ValueInfoProto getValueInfo(int index) {
43567 return valueInfo_.get(index);
43568 }
43569 /**
43570 * <pre>
43571 * Information for the values in the function. The ValueInfoProto.name's
43572 * must be distinct and refer to names in the function (including inputs,
43573 * outputs, and intermediate values). It is optional for a value to appear
43574 * in value_info list.
43575 * </pre>
43576 *
43577 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
43578 */
43579 @java.lang.Override
43580 public onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
43581 int index) {
43582 return valueInfo_.get(index);
43583 }
43584
43585 public static final int METADATA_PROPS_FIELD_NUMBER = 14;
43586 @SuppressWarnings("serial")
43587 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_;
43588 /**
43589 * <pre>
43590 * Named metadata values; keys should be distinct.
43591 * </pre>
43592 *
43593 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
43594 */
43595 @java.lang.Override
43596 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
43597 return metadataProps_;
43598 }
43599 /**
43600 * <pre>
43601 * Named metadata values; keys should be distinct.
43602 * </pre>
43603 *
43604 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
43605 */
43606 @java.lang.Override
43607 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
43608 getMetadataPropsOrBuilderList() {
43609 return metadataProps_;
43610 }
43611 /**
43612 * <pre>
43613 * Named metadata values; keys should be distinct.
43614 * </pre>
43615 *
43616 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
43617 */
43618 @java.lang.Override
43619 public int getMetadataPropsCount() {
43620 return metadataProps_.size();
43621 }
43622 /**
43623 * <pre>
43624 * Named metadata values; keys should be distinct.
43625 * </pre>
43626 *
43627 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
43628 */
43629 @java.lang.Override
43630 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
43631 return metadataProps_.get(index);
43632 }
43633 /**
43634 * <pre>
43635 * Named metadata values; keys should be distinct.
43636 * </pre>
43637 *
43638 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
43639 */
43640 @java.lang.Override
43641 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
43642 int index) {
43643 return metadataProps_.get(index);
43644 }
43645
43646 private byte memoizedIsInitialized = -1;
43647 @java.lang.Override
43648 public final boolean isInitialized() {
43649 byte isInitialized = memoizedIsInitialized;
43650 if (isInitialized == 1) return true;
43651 if (isInitialized == 0) return false;
43652
43653 memoizedIsInitialized = 1;
43654 return true;
43655 }
43656
43657 @java.lang.Override
43658 public void writeTo(com.google.protobuf.CodedOutputStream output)
43659 throws java.io.IOException {
43660 if (((bitField0_ & 0x00000001) != 0)) {
43661 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
43662 }
43663 for (int i = 0; i < input_.size(); i++) {
43664 com.google.protobuf.GeneratedMessage.writeString(output, 4, input_.getRaw(i));
43665 }
43666 for (int i = 0; i < output_.size(); i++) {
43667 com.google.protobuf.GeneratedMessage.writeString(output, 5, output_.getRaw(i));
43668 }
43669 for (int i = 0; i < attribute_.size(); i++) {
43670 com.google.protobuf.GeneratedMessage.writeString(output, 6, attribute_.getRaw(i));
43671 }
43672 for (int i = 0; i < node_.size(); i++) {
43673 output.writeMessage(7, node_.get(i));
43674 }
43675 if (((bitField0_ & 0x00000002) != 0)) {
43676 com.google.protobuf.GeneratedMessage.writeString(output, 8, docString_);
43677 }
43678 for (int i = 0; i < opsetImport_.size(); i++) {
43679 output.writeMessage(9, opsetImport_.get(i));
43680 }
43681 if (((bitField0_ & 0x00000004) != 0)) {
43682 com.google.protobuf.GeneratedMessage.writeString(output, 10, domain_);
43683 }
43684 for (int i = 0; i < attributeProto_.size(); i++) {
43685 output.writeMessage(11, attributeProto_.get(i));
43686 }
43687 for (int i = 0; i < valueInfo_.size(); i++) {
43688 output.writeMessage(12, valueInfo_.get(i));
43689 }
43690 if (((bitField0_ & 0x00000008) != 0)) {
43691 com.google.protobuf.GeneratedMessage.writeString(output, 13, overload_);
43692 }
43693 for (int i = 0; i < metadataProps_.size(); i++) {
43694 output.writeMessage(14, metadataProps_.get(i));
43695 }
43696 getUnknownFields().writeTo(output);
43697 }
43698
43699 @java.lang.Override
43700 public int getSerializedSize() {
43701 int size = memoizedSize;
43702 if (size != -1) return size;
43703
43704 size = 0;
43705 if (((bitField0_ & 0x00000001) != 0)) {
43706 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
43707 }
43708 {
43709 int dataSize = 0;
43710 for (int i = 0; i < input_.size(); i++) {
43711 dataSize += computeStringSizeNoTag(input_.getRaw(i));
43712 }
43713 size += dataSize;
43714 size += 1 * getInputList().size();
43715 }
43716 {
43717 int dataSize = 0;
43718 for (int i = 0; i < output_.size(); i++) {
43719 dataSize += computeStringSizeNoTag(output_.getRaw(i));
43720 }
43721 size += dataSize;
43722 size += 1 * getOutputList().size();
43723 }
43724 {
43725 int dataSize = 0;
43726 for (int i = 0; i < attribute_.size(); i++) {
43727 dataSize += computeStringSizeNoTag(attribute_.getRaw(i));
43728 }
43729 size += dataSize;
43730 size += 1 * getAttributeList().size();
43731 }
43732 for (int i = 0; i < node_.size(); i++) {
43733 size += com.google.protobuf.CodedOutputStream
43734 .computeMessageSize(7, node_.get(i));
43735 }
43736 if (((bitField0_ & 0x00000002) != 0)) {
43737 size += com.google.protobuf.GeneratedMessage.computeStringSize(8, docString_);
43738 }
43739 for (int i = 0; i < opsetImport_.size(); i++) {
43740 size += com.google.protobuf.CodedOutputStream
43741 .computeMessageSize(9, opsetImport_.get(i));
43742 }
43743 if (((bitField0_ & 0x00000004) != 0)) {
43744 size += com.google.protobuf.GeneratedMessage.computeStringSize(10, domain_);
43745 }
43746 for (int i = 0; i < attributeProto_.size(); i++) {
43747 size += com.google.protobuf.CodedOutputStream
43748 .computeMessageSize(11, attributeProto_.get(i));
43749 }
43750 for (int i = 0; i < valueInfo_.size(); i++) {
43751 size += com.google.protobuf.CodedOutputStream
43752 .computeMessageSize(12, valueInfo_.get(i));
43753 }
43754 if (((bitField0_ & 0x00000008) != 0)) {
43755 size += com.google.protobuf.GeneratedMessage.computeStringSize(13, overload_);
43756 }
43757 for (int i = 0; i < metadataProps_.size(); i++) {
43758 size += com.google.protobuf.CodedOutputStream
43759 .computeMessageSize(14, metadataProps_.get(i));
43760 }
43761 size += getUnknownFields().getSerializedSize();
43762 memoizedSize = size;
43763 return size;
43764 }
43765
43766 @java.lang.Override
43767 public boolean equals(final java.lang.Object obj) {
43768 if (obj == this) {
43769 return true;
43770 }
43771 if (!(obj instanceof onnx.OnnxMl.FunctionProto)) {
43772 return super.equals(obj);
43773 }
43774 onnx.OnnxMl.FunctionProto other = (onnx.OnnxMl.FunctionProto) obj;
43775
43776 if (hasName() != other.hasName()) return false;
43777 if (hasName()) {
43778 if (!getName()
43779 .equals(other.getName())) return false;
43780 }
43781 if (!getInputList()
43782 .equals(other.getInputList())) return false;
43783 if (!getOutputList()
43784 .equals(other.getOutputList())) return false;
43785 if (!getAttributeList()
43786 .equals(other.getAttributeList())) return false;
43787 if (!getAttributeProtoList()
43788 .equals(other.getAttributeProtoList())) return false;
43789 if (!getNodeList()
43790 .equals(other.getNodeList())) return false;
43791 if (hasDocString() != other.hasDocString()) return false;
43792 if (hasDocString()) {
43793 if (!getDocString()
43794 .equals(other.getDocString())) return false;
43795 }
43796 if (!getOpsetImportList()
43797 .equals(other.getOpsetImportList())) return false;
43798 if (hasDomain() != other.hasDomain()) return false;
43799 if (hasDomain()) {
43800 if (!getDomain()
43801 .equals(other.getDomain())) return false;
43802 }
43803 if (hasOverload() != other.hasOverload()) return false;
43804 if (hasOverload()) {
43805 if (!getOverload()
43806 .equals(other.getOverload())) return false;
43807 }
43808 if (!getValueInfoList()
43809 .equals(other.getValueInfoList())) return false;
43810 if (!getMetadataPropsList()
43811 .equals(other.getMetadataPropsList())) return false;
43812 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
43813 return true;
43814 }
43815
43816 @java.lang.Override
43817 public int hashCode() {
43818 if (memoizedHashCode != 0) {
43819 return memoizedHashCode;
43820 }
43821 int hash = 41;
43822 hash = (19 * hash) + getDescriptor().hashCode();
43823 if (hasName()) {
43824 hash = (37 * hash) + NAME_FIELD_NUMBER;
43825 hash = (53 * hash) + getName().hashCode();
43826 }
43827 if (getInputCount() > 0) {
43828 hash = (37 * hash) + INPUT_FIELD_NUMBER;
43829 hash = (53 * hash) + getInputList().hashCode();
43830 }
43831 if (getOutputCount() > 0) {
43832 hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
43833 hash = (53 * hash) + getOutputList().hashCode();
43834 }
43835 if (getAttributeCount() > 0) {
43836 hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER;
43837 hash = (53 * hash) + getAttributeList().hashCode();
43838 }
43839 if (getAttributeProtoCount() > 0) {
43840 hash = (37 * hash) + ATTRIBUTE_PROTO_FIELD_NUMBER;
43841 hash = (53 * hash) + getAttributeProtoList().hashCode();
43842 }
43843 if (getNodeCount() > 0) {
43844 hash = (37 * hash) + NODE_FIELD_NUMBER;
43845 hash = (53 * hash) + getNodeList().hashCode();
43846 }
43847 if (hasDocString()) {
43848 hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
43849 hash = (53 * hash) + getDocString().hashCode();
43850 }
43851 if (getOpsetImportCount() > 0) {
43852 hash = (37 * hash) + OPSET_IMPORT_FIELD_NUMBER;
43853 hash = (53 * hash) + getOpsetImportList().hashCode();
43854 }
43855 if (hasDomain()) {
43856 hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
43857 hash = (53 * hash) + getDomain().hashCode();
43858 }
43859 if (hasOverload()) {
43860 hash = (37 * hash) + OVERLOAD_FIELD_NUMBER;
43861 hash = (53 * hash) + getOverload().hashCode();
43862 }
43863 if (getValueInfoCount() > 0) {
43864 hash = (37 * hash) + VALUE_INFO_FIELD_NUMBER;
43865 hash = (53 * hash) + getValueInfoList().hashCode();
43866 }
43867 if (getMetadataPropsCount() > 0) {
43868 hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
43869 hash = (53 * hash) + getMetadataPropsList().hashCode();
43870 }
43871 hash = (29 * hash) + getUnknownFields().hashCode();
43872 memoizedHashCode = hash;
43873 return hash;
43874 }
43875
43876 public static onnx.OnnxMl.FunctionProto parseFrom(
43877 java.nio.ByteBuffer data)
43878 throws com.google.protobuf.InvalidProtocolBufferException {
43879 return PARSER.parseFrom(data);
43880 }
43881 public static onnx.OnnxMl.FunctionProto parseFrom(
43882 java.nio.ByteBuffer data,
43883 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43884 throws com.google.protobuf.InvalidProtocolBufferException {
43885 return PARSER.parseFrom(data, extensionRegistry);
43886 }
43887 public static onnx.OnnxMl.FunctionProto parseFrom(
43888 com.google.protobuf.ByteString data)
43889 throws com.google.protobuf.InvalidProtocolBufferException {
43890 return PARSER.parseFrom(data);
43891 }
43892 public static onnx.OnnxMl.FunctionProto parseFrom(
43893 com.google.protobuf.ByteString data,
43894 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43895 throws com.google.protobuf.InvalidProtocolBufferException {
43896 return PARSER.parseFrom(data, extensionRegistry);
43897 }
43898 public static onnx.OnnxMl.FunctionProto parseFrom(byte[] data)
43899 throws com.google.protobuf.InvalidProtocolBufferException {
43900 return PARSER.parseFrom(data);
43901 }
43902 public static onnx.OnnxMl.FunctionProto parseFrom(
43903 byte[] data,
43904 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43905 throws com.google.protobuf.InvalidProtocolBufferException {
43906 return PARSER.parseFrom(data, extensionRegistry);
43907 }
43908 public static onnx.OnnxMl.FunctionProto parseFrom(java.io.InputStream input)
43909 throws java.io.IOException {
43910 return com.google.protobuf.GeneratedMessage
43911 .parseWithIOException(PARSER, input);
43912 }
43913 public static onnx.OnnxMl.FunctionProto parseFrom(
43914 java.io.InputStream input,
43915 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43916 throws java.io.IOException {
43917 return com.google.protobuf.GeneratedMessage
43918 .parseWithIOException(PARSER, input, extensionRegistry);
43919 }
43920
43921 public static onnx.OnnxMl.FunctionProto parseDelimitedFrom(java.io.InputStream input)
43922 throws java.io.IOException {
43923 return com.google.protobuf.GeneratedMessage
43924 .parseDelimitedWithIOException(PARSER, input);
43925 }
43926
43927 public static onnx.OnnxMl.FunctionProto parseDelimitedFrom(
43928 java.io.InputStream input,
43929 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43930 throws java.io.IOException {
43931 return com.google.protobuf.GeneratedMessage
43932 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
43933 }
43934 public static onnx.OnnxMl.FunctionProto parseFrom(
43935 com.google.protobuf.CodedInputStream input)
43936 throws java.io.IOException {
43937 return com.google.protobuf.GeneratedMessage
43938 .parseWithIOException(PARSER, input);
43939 }
43940 public static onnx.OnnxMl.FunctionProto parseFrom(
43941 com.google.protobuf.CodedInputStream input,
43942 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
43943 throws java.io.IOException {
43944 return com.google.protobuf.GeneratedMessage
43945 .parseWithIOException(PARSER, input, extensionRegistry);
43946 }
43947
43948 @java.lang.Override
43949 public Builder newBuilderForType() { return newBuilder(); }
43950 public static Builder newBuilder() {
43951 return DEFAULT_INSTANCE.toBuilder();
43952 }
43953 public static Builder newBuilder(onnx.OnnxMl.FunctionProto prototype) {
43954 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
43955 }
43956 @java.lang.Override
43957 public Builder toBuilder() {
43958 return this == DEFAULT_INSTANCE
43959 ? new Builder() : new Builder().mergeFrom(this);
43960 }
43961
43962 @java.lang.Override
43963 protected Builder newBuilderForType(
43964 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
43965 Builder builder = new Builder(parent);
43966 return builder;
43967 }
43968 /**
43969 * Protobuf type {@code onnx.FunctionProto}
43970 */
43971 public static final class Builder extends
43972 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
43973 // @@protoc_insertion_point(builder_implements:onnx.FunctionProto)
43974 onnx.OnnxMl.FunctionProtoOrBuilder {
43975 public static final com.google.protobuf.Descriptors.Descriptor
43976 getDescriptor() {
43977 return onnx.OnnxMl.internal_static_onnx_FunctionProto_descriptor;
43978 }
43979
43980 @java.lang.Override
43981 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
43982 internalGetFieldAccessorTable() {
43983 return onnx.OnnxMl.internal_static_onnx_FunctionProto_fieldAccessorTable
43984 .ensureFieldAccessorsInitialized(
43985 onnx.OnnxMl.FunctionProto.class, onnx.OnnxMl.FunctionProto.Builder.class);
43986 }
43987
43988 // Construct using onnx.OnnxMl.FunctionProto.newBuilder()
43989 private Builder() {
43990
43991 }
43992
43993 private Builder(
43994 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
43995 super(parent);
43996
43997 }
43998 @java.lang.Override
43999 public Builder clear() {
44000 super.clear();
44001 bitField0_ = 0;
44002 name_ = "";
44003 input_ =
44004 com.google.protobuf.LazyStringArrayList.emptyList();
44005 output_ =
44006 com.google.protobuf.LazyStringArrayList.emptyList();
44007 attribute_ =
44008 com.google.protobuf.LazyStringArrayList.emptyList();
44009 if (attributeProtoBuilder_ == null) {
44010 attributeProto_ = java.util.Collections.emptyList();
44011 } else {
44012 attributeProto_ = null;
44013 attributeProtoBuilder_.clear();
44014 }
44015 bitField0_ = (bitField0_ & ~0x00000010);
44016 if (nodeBuilder_ == null) {
44017 node_ = java.util.Collections.emptyList();
44018 } else {
44019 node_ = null;
44020 nodeBuilder_.clear();
44021 }
44022 bitField0_ = (bitField0_ & ~0x00000020);
44023 docString_ = "";
44024 if (opsetImportBuilder_ == null) {
44025 opsetImport_ = java.util.Collections.emptyList();
44026 } else {
44027 opsetImport_ = null;
44028 opsetImportBuilder_.clear();
44029 }
44030 bitField0_ = (bitField0_ & ~0x00000080);
44031 domain_ = "";
44032 overload_ = "";
44033 if (valueInfoBuilder_ == null) {
44034 valueInfo_ = java.util.Collections.emptyList();
44035 } else {
44036 valueInfo_ = null;
44037 valueInfoBuilder_.clear();
44038 }
44039 bitField0_ = (bitField0_ & ~0x00000400);
44040 if (metadataPropsBuilder_ == null) {
44041 metadataProps_ = java.util.Collections.emptyList();
44042 } else {
44043 metadataProps_ = null;
44044 metadataPropsBuilder_.clear();
44045 }
44046 bitField0_ = (bitField0_ & ~0x00000800);
44047 return this;
44048 }
44049
44050 @java.lang.Override
44051 public com.google.protobuf.Descriptors.Descriptor
44052 getDescriptorForType() {
44053 return onnx.OnnxMl.internal_static_onnx_FunctionProto_descriptor;
44054 }
44055
44056 @java.lang.Override
44057 public onnx.OnnxMl.FunctionProto getDefaultInstanceForType() {
44058 return onnx.OnnxMl.FunctionProto.getDefaultInstance();
44059 }
44060
44061 @java.lang.Override
44062 public onnx.OnnxMl.FunctionProto build() {
44063 onnx.OnnxMl.FunctionProto result = buildPartial();
44064 if (!result.isInitialized()) {
44065 throw newUninitializedMessageException(result);
44066 }
44067 return result;
44068 }
44069
44070 @java.lang.Override
44071 public onnx.OnnxMl.FunctionProto buildPartial() {
44072 onnx.OnnxMl.FunctionProto result = new onnx.OnnxMl.FunctionProto(this);
44073 buildPartialRepeatedFields(result);
44074 if (bitField0_ != 0) { buildPartial0(result); }
44075 onBuilt();
44076 return result;
44077 }
44078
44079 private void buildPartialRepeatedFields(onnx.OnnxMl.FunctionProto result) {
44080 if (attributeProtoBuilder_ == null) {
44081 if (((bitField0_ & 0x00000010) != 0)) {
44082 attributeProto_ = java.util.Collections.unmodifiableList(attributeProto_);
44083 bitField0_ = (bitField0_ & ~0x00000010);
44084 }
44085 result.attributeProto_ = attributeProto_;
44086 } else {
44087 result.attributeProto_ = attributeProtoBuilder_.build();
44088 }
44089 if (nodeBuilder_ == null) {
44090 if (((bitField0_ & 0x00000020) != 0)) {
44091 node_ = java.util.Collections.unmodifiableList(node_);
44092 bitField0_ = (bitField0_ & ~0x00000020);
44093 }
44094 result.node_ = node_;
44095 } else {
44096 result.node_ = nodeBuilder_.build();
44097 }
44098 if (opsetImportBuilder_ == null) {
44099 if (((bitField0_ & 0x00000080) != 0)) {
44100 opsetImport_ = java.util.Collections.unmodifiableList(opsetImport_);
44101 bitField0_ = (bitField0_ & ~0x00000080);
44102 }
44103 result.opsetImport_ = opsetImport_;
44104 } else {
44105 result.opsetImport_ = opsetImportBuilder_.build();
44106 }
44107 if (valueInfoBuilder_ == null) {
44108 if (((bitField0_ & 0x00000400) != 0)) {
44109 valueInfo_ = java.util.Collections.unmodifiableList(valueInfo_);
44110 bitField0_ = (bitField0_ & ~0x00000400);
44111 }
44112 result.valueInfo_ = valueInfo_;
44113 } else {
44114 result.valueInfo_ = valueInfoBuilder_.build();
44115 }
44116 if (metadataPropsBuilder_ == null) {
44117 if (((bitField0_ & 0x00000800) != 0)) {
44118 metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
44119 bitField0_ = (bitField0_ & ~0x00000800);
44120 }
44121 result.metadataProps_ = metadataProps_;
44122 } else {
44123 result.metadataProps_ = metadataPropsBuilder_.build();
44124 }
44125 }
44126
44127 private void buildPartial0(onnx.OnnxMl.FunctionProto result) {
44128 int from_bitField0_ = bitField0_;
44129 int to_bitField0_ = 0;
44130 if (((from_bitField0_ & 0x00000001) != 0)) {
44131 result.name_ = name_;
44132 to_bitField0_ |= 0x00000001;
44133 }
44134 if (((from_bitField0_ & 0x00000002) != 0)) {
44135 input_.makeImmutable();
44136 result.input_ = input_;
44137 }
44138 if (((from_bitField0_ & 0x00000004) != 0)) {
44139 output_.makeImmutable();
44140 result.output_ = output_;
44141 }
44142 if (((from_bitField0_ & 0x00000008) != 0)) {
44143 attribute_.makeImmutable();
44144 result.attribute_ = attribute_;
44145 }
44146 if (((from_bitField0_ & 0x00000040) != 0)) {
44147 result.docString_ = docString_;
44148 to_bitField0_ |= 0x00000002;
44149 }
44150 if (((from_bitField0_ & 0x00000100) != 0)) {
44151 result.domain_ = domain_;
44152 to_bitField0_ |= 0x00000004;
44153 }
44154 if (((from_bitField0_ & 0x00000200) != 0)) {
44155 result.overload_ = overload_;
44156 to_bitField0_ |= 0x00000008;
44157 }
44158 result.bitField0_ |= to_bitField0_;
44159 }
44160
44161 @java.lang.Override
44162 public Builder mergeFrom(com.google.protobuf.Message other) {
44163 if (other instanceof onnx.OnnxMl.FunctionProto) {
44164 return mergeFrom((onnx.OnnxMl.FunctionProto)other);
44165 } else {
44166 super.mergeFrom(other);
44167 return this;
44168 }
44169 }
44170
44171 public Builder mergeFrom(onnx.OnnxMl.FunctionProto other) {
44172 if (other == onnx.OnnxMl.FunctionProto.getDefaultInstance()) return this;
44173 if (other.hasName()) {
44174 name_ = other.name_;
44175 bitField0_ |= 0x00000001;
44176 onChanged();
44177 }
44178 if (!other.input_.isEmpty()) {
44179 if (input_.isEmpty()) {
44180 input_ = other.input_;
44181 bitField0_ |= 0x00000002;
44182 } else {
44183 ensureInputIsMutable();
44184 input_.addAll(other.input_);
44185 }
44186 onChanged();
44187 }
44188 if (!other.output_.isEmpty()) {
44189 if (output_.isEmpty()) {
44190 output_ = other.output_;
44191 bitField0_ |= 0x00000004;
44192 } else {
44193 ensureOutputIsMutable();
44194 output_.addAll(other.output_);
44195 }
44196 onChanged();
44197 }
44198 if (!other.attribute_.isEmpty()) {
44199 if (attribute_.isEmpty()) {
44200 attribute_ = other.attribute_;
44201 bitField0_ |= 0x00000008;
44202 } else {
44203 ensureAttributeIsMutable();
44204 attribute_.addAll(other.attribute_);
44205 }
44206 onChanged();
44207 }
44208 if (attributeProtoBuilder_ == null) {
44209 if (!other.attributeProto_.isEmpty()) {
44210 if (attributeProto_.isEmpty()) {
44211 attributeProto_ = other.attributeProto_;
44212 bitField0_ = (bitField0_ & ~0x00000010);
44213 } else {
44214 ensureAttributeProtoIsMutable();
44215 attributeProto_.addAll(other.attributeProto_);
44216 }
44217 onChanged();
44218 }
44219 } else {
44220 if (!other.attributeProto_.isEmpty()) {
44221 if (attributeProtoBuilder_.isEmpty()) {
44222 attributeProtoBuilder_.dispose();
44223 attributeProtoBuilder_ = null;
44224 attributeProto_ = other.attributeProto_;
44225 bitField0_ = (bitField0_ & ~0x00000010);
44226 attributeProtoBuilder_ =
44227 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
44228 getAttributeProtoFieldBuilder() : null;
44229 } else {
44230 attributeProtoBuilder_.addAllMessages(other.attributeProto_);
44231 }
44232 }
44233 }
44234 if (nodeBuilder_ == null) {
44235 if (!other.node_.isEmpty()) {
44236 if (node_.isEmpty()) {
44237 node_ = other.node_;
44238 bitField0_ = (bitField0_ & ~0x00000020);
44239 } else {
44240 ensureNodeIsMutable();
44241 node_.addAll(other.node_);
44242 }
44243 onChanged();
44244 }
44245 } else {
44246 if (!other.node_.isEmpty()) {
44247 if (nodeBuilder_.isEmpty()) {
44248 nodeBuilder_.dispose();
44249 nodeBuilder_ = null;
44250 node_ = other.node_;
44251 bitField0_ = (bitField0_ & ~0x00000020);
44252 nodeBuilder_ =
44253 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
44254 getNodeFieldBuilder() : null;
44255 } else {
44256 nodeBuilder_.addAllMessages(other.node_);
44257 }
44258 }
44259 }
44260 if (other.hasDocString()) {
44261 docString_ = other.docString_;
44262 bitField0_ |= 0x00000040;
44263 onChanged();
44264 }
44265 if (opsetImportBuilder_ == null) {
44266 if (!other.opsetImport_.isEmpty()) {
44267 if (opsetImport_.isEmpty()) {
44268 opsetImport_ = other.opsetImport_;
44269 bitField0_ = (bitField0_ & ~0x00000080);
44270 } else {
44271 ensureOpsetImportIsMutable();
44272 opsetImport_.addAll(other.opsetImport_);
44273 }
44274 onChanged();
44275 }
44276 } else {
44277 if (!other.opsetImport_.isEmpty()) {
44278 if (opsetImportBuilder_.isEmpty()) {
44279 opsetImportBuilder_.dispose();
44280 opsetImportBuilder_ = null;
44281 opsetImport_ = other.opsetImport_;
44282 bitField0_ = (bitField0_ & ~0x00000080);
44283 opsetImportBuilder_ =
44284 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
44285 getOpsetImportFieldBuilder() : null;
44286 } else {
44287 opsetImportBuilder_.addAllMessages(other.opsetImport_);
44288 }
44289 }
44290 }
44291 if (other.hasDomain()) {
44292 domain_ = other.domain_;
44293 bitField0_ |= 0x00000100;
44294 onChanged();
44295 }
44296 if (other.hasOverload()) {
44297 overload_ = other.overload_;
44298 bitField0_ |= 0x00000200;
44299 onChanged();
44300 }
44301 if (valueInfoBuilder_ == null) {
44302 if (!other.valueInfo_.isEmpty()) {
44303 if (valueInfo_.isEmpty()) {
44304 valueInfo_ = other.valueInfo_;
44305 bitField0_ = (bitField0_ & ~0x00000400);
44306 } else {
44307 ensureValueInfoIsMutable();
44308 valueInfo_.addAll(other.valueInfo_);
44309 }
44310 onChanged();
44311 }
44312 } else {
44313 if (!other.valueInfo_.isEmpty()) {
44314 if (valueInfoBuilder_.isEmpty()) {
44315 valueInfoBuilder_.dispose();
44316 valueInfoBuilder_ = null;
44317 valueInfo_ = other.valueInfo_;
44318 bitField0_ = (bitField0_ & ~0x00000400);
44319 valueInfoBuilder_ =
44320 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
44321 getValueInfoFieldBuilder() : null;
44322 } else {
44323 valueInfoBuilder_.addAllMessages(other.valueInfo_);
44324 }
44325 }
44326 }
44327 if (metadataPropsBuilder_ == null) {
44328 if (!other.metadataProps_.isEmpty()) {
44329 if (metadataProps_.isEmpty()) {
44330 metadataProps_ = other.metadataProps_;
44331 bitField0_ = (bitField0_ & ~0x00000800);
44332 } else {
44333 ensureMetadataPropsIsMutable();
44334 metadataProps_.addAll(other.metadataProps_);
44335 }
44336 onChanged();
44337 }
44338 } else {
44339 if (!other.metadataProps_.isEmpty()) {
44340 if (metadataPropsBuilder_.isEmpty()) {
44341 metadataPropsBuilder_.dispose();
44342 metadataPropsBuilder_ = null;
44343 metadataProps_ = other.metadataProps_;
44344 bitField0_ = (bitField0_ & ~0x00000800);
44345 metadataPropsBuilder_ =
44346 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
44347 getMetadataPropsFieldBuilder() : null;
44348 } else {
44349 metadataPropsBuilder_.addAllMessages(other.metadataProps_);
44350 }
44351 }
44352 }
44353 this.mergeUnknownFields(other.getUnknownFields());
44354 onChanged();
44355 return this;
44356 }
44357
44358 @java.lang.Override
44359 public final boolean isInitialized() {
44360 return true;
44361 }
44362
44363 @java.lang.Override
44364 public Builder mergeFrom(
44365 com.google.protobuf.CodedInputStream input,
44366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
44367 throws java.io.IOException {
44368 if (extensionRegistry == null) {
44369 throw new java.lang.NullPointerException();
44370 }
44371 try {
44372 boolean done = false;
44373 while (!done) {
44374 int tag = input.readTag();
44375 switch (tag) {
44376 case 0:
44377 done = true;
44378 break;
44379 case 10: {
44380 name_ = input.readBytes();
44381 bitField0_ |= 0x00000001;
44382 break;
44383 } // case 10
44384 case 34: {
44385 com.google.protobuf.ByteString bs = input.readBytes();
44386 ensureInputIsMutable();
44387 input_.add(bs);
44388 break;
44389 } // case 34
44390 case 42: {
44391 com.google.protobuf.ByteString bs = input.readBytes();
44392 ensureOutputIsMutable();
44393 output_.add(bs);
44394 break;
44395 } // case 42
44396 case 50: {
44397 com.google.protobuf.ByteString bs = input.readBytes();
44398 ensureAttributeIsMutable();
44399 attribute_.add(bs);
44400 break;
44401 } // case 50
44402 case 58: {
44403 onnx.OnnxMl.NodeProto m =
44404 input.readMessage(
44405 onnx.OnnxMl.NodeProto.parser(),
44406 extensionRegistry);
44407 if (nodeBuilder_ == null) {
44408 ensureNodeIsMutable();
44409 node_.add(m);
44410 } else {
44411 nodeBuilder_.addMessage(m);
44412 }
44413 break;
44414 } // case 58
44415 case 66: {
44416 docString_ = input.readBytes();
44417 bitField0_ |= 0x00000040;
44418 break;
44419 } // case 66
44420 case 74: {
44421 onnx.OnnxMl.OperatorSetIdProto m =
44422 input.readMessage(
44423 onnx.OnnxMl.OperatorSetIdProto.parser(),
44424 extensionRegistry);
44425 if (opsetImportBuilder_ == null) {
44426 ensureOpsetImportIsMutable();
44427 opsetImport_.add(m);
44428 } else {
44429 opsetImportBuilder_.addMessage(m);
44430 }
44431 break;
44432 } // case 74
44433 case 82: {
44434 domain_ = input.readBytes();
44435 bitField0_ |= 0x00000100;
44436 break;
44437 } // case 82
44438 case 90: {
44439 onnx.OnnxMl.AttributeProto m =
44440 input.readMessage(
44441 onnx.OnnxMl.AttributeProto.parser(),
44442 extensionRegistry);
44443 if (attributeProtoBuilder_ == null) {
44444 ensureAttributeProtoIsMutable();
44445 attributeProto_.add(m);
44446 } else {
44447 attributeProtoBuilder_.addMessage(m);
44448 }
44449 break;
44450 } // case 90
44451 case 98: {
44452 onnx.OnnxMl.ValueInfoProto m =
44453 input.readMessage(
44454 onnx.OnnxMl.ValueInfoProto.parser(),
44455 extensionRegistry);
44456 if (valueInfoBuilder_ == null) {
44457 ensureValueInfoIsMutable();
44458 valueInfo_.add(m);
44459 } else {
44460 valueInfoBuilder_.addMessage(m);
44461 }
44462 break;
44463 } // case 98
44464 case 106: {
44465 overload_ = input.readBytes();
44466 bitField0_ |= 0x00000200;
44467 break;
44468 } // case 106
44469 case 114: {
44470 onnx.OnnxMl.StringStringEntryProto m =
44471 input.readMessage(
44472 onnx.OnnxMl.StringStringEntryProto.parser(),
44473 extensionRegistry);
44474 if (metadataPropsBuilder_ == null) {
44475 ensureMetadataPropsIsMutable();
44476 metadataProps_.add(m);
44477 } else {
44478 metadataPropsBuilder_.addMessage(m);
44479 }
44480 break;
44481 } // case 114
44482 default: {
44483 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
44484 done = true; // was an endgroup tag
44485 }
44486 break;
44487 } // default:
44488 } // switch (tag)
44489 } // while (!done)
44490 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
44491 throw e.unwrapIOException();
44492 } finally {
44493 onChanged();
44494 } // finally
44495 return this;
44496 }
44497 private int bitField0_;
44498
44499 private java.lang.Object name_ = "";
44500 /**
44501 * <pre>
44502 * The name of the function, similar to op_type in NodeProto.
44503 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44504 * </pre>
44505 *
44506 * <code>optional string name = 1;</code>
44507 * @return Whether the name field is set.
44508 */
44509 public boolean hasName() {
44510 return ((bitField0_ & 0x00000001) != 0);
44511 }
44512 /**
44513 * <pre>
44514 * The name of the function, similar to op_type in NodeProto.
44515 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44516 * </pre>
44517 *
44518 * <code>optional string name = 1;</code>
44519 * @return The name.
44520 */
44521 public java.lang.String getName() {
44522 java.lang.Object ref = name_;
44523 if (!(ref instanceof java.lang.String)) {
44524 com.google.protobuf.ByteString bs =
44525 (com.google.protobuf.ByteString) ref;
44526 java.lang.String s = bs.toStringUtf8();
44527 if (bs.isValidUtf8()) {
44528 name_ = s;
44529 }
44530 return s;
44531 } else {
44532 return (java.lang.String) ref;
44533 }
44534 }
44535 /**
44536 * <pre>
44537 * The name of the function, similar to op_type in NodeProto.
44538 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44539 * </pre>
44540 *
44541 * <code>optional string name = 1;</code>
44542 * @return The bytes for name.
44543 */
44544 public com.google.protobuf.ByteString
44545 getNameBytes() {
44546 java.lang.Object ref = name_;
44547 if (ref instanceof String) {
44548 com.google.protobuf.ByteString b =
44549 com.google.protobuf.ByteString.copyFromUtf8(
44550 (java.lang.String) ref);
44551 name_ = b;
44552 return b;
44553 } else {
44554 return (com.google.protobuf.ByteString) ref;
44555 }
44556 }
44557 /**
44558 * <pre>
44559 * The name of the function, similar to op_type in NodeProto.
44560 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44561 * </pre>
44562 *
44563 * <code>optional string name = 1;</code>
44564 * @param value The name to set.
44565 * @return This builder for chaining.
44566 */
44567 public Builder setName(
44568 java.lang.String value) {
44569 if (value == null) { throw new NullPointerException(); }
44570 name_ = value;
44571 bitField0_ |= 0x00000001;
44572 onChanged();
44573 return this;
44574 }
44575 /**
44576 * <pre>
44577 * The name of the function, similar to op_type in NodeProto.
44578 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44579 * </pre>
44580 *
44581 * <code>optional string name = 1;</code>
44582 * @return This builder for chaining.
44583 */
44584 public Builder clearName() {
44585 name_ = getDefaultInstance().getName();
44586 bitField0_ = (bitField0_ & ~0x00000001);
44587 onChanged();
44588 return this;
44589 }
44590 /**
44591 * <pre>
44592 * The name of the function, similar to op_type in NodeProto.
44593 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
44594 * </pre>
44595 *
44596 * <code>optional string name = 1;</code>
44597 * @param value The bytes for name to set.
44598 * @return This builder for chaining.
44599 */
44600 public Builder setNameBytes(
44601 com.google.protobuf.ByteString value) {
44602 if (value == null) { throw new NullPointerException(); }
44603 name_ = value;
44604 bitField0_ |= 0x00000001;
44605 onChanged();
44606 return this;
44607 }
44608
44609 private com.google.protobuf.LazyStringArrayList input_ =
44610 com.google.protobuf.LazyStringArrayList.emptyList();
44611 private void ensureInputIsMutable() {
44612 if (!input_.isModifiable()) {
44613 input_ = new com.google.protobuf.LazyStringArrayList(input_);
44614 }
44615 bitField0_ |= 0x00000002;
44616 }
44617 /**
44618 * <pre>
44619 * The inputs and outputs of the function.
44620 * </pre>
44621 *
44622 * <code>repeated string input = 4;</code>
44623 * @return A list containing the input.
44624 */
44625 public com.google.protobuf.ProtocolStringList
44626 getInputList() {
44627 input_.makeImmutable();
44628 return input_;
44629 }
44630 /**
44631 * <pre>
44632 * The inputs and outputs of the function.
44633 * </pre>
44634 *
44635 * <code>repeated string input = 4;</code>
44636 * @return The count of input.
44637 */
44638 public int getInputCount() {
44639 return input_.size();
44640 }
44641 /**
44642 * <pre>
44643 * The inputs and outputs of the function.
44644 * </pre>
44645 *
44646 * <code>repeated string input = 4;</code>
44647 * @param index The index of the element to return.
44648 * @return The input at the given index.
44649 */
44650 public java.lang.String getInput(int index) {
44651 return input_.get(index);
44652 }
44653 /**
44654 * <pre>
44655 * The inputs and outputs of the function.
44656 * </pre>
44657 *
44658 * <code>repeated string input = 4;</code>
44659 * @param index The index of the value to return.
44660 * @return The bytes of the input at the given index.
44661 */
44662 public com.google.protobuf.ByteString
44663 getInputBytes(int index) {
44664 return input_.getByteString(index);
44665 }
44666 /**
44667 * <pre>
44668 * The inputs and outputs of the function.
44669 * </pre>
44670 *
44671 * <code>repeated string input = 4;</code>
44672 * @param index The index to set the value at.
44673 * @param value The input to set.
44674 * @return This builder for chaining.
44675 */
44676 public Builder setInput(
44677 int index, java.lang.String value) {
44678 if (value == null) { throw new NullPointerException(); }
44679 ensureInputIsMutable();
44680 input_.set(index, value);
44681 bitField0_ |= 0x00000002;
44682 onChanged();
44683 return this;
44684 }
44685 /**
44686 * <pre>
44687 * The inputs and outputs of the function.
44688 * </pre>
44689 *
44690 * <code>repeated string input = 4;</code>
44691 * @param value The input to add.
44692 * @return This builder for chaining.
44693 */
44694 public Builder addInput(
44695 java.lang.String value) {
44696 if (value == null) { throw new NullPointerException(); }
44697 ensureInputIsMutable();
44698 input_.add(value);
44699 bitField0_ |= 0x00000002;
44700 onChanged();
44701 return this;
44702 }
44703 /**
44704 * <pre>
44705 * The inputs and outputs of the function.
44706 * </pre>
44707 *
44708 * <code>repeated string input = 4;</code>
44709 * @param values The input to add.
44710 * @return This builder for chaining.
44711 */
44712 public Builder addAllInput(
44713 java.lang.Iterable<java.lang.String> values) {
44714 ensureInputIsMutable();
44715 com.google.protobuf.AbstractMessageLite.Builder.addAll(
44716 values, input_);
44717 bitField0_ |= 0x00000002;
44718 onChanged();
44719 return this;
44720 }
44721 /**
44722 * <pre>
44723 * The inputs and outputs of the function.
44724 * </pre>
44725 *
44726 * <code>repeated string input = 4;</code>
44727 * @return This builder for chaining.
44728 */
44729 public Builder clearInput() {
44730 input_ =
44731 com.google.protobuf.LazyStringArrayList.emptyList();
44732 bitField0_ = (bitField0_ & ~0x00000002);;
44733 onChanged();
44734 return this;
44735 }
44736 /**
44737 * <pre>
44738 * The inputs and outputs of the function.
44739 * </pre>
44740 *
44741 * <code>repeated string input = 4;</code>
44742 * @param value The bytes of the input to add.
44743 * @return This builder for chaining.
44744 */
44745 public Builder addInputBytes(
44746 com.google.protobuf.ByteString value) {
44747 if (value == null) { throw new NullPointerException(); }
44748 ensureInputIsMutable();
44749 input_.add(value);
44750 bitField0_ |= 0x00000002;
44751 onChanged();
44752 return this;
44753 }
44754
44755 private com.google.protobuf.LazyStringArrayList output_ =
44756 com.google.protobuf.LazyStringArrayList.emptyList();
44757 private void ensureOutputIsMutable() {
44758 if (!output_.isModifiable()) {
44759 output_ = new com.google.protobuf.LazyStringArrayList(output_);
44760 }
44761 bitField0_ |= 0x00000004;
44762 }
44763 /**
44764 * <code>repeated string output = 5;</code>
44765 * @return A list containing the output.
44766 */
44767 public com.google.protobuf.ProtocolStringList
44768 getOutputList() {
44769 output_.makeImmutable();
44770 return output_;
44771 }
44772 /**
44773 * <code>repeated string output = 5;</code>
44774 * @return The count of output.
44775 */
44776 public int getOutputCount() {
44777 return output_.size();
44778 }
44779 /**
44780 * <code>repeated string output = 5;</code>
44781 * @param index The index of the element to return.
44782 * @return The output at the given index.
44783 */
44784 public java.lang.String getOutput(int index) {
44785 return output_.get(index);
44786 }
44787 /**
44788 * <code>repeated string output = 5;</code>
44789 * @param index The index of the value to return.
44790 * @return The bytes of the output at the given index.
44791 */
44792 public com.google.protobuf.ByteString
44793 getOutputBytes(int index) {
44794 return output_.getByteString(index);
44795 }
44796 /**
44797 * <code>repeated string output = 5;</code>
44798 * @param index The index to set the value at.
44799 * @param value The output to set.
44800 * @return This builder for chaining.
44801 */
44802 public Builder setOutput(
44803 int index, java.lang.String value) {
44804 if (value == null) { throw new NullPointerException(); }
44805 ensureOutputIsMutable();
44806 output_.set(index, value);
44807 bitField0_ |= 0x00000004;
44808 onChanged();
44809 return this;
44810 }
44811 /**
44812 * <code>repeated string output = 5;</code>
44813 * @param value The output to add.
44814 * @return This builder for chaining.
44815 */
44816 public Builder addOutput(
44817 java.lang.String value) {
44818 if (value == null) { throw new NullPointerException(); }
44819 ensureOutputIsMutable();
44820 output_.add(value);
44821 bitField0_ |= 0x00000004;
44822 onChanged();
44823 return this;
44824 }
44825 /**
44826 * <code>repeated string output = 5;</code>
44827 * @param values The output to add.
44828 * @return This builder for chaining.
44829 */
44830 public Builder addAllOutput(
44831 java.lang.Iterable<java.lang.String> values) {
44832 ensureOutputIsMutable();
44833 com.google.protobuf.AbstractMessageLite.Builder.addAll(
44834 values, output_);
44835 bitField0_ |= 0x00000004;
44836 onChanged();
44837 return this;
44838 }
44839 /**
44840 * <code>repeated string output = 5;</code>
44841 * @return This builder for chaining.
44842 */
44843 public Builder clearOutput() {
44844 output_ =
44845 com.google.protobuf.LazyStringArrayList.emptyList();
44846 bitField0_ = (bitField0_ & ~0x00000004);;
44847 onChanged();
44848 return this;
44849 }
44850 /**
44851 * <code>repeated string output = 5;</code>
44852 * @param value The bytes of the output to add.
44853 * @return This builder for chaining.
44854 */
44855 public Builder addOutputBytes(
44856 com.google.protobuf.ByteString value) {
44857 if (value == null) { throw new NullPointerException(); }
44858 ensureOutputIsMutable();
44859 output_.add(value);
44860 bitField0_ |= 0x00000004;
44861 onChanged();
44862 return this;
44863 }
44864
44865 private com.google.protobuf.LazyStringArrayList attribute_ =
44866 com.google.protobuf.LazyStringArrayList.emptyList();
44867 private void ensureAttributeIsMutable() {
44868 if (!attribute_.isModifiable()) {
44869 attribute_ = new com.google.protobuf.LazyStringArrayList(attribute_);
44870 }
44871 bitField0_ |= 0x00000008;
44872 }
44873 /**
44874 * <pre>
44875 * The attribute parameters of the function.
44876 * It is for function parameters without default values.
44877 * </pre>
44878 *
44879 * <code>repeated string attribute = 6;</code>
44880 * @return A list containing the attribute.
44881 */
44882 public com.google.protobuf.ProtocolStringList
44883 getAttributeList() {
44884 attribute_.makeImmutable();
44885 return attribute_;
44886 }
44887 /**
44888 * <pre>
44889 * The attribute parameters of the function.
44890 * It is for function parameters without default values.
44891 * </pre>
44892 *
44893 * <code>repeated string attribute = 6;</code>
44894 * @return The count of attribute.
44895 */
44896 public int getAttributeCount() {
44897 return attribute_.size();
44898 }
44899 /**
44900 * <pre>
44901 * The attribute parameters of the function.
44902 * It is for function parameters without default values.
44903 * </pre>
44904 *
44905 * <code>repeated string attribute = 6;</code>
44906 * @param index The index of the element to return.
44907 * @return The attribute at the given index.
44908 */
44909 public java.lang.String getAttribute(int index) {
44910 return attribute_.get(index);
44911 }
44912 /**
44913 * <pre>
44914 * The attribute parameters of the function.
44915 * It is for function parameters without default values.
44916 * </pre>
44917 *
44918 * <code>repeated string attribute = 6;</code>
44919 * @param index The index of the value to return.
44920 * @return The bytes of the attribute at the given index.
44921 */
44922 public com.google.protobuf.ByteString
44923 getAttributeBytes(int index) {
44924 return attribute_.getByteString(index);
44925 }
44926 /**
44927 * <pre>
44928 * The attribute parameters of the function.
44929 * It is for function parameters without default values.
44930 * </pre>
44931 *
44932 * <code>repeated string attribute = 6;</code>
44933 * @param index The index to set the value at.
44934 * @param value The attribute to set.
44935 * @return This builder for chaining.
44936 */
44937 public Builder setAttribute(
44938 int index, java.lang.String value) {
44939 if (value == null) { throw new NullPointerException(); }
44940 ensureAttributeIsMutable();
44941 attribute_.set(index, value);
44942 bitField0_ |= 0x00000008;
44943 onChanged();
44944 return this;
44945 }
44946 /**
44947 * <pre>
44948 * The attribute parameters of the function.
44949 * It is for function parameters without default values.
44950 * </pre>
44951 *
44952 * <code>repeated string attribute = 6;</code>
44953 * @param value The attribute to add.
44954 * @return This builder for chaining.
44955 */
44956 public Builder addAttribute(
44957 java.lang.String value) {
44958 if (value == null) { throw new NullPointerException(); }
44959 ensureAttributeIsMutable();
44960 attribute_.add(value);
44961 bitField0_ |= 0x00000008;
44962 onChanged();
44963 return this;
44964 }
44965 /**
44966 * <pre>
44967 * The attribute parameters of the function.
44968 * It is for function parameters without default values.
44969 * </pre>
44970 *
44971 * <code>repeated string attribute = 6;</code>
44972 * @param values The attribute to add.
44973 * @return This builder for chaining.
44974 */
44975 public Builder addAllAttribute(
44976 java.lang.Iterable<java.lang.String> values) {
44977 ensureAttributeIsMutable();
44978 com.google.protobuf.AbstractMessageLite.Builder.addAll(
44979 values, attribute_);
44980 bitField0_ |= 0x00000008;
44981 onChanged();
44982 return this;
44983 }
44984 /**
44985 * <pre>
44986 * The attribute parameters of the function.
44987 * It is for function parameters without default values.
44988 * </pre>
44989 *
44990 * <code>repeated string attribute = 6;</code>
44991 * @return This builder for chaining.
44992 */
44993 public Builder clearAttribute() {
44994 attribute_ =
44995 com.google.protobuf.LazyStringArrayList.emptyList();
44996 bitField0_ = (bitField0_ & ~0x00000008);;
44997 onChanged();
44998 return this;
44999 }
45000 /**
45001 * <pre>
45002 * The attribute parameters of the function.
45003 * It is for function parameters without default values.
45004 * </pre>
45005 *
45006 * <code>repeated string attribute = 6;</code>
45007 * @param value The bytes of the attribute to add.
45008 * @return This builder for chaining.
45009 */
45010 public Builder addAttributeBytes(
45011 com.google.protobuf.ByteString value) {
45012 if (value == null) { throw new NullPointerException(); }
45013 ensureAttributeIsMutable();
45014 attribute_.add(value);
45015 bitField0_ |= 0x00000008;
45016 onChanged();
45017 return this;
45018 }
45019
45020 private java.util.List<onnx.OnnxMl.AttributeProto> attributeProto_ =
45021 java.util.Collections.emptyList();
45022 private void ensureAttributeProtoIsMutable() {
45023 if (!((bitField0_ & 0x00000010) != 0)) {
45024 attributeProto_ = new java.util.ArrayList<onnx.OnnxMl.AttributeProto>(attributeProto_);
45025 bitField0_ |= 0x00000010;
45026 }
45027 }
45028
45029 private com.google.protobuf.RepeatedFieldBuilder<
45030 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder> attributeProtoBuilder_;
45031
45032 /**
45033 * <pre>
45034 * The attribute protos of the function.
45035 * It is for function attributes with default values.
45036 * A function attribute shall be represented either as
45037 * a string attribute or an AttributeProto, not both.
45038 * </pre>
45039 *
45040 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45041 */
45042 public java.util.List<onnx.OnnxMl.AttributeProto> getAttributeProtoList() {
45043 if (attributeProtoBuilder_ == null) {
45044 return java.util.Collections.unmodifiableList(attributeProto_);
45045 } else {
45046 return attributeProtoBuilder_.getMessageList();
45047 }
45048 }
45049 /**
45050 * <pre>
45051 * The attribute protos of the function.
45052 * It is for function attributes with default values.
45053 * A function attribute shall be represented either as
45054 * a string attribute or an AttributeProto, not both.
45055 * </pre>
45056 *
45057 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45058 */
45059 public int getAttributeProtoCount() {
45060 if (attributeProtoBuilder_ == null) {
45061 return attributeProto_.size();
45062 } else {
45063 return attributeProtoBuilder_.getCount();
45064 }
45065 }
45066 /**
45067 * <pre>
45068 * The attribute protos of the function.
45069 * It is for function attributes with default values.
45070 * A function attribute shall be represented either as
45071 * a string attribute or an AttributeProto, not both.
45072 * </pre>
45073 *
45074 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45075 */
45076 public onnx.OnnxMl.AttributeProto getAttributeProto(int index) {
45077 if (attributeProtoBuilder_ == null) {
45078 return attributeProto_.get(index);
45079 } else {
45080 return attributeProtoBuilder_.getMessage(index);
45081 }
45082 }
45083 /**
45084 * <pre>
45085 * The attribute protos of the function.
45086 * It is for function attributes with default values.
45087 * A function attribute shall be represented either as
45088 * a string attribute or an AttributeProto, not both.
45089 * </pre>
45090 *
45091 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45092 */
45093 public Builder setAttributeProto(
45094 int index, onnx.OnnxMl.AttributeProto value) {
45095 if (attributeProtoBuilder_ == null) {
45096 if (value == null) {
45097 throw new NullPointerException();
45098 }
45099 ensureAttributeProtoIsMutable();
45100 attributeProto_.set(index, value);
45101 onChanged();
45102 } else {
45103 attributeProtoBuilder_.setMessage(index, value);
45104 }
45105 return this;
45106 }
45107 /**
45108 * <pre>
45109 * The attribute protos of the function.
45110 * It is for function attributes with default values.
45111 * A function attribute shall be represented either as
45112 * a string attribute or an AttributeProto, not both.
45113 * </pre>
45114 *
45115 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45116 */
45117 public Builder setAttributeProto(
45118 int index, onnx.OnnxMl.AttributeProto.Builder builderForValue) {
45119 if (attributeProtoBuilder_ == null) {
45120 ensureAttributeProtoIsMutable();
45121 attributeProto_.set(index, builderForValue.build());
45122 onChanged();
45123 } else {
45124 attributeProtoBuilder_.setMessage(index, builderForValue.build());
45125 }
45126 return this;
45127 }
45128 /**
45129 * <pre>
45130 * The attribute protos of the function.
45131 * It is for function attributes with default values.
45132 * A function attribute shall be represented either as
45133 * a string attribute or an AttributeProto, not both.
45134 * </pre>
45135 *
45136 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45137 */
45138 public Builder addAttributeProto(onnx.OnnxMl.AttributeProto value) {
45139 if (attributeProtoBuilder_ == null) {
45140 if (value == null) {
45141 throw new NullPointerException();
45142 }
45143 ensureAttributeProtoIsMutable();
45144 attributeProto_.add(value);
45145 onChanged();
45146 } else {
45147 attributeProtoBuilder_.addMessage(value);
45148 }
45149 return this;
45150 }
45151 /**
45152 * <pre>
45153 * The attribute protos of the function.
45154 * It is for function attributes with default values.
45155 * A function attribute shall be represented either as
45156 * a string attribute or an AttributeProto, not both.
45157 * </pre>
45158 *
45159 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45160 */
45161 public Builder addAttributeProto(
45162 int index, onnx.OnnxMl.AttributeProto value) {
45163 if (attributeProtoBuilder_ == null) {
45164 if (value == null) {
45165 throw new NullPointerException();
45166 }
45167 ensureAttributeProtoIsMutable();
45168 attributeProto_.add(index, value);
45169 onChanged();
45170 } else {
45171 attributeProtoBuilder_.addMessage(index, value);
45172 }
45173 return this;
45174 }
45175 /**
45176 * <pre>
45177 * The attribute protos of the function.
45178 * It is for function attributes with default values.
45179 * A function attribute shall be represented either as
45180 * a string attribute or an AttributeProto, not both.
45181 * </pre>
45182 *
45183 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45184 */
45185 public Builder addAttributeProto(
45186 onnx.OnnxMl.AttributeProto.Builder builderForValue) {
45187 if (attributeProtoBuilder_ == null) {
45188 ensureAttributeProtoIsMutable();
45189 attributeProto_.add(builderForValue.build());
45190 onChanged();
45191 } else {
45192 attributeProtoBuilder_.addMessage(builderForValue.build());
45193 }
45194 return this;
45195 }
45196 /**
45197 * <pre>
45198 * The attribute protos of the function.
45199 * It is for function attributes with default values.
45200 * A function attribute shall be represented either as
45201 * a string attribute or an AttributeProto, not both.
45202 * </pre>
45203 *
45204 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45205 */
45206 public Builder addAttributeProto(
45207 int index, onnx.OnnxMl.AttributeProto.Builder builderForValue) {
45208 if (attributeProtoBuilder_ == null) {
45209 ensureAttributeProtoIsMutable();
45210 attributeProto_.add(index, builderForValue.build());
45211 onChanged();
45212 } else {
45213 attributeProtoBuilder_.addMessage(index, builderForValue.build());
45214 }
45215 return this;
45216 }
45217 /**
45218 * <pre>
45219 * The attribute protos of the function.
45220 * It is for function attributes with default values.
45221 * A function attribute shall be represented either as
45222 * a string attribute or an AttributeProto, not both.
45223 * </pre>
45224 *
45225 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45226 */
45227 public Builder addAllAttributeProto(
45228 java.lang.Iterable<? extends onnx.OnnxMl.AttributeProto> values) {
45229 if (attributeProtoBuilder_ == null) {
45230 ensureAttributeProtoIsMutable();
45231 com.google.protobuf.AbstractMessageLite.Builder.addAll(
45232 values, attributeProto_);
45233 onChanged();
45234 } else {
45235 attributeProtoBuilder_.addAllMessages(values);
45236 }
45237 return this;
45238 }
45239 /**
45240 * <pre>
45241 * The attribute protos of the function.
45242 * It is for function attributes with default values.
45243 * A function attribute shall be represented either as
45244 * a string attribute or an AttributeProto, not both.
45245 * </pre>
45246 *
45247 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45248 */
45249 public Builder clearAttributeProto() {
45250 if (attributeProtoBuilder_ == null) {
45251 attributeProto_ = java.util.Collections.emptyList();
45252 bitField0_ = (bitField0_ & ~0x00000010);
45253 onChanged();
45254 } else {
45255 attributeProtoBuilder_.clear();
45256 }
45257 return this;
45258 }
45259 /**
45260 * <pre>
45261 * The attribute protos of the function.
45262 * It is for function attributes with default values.
45263 * A function attribute shall be represented either as
45264 * a string attribute or an AttributeProto, not both.
45265 * </pre>
45266 *
45267 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45268 */
45269 public Builder removeAttributeProto(int index) {
45270 if (attributeProtoBuilder_ == null) {
45271 ensureAttributeProtoIsMutable();
45272 attributeProto_.remove(index);
45273 onChanged();
45274 } else {
45275 attributeProtoBuilder_.remove(index);
45276 }
45277 return this;
45278 }
45279 /**
45280 * <pre>
45281 * The attribute protos of the function.
45282 * It is for function attributes with default values.
45283 * A function attribute shall be represented either as
45284 * a string attribute or an AttributeProto, not both.
45285 * </pre>
45286 *
45287 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45288 */
45289 public onnx.OnnxMl.AttributeProto.Builder getAttributeProtoBuilder(
45290 int index) {
45291 return getAttributeProtoFieldBuilder().getBuilder(index);
45292 }
45293 /**
45294 * <pre>
45295 * The attribute protos of the function.
45296 * It is for function attributes with default values.
45297 * A function attribute shall be represented either as
45298 * a string attribute or an AttributeProto, not both.
45299 * </pre>
45300 *
45301 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45302 */
45303 public onnx.OnnxMl.AttributeProtoOrBuilder getAttributeProtoOrBuilder(
45304 int index) {
45305 if (attributeProtoBuilder_ == null) {
45306 return attributeProto_.get(index); } else {
45307 return attributeProtoBuilder_.getMessageOrBuilder(index);
45308 }
45309 }
45310 /**
45311 * <pre>
45312 * The attribute protos of the function.
45313 * It is for function attributes with default values.
45314 * A function attribute shall be represented either as
45315 * a string attribute or an AttributeProto, not both.
45316 * </pre>
45317 *
45318 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45319 */
45320 public java.util.List<? extends onnx.OnnxMl.AttributeProtoOrBuilder>
45321 getAttributeProtoOrBuilderList() {
45322 if (attributeProtoBuilder_ != null) {
45323 return attributeProtoBuilder_.getMessageOrBuilderList();
45324 } else {
45325 return java.util.Collections.unmodifiableList(attributeProto_);
45326 }
45327 }
45328 /**
45329 * <pre>
45330 * The attribute protos of the function.
45331 * It is for function attributes with default values.
45332 * A function attribute shall be represented either as
45333 * a string attribute or an AttributeProto, not both.
45334 * </pre>
45335 *
45336 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45337 */
45338 public onnx.OnnxMl.AttributeProto.Builder addAttributeProtoBuilder() {
45339 return getAttributeProtoFieldBuilder().addBuilder(
45340 onnx.OnnxMl.AttributeProto.getDefaultInstance());
45341 }
45342 /**
45343 * <pre>
45344 * The attribute protos of the function.
45345 * It is for function attributes with default values.
45346 * A function attribute shall be represented either as
45347 * a string attribute or an AttributeProto, not both.
45348 * </pre>
45349 *
45350 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45351 */
45352 public onnx.OnnxMl.AttributeProto.Builder addAttributeProtoBuilder(
45353 int index) {
45354 return getAttributeProtoFieldBuilder().addBuilder(
45355 index, onnx.OnnxMl.AttributeProto.getDefaultInstance());
45356 }
45357 /**
45358 * <pre>
45359 * The attribute protos of the function.
45360 * It is for function attributes with default values.
45361 * A function attribute shall be represented either as
45362 * a string attribute or an AttributeProto, not both.
45363 * </pre>
45364 *
45365 * <code>repeated .onnx.AttributeProto attribute_proto = 11;</code>
45366 */
45367 public java.util.List<onnx.OnnxMl.AttributeProto.Builder>
45368 getAttributeProtoBuilderList() {
45369 return getAttributeProtoFieldBuilder().getBuilderList();
45370 }
45371 private com.google.protobuf.RepeatedFieldBuilder<
45372 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder>
45373 getAttributeProtoFieldBuilder() {
45374 if (attributeProtoBuilder_ == null) {
45375 attributeProtoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
45376 onnx.OnnxMl.AttributeProto, onnx.OnnxMl.AttributeProto.Builder, onnx.OnnxMl.AttributeProtoOrBuilder>(
45377 attributeProto_,
45378 ((bitField0_ & 0x00000010) != 0),
45379 getParentForChildren(),
45380 isClean());
45381 attributeProto_ = null;
45382 }
45383 return attributeProtoBuilder_;
45384 }
45385
45386 private java.util.List<onnx.OnnxMl.NodeProto> node_ =
45387 java.util.Collections.emptyList();
45388 private void ensureNodeIsMutable() {
45389 if (!((bitField0_ & 0x00000020) != 0)) {
45390 node_ = new java.util.ArrayList<onnx.OnnxMl.NodeProto>(node_);
45391 bitField0_ |= 0x00000020;
45392 }
45393 }
45394
45395 private com.google.protobuf.RepeatedFieldBuilder<
45396 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder> nodeBuilder_;
45397
45398 /**
45399 * <pre>
45400 * The nodes in the function.
45401 * </pre>
45402 *
45403 * <code>repeated .onnx.NodeProto node = 7;</code>
45404 */
45405 public java.util.List<onnx.OnnxMl.NodeProto> getNodeList() {
45406 if (nodeBuilder_ == null) {
45407 return java.util.Collections.unmodifiableList(node_);
45408 } else {
45409 return nodeBuilder_.getMessageList();
45410 }
45411 }
45412 /**
45413 * <pre>
45414 * The nodes in the function.
45415 * </pre>
45416 *
45417 * <code>repeated .onnx.NodeProto node = 7;</code>
45418 */
45419 public int getNodeCount() {
45420 if (nodeBuilder_ == null) {
45421 return node_.size();
45422 } else {
45423 return nodeBuilder_.getCount();
45424 }
45425 }
45426 /**
45427 * <pre>
45428 * The nodes in the function.
45429 * </pre>
45430 *
45431 * <code>repeated .onnx.NodeProto node = 7;</code>
45432 */
45433 public onnx.OnnxMl.NodeProto getNode(int index) {
45434 if (nodeBuilder_ == null) {
45435 return node_.get(index);
45436 } else {
45437 return nodeBuilder_.getMessage(index);
45438 }
45439 }
45440 /**
45441 * <pre>
45442 * The nodes in the function.
45443 * </pre>
45444 *
45445 * <code>repeated .onnx.NodeProto node = 7;</code>
45446 */
45447 public Builder setNode(
45448 int index, onnx.OnnxMl.NodeProto value) {
45449 if (nodeBuilder_ == null) {
45450 if (value == null) {
45451 throw new NullPointerException();
45452 }
45453 ensureNodeIsMutable();
45454 node_.set(index, value);
45455 onChanged();
45456 } else {
45457 nodeBuilder_.setMessage(index, value);
45458 }
45459 return this;
45460 }
45461 /**
45462 * <pre>
45463 * The nodes in the function.
45464 * </pre>
45465 *
45466 * <code>repeated .onnx.NodeProto node = 7;</code>
45467 */
45468 public Builder setNode(
45469 int index, onnx.OnnxMl.NodeProto.Builder builderForValue) {
45470 if (nodeBuilder_ == null) {
45471 ensureNodeIsMutable();
45472 node_.set(index, builderForValue.build());
45473 onChanged();
45474 } else {
45475 nodeBuilder_.setMessage(index, builderForValue.build());
45476 }
45477 return this;
45478 }
45479 /**
45480 * <pre>
45481 * The nodes in the function.
45482 * </pre>
45483 *
45484 * <code>repeated .onnx.NodeProto node = 7;</code>
45485 */
45486 public Builder addNode(onnx.OnnxMl.NodeProto value) {
45487 if (nodeBuilder_ == null) {
45488 if (value == null) {
45489 throw new NullPointerException();
45490 }
45491 ensureNodeIsMutable();
45492 node_.add(value);
45493 onChanged();
45494 } else {
45495 nodeBuilder_.addMessage(value);
45496 }
45497 return this;
45498 }
45499 /**
45500 * <pre>
45501 * The nodes in the function.
45502 * </pre>
45503 *
45504 * <code>repeated .onnx.NodeProto node = 7;</code>
45505 */
45506 public Builder addNode(
45507 int index, onnx.OnnxMl.NodeProto value) {
45508 if (nodeBuilder_ == null) {
45509 if (value == null) {
45510 throw new NullPointerException();
45511 }
45512 ensureNodeIsMutable();
45513 node_.add(index, value);
45514 onChanged();
45515 } else {
45516 nodeBuilder_.addMessage(index, value);
45517 }
45518 return this;
45519 }
45520 /**
45521 * <pre>
45522 * The nodes in the function.
45523 * </pre>
45524 *
45525 * <code>repeated .onnx.NodeProto node = 7;</code>
45526 */
45527 public Builder addNode(
45528 onnx.OnnxMl.NodeProto.Builder builderForValue) {
45529 if (nodeBuilder_ == null) {
45530 ensureNodeIsMutable();
45531 node_.add(builderForValue.build());
45532 onChanged();
45533 } else {
45534 nodeBuilder_.addMessage(builderForValue.build());
45535 }
45536 return this;
45537 }
45538 /**
45539 * <pre>
45540 * The nodes in the function.
45541 * </pre>
45542 *
45543 * <code>repeated .onnx.NodeProto node = 7;</code>
45544 */
45545 public Builder addNode(
45546 int index, onnx.OnnxMl.NodeProto.Builder builderForValue) {
45547 if (nodeBuilder_ == null) {
45548 ensureNodeIsMutable();
45549 node_.add(index, builderForValue.build());
45550 onChanged();
45551 } else {
45552 nodeBuilder_.addMessage(index, builderForValue.build());
45553 }
45554 return this;
45555 }
45556 /**
45557 * <pre>
45558 * The nodes in the function.
45559 * </pre>
45560 *
45561 * <code>repeated .onnx.NodeProto node = 7;</code>
45562 */
45563 public Builder addAllNode(
45564 java.lang.Iterable<? extends onnx.OnnxMl.NodeProto> values) {
45565 if (nodeBuilder_ == null) {
45566 ensureNodeIsMutable();
45567 com.google.protobuf.AbstractMessageLite.Builder.addAll(
45568 values, node_);
45569 onChanged();
45570 } else {
45571 nodeBuilder_.addAllMessages(values);
45572 }
45573 return this;
45574 }
45575 /**
45576 * <pre>
45577 * The nodes in the function.
45578 * </pre>
45579 *
45580 * <code>repeated .onnx.NodeProto node = 7;</code>
45581 */
45582 public Builder clearNode() {
45583 if (nodeBuilder_ == null) {
45584 node_ = java.util.Collections.emptyList();
45585 bitField0_ = (bitField0_ & ~0x00000020);
45586 onChanged();
45587 } else {
45588 nodeBuilder_.clear();
45589 }
45590 return this;
45591 }
45592 /**
45593 * <pre>
45594 * The nodes in the function.
45595 * </pre>
45596 *
45597 * <code>repeated .onnx.NodeProto node = 7;</code>
45598 */
45599 public Builder removeNode(int index) {
45600 if (nodeBuilder_ == null) {
45601 ensureNodeIsMutable();
45602 node_.remove(index);
45603 onChanged();
45604 } else {
45605 nodeBuilder_.remove(index);
45606 }
45607 return this;
45608 }
45609 /**
45610 * <pre>
45611 * The nodes in the function.
45612 * </pre>
45613 *
45614 * <code>repeated .onnx.NodeProto node = 7;</code>
45615 */
45616 public onnx.OnnxMl.NodeProto.Builder getNodeBuilder(
45617 int index) {
45618 return getNodeFieldBuilder().getBuilder(index);
45619 }
45620 /**
45621 * <pre>
45622 * The nodes in the function.
45623 * </pre>
45624 *
45625 * <code>repeated .onnx.NodeProto node = 7;</code>
45626 */
45627 public onnx.OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(
45628 int index) {
45629 if (nodeBuilder_ == null) {
45630 return node_.get(index); } else {
45631 return nodeBuilder_.getMessageOrBuilder(index);
45632 }
45633 }
45634 /**
45635 * <pre>
45636 * The nodes in the function.
45637 * </pre>
45638 *
45639 * <code>repeated .onnx.NodeProto node = 7;</code>
45640 */
45641 public java.util.List<? extends onnx.OnnxMl.NodeProtoOrBuilder>
45642 getNodeOrBuilderList() {
45643 if (nodeBuilder_ != null) {
45644 return nodeBuilder_.getMessageOrBuilderList();
45645 } else {
45646 return java.util.Collections.unmodifiableList(node_);
45647 }
45648 }
45649 /**
45650 * <pre>
45651 * The nodes in the function.
45652 * </pre>
45653 *
45654 * <code>repeated .onnx.NodeProto node = 7;</code>
45655 */
45656 public onnx.OnnxMl.NodeProto.Builder addNodeBuilder() {
45657 return getNodeFieldBuilder().addBuilder(
45658 onnx.OnnxMl.NodeProto.getDefaultInstance());
45659 }
45660 /**
45661 * <pre>
45662 * The nodes in the function.
45663 * </pre>
45664 *
45665 * <code>repeated .onnx.NodeProto node = 7;</code>
45666 */
45667 public onnx.OnnxMl.NodeProto.Builder addNodeBuilder(
45668 int index) {
45669 return getNodeFieldBuilder().addBuilder(
45670 index, onnx.OnnxMl.NodeProto.getDefaultInstance());
45671 }
45672 /**
45673 * <pre>
45674 * The nodes in the function.
45675 * </pre>
45676 *
45677 * <code>repeated .onnx.NodeProto node = 7;</code>
45678 */
45679 public java.util.List<onnx.OnnxMl.NodeProto.Builder>
45680 getNodeBuilderList() {
45681 return getNodeFieldBuilder().getBuilderList();
45682 }
45683 private com.google.protobuf.RepeatedFieldBuilder<
45684 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder>
45685 getNodeFieldBuilder() {
45686 if (nodeBuilder_ == null) {
45687 nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
45688 onnx.OnnxMl.NodeProto, onnx.OnnxMl.NodeProto.Builder, onnx.OnnxMl.NodeProtoOrBuilder>(
45689 node_,
45690 ((bitField0_ & 0x00000020) != 0),
45691 getParentForChildren(),
45692 isClean());
45693 node_ = null;
45694 }
45695 return nodeBuilder_;
45696 }
45697
45698 private java.lang.Object docString_ = "";
45699 /**
45700 * <pre>
45701 * A human-readable documentation for this function. Markdown is allowed.
45702 * </pre>
45703 *
45704 * <code>optional string doc_string = 8;</code>
45705 * @return Whether the docString field is set.
45706 */
45707 public boolean hasDocString() {
45708 return ((bitField0_ & 0x00000040) != 0);
45709 }
45710 /**
45711 * <pre>
45712 * A human-readable documentation for this function. Markdown is allowed.
45713 * </pre>
45714 *
45715 * <code>optional string doc_string = 8;</code>
45716 * @return The docString.
45717 */
45718 public java.lang.String getDocString() {
45719 java.lang.Object ref = docString_;
45720 if (!(ref instanceof java.lang.String)) {
45721 com.google.protobuf.ByteString bs =
45722 (com.google.protobuf.ByteString) ref;
45723 java.lang.String s = bs.toStringUtf8();
45724 if (bs.isValidUtf8()) {
45725 docString_ = s;
45726 }
45727 return s;
45728 } else {
45729 return (java.lang.String) ref;
45730 }
45731 }
45732 /**
45733 * <pre>
45734 * A human-readable documentation for this function. Markdown is allowed.
45735 * </pre>
45736 *
45737 * <code>optional string doc_string = 8;</code>
45738 * @return The bytes for docString.
45739 */
45740 public com.google.protobuf.ByteString
45741 getDocStringBytes() {
45742 java.lang.Object ref = docString_;
45743 if (ref instanceof String) {
45744 com.google.protobuf.ByteString b =
45745 com.google.protobuf.ByteString.copyFromUtf8(
45746 (java.lang.String) ref);
45747 docString_ = b;
45748 return b;
45749 } else {
45750 return (com.google.protobuf.ByteString) ref;
45751 }
45752 }
45753 /**
45754 * <pre>
45755 * A human-readable documentation for this function. Markdown is allowed.
45756 * </pre>
45757 *
45758 * <code>optional string doc_string = 8;</code>
45759 * @param value The docString to set.
45760 * @return This builder for chaining.
45761 */
45762 public Builder setDocString(
45763 java.lang.String value) {
45764 if (value == null) { throw new NullPointerException(); }
45765 docString_ = value;
45766 bitField0_ |= 0x00000040;
45767 onChanged();
45768 return this;
45769 }
45770 /**
45771 * <pre>
45772 * A human-readable documentation for this function. Markdown is allowed.
45773 * </pre>
45774 *
45775 * <code>optional string doc_string = 8;</code>
45776 * @return This builder for chaining.
45777 */
45778 public Builder clearDocString() {
45779 docString_ = getDefaultInstance().getDocString();
45780 bitField0_ = (bitField0_ & ~0x00000040);
45781 onChanged();
45782 return this;
45783 }
45784 /**
45785 * <pre>
45786 * A human-readable documentation for this function. Markdown is allowed.
45787 * </pre>
45788 *
45789 * <code>optional string doc_string = 8;</code>
45790 * @param value The bytes for docString to set.
45791 * @return This builder for chaining.
45792 */
45793 public Builder setDocStringBytes(
45794 com.google.protobuf.ByteString value) {
45795 if (value == null) { throw new NullPointerException(); }
45796 docString_ = value;
45797 bitField0_ |= 0x00000040;
45798 onChanged();
45799 return this;
45800 }
45801
45802 private java.util.List<onnx.OnnxMl.OperatorSetIdProto> opsetImport_ =
45803 java.util.Collections.emptyList();
45804 private void ensureOpsetImportIsMutable() {
45805 if (!((bitField0_ & 0x00000080) != 0)) {
45806 opsetImport_ = new java.util.ArrayList<onnx.OnnxMl.OperatorSetIdProto>(opsetImport_);
45807 bitField0_ |= 0x00000080;
45808 }
45809 }
45810
45811 private com.google.protobuf.RepeatedFieldBuilder<
45812 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder> opsetImportBuilder_;
45813
45814 /**
45815 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45816 */
45817 public java.util.List<onnx.OnnxMl.OperatorSetIdProto> getOpsetImportList() {
45818 if (opsetImportBuilder_ == null) {
45819 return java.util.Collections.unmodifiableList(opsetImport_);
45820 } else {
45821 return opsetImportBuilder_.getMessageList();
45822 }
45823 }
45824 /**
45825 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45826 */
45827 public int getOpsetImportCount() {
45828 if (opsetImportBuilder_ == null) {
45829 return opsetImport_.size();
45830 } else {
45831 return opsetImportBuilder_.getCount();
45832 }
45833 }
45834 /**
45835 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45836 */
45837 public onnx.OnnxMl.OperatorSetIdProto getOpsetImport(int index) {
45838 if (opsetImportBuilder_ == null) {
45839 return opsetImport_.get(index);
45840 } else {
45841 return opsetImportBuilder_.getMessage(index);
45842 }
45843 }
45844 /**
45845 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45846 */
45847 public Builder setOpsetImport(
45848 int index, onnx.OnnxMl.OperatorSetIdProto value) {
45849 if (opsetImportBuilder_ == null) {
45850 if (value == null) {
45851 throw new NullPointerException();
45852 }
45853 ensureOpsetImportIsMutable();
45854 opsetImport_.set(index, value);
45855 onChanged();
45856 } else {
45857 opsetImportBuilder_.setMessage(index, value);
45858 }
45859 return this;
45860 }
45861 /**
45862 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45863 */
45864 public Builder setOpsetImport(
45865 int index, onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
45866 if (opsetImportBuilder_ == null) {
45867 ensureOpsetImportIsMutable();
45868 opsetImport_.set(index, builderForValue.build());
45869 onChanged();
45870 } else {
45871 opsetImportBuilder_.setMessage(index, builderForValue.build());
45872 }
45873 return this;
45874 }
45875 /**
45876 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45877 */
45878 public Builder addOpsetImport(onnx.OnnxMl.OperatorSetIdProto value) {
45879 if (opsetImportBuilder_ == null) {
45880 if (value == null) {
45881 throw new NullPointerException();
45882 }
45883 ensureOpsetImportIsMutable();
45884 opsetImport_.add(value);
45885 onChanged();
45886 } else {
45887 opsetImportBuilder_.addMessage(value);
45888 }
45889 return this;
45890 }
45891 /**
45892 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45893 */
45894 public Builder addOpsetImport(
45895 int index, onnx.OnnxMl.OperatorSetIdProto value) {
45896 if (opsetImportBuilder_ == null) {
45897 if (value == null) {
45898 throw new NullPointerException();
45899 }
45900 ensureOpsetImportIsMutable();
45901 opsetImport_.add(index, value);
45902 onChanged();
45903 } else {
45904 opsetImportBuilder_.addMessage(index, value);
45905 }
45906 return this;
45907 }
45908 /**
45909 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45910 */
45911 public Builder addOpsetImport(
45912 onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
45913 if (opsetImportBuilder_ == null) {
45914 ensureOpsetImportIsMutable();
45915 opsetImport_.add(builderForValue.build());
45916 onChanged();
45917 } else {
45918 opsetImportBuilder_.addMessage(builderForValue.build());
45919 }
45920 return this;
45921 }
45922 /**
45923 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45924 */
45925 public Builder addOpsetImport(
45926 int index, onnx.OnnxMl.OperatorSetIdProto.Builder builderForValue) {
45927 if (opsetImportBuilder_ == null) {
45928 ensureOpsetImportIsMutable();
45929 opsetImport_.add(index, builderForValue.build());
45930 onChanged();
45931 } else {
45932 opsetImportBuilder_.addMessage(index, builderForValue.build());
45933 }
45934 return this;
45935 }
45936 /**
45937 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45938 */
45939 public Builder addAllOpsetImport(
45940 java.lang.Iterable<? extends onnx.OnnxMl.OperatorSetIdProto> values) {
45941 if (opsetImportBuilder_ == null) {
45942 ensureOpsetImportIsMutable();
45943 com.google.protobuf.AbstractMessageLite.Builder.addAll(
45944 values, opsetImport_);
45945 onChanged();
45946 } else {
45947 opsetImportBuilder_.addAllMessages(values);
45948 }
45949 return this;
45950 }
45951 /**
45952 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45953 */
45954 public Builder clearOpsetImport() {
45955 if (opsetImportBuilder_ == null) {
45956 opsetImport_ = java.util.Collections.emptyList();
45957 bitField0_ = (bitField0_ & ~0x00000080);
45958 onChanged();
45959 } else {
45960 opsetImportBuilder_.clear();
45961 }
45962 return this;
45963 }
45964 /**
45965 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45966 */
45967 public Builder removeOpsetImport(int index) {
45968 if (opsetImportBuilder_ == null) {
45969 ensureOpsetImportIsMutable();
45970 opsetImport_.remove(index);
45971 onChanged();
45972 } else {
45973 opsetImportBuilder_.remove(index);
45974 }
45975 return this;
45976 }
45977 /**
45978 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45979 */
45980 public onnx.OnnxMl.OperatorSetIdProto.Builder getOpsetImportBuilder(
45981 int index) {
45982 return getOpsetImportFieldBuilder().getBuilder(index);
45983 }
45984 /**
45985 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45986 */
45987 public onnx.OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
45988 int index) {
45989 if (opsetImportBuilder_ == null) {
45990 return opsetImport_.get(index); } else {
45991 return opsetImportBuilder_.getMessageOrBuilder(index);
45992 }
45993 }
45994 /**
45995 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
45996 */
45997 public java.util.List<? extends onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
45998 getOpsetImportOrBuilderList() {
45999 if (opsetImportBuilder_ != null) {
46000 return opsetImportBuilder_.getMessageOrBuilderList();
46001 } else {
46002 return java.util.Collections.unmodifiableList(opsetImport_);
46003 }
46004 }
46005 /**
46006 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
46007 */
46008 public onnx.OnnxMl.OperatorSetIdProto.Builder addOpsetImportBuilder() {
46009 return getOpsetImportFieldBuilder().addBuilder(
46010 onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance());
46011 }
46012 /**
46013 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
46014 */
46015 public onnx.OnnxMl.OperatorSetIdProto.Builder addOpsetImportBuilder(
46016 int index) {
46017 return getOpsetImportFieldBuilder().addBuilder(
46018 index, onnx.OnnxMl.OperatorSetIdProto.getDefaultInstance());
46019 }
46020 /**
46021 * <code>repeated .onnx.OperatorSetIdProto opset_import = 9;</code>
46022 */
46023 public java.util.List<onnx.OnnxMl.OperatorSetIdProto.Builder>
46024 getOpsetImportBuilderList() {
46025 return getOpsetImportFieldBuilder().getBuilderList();
46026 }
46027 private com.google.protobuf.RepeatedFieldBuilder<
46028 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder>
46029 getOpsetImportFieldBuilder() {
46030 if (opsetImportBuilder_ == null) {
46031 opsetImportBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
46032 onnx.OnnxMl.OperatorSetIdProto, onnx.OnnxMl.OperatorSetIdProto.Builder, onnx.OnnxMl.OperatorSetIdProtoOrBuilder>(
46033 opsetImport_,
46034 ((bitField0_ & 0x00000080) != 0),
46035 getParentForChildren(),
46036 isClean());
46037 opsetImport_ = null;
46038 }
46039 return opsetImportBuilder_;
46040 }
46041
46042 private java.lang.Object domain_ = "";
46043 /**
46044 * <pre>
46045 * The domain which this function belongs to.
46046 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46047 * </pre>
46048 *
46049 * <code>optional string domain = 10;</code>
46050 * @return Whether the domain field is set.
46051 */
46052 public boolean hasDomain() {
46053 return ((bitField0_ & 0x00000100) != 0);
46054 }
46055 /**
46056 * <pre>
46057 * The domain which this function belongs to.
46058 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46059 * </pre>
46060 *
46061 * <code>optional string domain = 10;</code>
46062 * @return The domain.
46063 */
46064 public java.lang.String getDomain() {
46065 java.lang.Object ref = domain_;
46066 if (!(ref instanceof java.lang.String)) {
46067 com.google.protobuf.ByteString bs =
46068 (com.google.protobuf.ByteString) ref;
46069 java.lang.String s = bs.toStringUtf8();
46070 if (bs.isValidUtf8()) {
46071 domain_ = s;
46072 }
46073 return s;
46074 } else {
46075 return (java.lang.String) ref;
46076 }
46077 }
46078 /**
46079 * <pre>
46080 * The domain which this function belongs to.
46081 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46082 * </pre>
46083 *
46084 * <code>optional string domain = 10;</code>
46085 * @return The bytes for domain.
46086 */
46087 public com.google.protobuf.ByteString
46088 getDomainBytes() {
46089 java.lang.Object ref = domain_;
46090 if (ref instanceof String) {
46091 com.google.protobuf.ByteString b =
46092 com.google.protobuf.ByteString.copyFromUtf8(
46093 (java.lang.String) ref);
46094 domain_ = b;
46095 return b;
46096 } else {
46097 return (com.google.protobuf.ByteString) ref;
46098 }
46099 }
46100 /**
46101 * <pre>
46102 * The domain which this function belongs to.
46103 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46104 * </pre>
46105 *
46106 * <code>optional string domain = 10;</code>
46107 * @param value The domain to set.
46108 * @return This builder for chaining.
46109 */
46110 public Builder setDomain(
46111 java.lang.String value) {
46112 if (value == null) { throw new NullPointerException(); }
46113 domain_ = value;
46114 bitField0_ |= 0x00000100;
46115 onChanged();
46116 return this;
46117 }
46118 /**
46119 * <pre>
46120 * The domain which this function belongs to.
46121 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46122 * </pre>
46123 *
46124 * <code>optional string domain = 10;</code>
46125 * @return This builder for chaining.
46126 */
46127 public Builder clearDomain() {
46128 domain_ = getDefaultInstance().getDomain();
46129 bitField0_ = (bitField0_ & ~0x00000100);
46130 onChanged();
46131 return this;
46132 }
46133 /**
46134 * <pre>
46135 * The domain which this function belongs to.
46136 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46137 * </pre>
46138 *
46139 * <code>optional string domain = 10;</code>
46140 * @param value The bytes for domain to set.
46141 * @return This builder for chaining.
46142 */
46143 public Builder setDomainBytes(
46144 com.google.protobuf.ByteString value) {
46145 if (value == null) { throw new NullPointerException(); }
46146 domain_ = value;
46147 bitField0_ |= 0x00000100;
46148 onChanged();
46149 return this;
46150 }
46151
46152 private java.lang.Object overload_ = "";
46153 /**
46154 * <pre>
46155 * The overload identifier of the function.
46156 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46157 * </pre>
46158 *
46159 * <code>optional string overload = 13;</code>
46160 * @return Whether the overload field is set.
46161 */
46162 public boolean hasOverload() {
46163 return ((bitField0_ & 0x00000200) != 0);
46164 }
46165 /**
46166 * <pre>
46167 * The overload identifier of the function.
46168 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46169 * </pre>
46170 *
46171 * <code>optional string overload = 13;</code>
46172 * @return The overload.
46173 */
46174 public java.lang.String getOverload() {
46175 java.lang.Object ref = overload_;
46176 if (!(ref instanceof java.lang.String)) {
46177 com.google.protobuf.ByteString bs =
46178 (com.google.protobuf.ByteString) ref;
46179 java.lang.String s = bs.toStringUtf8();
46180 if (bs.isValidUtf8()) {
46181 overload_ = s;
46182 }
46183 return s;
46184 } else {
46185 return (java.lang.String) ref;
46186 }
46187 }
46188 /**
46189 * <pre>
46190 * The overload identifier of the function.
46191 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46192 * </pre>
46193 *
46194 * <code>optional string overload = 13;</code>
46195 * @return The bytes for overload.
46196 */
46197 public com.google.protobuf.ByteString
46198 getOverloadBytes() {
46199 java.lang.Object ref = overload_;
46200 if (ref instanceof String) {
46201 com.google.protobuf.ByteString b =
46202 com.google.protobuf.ByteString.copyFromUtf8(
46203 (java.lang.String) ref);
46204 overload_ = b;
46205 return b;
46206 } else {
46207 return (com.google.protobuf.ByteString) ref;
46208 }
46209 }
46210 /**
46211 * <pre>
46212 * The overload identifier of the function.
46213 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46214 * </pre>
46215 *
46216 * <code>optional string overload = 13;</code>
46217 * @param value The overload to set.
46218 * @return This builder for chaining.
46219 */
46220 public Builder setOverload(
46221 java.lang.String value) {
46222 if (value == null) { throw new NullPointerException(); }
46223 overload_ = value;
46224 bitField0_ |= 0x00000200;
46225 onChanged();
46226 return this;
46227 }
46228 /**
46229 * <pre>
46230 * The overload identifier of the function.
46231 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46232 * </pre>
46233 *
46234 * <code>optional string overload = 13;</code>
46235 * @return This builder for chaining.
46236 */
46237 public Builder clearOverload() {
46238 overload_ = getDefaultInstance().getOverload();
46239 bitField0_ = (bitField0_ & ~0x00000200);
46240 onChanged();
46241 return this;
46242 }
46243 /**
46244 * <pre>
46245 * The overload identifier of the function.
46246 * This is part of the unique-id (domain, name, overload) of FunctionProtos in a model.
46247 * </pre>
46248 *
46249 * <code>optional string overload = 13;</code>
46250 * @param value The bytes for overload to set.
46251 * @return This builder for chaining.
46252 */
46253 public Builder setOverloadBytes(
46254 com.google.protobuf.ByteString value) {
46255 if (value == null) { throw new NullPointerException(); }
46256 overload_ = value;
46257 bitField0_ |= 0x00000200;
46258 onChanged();
46259 return this;
46260 }
46261
46262 private java.util.List<onnx.OnnxMl.ValueInfoProto> valueInfo_ =
46263 java.util.Collections.emptyList();
46264 private void ensureValueInfoIsMutable() {
46265 if (!((bitField0_ & 0x00000400) != 0)) {
46266 valueInfo_ = new java.util.ArrayList<onnx.OnnxMl.ValueInfoProto>(valueInfo_);
46267 bitField0_ |= 0x00000400;
46268 }
46269 }
46270
46271 private com.google.protobuf.RepeatedFieldBuilder<
46272 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder> valueInfoBuilder_;
46273
46274 /**
46275 * <pre>
46276 * Information for the values in the function. The ValueInfoProto.name's
46277 * must be distinct and refer to names in the function (including inputs,
46278 * outputs, and intermediate values). It is optional for a value to appear
46279 * in value_info list.
46280 * </pre>
46281 *
46282 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46283 */
46284 public java.util.List<onnx.OnnxMl.ValueInfoProto> getValueInfoList() {
46285 if (valueInfoBuilder_ == null) {
46286 return java.util.Collections.unmodifiableList(valueInfo_);
46287 } else {
46288 return valueInfoBuilder_.getMessageList();
46289 }
46290 }
46291 /**
46292 * <pre>
46293 * Information for the values in the function. The ValueInfoProto.name's
46294 * must be distinct and refer to names in the function (including inputs,
46295 * outputs, and intermediate values). It is optional for a value to appear
46296 * in value_info list.
46297 * </pre>
46298 *
46299 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46300 */
46301 public int getValueInfoCount() {
46302 if (valueInfoBuilder_ == null) {
46303 return valueInfo_.size();
46304 } else {
46305 return valueInfoBuilder_.getCount();
46306 }
46307 }
46308 /**
46309 * <pre>
46310 * Information for the values in the function. The ValueInfoProto.name's
46311 * must be distinct and refer to names in the function (including inputs,
46312 * outputs, and intermediate values). It is optional for a value to appear
46313 * in value_info list.
46314 * </pre>
46315 *
46316 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46317 */
46318 public onnx.OnnxMl.ValueInfoProto getValueInfo(int index) {
46319 if (valueInfoBuilder_ == null) {
46320 return valueInfo_.get(index);
46321 } else {
46322 return valueInfoBuilder_.getMessage(index);
46323 }
46324 }
46325 /**
46326 * <pre>
46327 * Information for the values in the function. The ValueInfoProto.name's
46328 * must be distinct and refer to names in the function (including inputs,
46329 * outputs, and intermediate values). It is optional for a value to appear
46330 * in value_info list.
46331 * </pre>
46332 *
46333 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46334 */
46335 public Builder setValueInfo(
46336 int index, onnx.OnnxMl.ValueInfoProto value) {
46337 if (valueInfoBuilder_ == null) {
46338 if (value == null) {
46339 throw new NullPointerException();
46340 }
46341 ensureValueInfoIsMutable();
46342 valueInfo_.set(index, value);
46343 onChanged();
46344 } else {
46345 valueInfoBuilder_.setMessage(index, value);
46346 }
46347 return this;
46348 }
46349 /**
46350 * <pre>
46351 * Information for the values in the function. The ValueInfoProto.name's
46352 * must be distinct and refer to names in the function (including inputs,
46353 * outputs, and intermediate values). It is optional for a value to appear
46354 * in value_info list.
46355 * </pre>
46356 *
46357 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46358 */
46359 public Builder setValueInfo(
46360 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
46361 if (valueInfoBuilder_ == null) {
46362 ensureValueInfoIsMutable();
46363 valueInfo_.set(index, builderForValue.build());
46364 onChanged();
46365 } else {
46366 valueInfoBuilder_.setMessage(index, builderForValue.build());
46367 }
46368 return this;
46369 }
46370 /**
46371 * <pre>
46372 * Information for the values in the function. The ValueInfoProto.name's
46373 * must be distinct and refer to names in the function (including inputs,
46374 * outputs, and intermediate values). It is optional for a value to appear
46375 * in value_info list.
46376 * </pre>
46377 *
46378 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46379 */
46380 public Builder addValueInfo(onnx.OnnxMl.ValueInfoProto value) {
46381 if (valueInfoBuilder_ == null) {
46382 if (value == null) {
46383 throw new NullPointerException();
46384 }
46385 ensureValueInfoIsMutable();
46386 valueInfo_.add(value);
46387 onChanged();
46388 } else {
46389 valueInfoBuilder_.addMessage(value);
46390 }
46391 return this;
46392 }
46393 /**
46394 * <pre>
46395 * Information for the values in the function. The ValueInfoProto.name's
46396 * must be distinct and refer to names in the function (including inputs,
46397 * outputs, and intermediate values). It is optional for a value to appear
46398 * in value_info list.
46399 * </pre>
46400 *
46401 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46402 */
46403 public Builder addValueInfo(
46404 int index, onnx.OnnxMl.ValueInfoProto value) {
46405 if (valueInfoBuilder_ == null) {
46406 if (value == null) {
46407 throw new NullPointerException();
46408 }
46409 ensureValueInfoIsMutable();
46410 valueInfo_.add(index, value);
46411 onChanged();
46412 } else {
46413 valueInfoBuilder_.addMessage(index, value);
46414 }
46415 return this;
46416 }
46417 /**
46418 * <pre>
46419 * Information for the values in the function. The ValueInfoProto.name's
46420 * must be distinct and refer to names in the function (including inputs,
46421 * outputs, and intermediate values). It is optional for a value to appear
46422 * in value_info list.
46423 * </pre>
46424 *
46425 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46426 */
46427 public Builder addValueInfo(
46428 onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
46429 if (valueInfoBuilder_ == null) {
46430 ensureValueInfoIsMutable();
46431 valueInfo_.add(builderForValue.build());
46432 onChanged();
46433 } else {
46434 valueInfoBuilder_.addMessage(builderForValue.build());
46435 }
46436 return this;
46437 }
46438 /**
46439 * <pre>
46440 * Information for the values in the function. The ValueInfoProto.name's
46441 * must be distinct and refer to names in the function (including inputs,
46442 * outputs, and intermediate values). It is optional for a value to appear
46443 * in value_info list.
46444 * </pre>
46445 *
46446 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46447 */
46448 public Builder addValueInfo(
46449 int index, onnx.OnnxMl.ValueInfoProto.Builder builderForValue) {
46450 if (valueInfoBuilder_ == null) {
46451 ensureValueInfoIsMutable();
46452 valueInfo_.add(index, builderForValue.build());
46453 onChanged();
46454 } else {
46455 valueInfoBuilder_.addMessage(index, builderForValue.build());
46456 }
46457 return this;
46458 }
46459 /**
46460 * <pre>
46461 * Information for the values in the function. The ValueInfoProto.name's
46462 * must be distinct and refer to names in the function (including inputs,
46463 * outputs, and intermediate values). It is optional for a value to appear
46464 * in value_info list.
46465 * </pre>
46466 *
46467 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46468 */
46469 public Builder addAllValueInfo(
46470 java.lang.Iterable<? extends onnx.OnnxMl.ValueInfoProto> values) {
46471 if (valueInfoBuilder_ == null) {
46472 ensureValueInfoIsMutable();
46473 com.google.protobuf.AbstractMessageLite.Builder.addAll(
46474 values, valueInfo_);
46475 onChanged();
46476 } else {
46477 valueInfoBuilder_.addAllMessages(values);
46478 }
46479 return this;
46480 }
46481 /**
46482 * <pre>
46483 * Information for the values in the function. The ValueInfoProto.name's
46484 * must be distinct and refer to names in the function (including inputs,
46485 * outputs, and intermediate values). It is optional for a value to appear
46486 * in value_info list.
46487 * </pre>
46488 *
46489 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46490 */
46491 public Builder clearValueInfo() {
46492 if (valueInfoBuilder_ == null) {
46493 valueInfo_ = java.util.Collections.emptyList();
46494 bitField0_ = (bitField0_ & ~0x00000400);
46495 onChanged();
46496 } else {
46497 valueInfoBuilder_.clear();
46498 }
46499 return this;
46500 }
46501 /**
46502 * <pre>
46503 * Information for the values in the function. The ValueInfoProto.name's
46504 * must be distinct and refer to names in the function (including inputs,
46505 * outputs, and intermediate values). It is optional for a value to appear
46506 * in value_info list.
46507 * </pre>
46508 *
46509 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46510 */
46511 public Builder removeValueInfo(int index) {
46512 if (valueInfoBuilder_ == null) {
46513 ensureValueInfoIsMutable();
46514 valueInfo_.remove(index);
46515 onChanged();
46516 } else {
46517 valueInfoBuilder_.remove(index);
46518 }
46519 return this;
46520 }
46521 /**
46522 * <pre>
46523 * Information for the values in the function. The ValueInfoProto.name's
46524 * must be distinct and refer to names in the function (including inputs,
46525 * outputs, and intermediate values). It is optional for a value to appear
46526 * in value_info list.
46527 * </pre>
46528 *
46529 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46530 */
46531 public onnx.OnnxMl.ValueInfoProto.Builder getValueInfoBuilder(
46532 int index) {
46533 return getValueInfoFieldBuilder().getBuilder(index);
46534 }
46535 /**
46536 * <pre>
46537 * Information for the values in the function. The ValueInfoProto.name's
46538 * must be distinct and refer to names in the function (including inputs,
46539 * outputs, and intermediate values). It is optional for a value to appear
46540 * in value_info list.
46541 * </pre>
46542 *
46543 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46544 */
46545 public onnx.OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
46546 int index) {
46547 if (valueInfoBuilder_ == null) {
46548 return valueInfo_.get(index); } else {
46549 return valueInfoBuilder_.getMessageOrBuilder(index);
46550 }
46551 }
46552 /**
46553 * <pre>
46554 * Information for the values in the function. The ValueInfoProto.name's
46555 * must be distinct and refer to names in the function (including inputs,
46556 * outputs, and intermediate values). It is optional for a value to appear
46557 * in value_info list.
46558 * </pre>
46559 *
46560 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46561 */
46562 public java.util.List<? extends onnx.OnnxMl.ValueInfoProtoOrBuilder>
46563 getValueInfoOrBuilderList() {
46564 if (valueInfoBuilder_ != null) {
46565 return valueInfoBuilder_.getMessageOrBuilderList();
46566 } else {
46567 return java.util.Collections.unmodifiableList(valueInfo_);
46568 }
46569 }
46570 /**
46571 * <pre>
46572 * Information for the values in the function. The ValueInfoProto.name's
46573 * must be distinct and refer to names in the function (including inputs,
46574 * outputs, and intermediate values). It is optional for a value to appear
46575 * in value_info list.
46576 * </pre>
46577 *
46578 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46579 */
46580 public onnx.OnnxMl.ValueInfoProto.Builder addValueInfoBuilder() {
46581 return getValueInfoFieldBuilder().addBuilder(
46582 onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
46583 }
46584 /**
46585 * <pre>
46586 * Information for the values in the function. The ValueInfoProto.name's
46587 * must be distinct and refer to names in the function (including inputs,
46588 * outputs, and intermediate values). It is optional for a value to appear
46589 * in value_info list.
46590 * </pre>
46591 *
46592 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46593 */
46594 public onnx.OnnxMl.ValueInfoProto.Builder addValueInfoBuilder(
46595 int index) {
46596 return getValueInfoFieldBuilder().addBuilder(
46597 index, onnx.OnnxMl.ValueInfoProto.getDefaultInstance());
46598 }
46599 /**
46600 * <pre>
46601 * Information for the values in the function. The ValueInfoProto.name's
46602 * must be distinct and refer to names in the function (including inputs,
46603 * outputs, and intermediate values). It is optional for a value to appear
46604 * in value_info list.
46605 * </pre>
46606 *
46607 * <code>repeated .onnx.ValueInfoProto value_info = 12;</code>
46608 */
46609 public java.util.List<onnx.OnnxMl.ValueInfoProto.Builder>
46610 getValueInfoBuilderList() {
46611 return getValueInfoFieldBuilder().getBuilderList();
46612 }
46613 private com.google.protobuf.RepeatedFieldBuilder<
46614 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>
46615 getValueInfoFieldBuilder() {
46616 if (valueInfoBuilder_ == null) {
46617 valueInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
46618 onnx.OnnxMl.ValueInfoProto, onnx.OnnxMl.ValueInfoProto.Builder, onnx.OnnxMl.ValueInfoProtoOrBuilder>(
46619 valueInfo_,
46620 ((bitField0_ & 0x00000400) != 0),
46621 getParentForChildren(),
46622 isClean());
46623 valueInfo_ = null;
46624 }
46625 return valueInfoBuilder_;
46626 }
46627
46628 private java.util.List<onnx.OnnxMl.StringStringEntryProto> metadataProps_ =
46629 java.util.Collections.emptyList();
46630 private void ensureMetadataPropsIsMutable() {
46631 if (!((bitField0_ & 0x00000800) != 0)) {
46632 metadataProps_ = new java.util.ArrayList<onnx.OnnxMl.StringStringEntryProto>(metadataProps_);
46633 bitField0_ |= 0x00000800;
46634 }
46635 }
46636
46637 private com.google.protobuf.RepeatedFieldBuilder<
46638 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder> metadataPropsBuilder_;
46639
46640 /**
46641 * <pre>
46642 * Named metadata values; keys should be distinct.
46643 * </pre>
46644 *
46645 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46646 */
46647 public java.util.List<onnx.OnnxMl.StringStringEntryProto> getMetadataPropsList() {
46648 if (metadataPropsBuilder_ == null) {
46649 return java.util.Collections.unmodifiableList(metadataProps_);
46650 } else {
46651 return metadataPropsBuilder_.getMessageList();
46652 }
46653 }
46654 /**
46655 * <pre>
46656 * Named metadata values; keys should be distinct.
46657 * </pre>
46658 *
46659 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46660 */
46661 public int getMetadataPropsCount() {
46662 if (metadataPropsBuilder_ == null) {
46663 return metadataProps_.size();
46664 } else {
46665 return metadataPropsBuilder_.getCount();
46666 }
46667 }
46668 /**
46669 * <pre>
46670 * Named metadata values; keys should be distinct.
46671 * </pre>
46672 *
46673 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46674 */
46675 public onnx.OnnxMl.StringStringEntryProto getMetadataProps(int index) {
46676 if (metadataPropsBuilder_ == null) {
46677 return metadataProps_.get(index);
46678 } else {
46679 return metadataPropsBuilder_.getMessage(index);
46680 }
46681 }
46682 /**
46683 * <pre>
46684 * Named metadata values; keys should be distinct.
46685 * </pre>
46686 *
46687 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46688 */
46689 public Builder setMetadataProps(
46690 int index, onnx.OnnxMl.StringStringEntryProto value) {
46691 if (metadataPropsBuilder_ == null) {
46692 if (value == null) {
46693 throw new NullPointerException();
46694 }
46695 ensureMetadataPropsIsMutable();
46696 metadataProps_.set(index, value);
46697 onChanged();
46698 } else {
46699 metadataPropsBuilder_.setMessage(index, value);
46700 }
46701 return this;
46702 }
46703 /**
46704 * <pre>
46705 * Named metadata values; keys should be distinct.
46706 * </pre>
46707 *
46708 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46709 */
46710 public Builder setMetadataProps(
46711 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
46712 if (metadataPropsBuilder_ == null) {
46713 ensureMetadataPropsIsMutable();
46714 metadataProps_.set(index, builderForValue.build());
46715 onChanged();
46716 } else {
46717 metadataPropsBuilder_.setMessage(index, builderForValue.build());
46718 }
46719 return this;
46720 }
46721 /**
46722 * <pre>
46723 * Named metadata values; keys should be distinct.
46724 * </pre>
46725 *
46726 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46727 */
46728 public Builder addMetadataProps(onnx.OnnxMl.StringStringEntryProto value) {
46729 if (metadataPropsBuilder_ == null) {
46730 if (value == null) {
46731 throw new NullPointerException();
46732 }
46733 ensureMetadataPropsIsMutable();
46734 metadataProps_.add(value);
46735 onChanged();
46736 } else {
46737 metadataPropsBuilder_.addMessage(value);
46738 }
46739 return this;
46740 }
46741 /**
46742 * <pre>
46743 * Named metadata values; keys should be distinct.
46744 * </pre>
46745 *
46746 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46747 */
46748 public Builder addMetadataProps(
46749 int index, onnx.OnnxMl.StringStringEntryProto value) {
46750 if (metadataPropsBuilder_ == null) {
46751 if (value == null) {
46752 throw new NullPointerException();
46753 }
46754 ensureMetadataPropsIsMutable();
46755 metadataProps_.add(index, value);
46756 onChanged();
46757 } else {
46758 metadataPropsBuilder_.addMessage(index, value);
46759 }
46760 return this;
46761 }
46762 /**
46763 * <pre>
46764 * Named metadata values; keys should be distinct.
46765 * </pre>
46766 *
46767 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46768 */
46769 public Builder addMetadataProps(
46770 onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
46771 if (metadataPropsBuilder_ == null) {
46772 ensureMetadataPropsIsMutable();
46773 metadataProps_.add(builderForValue.build());
46774 onChanged();
46775 } else {
46776 metadataPropsBuilder_.addMessage(builderForValue.build());
46777 }
46778 return this;
46779 }
46780 /**
46781 * <pre>
46782 * Named metadata values; keys should be distinct.
46783 * </pre>
46784 *
46785 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46786 */
46787 public Builder addMetadataProps(
46788 int index, onnx.OnnxMl.StringStringEntryProto.Builder builderForValue) {
46789 if (metadataPropsBuilder_ == null) {
46790 ensureMetadataPropsIsMutable();
46791 metadataProps_.add(index, builderForValue.build());
46792 onChanged();
46793 } else {
46794 metadataPropsBuilder_.addMessage(index, builderForValue.build());
46795 }
46796 return this;
46797 }
46798 /**
46799 * <pre>
46800 * Named metadata values; keys should be distinct.
46801 * </pre>
46802 *
46803 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46804 */
46805 public Builder addAllMetadataProps(
46806 java.lang.Iterable<? extends onnx.OnnxMl.StringStringEntryProto> values) {
46807 if (metadataPropsBuilder_ == null) {
46808 ensureMetadataPropsIsMutable();
46809 com.google.protobuf.AbstractMessageLite.Builder.addAll(
46810 values, metadataProps_);
46811 onChanged();
46812 } else {
46813 metadataPropsBuilder_.addAllMessages(values);
46814 }
46815 return this;
46816 }
46817 /**
46818 * <pre>
46819 * Named metadata values; keys should be distinct.
46820 * </pre>
46821 *
46822 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46823 */
46824 public Builder clearMetadataProps() {
46825 if (metadataPropsBuilder_ == null) {
46826 metadataProps_ = java.util.Collections.emptyList();
46827 bitField0_ = (bitField0_ & ~0x00000800);
46828 onChanged();
46829 } else {
46830 metadataPropsBuilder_.clear();
46831 }
46832 return this;
46833 }
46834 /**
46835 * <pre>
46836 * Named metadata values; keys should be distinct.
46837 * </pre>
46838 *
46839 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46840 */
46841 public Builder removeMetadataProps(int index) {
46842 if (metadataPropsBuilder_ == null) {
46843 ensureMetadataPropsIsMutable();
46844 metadataProps_.remove(index);
46845 onChanged();
46846 } else {
46847 metadataPropsBuilder_.remove(index);
46848 }
46849 return this;
46850 }
46851 /**
46852 * <pre>
46853 * Named metadata values; keys should be distinct.
46854 * </pre>
46855 *
46856 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46857 */
46858 public onnx.OnnxMl.StringStringEntryProto.Builder getMetadataPropsBuilder(
46859 int index) {
46860 return getMetadataPropsFieldBuilder().getBuilder(index);
46861 }
46862 /**
46863 * <pre>
46864 * Named metadata values; keys should be distinct.
46865 * </pre>
46866 *
46867 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46868 */
46869 public onnx.OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
46870 int index) {
46871 if (metadataPropsBuilder_ == null) {
46872 return metadataProps_.get(index); } else {
46873 return metadataPropsBuilder_.getMessageOrBuilder(index);
46874 }
46875 }
46876 /**
46877 * <pre>
46878 * Named metadata values; keys should be distinct.
46879 * </pre>
46880 *
46881 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46882 */
46883 public java.util.List<? extends onnx.OnnxMl.StringStringEntryProtoOrBuilder>
46884 getMetadataPropsOrBuilderList() {
46885 if (metadataPropsBuilder_ != null) {
46886 return metadataPropsBuilder_.getMessageOrBuilderList();
46887 } else {
46888 return java.util.Collections.unmodifiableList(metadataProps_);
46889 }
46890 }
46891 /**
46892 * <pre>
46893 * Named metadata values; keys should be distinct.
46894 * </pre>
46895 *
46896 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46897 */
46898 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder() {
46899 return getMetadataPropsFieldBuilder().addBuilder(
46900 onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
46901 }
46902 /**
46903 * <pre>
46904 * Named metadata values; keys should be distinct.
46905 * </pre>
46906 *
46907 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46908 */
46909 public onnx.OnnxMl.StringStringEntryProto.Builder addMetadataPropsBuilder(
46910 int index) {
46911 return getMetadataPropsFieldBuilder().addBuilder(
46912 index, onnx.OnnxMl.StringStringEntryProto.getDefaultInstance());
46913 }
46914 /**
46915 * <pre>
46916 * Named metadata values; keys should be distinct.
46917 * </pre>
46918 *
46919 * <code>repeated .onnx.StringStringEntryProto metadata_props = 14;</code>
46920 */
46921 public java.util.List<onnx.OnnxMl.StringStringEntryProto.Builder>
46922 getMetadataPropsBuilderList() {
46923 return getMetadataPropsFieldBuilder().getBuilderList();
46924 }
46925 private com.google.protobuf.RepeatedFieldBuilder<
46926 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>
46927 getMetadataPropsFieldBuilder() {
46928 if (metadataPropsBuilder_ == null) {
46929 metadataPropsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
46930 onnx.OnnxMl.StringStringEntryProto, onnx.OnnxMl.StringStringEntryProto.Builder, onnx.OnnxMl.StringStringEntryProtoOrBuilder>(
46931 metadataProps_,
46932 ((bitField0_ & 0x00000800) != 0),
46933 getParentForChildren(),
46934 isClean());
46935 metadataProps_ = null;
46936 }
46937 return metadataPropsBuilder_;
46938 }
46939
46940 // @@protoc_insertion_point(builder_scope:onnx.FunctionProto)
46941 }
46942
46943 // @@protoc_insertion_point(class_scope:onnx.FunctionProto)
46944 private static final onnx.OnnxMl.FunctionProto DEFAULT_INSTANCE;
46945 static {
46946 DEFAULT_INSTANCE = new onnx.OnnxMl.FunctionProto();
46947 }
46948
46949 public static onnx.OnnxMl.FunctionProto getDefaultInstance() {
46950 return DEFAULT_INSTANCE;
46951 }
46952
46953 private static final com.google.protobuf.Parser<FunctionProto>
46954 PARSER = new com.google.protobuf.AbstractParser<FunctionProto>() {
46955 @java.lang.Override
46956 public FunctionProto parsePartialFrom(
46957 com.google.protobuf.CodedInputStream input,
46958 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
46959 throws com.google.protobuf.InvalidProtocolBufferException {
46960 Builder builder = newBuilder();
46961 try {
46962 builder.mergeFrom(input, extensionRegistry);
46963 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
46964 throw e.setUnfinishedMessage(builder.buildPartial());
46965 } catch (com.google.protobuf.UninitializedMessageException e) {
46966 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
46967 } catch (java.io.IOException e) {
46968 throw new com.google.protobuf.InvalidProtocolBufferException(e)
46969 .setUnfinishedMessage(builder.buildPartial());
46970 }
46971 return builder.buildPartial();
46972 }
46973 };
46974
46975 public static com.google.protobuf.Parser<FunctionProto> parser() {
46976 return PARSER;
46977 }
46978
46979 @java.lang.Override
46980 public com.google.protobuf.Parser<FunctionProto> getParserForType() {
46981 return PARSER;
46982 }
46983
46984 @java.lang.Override
46985 public onnx.OnnxMl.FunctionProto getDefaultInstanceForType() {
46986 return DEFAULT_INSTANCE;
46987 }
46988
46989 }
46990
46991 private static final com.google.protobuf.Descriptors.Descriptor
46992 internal_static_onnx_AttributeProto_descriptor;
46993 private static final
46994 com.google.protobuf.GeneratedMessage.FieldAccessorTable
46995 internal_static_onnx_AttributeProto_fieldAccessorTable;
46996 private static final com.google.protobuf.Descriptors.Descriptor
46997 internal_static_onnx_ValueInfoProto_descriptor;
46998 private static final
46999 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47000 internal_static_onnx_ValueInfoProto_fieldAccessorTable;
47001 private static final com.google.protobuf.Descriptors.Descriptor
47002 internal_static_onnx_NodeProto_descriptor;
47003 private static final
47004 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47005 internal_static_onnx_NodeProto_fieldAccessorTable;
47006 private static final com.google.protobuf.Descriptors.Descriptor
47007 internal_static_onnx_TrainingInfoProto_descriptor;
47008 private static final
47009 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47010 internal_static_onnx_TrainingInfoProto_fieldAccessorTable;
47011 private static final com.google.protobuf.Descriptors.Descriptor
47012 internal_static_onnx_ModelProto_descriptor;
47013 private static final
47014 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47015 internal_static_onnx_ModelProto_fieldAccessorTable;
47016 private static final com.google.protobuf.Descriptors.Descriptor
47017 internal_static_onnx_StringStringEntryProto_descriptor;
47018 private static final
47019 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47020 internal_static_onnx_StringStringEntryProto_fieldAccessorTable;
47021 private static final com.google.protobuf.Descriptors.Descriptor
47022 internal_static_onnx_TensorAnnotation_descriptor;
47023 private static final
47024 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47025 internal_static_onnx_TensorAnnotation_fieldAccessorTable;
47026 private static final com.google.protobuf.Descriptors.Descriptor
47027 internal_static_onnx_GraphProto_descriptor;
47028 private static final
47029 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47030 internal_static_onnx_GraphProto_fieldAccessorTable;
47031 private static final com.google.protobuf.Descriptors.Descriptor
47032 internal_static_onnx_TensorProto_descriptor;
47033 private static final
47034 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47035 internal_static_onnx_TensorProto_fieldAccessorTable;
47036 private static final com.google.protobuf.Descriptors.Descriptor
47037 internal_static_onnx_TensorProto_Segment_descriptor;
47038 private static final
47039 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47040 internal_static_onnx_TensorProto_Segment_fieldAccessorTable;
47041 private static final com.google.protobuf.Descriptors.Descriptor
47042 internal_static_onnx_SparseTensorProto_descriptor;
47043 private static final
47044 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47045 internal_static_onnx_SparseTensorProto_fieldAccessorTable;
47046 private static final com.google.protobuf.Descriptors.Descriptor
47047 internal_static_onnx_TensorShapeProto_descriptor;
47048 private static final
47049 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47050 internal_static_onnx_TensorShapeProto_fieldAccessorTable;
47051 private static final com.google.protobuf.Descriptors.Descriptor
47052 internal_static_onnx_TensorShapeProto_Dimension_descriptor;
47053 private static final
47054 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47055 internal_static_onnx_TensorShapeProto_Dimension_fieldAccessorTable;
47056 private static final com.google.protobuf.Descriptors.Descriptor
47057 internal_static_onnx_TypeProto_descriptor;
47058 private static final
47059 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47060 internal_static_onnx_TypeProto_fieldAccessorTable;
47061 private static final com.google.protobuf.Descriptors.Descriptor
47062 internal_static_onnx_TypeProto_Tensor_descriptor;
47063 private static final
47064 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47065 internal_static_onnx_TypeProto_Tensor_fieldAccessorTable;
47066 private static final com.google.protobuf.Descriptors.Descriptor
47067 internal_static_onnx_TypeProto_Sequence_descriptor;
47068 private static final
47069 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47070 internal_static_onnx_TypeProto_Sequence_fieldAccessorTable;
47071 private static final com.google.protobuf.Descriptors.Descriptor
47072 internal_static_onnx_TypeProto_Map_descriptor;
47073 private static final
47074 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47075 internal_static_onnx_TypeProto_Map_fieldAccessorTable;
47076 private static final com.google.protobuf.Descriptors.Descriptor
47077 internal_static_onnx_TypeProto_Optional_descriptor;
47078 private static final
47079 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47080 internal_static_onnx_TypeProto_Optional_fieldAccessorTable;
47081 private static final com.google.protobuf.Descriptors.Descriptor
47082 internal_static_onnx_TypeProto_SparseTensor_descriptor;
47083 private static final
47084 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47085 internal_static_onnx_TypeProto_SparseTensor_fieldAccessorTable;
47086 private static final com.google.protobuf.Descriptors.Descriptor
47087 internal_static_onnx_TypeProto_Opaque_descriptor;
47088 private static final
47089 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47090 internal_static_onnx_TypeProto_Opaque_fieldAccessorTable;
47091 private static final com.google.protobuf.Descriptors.Descriptor
47092 internal_static_onnx_OperatorSetIdProto_descriptor;
47093 private static final
47094 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47095 internal_static_onnx_OperatorSetIdProto_fieldAccessorTable;
47096 private static final com.google.protobuf.Descriptors.Descriptor
47097 internal_static_onnx_FunctionProto_descriptor;
47098 private static final
47099 com.google.protobuf.GeneratedMessage.FieldAccessorTable
47100 internal_static_onnx_FunctionProto_fieldAccessorTable;
47101
47102 public static com.google.protobuf.Descriptors.FileDescriptor
47103 getDescriptor() {
47104 return descriptor;
47105 }
47106 private static com.google.protobuf.Descriptors.FileDescriptor
47107 descriptor;
47108 static {
47109 java.lang.String[] descriptorData = {
47110 "\n\ronnx-ml.proto\022\004onnx\"\333\005\n\016AttributeProto" +
47111 "\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_name\030\025 \001(\t\022\022\n" +
47112 "\ndoc_string\030\r \001(\t\0220\n\004type\030\024 \001(\0162\".onnx.A" +
47113 "ttributeProto.AttributeType\022\t\n\001f\030\002 \001(\002\022\t" +
47114 "\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022\034\n\001t\030\005 \001(\0132\021.onnx.T" +
47115 "ensorProto\022\033\n\001g\030\006 \001(\0132\020.onnx.GraphProto\022" +
47116 ".\n\rsparse_tensor\030\026 \001(\0132\027.onnx.SparseTens" +
47117 "orProto\022\033\n\002tp\030\016 \001(\0132\017.onnx.TypeProto\022\016\n\006" +
47118 "floats\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t " +
47119 "\003(\014\022\"\n\007tensors\030\n \003(\0132\021.onnx.TensorProto\022" +
47120 " \n\006graphs\030\013 \003(\0132\020.onnx.GraphProto\022/\n\016spa" +
47121 "rse_tensors\030\027 \003(\0132\027.onnx.SparseTensorPro" +
47122 "to\022$\n\013type_protos\030\017 \003(\0132\017.onnx.TypeProto" +
47123 "\"\331\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLO" +
47124 "AT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022\t\n" +
47125 "\005GRAPH\020\005\022\021\n\rSPARSE_TENSOR\020\013\022\016\n\nTYPE_PROT" +
47126 "O\020\r\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRINGS\020\010\022\013" +
47127 "\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\022\022\n\016SPARSE_TENSOR" +
47128 "S\020\014\022\017\n\013TYPE_PROTOS\020\016J\004\010\014\020\rJ\004\010\020\020\024R\001v\"\207\001\n\016" +
47129 "ValueInfoProto\022\014\n\004name\030\001 \001(\t\022\035\n\004type\030\002 \001" +
47130 "(\0132\017.onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t\022" +
47131 "4\n\016metadata_props\030\004 \003(\0132\034.onnx.StringStr" +
47132 "ingEntryProto\"\336\001\n\tNodeProto\022\r\n\005input\030\001 \003" +
47133 "(\t\022\016\n\006output\030\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_t" +
47134 "ype\030\004 \001(\t\022\016\n\006domain\030\007 \001(\t\022\020\n\010overload\030\010 " +
47135 "\001(\t\022\'\n\tattribute\030\005 \003(\0132\024.onnx.AttributeP" +
47136 "roto\022\022\n\ndoc_string\030\006 \001(\t\0224\n\016metadata_pro" +
47137 "ps\030\t \003(\0132\034.onnx.StringStringEntryProto\"\326" +
47138 "\001\n\021TrainingInfoProto\022(\n\016initialization\030\001" +
47139 " \001(\0132\020.onnx.GraphProto\022#\n\talgorithm\030\002 \001(" +
47140 "\0132\020.onnx.GraphProto\022<\n\026initialization_bi" +
47141 "nding\030\003 \003(\0132\034.onnx.StringStringEntryProt" +
47142 "o\0224\n\016update_binding\030\004 \003(\0132\034.onnx.StringS" +
47143 "tringEntryProto\"\353\002\n\nModelProto\022\022\n\nir_ver" +
47144 "sion\030\001 \001(\003\022.\n\014opset_import\030\010 \003(\0132\030.onnx." +
47145 "OperatorSetIdProto\022\025\n\rproducer_name\030\002 \001(" +
47146 "\t\022\030\n\020producer_version\030\003 \001(\t\022\016\n\006domain\030\004 " +
47147 "\001(\t\022\025\n\rmodel_version\030\005 \001(\003\022\022\n\ndoc_string" +
47148 "\030\006 \001(\t\022\037\n\005graph\030\007 \001(\0132\020.onnx.GraphProto\022" +
47149 "4\n\016metadata_props\030\016 \003(\0132\034.onnx.StringStr" +
47150 "ingEntryProto\022.\n\rtraining_info\030\024 \003(\0132\027.o" +
47151 "nnx.TrainingInfoProto\022&\n\tfunctions\030\031 \003(\013" +
47152 "2\023.onnx.FunctionProto\"4\n\026StringStringEnt" +
47153 "ryProto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"k\n\020T" +
47154 "ensorAnnotation\022\023\n\013tensor_name\030\001 \001(\t\022B\n\034" +
47155 "quant_parameter_tensor_names\030\002 \003(\0132\034.onn" +
47156 "x.StringStringEntryProto\"\324\003\n\nGraphProto\022" +
47157 "\035\n\004node\030\001 \003(\0132\017.onnx.NodeProto\022\014\n\004name\030\002" +
47158 " \001(\t\022&\n\013initializer\030\005 \003(\0132\021.onnx.TensorP" +
47159 "roto\0223\n\022sparse_initializer\030\017 \003(\0132\027.onnx." +
47160 "SparseTensorProto\022\022\n\ndoc_string\030\n \001(\t\022#\n" +
47161 "\005input\030\013 \003(\0132\024.onnx.ValueInfoProto\022$\n\006ou" +
47162 "tput\030\014 \003(\0132\024.onnx.ValueInfoProto\022(\n\nvalu" +
47163 "e_info\030\r \003(\0132\024.onnx.ValueInfoProto\0227\n\027qu" +
47164 "antization_annotation\030\016 \003(\0132\026.onnx.Tenso" +
47165 "rAnnotation\0224\n\016metadata_props\030\020 \003(\0132\034.on" +
47166 "nx.StringStringEntryProtoJ\004\010\003\020\004J\004\010\004\020\005J\004\010" +
47167 "\006\020\nR\nir_versionR\020producer_versionR\014produ" +
47168 "cer_tagR\006domain\"\315\006\n\013TensorProto\022\014\n\004dims\030" +
47169 "\001 \003(\003\022\021\n\tdata_type\030\002 \001(\005\022*\n\007segment\030\003 \001(" +
47170 "\0132\031.onnx.TensorProto.Segment\022\026\n\nfloat_da" +
47171 "ta\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005 \003(\005B\002\020\001\022\023\n\013" +
47172 "string_data\030\006 \003(\014\022\026\n\nint64_data\030\007 \003(\003B\002\020" +
47173 "\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_string\030\014 \001(\t\022\020\n\010r" +
47174 "aw_data\030\t \001(\014\0223\n\rexternal_data\030\r \003(\0132\034.o" +
47175 "nnx.StringStringEntryProto\0225\n\rdata_locat" +
47176 "ion\030\016 \001(\0162\036.onnx.TensorProto.DataLocatio" +
47177 "n\022\027\n\013double_data\030\n \003(\001B\002\020\001\022\027\n\013uint64_dat" +
47178 "a\030\013 \003(\004B\002\020\001\0224\n\016metadata_props\030\020 \003(\0132\034.on" +
47179 "nx.StringStringEntryProto\032%\n\007Segment\022\r\n\005" +
47180 "begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\271\002\n\010DataType\022\r\n" +
47181 "\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UINT8\020\002\022\010\n\004IN" +
47182 "T8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n\005INT32\020\006\022\t" +
47183 "\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020\t\022\013\n\007FLOAT" +
47184 "16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n\n\006UINT64\020\r" +
47185 "\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020\017\022\014\n\010BFLOA" +
47186 "T16\020\020\022\020\n\014FLOAT8E4M3FN\020\021\022\022\n\016FLOAT8E4M3FNU" +
47187 "Z\020\022\022\016\n\nFLOAT8E5M2\020\023\022\022\n\016FLOAT8E5M2FNUZ\020\024\022" +
47188 "\t\n\005UINT4\020\025\022\010\n\004INT4\020\026\")\n\014DataLocation\022\013\n\007" +
47189 "DEFAULT\020\000\022\014\n\010EXTERNAL\020\001\"h\n\021SparseTensorP" +
47190 "roto\022!\n\006values\030\001 \001(\0132\021.onnx.TensorProto\022" +
47191 "\"\n\007indices\030\002 \001(\0132\021.onnx.TensorProto\022\014\n\004d" +
47192 "ims\030\003 \003(\003\"\225\001\n\020TensorShapeProto\022-\n\003dim\030\001 " +
47193 "\003(\0132 .onnx.TensorShapeProto.Dimension\032R\n" +
47194 "\tDimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_p" +
47195 "aram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005valu" +
47196 "e\"\245\005\n\tTypeProto\022-\n\013tensor_type\030\001 \001(\0132\026.o" +
47197 "nnx.TypeProto.TensorH\000\0221\n\rsequence_type\030" +
47198 "\004 \001(\0132\030.onnx.TypeProto.SequenceH\000\022\'\n\010map" +
47199 "_type\030\005 \001(\0132\023.onnx.TypeProto.MapH\000\0221\n\rop" +
47200 "tional_type\030\t \001(\0132\030.onnx.TypeProto.Optio" +
47201 "nalH\000\022:\n\022sparse_tensor_type\030\010 \001(\0132\034.onnx" +
47202 ".TypeProto.SparseTensorH\000\022-\n\013opaque_type" +
47203 "\030\007 \001(\0132\026.onnx.TypeProto.OpaqueH\000\022\022\n\ndeno" +
47204 "tation\030\006 \001(\t\032B\n\006Tensor\022\021\n\telem_type\030\001 \001(" +
47205 "\005\022%\n\005shape\030\002 \001(\0132\026.onnx.TensorShapeProto" +
47206 "\032.\n\010Sequence\022\"\n\telem_type\030\001 \001(\0132\017.onnx.T" +
47207 "ypeProto\032<\n\003Map\022\020\n\010key_type\030\001 \001(\005\022#\n\nval" +
47208 "ue_type\030\002 \001(\0132\017.onnx.TypeProto\032.\n\010Option" +
47209 "al\022\"\n\telem_type\030\001 \001(\0132\017.onnx.TypeProto\032H" +
47210 "\n\014SparseTensor\022\021\n\telem_type\030\001 \001(\005\022%\n\005sha" +
47211 "pe\030\002 \001(\0132\026.onnx.TensorShapeProto\032&\n\006Opaq" +
47212 "ue\022\016\n\006domain\030\001 \001(\t\022\014\n\004name\030\002 \001(\tB\007\n\005valu" +
47213 "e\"5\n\022OperatorSetIdProto\022\016\n\006domain\030\001 \001(\t\022" +
47214 "\017\n\007version\030\002 \001(\003\"\206\003\n\rFunctionProto\022\014\n\004na" +
47215 "me\030\001 \001(\t\022\r\n\005input\030\004 \003(\t\022\016\n\006output\030\005 \003(\t\022" +
47216 "\021\n\tattribute\030\006 \003(\t\022-\n\017attribute_proto\030\013 " +
47217 "\003(\0132\024.onnx.AttributeProto\022\035\n\004node\030\007 \003(\0132" +
47218 "\017.onnx.NodeProto\022\022\n\ndoc_string\030\010 \001(\t\022.\n\014" +
47219 "opset_import\030\t \003(\0132\030.onnx.OperatorSetIdP" +
47220 "roto\022\016\n\006domain\030\n \001(\t\022\020\n\010overload\030\r \001(\t\022(" +
47221 "\n\nvalue_info\030\014 \003(\0132\024.onnx.ValueInfoProto" +
47222 "\0224\n\016metadata_props\030\016 \003(\0132\034.onnx.StringSt" +
47223 "ringEntryProtoJ\004\010\002\020\003J\004\010\003\020\004R\rsince_versio" +
47224 "nR\006status*\227\002\n\007Version\022\022\n\016_START_VERSION\020" +
47225 "\000\022\031\n\025IR_VERSION_2017_10_10\020\001\022\031\n\025IR_VERSI" +
47226 "ON_2017_10_30\020\002\022\030\n\024IR_VERSION_2017_11_3\020" +
47227 "\003\022\030\n\024IR_VERSION_2019_1_22\020\004\022\030\n\024IR_VERSIO" +
47228 "N_2019_3_18\020\005\022\030\n\024IR_VERSION_2019_9_19\020\006\022" +
47229 "\027\n\023IR_VERSION_2020_5_8\020\007\022\030\n\024IR_VERSION_2" +
47230 "021_7_30\020\010\022\027\n\023IR_VERSION_2023_5_5\020\t\022\016\n\nI" +
47231 "R_VERSION\020\n*.\n\016OperatorStatus\022\020\n\014EXPERIM" +
47232 "ENTAL\020\000\022\n\n\006STABLE\020\001B\002H\003"
47233 };
47234 descriptor = com.google.protobuf.Descriptors.FileDescriptor
47235 .internalBuildGeneratedFileFrom(descriptorData,
47236 new com.google.protobuf.Descriptors.FileDescriptor[] {
47237 });
47238 internal_static_onnx_AttributeProto_descriptor =
47239 getDescriptor().getMessageTypes().get(0);
47240 internal_static_onnx_AttributeProto_fieldAccessorTable = new
47241 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47242 internal_static_onnx_AttributeProto_descriptor,
47243 new java.lang.String[] { "Name", "RefAttrName", "DocString", "Type", "F", "I", "S", "T", "G", "SparseTensor", "Tp", "Floats", "Ints", "Strings", "Tensors", "Graphs", "SparseTensors", "TypeProtos", });
47244 internal_static_onnx_ValueInfoProto_descriptor =
47245 getDescriptor().getMessageTypes().get(1);
47246 internal_static_onnx_ValueInfoProto_fieldAccessorTable = new
47247 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47248 internal_static_onnx_ValueInfoProto_descriptor,
47249 new java.lang.String[] { "Name", "Type", "DocString", "MetadataProps", });
47250 internal_static_onnx_NodeProto_descriptor =
47251 getDescriptor().getMessageTypes().get(2);
47252 internal_static_onnx_NodeProto_fieldAccessorTable = new
47253 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47254 internal_static_onnx_NodeProto_descriptor,
47255 new java.lang.String[] { "Input", "Output", "Name", "OpType", "Domain", "Overload", "Attribute", "DocString", "MetadataProps", });
47256 internal_static_onnx_TrainingInfoProto_descriptor =
47257 getDescriptor().getMessageTypes().get(3);
47258 internal_static_onnx_TrainingInfoProto_fieldAccessorTable = new
47259 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47260 internal_static_onnx_TrainingInfoProto_descriptor,
47261 new java.lang.String[] { "Initialization", "Algorithm", "InitializationBinding", "UpdateBinding", });
47262 internal_static_onnx_ModelProto_descriptor =
47263 getDescriptor().getMessageTypes().get(4);
47264 internal_static_onnx_ModelProto_fieldAccessorTable = new
47265 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47266 internal_static_onnx_ModelProto_descriptor,
47267 new java.lang.String[] { "IrVersion", "OpsetImport", "ProducerName", "ProducerVersion", "Domain", "ModelVersion", "DocString", "Graph", "MetadataProps", "TrainingInfo", "Functions", });
47268 internal_static_onnx_StringStringEntryProto_descriptor =
47269 getDescriptor().getMessageTypes().get(5);
47270 internal_static_onnx_StringStringEntryProto_fieldAccessorTable = new
47271 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47272 internal_static_onnx_StringStringEntryProto_descriptor,
47273 new java.lang.String[] { "Key", "Value", });
47274 internal_static_onnx_TensorAnnotation_descriptor =
47275 getDescriptor().getMessageTypes().get(6);
47276 internal_static_onnx_TensorAnnotation_fieldAccessorTable = new
47277 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47278 internal_static_onnx_TensorAnnotation_descriptor,
47279 new java.lang.String[] { "TensorName", "QuantParameterTensorNames", });
47280 internal_static_onnx_GraphProto_descriptor =
47281 getDescriptor().getMessageTypes().get(7);
47282 internal_static_onnx_GraphProto_fieldAccessorTable = new
47283 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47284 internal_static_onnx_GraphProto_descriptor,
47285 new java.lang.String[] { "Node", "Name", "Initializer", "SparseInitializer", "DocString", "Input", "Output", "ValueInfo", "QuantizationAnnotation", "MetadataProps", });
47286 internal_static_onnx_TensorProto_descriptor =
47287 getDescriptor().getMessageTypes().get(8);
47288 internal_static_onnx_TensorProto_fieldAccessorTable = new
47289 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47290 internal_static_onnx_TensorProto_descriptor,
47291 new java.lang.String[] { "Dims", "DataType", "Segment", "FloatData", "Int32Data", "StringData", "Int64Data", "Name", "DocString", "RawData", "ExternalData", "DataLocation", "DoubleData", "Uint64Data", "MetadataProps", });
47292 internal_static_onnx_TensorProto_Segment_descriptor =
47293 internal_static_onnx_TensorProto_descriptor.getNestedTypes().get(0);
47294 internal_static_onnx_TensorProto_Segment_fieldAccessorTable = new
47295 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47296 internal_static_onnx_TensorProto_Segment_descriptor,
47297 new java.lang.String[] { "Begin", "End", });
47298 internal_static_onnx_SparseTensorProto_descriptor =
47299 getDescriptor().getMessageTypes().get(9);
47300 internal_static_onnx_SparseTensorProto_fieldAccessorTable = new
47301 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47302 internal_static_onnx_SparseTensorProto_descriptor,
47303 new java.lang.String[] { "Values", "Indices", "Dims", });
47304 internal_static_onnx_TensorShapeProto_descriptor =
47305 getDescriptor().getMessageTypes().get(10);
47306 internal_static_onnx_TensorShapeProto_fieldAccessorTable = new
47307 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47308 internal_static_onnx_TensorShapeProto_descriptor,
47309 new java.lang.String[] { "Dim", });
47310 internal_static_onnx_TensorShapeProto_Dimension_descriptor =
47311 internal_static_onnx_TensorShapeProto_descriptor.getNestedTypes().get(0);
47312 internal_static_onnx_TensorShapeProto_Dimension_fieldAccessorTable = new
47313 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47314 internal_static_onnx_TensorShapeProto_Dimension_descriptor,
47315 new java.lang.String[] { "DimValue", "DimParam", "Denotation", "Value", });
47316 internal_static_onnx_TypeProto_descriptor =
47317 getDescriptor().getMessageTypes().get(11);
47318 internal_static_onnx_TypeProto_fieldAccessorTable = new
47319 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47320 internal_static_onnx_TypeProto_descriptor,
47321 new java.lang.String[] { "TensorType", "SequenceType", "MapType", "OptionalType", "SparseTensorType", "OpaqueType", "Denotation", "Value", });
47322 internal_static_onnx_TypeProto_Tensor_descriptor =
47323 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(0);
47324 internal_static_onnx_TypeProto_Tensor_fieldAccessorTable = new
47325 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47326 internal_static_onnx_TypeProto_Tensor_descriptor,
47327 new java.lang.String[] { "ElemType", "Shape", });
47328 internal_static_onnx_TypeProto_Sequence_descriptor =
47329 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(1);
47330 internal_static_onnx_TypeProto_Sequence_fieldAccessorTable = new
47331 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47332 internal_static_onnx_TypeProto_Sequence_descriptor,
47333 new java.lang.String[] { "ElemType", });
47334 internal_static_onnx_TypeProto_Map_descriptor =
47335 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(2);
47336 internal_static_onnx_TypeProto_Map_fieldAccessorTable = new
47337 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47338 internal_static_onnx_TypeProto_Map_descriptor,
47339 new java.lang.String[] { "KeyType", "ValueType", });
47340 internal_static_onnx_TypeProto_Optional_descriptor =
47341 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(3);
47342 internal_static_onnx_TypeProto_Optional_fieldAccessorTable = new
47343 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47344 internal_static_onnx_TypeProto_Optional_descriptor,
47345 new java.lang.String[] { "ElemType", });
47346 internal_static_onnx_TypeProto_SparseTensor_descriptor =
47347 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(4);
47348 internal_static_onnx_TypeProto_SparseTensor_fieldAccessorTable = new
47349 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47350 internal_static_onnx_TypeProto_SparseTensor_descriptor,
47351 new java.lang.String[] { "ElemType", "Shape", });
47352 internal_static_onnx_TypeProto_Opaque_descriptor =
47353 internal_static_onnx_TypeProto_descriptor.getNestedTypes().get(5);
47354 internal_static_onnx_TypeProto_Opaque_fieldAccessorTable = new
47355 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47356 internal_static_onnx_TypeProto_Opaque_descriptor,
47357 new java.lang.String[] { "Domain", "Name", });
47358 internal_static_onnx_OperatorSetIdProto_descriptor =
47359 getDescriptor().getMessageTypes().get(12);
47360 internal_static_onnx_OperatorSetIdProto_fieldAccessorTable = new
47361 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47362 internal_static_onnx_OperatorSetIdProto_descriptor,
47363 new java.lang.String[] { "Domain", "Version", });
47364 internal_static_onnx_FunctionProto_descriptor =
47365 getDescriptor().getMessageTypes().get(13);
47366 internal_static_onnx_FunctionProto_fieldAccessorTable = new
47367 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
47368 internal_static_onnx_FunctionProto_descriptor,
47369 new java.lang.String[] { "Name", "Input", "Output", "Attribute", "AttributeProto", "Node", "DocString", "OpsetImport", "Domain", "Overload", "ValueInfo", "MetadataProps", });
47370 descriptor.resolveAllFeaturesImmutable();
47371 }
47372
47373 // @@protoc_insertion_point(outer_class_scope)
47374 }