49 | * JPEG encoded stream of the image to be classified. 50 | *51 | *
52 | * optional bytes jpeg_encoded = 1;
53 | */
54 | ByteString getJpegEncoded();
55 | }
56 |
57 | /**
58 | * Protobuf type {@code tensorflow.serving.InceptionRequest}
59 | */
60 | public static final class InceptionRequest extends GeneratedMessage implements
61 | // @@protoc_insertion_point(message_implements:tensorflow.serving.InceptionRequest)
62 | InceptionRequestOrBuilder {
63 | // Use InceptionRequest.newBuilder() to construct.
64 | private InceptionRequest(GeneratedMessage.Builder> builder) {
65 | super(builder);
66 | }
67 |
68 | private InceptionRequest() {
69 | jpegEncoded_ = ByteString.EMPTY;
70 | }
71 |
72 | @Override
73 | public final UnknownFieldSet getUnknownFields() {
74 | return UnknownFieldSet.getDefaultInstance();
75 | }
76 |
77 | private InceptionRequest(CodedInputStream input,
78 | ExtensionRegistryLite extensionRegistry)
79 | throws InvalidProtocolBufferException {
80 | this();
81 | int mutable_bitField0_ = 0;
82 | try {
83 | boolean done = false;
84 | while (!done) {
85 | int tag = input.readTag();
86 | switch (tag) {
87 | case 0:
88 | done = true;
89 | break;
90 | default: {
91 | if (!input.skipField(tag)) {
92 | done = true;
93 | }
94 | break;
95 | }
96 | case 10: {
97 |
98 | jpegEncoded_ = input.readBytes();
99 | break;
100 | }
101 | }
102 | }
103 | } catch (InvalidProtocolBufferException e) {
104 | throw e.setUnfinishedMessage(this);
105 | } catch (IOException e) {
106 | throw new InvalidProtocolBufferException(e).setUnfinishedMessage(this);
107 | } finally {
108 | makeExtensionsImmutable();
109 | }
110 | }
111 |
112 | public static final Descriptor getDescriptor() {
113 | return InceptionInference.internal_static_tensorflow_serving_InceptionRequest_descriptor;
114 | }
115 |
116 | protected FieldAccessorTable internalGetFieldAccessorTable() {
117 | return InceptionInference.internal_static_tensorflow_serving_InceptionRequest_fieldAccessorTable
118 | .ensureFieldAccessorsInitialized(InceptionRequest.class,
119 | Builder.class);
120 | }
121 |
122 | public static final int JPEG_ENCODED_FIELD_NUMBER = 1;
123 | private ByteString jpegEncoded_;
124 |
125 | /**
126 | *
127 | * JPEG encoded stream of the image to be classified. 128 | *129 | *
130 | *
357 | *
368 | *
385 | *
450 | *
459 | *
468 | *
477 | *
486 | *
495 | *
504 | *
616 | *
627 | *
638 | *
649 | *
663 | *
674 | *
685 | *
975 | *
986 | *
997 | *
1008 | *
1019 | *
1036 | *
1053 | *
1067 | *
1081 | *
1108 | *
1119 | *
1130 | *
1141 | *
1155 | *
1169 | *
1183 | * optional bytes jpeg_encoded = 1;
131 | */
132 | public ByteString getJpegEncoded() {
133 | return jpegEncoded_;
134 | }
135 |
136 | private byte memoizedIsInitialized = -1;
137 |
138 | public final boolean isInitialized() {
139 | byte isInitialized = memoizedIsInitialized;
140 | if (isInitialized == 1)
141 | return true;
142 | if (isInitialized == 0)
143 | return false;
144 |
145 | memoizedIsInitialized = 1;
146 | return true;
147 | }
148 |
149 | public void writeTo(CodedOutputStream output) throws IOException {
150 | if (!jpegEncoded_.isEmpty()) {
151 | output.writeBytes(1, jpegEncoded_);
152 | }
153 | }
154 |
155 | public int getSerializedSize() {
156 | int size = memoizedSize;
157 | if (size != -1)
158 | return size;
159 |
160 | size = 0;
161 | if (!jpegEncoded_.isEmpty()) {
162 | size += CodedOutputStream.computeBytesSize(1, jpegEncoded_);
163 | }
164 | memoizedSize = size;
165 | return size;
166 | }
167 |
168 | private static final long serialVersionUID = 0L;
169 |
170 | public static InceptionRequest parseFrom(ByteString data)
171 | throws InvalidProtocolBufferException {
172 | return PARSER.parseFrom(data);
173 | }
174 |
175 | public static InceptionRequest parseFrom(ByteString data,
176 | ExtensionRegistryLite extensionRegistry)
177 | throws InvalidProtocolBufferException {
178 | return PARSER.parseFrom(data, extensionRegistry);
179 | }
180 |
181 | public static InceptionRequest parseFrom(byte[] data)
182 | throws InvalidProtocolBufferException {
183 | return PARSER.parseFrom(data);
184 | }
185 |
186 | public static InceptionRequest parseFrom(byte[] data,
187 | ExtensionRegistryLite extensionRegistry)
188 | throws InvalidProtocolBufferException {
189 | return PARSER.parseFrom(data, extensionRegistry);
190 | }
191 |
192 | public static InceptionRequest parseFrom(InputStream input)
193 | throws IOException {
194 | return GeneratedMessage.parseWithIOException(PARSER, input);
195 | }
196 |
197 | public static InceptionRequest parseFrom(InputStream input,
198 | ExtensionRegistryLite extensionRegistry) throws IOException {
199 | return GeneratedMessage
200 | .parseWithIOException(PARSER, input, extensionRegistry);
201 | }
202 |
203 | public static InceptionRequest parseDelimitedFrom(InputStream input)
204 | throws IOException {
205 | return GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
206 | }
207 |
208 | public static InceptionRequest parseDelimitedFrom(InputStream input,
209 | ExtensionRegistryLite extensionRegistry) throws IOException {
210 | return GeneratedMessage
211 | .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
212 | }
213 |
214 | public static InceptionRequest parseFrom(CodedInputStream input)
215 | throws IOException {
216 | return GeneratedMessage.parseWithIOException(PARSER, input);
217 | }
218 |
219 | public static InceptionRequest parseFrom(CodedInputStream input,
220 | ExtensionRegistryLite extensionRegistry) throws IOException {
221 | return GeneratedMessage
222 | .parseWithIOException(PARSER, input, extensionRegistry);
223 | }
224 |
225 | public Builder newBuilderForType() {
226 | return newBuilder();
227 | }
228 |
229 | public static Builder newBuilder() {
230 | return DEFAULT_INSTANCE.toBuilder();
231 | }
232 |
233 | public static Builder newBuilder(InceptionRequest prototype) {
234 | return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
235 | }
236 |
237 | public Builder toBuilder() {
238 | return this == DEFAULT_INSTANCE ?
239 | new Builder() :
240 | new Builder().mergeFrom(this);
241 | }
242 |
243 | @Override
244 | protected Builder newBuilderForType(BuilderParent parent) {
245 | Builder builder = new Builder(parent);
246 | return builder;
247 | }
248 |
249 | /**
250 | * Protobuf type {@code tensorflow.serving.InceptionRequest}
251 | */
252 | public static final class Builder extends GeneratedMessage.Builder
354 | * JPEG encoded stream of the image to be classified.
355 | *
356 | * optional bytes jpeg_encoded = 1;
358 | */
359 | public ByteString getJpegEncoded() {
360 | return jpegEncoded_;
361 | }
362 |
363 | /**
364 | *
365 | * JPEG encoded stream of the image to be classified.
366 | *
367 | * optional bytes jpeg_encoded = 1;
369 | */
370 | public Builder setJpegEncoded(ByteString value) {
371 | if (value == null) {
372 | throw new NullPointerException();
373 | }
374 |
375 | jpegEncoded_ = value;
376 | onChanged();
377 | return this;
378 | }
379 |
380 | /**
381 | *
382 | * JPEG encoded stream of the image to be classified.
383 | *
384 | * optional bytes jpeg_encoded = 1;
386 | */
387 | public Builder clearJpegEncoded() {
388 |
389 | jpegEncoded_ = getDefaultInstance().getJpegEncoded();
390 | onChanged();
391 | return this;
392 | }
393 |
394 | public final Builder setUnknownFields(
395 | final UnknownFieldSet unknownFields) {
396 | return this;
397 | }
398 |
399 | public final Builder mergeUnknownFields(
400 | final UnknownFieldSet unknownFields) {
401 | return this;
402 | }
403 |
404 | // @@protoc_insertion_point(builder_scope:tensorflow.serving.InceptionRequest)
405 | }
406 |
407 | // @@protoc_insertion_point(class_scope:tensorflow.serving.InceptionRequest)
408 | private static final InceptionRequest DEFAULT_INSTANCE;
409 |
410 | static {
411 | DEFAULT_INSTANCE = new InceptionRequest();
412 | }
413 |
414 | public static InceptionRequest getDefaultInstance() {
415 | return DEFAULT_INSTANCE;
416 | }
417 |
418 | private static final Parser
447 | * Human readable descriptions of the classes, in scores descending order.
448 | *
449 | * repeated string classes = 3;
451 | */
452 | ProtocolStringList getClassesList();
453 |
454 | /**
455 | *
456 | * Human readable descriptions of the classes, in scores descending order.
457 | *
458 | * repeated string classes = 3;
460 | */
461 | int getClassesCount();
462 |
463 | /**
464 | *
465 | * Human readable descriptions of the classes, in scores descending order.
466 | *
467 | * repeated string classes = 3;
469 | */
470 | String getClasses(int index);
471 |
472 | /**
473 | *
474 | * Human readable descriptions of the classes, in scores descending order.
475 | *
476 | * repeated string classes = 3;
478 | */
479 | ByteString getClassesBytes(int index);
480 |
481 | /**
482 | *
483 | * Scores of top matches, in same order as classes.
484 | *
485 | * repeated float scores = 2;
487 | */
488 | List
492 | * Scores of top matches, in same order as classes.
493 | *
494 | * repeated float scores = 2;
496 | */
497 | int getScoresCount();
498 |
499 | /**
500 | *
501 | * Scores of top matches, in same order as classes.
502 | *
503 | * repeated float scores = 2;
505 | */
506 | float getScores(int index);
507 | }
508 |
509 | /**
510 | * Protobuf type {@code tensorflow.serving.InceptionResponse}
511 | */
512 | public static final class InceptionResponse extends GeneratedMessage
513 | implements
514 | // @@protoc_insertion_point(message_implements:tensorflow.serving.InceptionResponse)
515 | InceptionResponseOrBuilder {
516 | // Use InceptionResponse.newBuilder() to construct.
517 | private InceptionResponse(GeneratedMessage.Builder> builder) {
518 | super(builder);
519 | }
520 |
521 | private InceptionResponse() {
522 | classes_ = LazyStringArrayList.EMPTY;
523 | scores_ = Collections.emptyList();
524 | }
525 |
526 | @Override
527 | public final UnknownFieldSet getUnknownFields() {
528 | return UnknownFieldSet.getDefaultInstance();
529 | }
530 |
531 | private InceptionResponse(CodedInputStream input,
532 | ExtensionRegistryLite extensionRegistry)
533 | throws InvalidProtocolBufferException {
534 | this();
535 | int mutable_bitField0_ = 0;
536 | try {
537 | boolean done = false;
538 | while (!done) {
539 | int tag = input.readTag();
540 | switch (tag) {
541 | case 0:
542 | done = true;
543 | break;
544 | default: {
545 | if (!input.skipField(tag)) {
546 | done = true;
547 | }
548 | break;
549 | }
550 | case 21: {
551 | if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
552 | scores_ = new ArrayList
613 | * Human readable descriptions of the classes, in scores descending order.
614 | *
615 | * repeated string classes = 3;
617 | */
618 | public ProtocolStringList getClassesList() {
619 | return classes_;
620 | }
621 |
622 | /**
623 | *
624 | * Human readable descriptions of the classes, in scores descending order.
625 | *
626 | * repeated string classes = 3;
628 | */
629 | public int getClassesCount() {
630 | return classes_.size();
631 | }
632 |
633 | /**
634 | *
635 | * Human readable descriptions of the classes, in scores descending order.
636 | *
637 | * repeated string classes = 3;
639 | */
640 | public String getClasses(int index) {
641 | return classes_.get(index);
642 | }
643 |
644 | /**
645 | *
646 | * Human readable descriptions of the classes, in scores descending order.
647 | *
648 | * repeated string classes = 3;
650 | */
651 | public ByteString getClassesBytes(int index) {
652 | return classes_.getByteString(index);
653 | }
654 |
655 | public static final int SCORES_FIELD_NUMBER = 2;
656 | private List
660 | * Scores of top matches, in same order as classes.
661 | *
662 | * repeated float scores = 2;
664 | */
665 | public List
671 | * Scores of top matches, in same order as classes.
672 | *
673 | * repeated float scores = 2;
675 | */
676 | public int getScoresCount() {
677 | return scores_.size();
678 | }
679 |
680 | /**
681 | *
682 | * Scores of top matches, in same order as classes.
683 | *
684 | * repeated float scores = 2;
686 | */
687 | public float getScores(int index) {
688 | return scores_.get(index);
689 | }
690 |
691 | private int scoresMemoizedSerializedSize = -1;
692 |
693 | private byte memoizedIsInitialized = -1;
694 |
695 | public final boolean isInitialized() {
696 | byte isInitialized = memoizedIsInitialized;
697 | if (isInitialized == 1)
698 | return true;
699 | if (isInitialized == 0)
700 | return false;
701 |
702 | memoizedIsInitialized = 1;
703 | return true;
704 | }
705 |
706 | public void writeTo(CodedOutputStream output) throws IOException {
707 | getSerializedSize();
708 | if (getScoresList().size() > 0) {
709 | output.writeRawVarint32(18);
710 | output.writeRawVarint32(scoresMemoizedSerializedSize);
711 | }
712 | for (int i = 0; i < scores_.size(); i++) {
713 | output.writeFloatNoTag(scores_.get(i));
714 | }
715 | for (int i = 0; i < classes_.size(); i++) {
716 | GeneratedMessage.writeString(output, 3, classes_.getRaw(i));
717 | }
718 | }
719 |
720 | public int getSerializedSize() {
721 | int size = memoizedSize;
722 | if (size != -1)
723 | return size;
724 |
725 | size = 0;
726 | {
727 | int dataSize = 0;
728 | dataSize = 4 * getScoresList().size();
729 | size += dataSize;
730 | if (!getScoresList().isEmpty()) {
731 | size += 1;
732 | size += CodedOutputStream.computeInt32SizeNoTag(dataSize);
733 | }
734 | scoresMemoizedSerializedSize = dataSize;
735 | }
736 | {
737 | int dataSize = 0;
738 | for (int i = 0; i < classes_.size(); i++) {
739 | dataSize += computeStringSizeNoTag(classes_.getRaw(i));
740 | }
741 | size += dataSize;
742 | size += 1 * getClassesList().size();
743 | }
744 | memoizedSize = size;
745 | return size;
746 | }
747 |
748 | private static final long serialVersionUID = 0L;
749 |
750 | public static InceptionResponse parseFrom(ByteString data)
751 | throws InvalidProtocolBufferException {
752 | return PARSER.parseFrom(data);
753 | }
754 |
755 | public static InceptionResponse parseFrom(ByteString data,
756 | ExtensionRegistryLite extensionRegistry)
757 | throws InvalidProtocolBufferException {
758 | return PARSER.parseFrom(data, extensionRegistry);
759 | }
760 |
761 | public static InceptionResponse parseFrom(byte[] data)
762 | throws InvalidProtocolBufferException {
763 | return PARSER.parseFrom(data);
764 | }
765 |
766 | public static InceptionResponse parseFrom(byte[] data,
767 | ExtensionRegistryLite extensionRegistry)
768 | throws InvalidProtocolBufferException {
769 | return PARSER.parseFrom(data, extensionRegistry);
770 | }
771 |
772 | public static InceptionResponse parseFrom(InputStream input)
773 | throws IOException {
774 | return GeneratedMessage.parseWithIOException(PARSER, input);
775 | }
776 |
777 | public static InceptionResponse parseFrom(InputStream input,
778 | ExtensionRegistryLite extensionRegistry) throws IOException {
779 | return GeneratedMessage
780 | .parseWithIOException(PARSER, input, extensionRegistry);
781 | }
782 |
783 | public static InceptionResponse parseDelimitedFrom(InputStream input)
784 | throws IOException {
785 | return GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
786 | }
787 |
788 | public static InceptionResponse parseDelimitedFrom(InputStream input,
789 | ExtensionRegistryLite extensionRegistry) throws IOException {
790 | return GeneratedMessage
791 | .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
792 | }
793 |
794 | public static InceptionResponse parseFrom(CodedInputStream input)
795 | throws IOException {
796 | return GeneratedMessage.parseWithIOException(PARSER, input);
797 | }
798 |
799 | public static InceptionResponse parseFrom(CodedInputStream input,
800 | ExtensionRegistryLite extensionRegistry) throws IOException {
801 | return GeneratedMessage
802 | .parseWithIOException(PARSER, input, extensionRegistry);
803 | }
804 |
805 | public Builder newBuilderForType() {
806 | return newBuilder();
807 | }
808 |
809 | public static Builder newBuilder() {
810 | return DEFAULT_INSTANCE.toBuilder();
811 | }
812 |
813 | public static Builder newBuilder(InceptionResponse prototype) {
814 | return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
815 | }
816 |
817 | public Builder toBuilder() {
818 | return this == DEFAULT_INSTANCE ?
819 | new Builder() :
820 | new Builder().mergeFrom(this);
821 | }
822 |
823 | @Override
824 | protected Builder newBuilderForType(BuilderParent parent) {
825 | Builder builder = new Builder(parent);
826 | return builder;
827 | }
828 |
829 | /**
830 | * Protobuf type {@code tensorflow.serving.InceptionResponse}
831 | */
832 | public static final class Builder extends GeneratedMessage.Builder
972 | * Human readable descriptions of the classes, in scores descending order.
973 | *
974 | * repeated string classes = 3;
976 | */
977 | public ProtocolStringList getClassesList() {
978 | return classes_.getUnmodifiableView();
979 | }
980 |
981 | /**
982 | *
983 | * Human readable descriptions of the classes, in scores descending order.
984 | *
985 | * repeated string classes = 3;
987 | */
988 | public int getClassesCount() {
989 | return classes_.size();
990 | }
991 |
992 | /**
993 | *
994 | * Human readable descriptions of the classes, in scores descending order.
995 | *
996 | * repeated string classes = 3;
998 | */
999 | public String getClasses(int index) {
1000 | return classes_.get(index);
1001 | }
1002 |
1003 | /**
1004 | *
1005 | * Human readable descriptions of the classes, in scores descending order.
1006 | *
1007 | * repeated string classes = 3;
1009 | */
1010 | public ByteString getClassesBytes(int index) {
1011 | return classes_.getByteString(index);
1012 | }
1013 |
1014 | /**
1015 | *
1016 | * Human readable descriptions of the classes, in scores descending order.
1017 | *
1018 | * repeated string classes = 3;
1020 | */
1021 | public Builder setClasses(int index, String value) {
1022 | if (value == null) {
1023 | throw new NullPointerException();
1024 | }
1025 | ensureClassesIsMutable();
1026 | classes_.set(index, value);
1027 | onChanged();
1028 | return this;
1029 | }
1030 |
1031 | /**
1032 | *
1033 | * Human readable descriptions of the classes, in scores descending order.
1034 | *
1035 | * repeated string classes = 3;
1037 | */
1038 | public Builder addClasses(String value) {
1039 | if (value == null) {
1040 | throw new NullPointerException();
1041 | }
1042 | ensureClassesIsMutable();
1043 | classes_.add(value);
1044 | onChanged();
1045 | return this;
1046 | }
1047 |
1048 | /**
1049 | *
1050 | * Human readable descriptions of the classes, in scores descending order.
1051 | *
1052 | * repeated string classes = 3;
1054 | */
1055 | public Builder addAllClasses(Iterable
1064 | * Human readable descriptions of the classes, in scores descending order.
1065 | *
1066 | * repeated string classes = 3;
1068 | */
1069 | public Builder clearClasses() {
1070 | classes_ = LazyStringArrayList.EMPTY;
1071 | bitField0_ = (bitField0_ & ~0x00000001);
1072 | onChanged();
1073 | return this;
1074 | }
1075 |
1076 | /**
1077 | *
1078 | * Human readable descriptions of the classes, in scores descending order.
1079 | *
1080 | * repeated string classes = 3;
1082 | */
1083 | public Builder addClassesBytes(ByteString value) {
1084 | if (value == null) {
1085 | throw new NullPointerException();
1086 | }
1087 | checkByteStringIsUtf8(value);
1088 | ensureClassesIsMutable();
1089 | classes_.add(value);
1090 | onChanged();
1091 | return this;
1092 | }
1093 |
1094 | private List
1105 | * Scores of top matches, in same order as classes.
1106 | *
1107 | * repeated float scores = 2;
1109 | */
1110 | public List
1116 | * Scores of top matches, in same order as classes.
1117 | *
1118 | * repeated float scores = 2;
1120 | */
1121 | public int getScoresCount() {
1122 | return scores_.size();
1123 | }
1124 |
1125 | /**
1126 | *
1127 | * Scores of top matches, in same order as classes.
1128 | *
1129 | * repeated float scores = 2;
1131 | */
1132 | public float getScores(int index) {
1133 | return scores_.get(index);
1134 | }
1135 |
1136 | /**
1137 | *
1138 | * Scores of top matches, in same order as classes.
1139 | *
1140 | * repeated float scores = 2;
1142 | */
1143 | public Builder setScores(int index, float value) {
1144 | ensureScoresIsMutable();
1145 | scores_.set(index, value);
1146 | onChanged();
1147 | return this;
1148 | }
1149 |
1150 | /**
1151 | *
1152 | * Scores of top matches, in same order as classes.
1153 | *
1154 | * repeated float scores = 2;
1156 | */
1157 | public Builder addScores(float value) {
1158 | ensureScoresIsMutable();
1159 | scores_.add(value);
1160 | onChanged();
1161 | return this;
1162 | }
1163 |
1164 | /**
1165 | *
1166 | * Scores of top matches, in same order as classes.
1167 | *
1168 | * repeated float scores = 2;
1170 | */
1171 | public Builder addAllScores(Iterable extends Float> values) {
1172 | ensureScoresIsMutable();
1173 | AbstractMessageLite.Builder.addAll(values, scores_);
1174 | onChanged();
1175 | return this;
1176 | }
1177 |
1178 | /**
1179 | *
1180 | * Scores of top matches, in same order as classes.
1181 | *
1182 | * repeated float scores = 2;
1184 | */
1185 | public Builder clearScores() {
1186 | scores_ = Collections.emptyList();
1187 | bitField0_ = (bitField0_ & ~0x00000002);
1188 | onChanged();
1189 | return this;
1190 | }
1191 |
1192 | public final Builder setUnknownFields(
1193 | final UnknownFieldSet unknownFields) {
1194 | return this;
1195 | }
1196 |
1197 | public final Builder mergeUnknownFields(
1198 | final UnknownFieldSet unknownFields) {
1199 | return this;
1200 | }
1201 |
1202 | // @@protoc_insertion_point(builder_scope:tensorflow.serving.InceptionResponse)
1203 | }
1204 |
1205 | // @@protoc_insertion_point(class_scope:tensorflow.serving.InceptionResponse)
1206 | private static final InceptionResponse DEFAULT_INSTANCE;
1207 |
1208 | static {
1209 | DEFAULT_INSTANCE = new InceptionResponse();
1210 | }
1211 |
1212 | public static InceptionResponse getDefaultInstance() {
1213 | return DEFAULT_INSTANCE;
1214 | }
1215 |
1216 | private static final Parser