Class Predict.PredictRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
tensorflow.serving.Predict.PredictRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable, Predict.PredictRequestOrBuilder
Enclosing class:
Predict.PredictRequest

public static final class Predict.PredictRequest.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
implements Predict.PredictRequestOrBuilder
 PredictRequest specifies which TensorFlow model to run, as well as
 how inputs are mapped to tensors and how outputs are filtered before
 returning to user.
 
Protobuf type tensorflow.serving.PredictRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapField

      protected com.google.protobuf.MapField internalGetMapField​(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • internalGetMutableMapField

      protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
      Overrides:
      internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • getDefaultInstanceForType

      public Predict.PredictRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Predict.PredictRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Predict.PredictRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • setField

      public Predict.PredictRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • clearField

      public Predict.PredictRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • clearOneof

      public Predict.PredictRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • setRepeatedField

      public Predict.PredictRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • addRepeatedField

      public Predict.PredictRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • mergeFrom

      public Predict.PredictRequest.Builder mergeFrom​(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Predict.PredictRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • mergeFrom

      public Predict.PredictRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Predict.PredictRequest.Builder>
      Throws:
      java.io.IOException
    • hasModelSpec

      public boolean hasModelSpec()
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
      Specified by:
      hasModelSpec in interface Predict.PredictRequestOrBuilder
      Returns:
      Whether the modelSpec field is set.
    • getModelSpec

      public Model.ModelSpec getModelSpec()
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
      Specified by:
      getModelSpec in interface Predict.PredictRequestOrBuilder
      Returns:
      The modelSpec.
    • setModelSpec

      public Predict.PredictRequest.Builder setModelSpec​(Model.ModelSpec value)
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
    • setModelSpec

      public Predict.PredictRequest.Builder setModelSpec​(Model.ModelSpec.Builder builderForValue)
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
    • mergeModelSpec

      public Predict.PredictRequest.Builder mergeModelSpec​(Model.ModelSpec value)
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
    • clearModelSpec

      public Predict.PredictRequest.Builder clearModelSpec()
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
    • getModelSpecBuilder

      public Model.ModelSpec.Builder getModelSpecBuilder()
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
    • getModelSpecOrBuilder

      public Model.ModelSpecOrBuilder getModelSpecOrBuilder()
       Model Specification. If version is not specified, will use the latest
       (numerical) version.
       
      .tensorflow.serving.ModelSpec model_spec = 1;
      Specified by:
      getModelSpecOrBuilder in interface Predict.PredictRequestOrBuilder
    • getInputsCount

      public int getInputsCount()
      Description copied from interface: Predict.PredictRequestOrBuilder
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
      Specified by:
      getInputsCount in interface Predict.PredictRequestOrBuilder
    • containsInputs

      public boolean containsInputs​(java.lang.String key)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
      Specified by:
      containsInputs in interface Predict.PredictRequestOrBuilder
    • getInputs

      @Deprecated public java.util.Map<java.lang.String,​TensorProto> getInputs()
      Deprecated.
      Use getInputsMap() instead.
      Specified by:
      getInputs in interface Predict.PredictRequestOrBuilder
    • getInputsMap

      public java.util.Map<java.lang.String,​TensorProto> getInputsMap()
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
      Specified by:
      getInputsMap in interface Predict.PredictRequestOrBuilder
    • getInputsOrDefault

      public TensorProto getInputsOrDefault​(java.lang.String key, TensorProto defaultValue)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
      Specified by:
      getInputsOrDefault in interface Predict.PredictRequestOrBuilder
    • getInputsOrThrow

      public TensorProto getInputsOrThrow​(java.lang.String key)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
      Specified by:
      getInputsOrThrow in interface Predict.PredictRequestOrBuilder
    • clearInputs

      public Predict.PredictRequest.Builder clearInputs()
    • removeInputs

      public Predict.PredictRequest.Builder removeInputs​(java.lang.String key)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
    • getMutableInputs

      @Deprecated public java.util.Map<java.lang.String,​TensorProto> getMutableInputs()
      Deprecated.
      Use alternate mutation accessors instead.
    • putInputs

      public Predict.PredictRequest.Builder putInputs​(java.lang.String key, TensorProto value)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
    • putAllInputs

      public Predict.PredictRequest.Builder putAllInputs​(java.util.Map<java.lang.String,​TensorProto> values)
       Input tensors.
       Names of input tensor are alias names. The mapping from aliases to real
       input tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'inputs' field.
       
      map<string, .tensorflow.TensorProto> inputs = 2;
    • getOutputFilterList

      public com.google.protobuf.ProtocolStringList getOutputFilterList()
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Specified by:
      getOutputFilterList in interface Predict.PredictRequestOrBuilder
      Returns:
      A list containing the outputFilter.
    • getOutputFilterCount

      public int getOutputFilterCount()
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Specified by:
      getOutputFilterCount in interface Predict.PredictRequestOrBuilder
      Returns:
      The count of outputFilter.
    • getOutputFilter

      public java.lang.String getOutputFilter​(int index)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Specified by:
      getOutputFilter in interface Predict.PredictRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The outputFilter at the given index.
    • getOutputFilterBytes

      public com.google.protobuf.ByteString getOutputFilterBytes​(int index)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Specified by:
      getOutputFilterBytes in interface Predict.PredictRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the outputFilter at the given index.
    • setOutputFilter

      public Predict.PredictRequest.Builder setOutputFilter​(int index, java.lang.String value)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Parameters:
      index - The index to set the value at.
      value - The outputFilter to set.
      Returns:
      This builder for chaining.
    • addOutputFilter

      public Predict.PredictRequest.Builder addOutputFilter​(java.lang.String value)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Parameters:
      value - The outputFilter to add.
      Returns:
      This builder for chaining.
    • addAllOutputFilter

      public Predict.PredictRequest.Builder addAllOutputFilter​(java.lang.Iterable<java.lang.String> values)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Parameters:
      values - The outputFilter to add.
      Returns:
      This builder for chaining.
    • clearOutputFilter

      public Predict.PredictRequest.Builder clearOutputFilter()
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Returns:
      This builder for chaining.
    • addOutputFilterBytes

      public Predict.PredictRequest.Builder addOutputFilterBytes​(com.google.protobuf.ByteString value)
       Output filter.
       Names specified are alias names. The mapping from aliases to real output
       tensor names is stored in the SavedModel export as a prediction
       SignatureDef under the 'outputs' field.
       Only tensors specified here will be run/fetched and returned, with the
       exception that when none is specified, all tensors specified in the
       named signature will be run/fetched and returned.
       
      repeated string output_filter = 3;
      Parameters:
      value - The bytes of the outputFilter to add.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Predict.PredictRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>
    • mergeUnknownFields

      public final Predict.PredictRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictRequest.Builder>