Package inference

Class GrpcPredictV2.ModelInferResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GrpcPredictV2.ModelInferResponse.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<GrpcPredictV2.ModelInferResponse.Builder>
inference.GrpcPredictV2.ModelInferResponse.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GrpcPredictV2.ModelInferResponseOrBuilder, Cloneable
Enclosing class:
GrpcPredictV2.ModelInferResponse

public static final class GrpcPredictV2.ModelInferResponse.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GrpcPredictV2.ModelInferResponse.Builder> implements GrpcPredictV2.ModelInferResponseOrBuilder
Protobuf type inference.ModelInferResponse
  • 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<GrpcPredictV2.ModelInferResponse.Builder>
    • internalGetMutableMapFieldReflection

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

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

      public GrpcPredictV2.ModelInferResponse 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 GrpcPredictV2.ModelInferResponse 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<GrpcPredictV2.ModelInferResponse.Builder>
    • setField

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • clearField

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • clearOneof

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • setRepeatedField

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • addRepeatedField

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • mergeFrom

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • mergeFrom

      public GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
      Throws:
      IOException
    • getModelName

      public String getModelName()
       The name of the model used for inference.
       
      string model_name = 1;
      Specified by:
      getModelName in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The modelName.
    • getModelNameBytes

      public com.google.protobuf.ByteString getModelNameBytes()
       The name of the model used for inference.
       
      string model_name = 1;
      Specified by:
      getModelNameBytes in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The bytes for modelName.
    • setModelName

      public GrpcPredictV2.ModelInferResponse.Builder setModelName(String value)
       The name of the model used for inference.
       
      string model_name = 1;
      Parameters:
      value - The modelName to set.
      Returns:
      This builder for chaining.
    • clearModelName

       The name of the model used for inference.
       
      string model_name = 1;
      Returns:
      This builder for chaining.
    • setModelNameBytes

      public GrpcPredictV2.ModelInferResponse.Builder setModelNameBytes(com.google.protobuf.ByteString value)
       The name of the model used for inference.
       
      string model_name = 1;
      Parameters:
      value - The bytes for modelName to set.
      Returns:
      This builder for chaining.
    • getModelVersion

      public String getModelVersion()
       The version of the model used for inference.
       
      string model_version = 2;
      Specified by:
      getModelVersion in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The modelVersion.
    • getModelVersionBytes

      public com.google.protobuf.ByteString getModelVersionBytes()
       The version of the model used for inference.
       
      string model_version = 2;
      Specified by:
      getModelVersionBytes in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The bytes for modelVersion.
    • setModelVersion

      public GrpcPredictV2.ModelInferResponse.Builder setModelVersion(String value)
       The version of the model used for inference.
       
      string model_version = 2;
      Parameters:
      value - The modelVersion to set.
      Returns:
      This builder for chaining.
    • clearModelVersion

      public GrpcPredictV2.ModelInferResponse.Builder clearModelVersion()
       The version of the model used for inference.
       
      string model_version = 2;
      Returns:
      This builder for chaining.
    • setModelVersionBytes

      public GrpcPredictV2.ModelInferResponse.Builder setModelVersionBytes(com.google.protobuf.ByteString value)
       The version of the model used for inference.
       
      string model_version = 2;
      Parameters:
      value - The bytes for modelVersion to set.
      Returns:
      This builder for chaining.
    • getId

      public String getId()
       The id of the inference request if one was specified.
       
      string id = 3;
      Specified by:
      getId in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       The id of the inference request if one was specified.
       
      string id = 3;
      Specified by:
      getIdBytes in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The bytes for id.
    • setId

       The id of the inference request if one was specified.
       
      string id = 3;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

       The id of the inference request if one was specified.
       
      string id = 3;
      Returns:
      This builder for chaining.
    • setIdBytes

      public GrpcPredictV2.ModelInferResponse.Builder setIdBytes(com.google.protobuf.ByteString value)
       The id of the inference request if one was specified.
       
      string id = 3;
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getParametersCount

      public int getParametersCount()
      Description copied from interface: GrpcPredictV2.ModelInferResponseOrBuilder
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
      Specified by:
      getParametersCount in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • containsParameters

      public boolean containsParameters(String key)
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
      Specified by:
      containsParameters in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getParameters

      Deprecated.
      Use getParametersMap() instead.
      Specified by:
      getParameters in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getParametersMap

      public Map<String,GrpcPredictV2.InferParameter> getParametersMap()
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
      Specified by:
      getParametersMap in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getParametersOrDefault

      public GrpcPredictV2.InferParameter getParametersOrDefault(String key, GrpcPredictV2.InferParameter defaultValue)
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
      Specified by:
      getParametersOrDefault in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getParametersOrThrow

      public GrpcPredictV2.InferParameter getParametersOrThrow(String key)
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
      Specified by:
      getParametersOrThrow in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • clearParameters

      public GrpcPredictV2.ModelInferResponse.Builder clearParameters()
    • removeParameters

      public GrpcPredictV2.ModelInferResponse.Builder removeParameters(String key)
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
    • getMutableParameters

      @Deprecated public Map<String,GrpcPredictV2.InferParameter> getMutableParameters()
      Deprecated.
      Use alternate mutation accessors instead.
    • putParameters

       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
    • putAllParameters

       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
    • putParametersBuilderIfAbsent

      public GrpcPredictV2.InferParameter.Builder putParametersBuilderIfAbsent(String key)
       Optional inference response parameters.
       
      map<string, .inference.InferParameter> parameters = 4;
    • getOutputsList

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
      Specified by:
      getOutputsList in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getOutputsCount

      public int getOutputsCount()
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
      Specified by:
      getOutputsCount in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
      Specified by:
      getOutputs in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • setOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • setOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addAllOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • clearOutputs

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • removeOutputs

      public GrpcPredictV2.ModelInferResponse.Builder removeOutputs(int index)
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • getOutputsBuilder

      public GrpcPredictV2.ModelInferResponse.InferOutputTensor.Builder getOutputsBuilder(int index)
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • getOutputsOrBuilder

      public GrpcPredictV2.ModelInferResponse.InferOutputTensorOrBuilder getOutputsOrBuilder(int index)
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
      Specified by:
      getOutputsOrBuilder in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • getOutputsOrBuilderList

      public List<? extends GrpcPredictV2.ModelInferResponse.InferOutputTensorOrBuilder> getOutputsOrBuilderList()
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
      Specified by:
      getOutputsOrBuilderList in interface GrpcPredictV2.ModelInferResponseOrBuilder
    • addOutputsBuilder

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • addOutputsBuilder

      public GrpcPredictV2.ModelInferResponse.InferOutputTensor.Builder addOutputsBuilder(int index)
       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • getOutputsBuilderList

       The output tensors holding inference results.
       
      repeated .inference.ModelInferResponse.InferOutputTensor outputs = 5;
    • getRawOutputContentsList

      public List<com.google.protobuf.ByteString> getRawOutputContentsList()
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Specified by:
      getRawOutputContentsList in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      A list containing the rawOutputContents.
    • getRawOutputContentsCount

      public int getRawOutputContentsCount()
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Specified by:
      getRawOutputContentsCount in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Returns:
      The count of rawOutputContents.
    • getRawOutputContents

      public com.google.protobuf.ByteString getRawOutputContents(int index)
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Specified by:
      getRawOutputContents in interface GrpcPredictV2.ModelInferResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The rawOutputContents at the given index.
    • setRawOutputContents

      public GrpcPredictV2.ModelInferResponse.Builder setRawOutputContents(int index, com.google.protobuf.ByteString value)
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Parameters:
      index - The index to set the value at.
      value - The rawOutputContents to set.
      Returns:
      This builder for chaining.
    • addRawOutputContents

      public GrpcPredictV2.ModelInferResponse.Builder addRawOutputContents(com.google.protobuf.ByteString value)
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Parameters:
      value - The rawOutputContents to add.
      Returns:
      This builder for chaining.
    • addAllRawOutputContents

      public GrpcPredictV2.ModelInferResponse.Builder addAllRawOutputContents(Iterable<? extends com.google.protobuf.ByteString> values)
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Parameters:
      values - The rawOutputContents to add.
      Returns:
      This builder for chaining.
    • clearRawOutputContents

      public GrpcPredictV2.ModelInferResponse.Builder clearRawOutputContents()
       The data contained in an output tensor can be represented in
       "raw" bytes form or in the repeated type that matches the
       tensor's data type. To use the raw representation 'raw_output_contents'
       must be initialized with data for each tensor in the same order as
       'outputs'. For each tensor, the size of this content must match
       what is expected by the tensor's shape and data type. The raw
       data must be the flattened, one-dimensional, row-major order of
       the tensor elements without any stride or padding between the
       elements. Note that the FP16 and BF16 data types must be represented as
       raw content as there is no specific data type for a 16-bit float type.
      
       If this field is specified then InferOutputTensor::contents must
       not be specified for any output tensor.
       
      repeated bytes raw_output_contents = 6;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>
    • mergeUnknownFields

      public final GrpcPredictV2.ModelInferResponse.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<GrpcPredictV2.ModelInferResponse.Builder>