Package inference

Class ModelConfigOuterClass.ModelInput.Builder

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

public static final class ModelConfigOuterClass.ModelInput.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelInput.Builder> implements ModelConfigOuterClass.ModelInputOrBuilder
@@
@@.. cpp:var:: message ModelInput
@@
@@   An input required by the model.
@@
 
Protobuf type inference.ModelInput
  • Method Details

    • getDescriptor

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

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

      public ModelConfigOuterClass.ModelInput 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 ModelConfigOuterClass.ModelInput 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<ModelConfigOuterClass.ModelInput.Builder>
    • setField

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • clearField

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • clearOneof

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • setRepeatedField

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • addRepeatedField

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • mergeFrom

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • mergeFrom

      public ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
      Throws:
      IOException
    • getName

      public String getName()
      @@  .. cpp:var:: string name
      @@
      @@     The name of the input.
      @@
       
      string name = 1;
      Specified by:
      getName in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
      @@  .. cpp:var:: string name
      @@
      @@     The name of the input.
      @@
       
      string name = 1;
      Specified by:
      getNameBytes in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The bytes for name.
    • setName

      @@  .. cpp:var:: string name
      @@
      @@     The name of the input.
      @@
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      @@  .. cpp:var:: string name
      @@
      @@     The name of the input.
      @@
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public ModelConfigOuterClass.ModelInput.Builder setNameBytes(com.google.protobuf.ByteString value)
      @@  .. cpp:var:: string name
      @@
      @@     The name of the input.
      @@
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDataTypeValue

      public int getDataTypeValue()
      @@  .. cpp:var:: DataType data_type
      @@
      @@     The data-type of the input.
      @@
       
      .inference.DataType data_type = 2;
      Specified by:
      getDataTypeValue in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The enum numeric value on the wire for dataType.
    • setDataTypeValue

      public ModelConfigOuterClass.ModelInput.Builder setDataTypeValue(int value)
      @@  .. cpp:var:: DataType data_type
      @@
      @@     The data-type of the input.
      @@
       
      .inference.DataType data_type = 2;
      Parameters:
      value - The enum numeric value on the wire for dataType to set.
      Returns:
      This builder for chaining.
    • getDataType

      public ModelConfigOuterClass.DataType getDataType()
      @@  .. cpp:var:: DataType data_type
      @@
      @@     The data-type of the input.
      @@
       
      .inference.DataType data_type = 2;
      Specified by:
      getDataType in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The dataType.
    • setDataType

      @@  .. cpp:var:: DataType data_type
      @@
      @@     The data-type of the input.
      @@
       
      .inference.DataType data_type = 2;
      Parameters:
      value - The dataType to set.
      Returns:
      This builder for chaining.
    • clearDataType

      @@  .. cpp:var:: DataType data_type
      @@
      @@     The data-type of the input.
      @@
       
      .inference.DataType data_type = 2;
      Returns:
      This builder for chaining.
    • getFormatValue

      public int getFormatValue()
      @@  .. cpp:var:: Format format
      @@
      @@     The format of the input. Optional.
      @@
       
      .inference.ModelInput.Format format = 3;
      Specified by:
      getFormatValue in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The enum numeric value on the wire for format.
    • setFormatValue

      public ModelConfigOuterClass.ModelInput.Builder setFormatValue(int value)
      @@  .. cpp:var:: Format format
      @@
      @@     The format of the input. Optional.
      @@
       
      .inference.ModelInput.Format format = 3;
      Parameters:
      value - The enum numeric value on the wire for format to set.
      Returns:
      This builder for chaining.
    • getFormat

      @@  .. cpp:var:: Format format
      @@
      @@     The format of the input. Optional.
      @@
       
      .inference.ModelInput.Format format = 3;
      Specified by:
      getFormat in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The format.
    • setFormat

      @@  .. cpp:var:: Format format
      @@
      @@     The format of the input. Optional.
      @@
       
      .inference.ModelInput.Format format = 3;
      Parameters:
      value - The format to set.
      Returns:
      This builder for chaining.
    • clearFormat

      @@  .. cpp:var:: Format format
      @@
      @@     The format of the input. Optional.
      @@
       
      .inference.ModelInput.Format format = 3;
      Returns:
      This builder for chaining.
    • getDimsList

      public List<Long> getDimsList()
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Specified by:
      getDimsList in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      A list containing the dims.
    • getDimsCount

      public int getDimsCount()
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Specified by:
      getDimsCount in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The count of dims.
    • getDims

      public long getDims(int index)
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Specified by:
      getDims in interface ModelConfigOuterClass.ModelInputOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The dims at the given index.
    • setDims

      public ModelConfigOuterClass.ModelInput.Builder setDims(int index, long value)
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Parameters:
      index - The index to set the value at.
      value - The dims to set.
      Returns:
      This builder for chaining.
    • addDims

      public ModelConfigOuterClass.ModelInput.Builder addDims(long value)
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Parameters:
      value - The dims to add.
      Returns:
      This builder for chaining.
    • addAllDims

      public ModelConfigOuterClass.ModelInput.Builder addAllDims(Iterable<? extends Long> values)
      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Parameters:
      values - The dims to add.
      Returns:
      This builder for chaining.
    • clearDims

      @@  .. cpp:var:: int64 dims (repeated)
      @@
      @@     The dimensions/shape of the input tensor that must be provided
      @@     when invoking the inference API for this model.
      @@
       
      repeated int64 dims = 4;
      Returns:
      This builder for chaining.
    • hasReshape

      public boolean hasReshape()
      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
      Specified by:
      hasReshape in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      Whether the reshape field is set.
    • getReshape

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
      Specified by:
      getReshape in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The reshape.
    • setReshape

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
    • setReshape

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
    • mergeReshape

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
    • clearReshape

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
    • getReshapeBuilder

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
    • getReshapeOrBuilder

      @@  .. cpp:var:: ModelTensorReshape reshape
      @@
      @@     The shape expected for this input by the backend. The input will
      @@     be reshaped to this before being presented to the backend. The
      @@     reshape must have the same number of elements as the input shape
      @@     specified by 'dims'. Optional.
      @@
       
      .inference.ModelTensorReshape reshape = 5;
      Specified by:
      getReshapeOrBuilder in interface ModelConfigOuterClass.ModelInputOrBuilder
    • getIsShapeTensor

      public boolean getIsShapeTensor()
      @@  .. cpp:var:: bool is_shape_tensor
      @@
      @@     Whether or not the input is a shape tensor to the model. This field
      @@     is currently supported only for the TensorRT model. An error will be
      @@     generated if this specification does not comply with underlying
      @@     model.
      @@
       
      bool is_shape_tensor = 6;
      Specified by:
      getIsShapeTensor in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The isShapeTensor.
    • setIsShapeTensor

      public ModelConfigOuterClass.ModelInput.Builder setIsShapeTensor(boolean value)
      @@  .. cpp:var:: bool is_shape_tensor
      @@
      @@     Whether or not the input is a shape tensor to the model. This field
      @@     is currently supported only for the TensorRT model. An error will be
      @@     generated if this specification does not comply with underlying
      @@     model.
      @@
       
      bool is_shape_tensor = 6;
      Parameters:
      value - The isShapeTensor to set.
      Returns:
      This builder for chaining.
    • clearIsShapeTensor

      public ModelConfigOuterClass.ModelInput.Builder clearIsShapeTensor()
      @@  .. cpp:var:: bool is_shape_tensor
      @@
      @@     Whether or not the input is a shape tensor to the model. This field
      @@     is currently supported only for the TensorRT model. An error will be
      @@     generated if this specification does not comply with underlying
      @@     model.
      @@
       
      bool is_shape_tensor = 6;
      Returns:
      This builder for chaining.
    • getAllowRaggedBatch

      public boolean getAllowRaggedBatch()
      @@  .. cpp:var:: bool allow_ragged_batch
      @@
      @@     Whether or not the input is allowed to be "ragged" in a dynamically
      @@     created batch. Default is false indicating that two requests will
      @@     only be batched if this tensor has the same shape in both requests.
      @@     True indicates that two requests can be batched even if this tensor
      @@     has a different shape in each request.
      @@
       
      bool allow_ragged_batch = 7;
      Specified by:
      getAllowRaggedBatch in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The allowRaggedBatch.
    • setAllowRaggedBatch

      public ModelConfigOuterClass.ModelInput.Builder setAllowRaggedBatch(boolean value)
      @@  .. cpp:var:: bool allow_ragged_batch
      @@
      @@     Whether or not the input is allowed to be "ragged" in a dynamically
      @@     created batch. Default is false indicating that two requests will
      @@     only be batched if this tensor has the same shape in both requests.
      @@     True indicates that two requests can be batched even if this tensor
      @@     has a different shape in each request.
      @@
       
      bool allow_ragged_batch = 7;
      Parameters:
      value - The allowRaggedBatch to set.
      Returns:
      This builder for chaining.
    • clearAllowRaggedBatch

      public ModelConfigOuterClass.ModelInput.Builder clearAllowRaggedBatch()
      @@  .. cpp:var:: bool allow_ragged_batch
      @@
      @@     Whether or not the input is allowed to be "ragged" in a dynamically
      @@     created batch. Default is false indicating that two requests will
      @@     only be batched if this tensor has the same shape in both requests.
      @@     True indicates that two requests can be batched even if this tensor
      @@     has a different shape in each request.
      @@
       
      bool allow_ragged_batch = 7;
      Returns:
      This builder for chaining.
    • getOptional

      public boolean getOptional()
      @@  .. cpp:var:: bool optional
      @@
      @@     Whether or not the input is optional for the model execution.
      @@     If true, the input is not required in the inference request.
      @@     Default value is false.
      @@
       
      bool optional = 8;
      Specified by:
      getOptional in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The optional.
    • setOptional

      public ModelConfigOuterClass.ModelInput.Builder setOptional(boolean value)
      @@  .. cpp:var:: bool optional
      @@
      @@     Whether or not the input is optional for the model execution.
      @@     If true, the input is not required in the inference request.
      @@     Default value is false.
      @@
       
      bool optional = 8;
      Parameters:
      value - The optional to set.
      Returns:
      This builder for chaining.
    • clearOptional

      @@  .. cpp:var:: bool optional
      @@
      @@     Whether or not the input is optional for the model execution.
      @@     If true, the input is not required in the inference request.
      @@     Default value is false.
      @@
       
      bool optional = 8;
      Returns:
      This builder for chaining.
    • getIsNonLinearFormatIo

      public boolean getIsNonLinearFormatIo()
      @@  .. cpp:var:: bool is_non_linear_format_io
      @@
      @@     Indicates whether the input tensor uses a non-linear IO format. This
      @@     field is currently supported only for TensorRT models. An error will
      @@     be generated if this specification does not comply with the
      @@     underlying model.
      @@
       
      bool is_non_linear_format_io = 9;
      Specified by:
      getIsNonLinearFormatIo in interface ModelConfigOuterClass.ModelInputOrBuilder
      Returns:
      The isNonLinearFormatIo.
    • setIsNonLinearFormatIo

      public ModelConfigOuterClass.ModelInput.Builder setIsNonLinearFormatIo(boolean value)
      @@  .. cpp:var:: bool is_non_linear_format_io
      @@
      @@     Indicates whether the input tensor uses a non-linear IO format. This
      @@     field is currently supported only for TensorRT models. An error will
      @@     be generated if this specification does not comply with the
      @@     underlying model.
      @@
       
      bool is_non_linear_format_io = 9;
      Parameters:
      value - The isNonLinearFormatIo to set.
      Returns:
      This builder for chaining.
    • clearIsNonLinearFormatIo

      public ModelConfigOuterClass.ModelInput.Builder clearIsNonLinearFormatIo()
      @@  .. cpp:var:: bool is_non_linear_format_io
      @@
      @@     Indicates whether the input tensor uses a non-linear IO format. This
      @@     field is currently supported only for TensorRT models. An error will
      @@     be generated if this specification does not comply with the
      @@     underlying model.
      @@
       
      bool is_non_linear_format_io = 9;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>
    • mergeUnknownFields

      public final ModelConfigOuterClass.ModelInput.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<ModelConfigOuterClass.ModelInput.Builder>