Class Predict.PredictStreamedOptions.Builder

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

public static final class Predict.PredictStreamedOptions.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictStreamedOptions.Builder> implements Predict.PredictStreamedOptionsOrBuilder
 Options only used for streaming requests that control how inputs/ouputs are
 handled in the stream.
 
Protobuf type tensorflow.serving.PredictStreamedOptions
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictStreamedOptions.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictStreamedOptions.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Predict.PredictStreamedOptions.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.PredictStreamedOptions.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.PredictStreamedOptions.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Predict.PredictStreamedOptions 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.PredictStreamedOptions.Builder>
    • setField

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

      public Predict.PredictStreamedOptions.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.PredictStreamedOptions.Builder>
    • clearOneof

      public Predict.PredictStreamedOptions.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.PredictStreamedOptions.Builder>
    • setRepeatedField

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

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

      public Predict.PredictStreamedOptions.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.PredictStreamedOptions.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.PredictStreamedOptions.Builder>
    • mergeFrom

      public Predict.PredictStreamedOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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.PredictStreamedOptions.Builder>
      Throws:
      IOException
    • getRequestStateValue

      public int getRequestStateValue()
       Request state used to handle segmentation of requests.
       
      .tensorflow.serving.PredictStreamedOptions.RequestState request_state = 1;
      Specified by:
      getRequestStateValue in interface Predict.PredictStreamedOptionsOrBuilder
      Returns:
      The enum numeric value on the wire for requestState.
    • setRequestStateValue

      public Predict.PredictStreamedOptions.Builder setRequestStateValue(int value)
       Request state used to handle segmentation of requests.
       
      .tensorflow.serving.PredictStreamedOptions.RequestState request_state = 1;
      Parameters:
      value - The enum numeric value on the wire for requestState to set.
      Returns:
      This builder for chaining.
    • getRequestState

       Request state used to handle segmentation of requests.
       
      .tensorflow.serving.PredictStreamedOptions.RequestState request_state = 1;
      Specified by:
      getRequestState in interface Predict.PredictStreamedOptionsOrBuilder
      Returns:
      The requestState.
    • setRequestState

       Request state used to handle segmentation of requests.
       
      .tensorflow.serving.PredictStreamedOptions.RequestState request_state = 1;
      Parameters:
      value - The requestState to set.
      Returns:
      This builder for chaining.
    • clearRequestState

      public Predict.PredictStreamedOptions.Builder clearRequestState()
       Request state used to handle segmentation of requests.
       
      .tensorflow.serving.PredictStreamedOptions.RequestState request_state = 1;
      Returns:
      This builder for chaining.
    • getSplitDimensionsCount

      public int getSplitDimensionsCount()
      Description copied from interface: Predict.PredictStreamedOptionsOrBuilder
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
      Specified by:
      getSplitDimensionsCount in interface Predict.PredictStreamedOptionsOrBuilder
    • containsSplitDimensions

      public boolean containsSplitDimensions(String key)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
      Specified by:
      containsSplitDimensions in interface Predict.PredictStreamedOptionsOrBuilder
    • getSplitDimensions

      @Deprecated public Map<String,Integer> getSplitDimensions()
      Deprecated.
      Specified by:
      getSplitDimensions in interface Predict.PredictStreamedOptionsOrBuilder
    • getSplitDimensionsMap

      public Map<String,Integer> getSplitDimensionsMap()
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
      Specified by:
      getSplitDimensionsMap in interface Predict.PredictStreamedOptionsOrBuilder
    • getSplitDimensionsOrDefault

      public int getSplitDimensionsOrDefault(String key, int defaultValue)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
      Specified by:
      getSplitDimensionsOrDefault in interface Predict.PredictStreamedOptionsOrBuilder
    • getSplitDimensionsOrThrow

      public int getSplitDimensionsOrThrow(String key)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
      Specified by:
      getSplitDimensionsOrThrow in interface Predict.PredictStreamedOptionsOrBuilder
    • clearSplitDimensions

      public Predict.PredictStreamedOptions.Builder clearSplitDimensions()
    • removeSplitDimensions

      public Predict.PredictStreamedOptions.Builder removeSplitDimensions(String key)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
    • getMutableSplitDimensions

      @Deprecated public Map<String,Integer> getMutableSplitDimensions()
      Deprecated.
      Use alternate mutation accessors instead.
    • putSplitDimensions

      public Predict.PredictStreamedOptions.Builder putSplitDimensions(String key, int value)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
    • putAllSplitDimensions

      public Predict.PredictStreamedOptions.Builder putAllSplitDimensions(Map<String,Integer> values)
       Input tensors split dimensions.
       Defines the dimension used to split input tensors specified
       in PredictRequest.inputs. The dimension will be used
       for concatenation of multiple SPLIT requests.
      
       For input tensor in PredictRequest.inputs that are not contained in this
       map, the tensors from the first SPLIT request will be used.
      
       For example, with an original input tensor of [[1, 2, 3, 4], [5, 6, 7, 8]].
      
       For a split dimension of 0 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [1, 2, 3, 4] and request 2 should be
       be [5, 6, 7, 8].
      
       For a split dimension of 1 and two requests (SPLIT and END_SPLIT), the
       input tensors for request 1 should be [[1, 2], [5, 6]] and request 2 should
       be [[3, 4], [7, 8]].
       
      map<string, int32> split_dimensions = 2;
    • getReturnSingleResponse

      public boolean getReturnSingleResponse()
       If true, there will be a single PredictResponse output.
       If false, output can be split into 1 or more PredictResponses.
       Value of this field should be the same for all requests in the stream.
       
      bool return_single_response = 3;
      Specified by:
      getReturnSingleResponse in interface Predict.PredictStreamedOptionsOrBuilder
      Returns:
      The returnSingleResponse.
    • setReturnSingleResponse

      public Predict.PredictStreamedOptions.Builder setReturnSingleResponse(boolean value)
       If true, there will be a single PredictResponse output.
       If false, output can be split into 1 or more PredictResponses.
       Value of this field should be the same for all requests in the stream.
       
      bool return_single_response = 3;
      Parameters:
      value - The returnSingleResponse to set.
      Returns:
      This builder for chaining.
    • clearReturnSingleResponse

      public Predict.PredictStreamedOptions.Builder clearReturnSingleResponse()
       If true, there will be a single PredictResponse output.
       If false, output can be split into 1 or more PredictResponses.
       Value of this field should be the same for all requests in the stream.
       
      bool return_single_response = 3;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Predict.PredictStreamedOptions.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.PredictStreamedOptions.Builder>
    • mergeUnknownFields

      public final Predict.PredictStreamedOptions.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.PredictStreamedOptions.Builder>