|
@@ -0,0 +1,1175 @@
|
|
|
+// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
+// source: inference.proto
|
|
|
+
|
|
|
+package inference;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Protobuf type {@code org.pytorch.serve.grpc.inference.PredictionsRequest}
|
|
|
+ */
|
|
|
+public final class PredictionsRequest extends
|
|
|
+ com.google.protobuf.GeneratedMessageV3 implements
|
|
|
+ // @@protoc_insertion_point(message_implements:org.pytorch.serve.grpc.inference.PredictionsRequest)
|
|
|
+ PredictionsRequestOrBuilder {
|
|
|
+private static final long serialVersionUID = 0L;
|
|
|
+ // Use PredictionsRequest.newBuilder() to construct.
|
|
|
+ private PredictionsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
|
|
+ super(builder);
|
|
|
+ }
|
|
|
+ private PredictionsRequest() {
|
|
|
+ modelName_ = "";
|
|
|
+ modelVersion_ = "";
|
|
|
+ sequenceId_ = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public final com.google.protobuf.UnknownFieldSet
|
|
|
+ getUnknownFields() {
|
|
|
+ return this.unknownFields;
|
|
|
+ }
|
|
|
+ private PredictionsRequest(
|
|
|
+ com.google.protobuf.CodedInputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ this();
|
|
|
+ if (extensionRegistry == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+ int mutable_bitField0_ = 0;
|
|
|
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
|
|
+ com.google.protobuf.UnknownFieldSet.newBuilder();
|
|
|
+ try {
|
|
|
+ boolean done = false;
|
|
|
+ while (!done) {
|
|
|
+ int tag = input.readTag();
|
|
|
+ switch (tag) {
|
|
|
+ case 0:
|
|
|
+ done = true;
|
|
|
+ break;
|
|
|
+ default: {
|
|
|
+ if (!parseUnknownFieldProto3(
|
|
|
+ input, unknownFields, extensionRegistry, tag)) {
|
|
|
+ done = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 10: {
|
|
|
+ String s = input.readStringRequireUtf8();
|
|
|
+
|
|
|
+ modelName_ = s;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 18: {
|
|
|
+ String s = input.readStringRequireUtf8();
|
|
|
+
|
|
|
+ modelVersion_ = s;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 26: {
|
|
|
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
+ input_ = com.google.protobuf.MapField.newMapField(
|
|
|
+ InputDefaultEntryHolder.defaultEntry);
|
|
|
+ mutable_bitField0_ |= 0x00000004;
|
|
|
+ }
|
|
|
+ com.google.protobuf.MapEntry<String, com.google.protobuf.ByteString>
|
|
|
+ input__ = input.readMessage(
|
|
|
+ InputDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
|
|
|
+ input_.getMutableMap().put(
|
|
|
+ input__.getKey(), input__.getValue());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 34: {
|
|
|
+ String s = input.readStringRequireUtf8();
|
|
|
+
|
|
|
+ sequenceId_ = s;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
|
|
+ throw e.setUnfinishedMessage(this);
|
|
|
+ } catch (java.io.IOException e) {
|
|
|
+ throw new com.google.protobuf.InvalidProtocolBufferException(
|
|
|
+ e).setUnfinishedMessage(this);
|
|
|
+ } finally {
|
|
|
+ this.unknownFields = unknownFields.build();
|
|
|
+ makeExtensionsImmutable();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
+ getDescriptor() {
|
|
|
+ return Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_descriptor;
|
|
|
+ }
|
|
|
+
|
|
|
+ @SuppressWarnings({"rawtypes"})
|
|
|
+ protected com.google.protobuf.MapField internalGetMapField(
|
|
|
+ int number) {
|
|
|
+ switch (number) {
|
|
|
+ case 3:
|
|
|
+ return internalGetInput();
|
|
|
+ default:
|
|
|
+ throw new RuntimeException(
|
|
|
+ "Invalid map field number: " + number);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ protected FieldAccessorTable
|
|
|
+ internalGetFieldAccessorTable() {
|
|
|
+ return Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_fieldAccessorTable
|
|
|
+ .ensureFieldAccessorsInitialized(
|
|
|
+ PredictionsRequest.class, Builder.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ private int bitField0_;
|
|
|
+ public static final int MODEL_NAME_FIELD_NUMBER = 1;
|
|
|
+ private volatile Object modelName_;
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public String getModelName() {
|
|
|
+ Object ref = modelName_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ return (String) ref;
|
|
|
+ } else {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ modelName_ = s;
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getModelNameBytes() {
|
|
|
+ Object ref = modelName_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ modelName_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final int MODEL_VERSION_FIELD_NUMBER = 2;
|
|
|
+ private volatile Object modelVersion_;
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public String getModelVersion() {
|
|
|
+ Object ref = modelVersion_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ return (String) ref;
|
|
|
+ } else {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ modelVersion_ = s;
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getModelVersionBytes() {
|
|
|
+ Object ref = modelVersion_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ modelVersion_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final int INPUT_FIELD_NUMBER = 3;
|
|
|
+ private static final class InputDefaultEntryHolder {
|
|
|
+ static final com.google.protobuf.MapEntry<
|
|
|
+ String, com.google.protobuf.ByteString> defaultEntry =
|
|
|
+ com.google.protobuf.MapEntry
|
|
|
+ .<String, com.google.protobuf.ByteString>newDefaultInstance(
|
|
|
+ Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_InputEntry_descriptor,
|
|
|
+ com.google.protobuf.WireFormat.FieldType.STRING,
|
|
|
+ "",
|
|
|
+ com.google.protobuf.WireFormat.FieldType.BYTES,
|
|
|
+ com.google.protobuf.ByteString.EMPTY);
|
|
|
+ }
|
|
|
+ private com.google.protobuf.MapField<
|
|
|
+ String, com.google.protobuf.ByteString> input_;
|
|
|
+ private com.google.protobuf.MapField<String, com.google.protobuf.ByteString>
|
|
|
+ internalGetInput() {
|
|
|
+ if (input_ == null) {
|
|
|
+ return com.google.protobuf.MapField.emptyMapField(
|
|
|
+ InputDefaultEntryHolder.defaultEntry);
|
|
|
+ }
|
|
|
+ return input_;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getInputCount() {
|
|
|
+ return internalGetInput().getMap().size();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public boolean containsInput(
|
|
|
+ String key) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ return internalGetInput().getMap().containsKey(key);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Use {@link #getInputMap()} instead.
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
+ public java.util.Map<String, com.google.protobuf.ByteString> getInput() {
|
|
|
+ return getInputMap();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public java.util.Map<String, com.google.protobuf.ByteString> getInputMap() {
|
|
|
+ return internalGetInput().getMap();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public com.google.protobuf.ByteString getInputOrDefault(
|
|
|
+ String key,
|
|
|
+ com.google.protobuf.ByteString defaultValue) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ java.util.Map<String, com.google.protobuf.ByteString> map =
|
|
|
+ internalGetInput().getMap();
|
|
|
+ return map.containsKey(key) ? map.get(key) : defaultValue;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public com.google.protobuf.ByteString getInputOrThrow(
|
|
|
+ String key) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ java.util.Map<String, com.google.protobuf.ByteString> map =
|
|
|
+ internalGetInput().getMap();
|
|
|
+ if (!map.containsKey(key)) {
|
|
|
+ throw new IllegalArgumentException();
|
|
|
+ }
|
|
|
+ return map.get(key);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final int SEQUENCE_ID_FIELD_NUMBER = 4;
|
|
|
+ private volatile Object sequenceId_;
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public String getSequenceId() {
|
|
|
+ Object ref = sequenceId_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ return (String) ref;
|
|
|
+ } else {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ sequenceId_ = s;
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getSequenceIdBytes() {
|
|
|
+ Object ref = sequenceId_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ sequenceId_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private byte memoizedIsInitialized = -1;
|
|
|
+ public final boolean isInitialized() {
|
|
|
+ byte isInitialized = memoizedIsInitialized;
|
|
|
+ if (isInitialized == 1) return true;
|
|
|
+ if (isInitialized == 0) return false;
|
|
|
+
|
|
|
+ memoizedIsInitialized = 1;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
|
|
|
+ throws java.io.IOException {
|
|
|
+ if (!getModelNameBytes().isEmpty()) {
|
|
|
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, modelName_);
|
|
|
+ }
|
|
|
+ if (!getModelVersionBytes().isEmpty()) {
|
|
|
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, modelVersion_);
|
|
|
+ }
|
|
|
+ com.google.protobuf.GeneratedMessageV3
|
|
|
+ .serializeStringMapTo(
|
|
|
+ output,
|
|
|
+ internalGetInput(),
|
|
|
+ InputDefaultEntryHolder.defaultEntry,
|
|
|
+ 3);
|
|
|
+ if (!getSequenceIdBytes().isEmpty()) {
|
|
|
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sequenceId_);
|
|
|
+ }
|
|
|
+ unknownFields.writeTo(output);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getSerializedSize() {
|
|
|
+ int size = memoizedSize;
|
|
|
+ if (size != -1) return size;
|
|
|
+
|
|
|
+ size = 0;
|
|
|
+ if (!getModelNameBytes().isEmpty()) {
|
|
|
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, modelName_);
|
|
|
+ }
|
|
|
+ if (!getModelVersionBytes().isEmpty()) {
|
|
|
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, modelVersion_);
|
|
|
+ }
|
|
|
+ for (java.util.Map.Entry<String, com.google.protobuf.ByteString> entry
|
|
|
+ : internalGetInput().getMap().entrySet()) {
|
|
|
+ com.google.protobuf.MapEntry<String, com.google.protobuf.ByteString>
|
|
|
+ input__ = InputDefaultEntryHolder.defaultEntry.newBuilderForType()
|
|
|
+ .setKey(entry.getKey())
|
|
|
+ .setValue(entry.getValue())
|
|
|
+ .build();
|
|
|
+ size += com.google.protobuf.CodedOutputStream
|
|
|
+ .computeMessageSize(3, input__);
|
|
|
+ }
|
|
|
+ if (!getSequenceIdBytes().isEmpty()) {
|
|
|
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sequenceId_);
|
|
|
+ }
|
|
|
+ size += unknownFields.getSerializedSize();
|
|
|
+ memoizedSize = size;
|
|
|
+ return size;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(final Object obj) {
|
|
|
+ if (obj == this) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (!(obj instanceof PredictionsRequest)) {
|
|
|
+ return super.equals(obj);
|
|
|
+ }
|
|
|
+ PredictionsRequest other = (PredictionsRequest) obj;
|
|
|
+
|
|
|
+ boolean result = true;
|
|
|
+ result = result && getModelName()
|
|
|
+ .equals(other.getModelName());
|
|
|
+ result = result && getModelVersion()
|
|
|
+ .equals(other.getModelVersion());
|
|
|
+ result = result && internalGetInput().equals(
|
|
|
+ other.internalGetInput());
|
|
|
+ result = result && getSequenceId()
|
|
|
+ .equals(other.getSequenceId());
|
|
|
+ result = result && unknownFields.equals(other.unknownFields);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ if (memoizedHashCode != 0) {
|
|
|
+ return memoizedHashCode;
|
|
|
+ }
|
|
|
+ int hash = 41;
|
|
|
+ hash = (19 * hash) + getDescriptor().hashCode();
|
|
|
+ hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER;
|
|
|
+ hash = (53 * hash) + getModelName().hashCode();
|
|
|
+ hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER;
|
|
|
+ hash = (53 * hash) + getModelVersion().hashCode();
|
|
|
+ if (!internalGetInput().getMap().isEmpty()) {
|
|
|
+ hash = (37 * hash) + INPUT_FIELD_NUMBER;
|
|
|
+ hash = (53 * hash) + internalGetInput().hashCode();
|
|
|
+ }
|
|
|
+ hash = (37 * hash) + SEQUENCE_ID_FIELD_NUMBER;
|
|
|
+ hash = (53 * hash) + getSequenceId().hashCode();
|
|
|
+ hash = (29 * hash) + unknownFields.hashCode();
|
|
|
+ memoizedHashCode = hash;
|
|
|
+ return hash;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ java.nio.ByteBuffer data)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ java.nio.ByteBuffer data,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data, extensionRegistry);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ com.google.protobuf.ByteString data)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ com.google.protobuf.ByteString data,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data, extensionRegistry);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(byte[] data)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ byte[] data,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return PARSER.parseFrom(data, extensionRegistry);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(java.io.InputStream input)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseWithIOException(PARSER, input);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ java.io.InputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseWithIOException(PARSER, input, extensionRegistry);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseDelimitedFrom(java.io.InputStream input)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseDelimitedWithIOException(PARSER, input);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseDelimitedFrom(
|
|
|
+ java.io.InputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ com.google.protobuf.CodedInputStream input)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseWithIOException(PARSER, input);
|
|
|
+ }
|
|
|
+ public static PredictionsRequest parseFrom(
|
|
|
+ com.google.protobuf.CodedInputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws java.io.IOException {
|
|
|
+ return com.google.protobuf.GeneratedMessageV3
|
|
|
+ .parseWithIOException(PARSER, input, extensionRegistry);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder newBuilderForType() { return newBuilder(); }
|
|
|
+ public static Builder newBuilder() {
|
|
|
+ return DEFAULT_INSTANCE.toBuilder();
|
|
|
+ }
|
|
|
+ public static Builder newBuilder(PredictionsRequest prototype) {
|
|
|
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
|
|
+ }
|
|
|
+ public Builder toBuilder() {
|
|
|
+ return this == DEFAULT_INSTANCE
|
|
|
+ ? new Builder() : new Builder().mergeFrom(this);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected Builder newBuilderForType(
|
|
|
+ BuilderParent parent) {
|
|
|
+ Builder builder = new Builder(parent);
|
|
|
+ return builder;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Protobuf type {@code org.pytorch.serve.grpc.inference.PredictionsRequest}
|
|
|
+ */
|
|
|
+ public static final class Builder extends
|
|
|
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
|
|
+ // @@protoc_insertion_point(builder_implements:org.pytorch.serve.grpc.inference.PredictionsRequest)
|
|
|
+ PredictionsRequestOrBuilder {
|
|
|
+ public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
+ getDescriptor() {
|
|
|
+ return Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_descriptor;
|
|
|
+ }
|
|
|
+
|
|
|
+ @SuppressWarnings({"rawtypes"})
|
|
|
+ protected com.google.protobuf.MapField internalGetMapField(
|
|
|
+ int number) {
|
|
|
+ switch (number) {
|
|
|
+ case 3:
|
|
|
+ return internalGetInput();
|
|
|
+ default:
|
|
|
+ throw new RuntimeException(
|
|
|
+ "Invalid map field number: " + number);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @SuppressWarnings({"rawtypes"})
|
|
|
+ protected com.google.protobuf.MapField internalGetMutableMapField(
|
|
|
+ int number) {
|
|
|
+ switch (number) {
|
|
|
+ case 3:
|
|
|
+ return internalGetMutableInput();
|
|
|
+ default:
|
|
|
+ throw new RuntimeException(
|
|
|
+ "Invalid map field number: " + number);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ protected FieldAccessorTable
|
|
|
+ internalGetFieldAccessorTable() {
|
|
|
+ return Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_fieldAccessorTable
|
|
|
+ .ensureFieldAccessorsInitialized(
|
|
|
+ PredictionsRequest.class, Builder.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ // Construct using org.pytorch.serve.grpc.inference.PredictionsRequest.newBuilder()
|
|
|
+ private Builder() {
|
|
|
+ maybeForceBuilderInitialization();
|
|
|
+ }
|
|
|
+
|
|
|
+ private Builder(
|
|
|
+ BuilderParent parent) {
|
|
|
+ super(parent);
|
|
|
+ maybeForceBuilderInitialization();
|
|
|
+ }
|
|
|
+ private void maybeForceBuilderInitialization() {
|
|
|
+ if (com.google.protobuf.GeneratedMessageV3
|
|
|
+ .alwaysUseFieldBuilders) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public Builder clear() {
|
|
|
+ super.clear();
|
|
|
+ modelName_ = "";
|
|
|
+
|
|
|
+ modelVersion_ = "";
|
|
|
+
|
|
|
+ internalGetMutableInput().clear();
|
|
|
+ sequenceId_ = "";
|
|
|
+
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public com.google.protobuf.Descriptors.Descriptor
|
|
|
+ getDescriptorForType() {
|
|
|
+ return Inference.internal_static_org_pytorch_serve_grpc_inference_PredictionsRequest_descriptor;
|
|
|
+ }
|
|
|
+
|
|
|
+ public PredictionsRequest getDefaultInstanceForType() {
|
|
|
+ return PredictionsRequest.getDefaultInstance();
|
|
|
+ }
|
|
|
+
|
|
|
+ public PredictionsRequest build() {
|
|
|
+ PredictionsRequest result = buildPartial();
|
|
|
+ if (!result.isInitialized()) {
|
|
|
+ throw newUninitializedMessageException(result);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public PredictionsRequest buildPartial() {
|
|
|
+ PredictionsRequest result = new PredictionsRequest(this);
|
|
|
+ int from_bitField0_ = bitField0_;
|
|
|
+ int to_bitField0_ = 0;
|
|
|
+ result.modelName_ = modelName_;
|
|
|
+ result.modelVersion_ = modelVersion_;
|
|
|
+ result.input_ = internalGetInput();
|
|
|
+ result.input_.makeImmutable();
|
|
|
+ result.sequenceId_ = sequenceId_;
|
|
|
+ result.bitField0_ = to_bitField0_;
|
|
|
+ onBuilt();
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder clone() {
|
|
|
+ return (Builder) super.clone();
|
|
|
+ }
|
|
|
+ public Builder setField(
|
|
|
+ com.google.protobuf.Descriptors.FieldDescriptor field,
|
|
|
+ Object value) {
|
|
|
+ return (Builder) super.setField(field, value);
|
|
|
+ }
|
|
|
+ public Builder clearField(
|
|
|
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
|
|
|
+ return (Builder) super.clearField(field);
|
|
|
+ }
|
|
|
+ public Builder clearOneof(
|
|
|
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
|
|
+ return (Builder) super.clearOneof(oneof);
|
|
|
+ }
|
|
|
+ public Builder setRepeatedField(
|
|
|
+ com.google.protobuf.Descriptors.FieldDescriptor field,
|
|
|
+ int index, Object value) {
|
|
|
+ return (Builder) super.setRepeatedField(field, index, value);
|
|
|
+ }
|
|
|
+ public Builder addRepeatedField(
|
|
|
+ com.google.protobuf.Descriptors.FieldDescriptor field,
|
|
|
+ Object value) {
|
|
|
+ return (Builder) super.addRepeatedField(field, value);
|
|
|
+ }
|
|
|
+ public Builder mergeFrom(com.google.protobuf.Message other) {
|
|
|
+ if (other instanceof PredictionsRequest) {
|
|
|
+ return mergeFrom((PredictionsRequest)other);
|
|
|
+ } else {
|
|
|
+ super.mergeFrom(other);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder mergeFrom(PredictionsRequest other) {
|
|
|
+ if (other == PredictionsRequest.getDefaultInstance()) return this;
|
|
|
+ if (!other.getModelName().isEmpty()) {
|
|
|
+ modelName_ = other.modelName_;
|
|
|
+ onChanged();
|
|
|
+ }
|
|
|
+ if (!other.getModelVersion().isEmpty()) {
|
|
|
+ modelVersion_ = other.modelVersion_;
|
|
|
+ onChanged();
|
|
|
+ }
|
|
|
+ internalGetMutableInput().mergeFrom(
|
|
|
+ other.internalGetInput());
|
|
|
+ if (!other.getSequenceId().isEmpty()) {
|
|
|
+ sequenceId_ = other.sequenceId_;
|
|
|
+ onChanged();
|
|
|
+ }
|
|
|
+ this.mergeUnknownFields(other.unknownFields);
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public final boolean isInitialized() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder mergeFrom(
|
|
|
+ com.google.protobuf.CodedInputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws java.io.IOException {
|
|
|
+ PredictionsRequest parsedMessage = null;
|
|
|
+ try {
|
|
|
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
|
|
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
|
|
+ parsedMessage = (PredictionsRequest) e.getUnfinishedMessage();
|
|
|
+ throw e.unwrapIOException();
|
|
|
+ } finally {
|
|
|
+ if (parsedMessage != null) {
|
|
|
+ mergeFrom(parsedMessage);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ private int bitField0_;
|
|
|
+
|
|
|
+ private Object modelName_ = "";
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public String getModelName() {
|
|
|
+ Object ref = modelName_;
|
|
|
+ if (!(ref instanceof String)) {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ modelName_ = s;
|
|
|
+ return s;
|
|
|
+ } else {
|
|
|
+ return (String) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getModelNameBytes() {
|
|
|
+ Object ref = modelName_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ modelName_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public Builder setModelName(
|
|
|
+ String value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+
|
|
|
+ modelName_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public Builder clearModelName() {
|
|
|
+
|
|
|
+ modelName_ = getDefaultInstance().getModelName();
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Name of model.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_name = 1;</code>
|
|
|
+ */
|
|
|
+ public Builder setModelNameBytes(
|
|
|
+ com.google.protobuf.ByteString value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+ checkByteStringIsUtf8(value);
|
|
|
+
|
|
|
+ modelName_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Object modelVersion_ = "";
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public String getModelVersion() {
|
|
|
+ Object ref = modelVersion_;
|
|
|
+ if (!(ref instanceof String)) {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ modelVersion_ = s;
|
|
|
+ return s;
|
|
|
+ } else {
|
|
|
+ return (String) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getModelVersionBytes() {
|
|
|
+ Object ref = modelVersion_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ modelVersion_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public Builder setModelVersion(
|
|
|
+ String value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+
|
|
|
+ modelVersion_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public Builder clearModelVersion() {
|
|
|
+
|
|
|
+ modelVersion_ = getDefaultInstance().getModelVersion();
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Version of model to run prediction on.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string model_version = 2;</code>
|
|
|
+ */
|
|
|
+ public Builder setModelVersionBytes(
|
|
|
+ com.google.protobuf.ByteString value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+ checkByteStringIsUtf8(value);
|
|
|
+
|
|
|
+ modelVersion_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ private com.google.protobuf.MapField<
|
|
|
+ String, com.google.protobuf.ByteString> input_;
|
|
|
+ private com.google.protobuf.MapField<String, com.google.protobuf.ByteString>
|
|
|
+ internalGetInput() {
|
|
|
+ if (input_ == null) {
|
|
|
+ return com.google.protobuf.MapField.emptyMapField(
|
|
|
+ InputDefaultEntryHolder.defaultEntry);
|
|
|
+ }
|
|
|
+ return input_;
|
|
|
+ }
|
|
|
+ private com.google.protobuf.MapField<String, com.google.protobuf.ByteString>
|
|
|
+ internalGetMutableInput() {
|
|
|
+ onChanged();;
|
|
|
+ if (input_ == null) {
|
|
|
+ input_ = com.google.protobuf.MapField.newMapField(
|
|
|
+ InputDefaultEntryHolder.defaultEntry);
|
|
|
+ }
|
|
|
+ if (!input_.isMutable()) {
|
|
|
+ input_ = input_.copy();
|
|
|
+ }
|
|
|
+ return input_;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getInputCount() {
|
|
|
+ return internalGetInput().getMap().size();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public boolean containsInput(
|
|
|
+ String key) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ return internalGetInput().getMap().containsKey(key);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Use {@link #getInputMap()} instead.
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
+ public java.util.Map<String, com.google.protobuf.ByteString> getInput() {
|
|
|
+ return getInputMap();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public java.util.Map<String, com.google.protobuf.ByteString> getInputMap() {
|
|
|
+ return internalGetInput().getMap();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public com.google.protobuf.ByteString getInputOrDefault(
|
|
|
+ String key,
|
|
|
+ com.google.protobuf.ByteString defaultValue) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ java.util.Map<String, com.google.protobuf.ByteString> map =
|
|
|
+ internalGetInput().getMap();
|
|
|
+ return map.containsKey(key) ? map.get(key) : defaultValue;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public com.google.protobuf.ByteString getInputOrThrow(
|
|
|
+ String key) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ java.util.Map<String, com.google.protobuf.ByteString> map =
|
|
|
+ internalGetInput().getMap();
|
|
|
+ if (!map.containsKey(key)) {
|
|
|
+ throw new IllegalArgumentException();
|
|
|
+ }
|
|
|
+ return map.get(key);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder clearInput() {
|
|
|
+ internalGetMutableInput().getMutableMap()
|
|
|
+ .clear();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public Builder removeInput(
|
|
|
+ String key) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ internalGetMutableInput().getMutableMap()
|
|
|
+ .remove(key);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Use alternate mutation accessors instead.
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
+ public java.util.Map<String, com.google.protobuf.ByteString>
|
|
|
+ getMutableInput() {
|
|
|
+ return internalGetMutableInput().getMutableMap();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+ public Builder putInput(
|
|
|
+ String key,
|
|
|
+ com.google.protobuf.ByteString value) {
|
|
|
+ if (key == null) { throw new NullPointerException(); }
|
|
|
+ if (value == null) { throw new NullPointerException(); }
|
|
|
+ internalGetMutableInput().getMutableMap()
|
|
|
+ .put(key, value);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * Input data for model prediction
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>map<string, bytes> input = 3;</code>
|
|
|
+ */
|
|
|
+
|
|
|
+ public Builder putAllInput(
|
|
|
+ java.util.Map<String, com.google.protobuf.ByteString> values) {
|
|
|
+ internalGetMutableInput().getMutableMap()
|
|
|
+ .putAll(values);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Object sequenceId_ = "";
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public String getSequenceId() {
|
|
|
+ Object ref = sequenceId_;
|
|
|
+ if (!(ref instanceof String)) {
|
|
|
+ com.google.protobuf.ByteString bs =
|
|
|
+ (com.google.protobuf.ByteString) ref;
|
|
|
+ String s = bs.toStringUtf8();
|
|
|
+ sequenceId_ = s;
|
|
|
+ return s;
|
|
|
+ } else {
|
|
|
+ return (String) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public com.google.protobuf.ByteString
|
|
|
+ getSequenceIdBytes() {
|
|
|
+ Object ref = sequenceId_;
|
|
|
+ if (ref instanceof String) {
|
|
|
+ com.google.protobuf.ByteString b =
|
|
|
+ com.google.protobuf.ByteString.copyFromUtf8(
|
|
|
+ (String) ref);
|
|
|
+ sequenceId_ = b;
|
|
|
+ return b;
|
|
|
+ } else {
|
|
|
+ return (com.google.protobuf.ByteString) ref;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public Builder setSequenceId(
|
|
|
+ String value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+
|
|
|
+ sequenceId_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public Builder clearSequenceId() {
|
|
|
+
|
|
|
+ sequenceId_ = getDefaultInstance().getSequenceId();
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * <pre>
|
|
|
+ * SequenceId is required for StreamPredictions2 API.
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * <code>string sequence_id = 4;</code>
|
|
|
+ */
|
|
|
+ public Builder setSequenceIdBytes(
|
|
|
+ com.google.protobuf.ByteString value) {
|
|
|
+ if (value == null) {
|
|
|
+ throw new NullPointerException();
|
|
|
+ }
|
|
|
+ checkByteStringIsUtf8(value);
|
|
|
+
|
|
|
+ sequenceId_ = value;
|
|
|
+ onChanged();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+ public final Builder setUnknownFields(
|
|
|
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
|
|
|
+ return super.setUnknownFieldsProto3(unknownFields);
|
|
|
+ }
|
|
|
+
|
|
|
+ public final Builder mergeUnknownFields(
|
|
|
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
|
|
|
+ return super.mergeUnknownFields(unknownFields);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // @@protoc_insertion_point(builder_scope:org.pytorch.serve.grpc.inference.PredictionsRequest)
|
|
|
+ }
|
|
|
+
|
|
|
+ // @@protoc_insertion_point(class_scope:org.pytorch.serve.grpc.inference.PredictionsRequest)
|
|
|
+ private static final PredictionsRequest DEFAULT_INSTANCE;
|
|
|
+ static {
|
|
|
+ DEFAULT_INSTANCE = new PredictionsRequest();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static PredictionsRequest getDefaultInstance() {
|
|
|
+ return DEFAULT_INSTANCE;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static final com.google.protobuf.Parser<PredictionsRequest>
|
|
|
+ PARSER = new com.google.protobuf.AbstractParser<PredictionsRequest>() {
|
|
|
+ public PredictionsRequest parsePartialFrom(
|
|
|
+ com.google.protobuf.CodedInputStream input,
|
|
|
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
+ throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
+ return new PredictionsRequest(input, extensionRegistry);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ public static com.google.protobuf.Parser<PredictionsRequest> parser() {
|
|
|
+ return PARSER;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public com.google.protobuf.Parser<PredictionsRequest> getParserForType() {
|
|
|
+ return PARSER;
|
|
|
+ }
|
|
|
+
|
|
|
+ public PredictionsRequest getDefaultInstanceForType() {
|
|
|
+ return DEFAULT_INSTANCE;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|