Package com.sap.ai.sdk.foundationmodels.rpt.generated.model

# Class PredictRequestPayload

java.lang.Object
com.sap.ai.sdk.foundationmodels.rpt.generated.model.PredictRequestPayload

public class PredictRequestPayload extends Object
Users need to specify a list of rows, which contains both the context rows and the rows for which to predict a label, and a mapping of column names to placeholder values. The model will predict the value for any column specified in `predict_columns` for all rows that have the placeholder value in that column.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `PredictRequestPayload.Builder`
  Builder helper class.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `PredictRequestPayload()`
  Default constructor for PredictRequestPayload.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PredictRequestPayload`
  `addRowsItem(Map<String,RowsInnerValue> rowsItem)`
  Add one rows instance to this `PredictRequestPayload`.
  `PredictRequestPayload`
  `columns(Map<String,List<RowsInnerValue>> columns)`
  Set the columns of this `PredictRequestPayload` instance and return the same instance.
  `static PredictRequestPayload.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `PredictRequestPayload` instance with all required arguments.
  `PredictRequestPayload`
  `dataSchema(Map<String,SchemaFieldConfig> dataSchema)`
  Set the dataSchema of this `PredictRequestPayload` instance and return the same instance.
  `boolean`
  `equals(Object o)`
  `Map<String,List<RowsInnerValue>>`
  `getColumns()`
  Alternative to rows: columns of data where each key is a column name and the value is a list of all column values.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `PredictRequestPayload`.
  `Map<String,SchemaFieldConfig>`
  `getDataSchema()`
  Optional schema defining the data types of each column.
  `String`
  `getIndexColumn()`
  The name of the index column.
  `PredictionConfig`
  `getPredictionConfig()`
  Configuration of target columns and placeholder value.
  `List<Map<String,RowsInnerValue>>`
  `getRows()`
  Table rows, i.e.
  `int`
  `hashCode()`
  `PredictRequestPayload`
  `indexColumn(String indexColumn)`
  Set the indexColumn of this `PredictRequestPayload` instance and return the same instance.
  `Boolean`
  `isParseDataTypes()`
  Whether to parse the data types of the columns.
  `PredictRequestPayload`
  `parseDataTypes(Boolean parseDataTypes)`
  Set the parseDataTypes of this `PredictRequestPayload` instance and return the same instance.
  `PredictRequestPayload`
  `predictionConfig(PredictionConfig predictionConfig)`
  Set the predictionConfig of this `PredictRequestPayload` instance and return the same instance.
  `PredictRequestPayload`
  `putcolumnsItem(String key, List<RowsInnerValue> columnsItem)`
  Put one columns instance to this `PredictRequestPayload` instance.
  `PredictRequestPayload`
  `putdataSchemaItem(String key, SchemaFieldConfig dataSchemaItem)`
  Put one dataSchema instance to this `PredictRequestPayload` instance.
  `PredictRequestPayload`
  `rows(List<Map<String,RowsInnerValue>> rows)`
  Set the rows of this `PredictRequestPayload` instance and return the same instance.
  `void`
  `setColumns(Map<String,List<RowsInnerValue>> columns)`
  Set the columns of this `PredictRequestPayload` instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `PredictRequestPayload` instance.
  `void`
  `setDataSchema(Map<String,SchemaFieldConfig> dataSchema)`
  Set the dataSchema of this `PredictRequestPayload` instance.
  `void`
  `setIndexColumn(String indexColumn)`
  Set the indexColumn of this `PredictRequestPayload` instance.
  `void`
  `setParseDataTypes(Boolean parseDataTypes)`
  Set the parseDataTypes of this `PredictRequestPayload` instance.
  `void`
  `setPredictionConfig(PredictionConfig predictionConfig)`
  Set the predictionConfig of this `PredictRequestPayload` instance.
  `void`
  `setRows(List<Map<String,RowsInnerValue>> rows)`
  Set the rows of this `PredictRequestPayload` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `PredictRequestPayload` instance including unrecognized properties.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PredictRequestPayload

    protected PredictRequestPayload()
    Default constructor for PredictRequestPayload.

- ## Method Details

  - ### predictionConfig

    @Nonnull public PredictRequestPayload predictionConfig(@Nonnull PredictionConfig predictionConfig)
    Set the predictionConfig of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `predictionConfig` - Configuration of target columns and placeholder value.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### getPredictionConfig

    @Nonnull public PredictionConfig getPredictionConfig()
    Configuration of target columns and placeholder value.
    Returns:
      predictionConfig The predictionConfig of this `PredictRequestPayload` instance.

  - ### setPredictionConfig

    public void setPredictionConfig(@Nonnull PredictionConfig predictionConfig)
    Set the predictionConfig of this `PredictRequestPayload` instance.
    Parameters:
      `predictionConfig` - Configuration of target columns and placeholder value.

  - ### rows

    @Nonnull public PredictRequestPayload rows(@Nullable List<Map<String,RowsInnerValue>> rows)
    Set the rows of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `rows` - Table rows, i.e. list of objects where each object is a mapping of column names to values. Either \"rows\" or \"columns\" must be provided.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### addRowsItem

    @Nonnull public PredictRequestPayload addRowsItem(@Nonnull Map<String,RowsInnerValue> rowsItem)
    Add one rows instance to this `PredictRequestPayload`.
    Parameters:
      `rowsItem` - The rows that should be added
    Returns:
      The same instance of type `PredictRequestPayload`

  - ### getRows

    @Nonnull public List<Map<String,RowsInnerValue>> getRows()
    Table rows, i.e. list of objects where each object is a mapping of column names to values. Either \"rows\" or \"columns\" must be provided.
    Returns:
      rows The rows of this `PredictRequestPayload` instance.

  - ### setRows

    public void setRows(@Nullable List<Map<String,RowsInnerValue>> rows)
    Set the rows of this `PredictRequestPayload` instance.
    Parameters:
      `rows` - Table rows, i.e. list of objects where each object is a mapping of column names to values. Either \"rows\" or \"columns\" must be provided.

  - ### columns

    @Nonnull public PredictRequestPayload columns(@Nullable Map<String,List<RowsInnerValue>> columns)
    Set the columns of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `columns` - Alternative to rows: columns of data where each key is a column name and the value is a list of all column values. Either \"rows\" or \"columns\" must be provided.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### putcolumnsItem

    @Nonnull public PredictRequestPayload putcolumnsItem(@Nonnull String key, @Nonnull List<RowsInnerValue> columnsItem)
    Put one columns instance to this `PredictRequestPayload` instance.
    Parameters:
      `key` - The String key of this columns instance
      `columnsItem` - The columns that should be added under the given key
    Returns:
      The same instance of type `PredictRequestPayload`

  - ### getColumns

    @Nullable public Map<String,List<RowsInnerValue>> getColumns()
    Alternative to rows: columns of data where each key is a column name and the value is a list of all column values. Either \"rows\" or \"columns\" must be provided.
    Returns:
      columns The columns of this `PredictRequestPayload` instance.

  - ### setColumns

    public void setColumns(@Nullable Map<String,List<RowsInnerValue>> columns)
    Set the columns of this `PredictRequestPayload` instance.
    Parameters:
      `columns` - Alternative to rows: columns of data where each key is a column name and the value is a list of all column values. Either \"rows\" or \"columns\" must be provided.

  - ### indexColumn

    @Nonnull public PredictRequestPayload indexColumn(@Nullable String indexColumn)
    Set the indexColumn of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `indexColumn` - The name of the index column. If provided, the service will return this column's value in each prediction object to facilitate aligning the output predictions with the input rows on the client side. If not provided, the column will not be included in the output.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### getIndexColumn

    @Nullable public String getIndexColumn()
    The name of the index column. If provided, the service will return this column's value in each prediction object to facilitate aligning the output predictions with the input rows on the client side. If not provided, the column will not be included in the output.
    Returns:
      indexColumn The indexColumn of this `PredictRequestPayload` instance.

  - ### setIndexColumn

    public void setIndexColumn(@Nullable String indexColumn)
    Set the indexColumn of this `PredictRequestPayload` instance.
    Parameters:
      `indexColumn` - The name of the index column. If provided, the service will return this column's value in each prediction object to facilitate aligning the output predictions with the input rows on the client side. If not provided, the column will not be included in the output.

  - ### parseDataTypes

    @Nonnull public PredictRequestPayload parseDataTypes(@Nullable Boolean parseDataTypes)
    Set the parseDataTypes of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `parseDataTypes` - Whether to parse the data types of the columns. If set to True, numeric columns will be parsed to float or integer and dates in ISO format YYYY-MM-DD will be parsed.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### isParseDataTypes

    @Nonnull public Boolean isParseDataTypes()
    Whether to parse the data types of the columns. If set to True, numeric columns will be parsed to float or integer and dates in ISO format YYYY-MM-DD will be parsed.
    Returns:
      parseDataTypes The parseDataTypes of this `PredictRequestPayload` instance.

  - ### setParseDataTypes

    public void setParseDataTypes(@Nullable Boolean parseDataTypes)
    Set the parseDataTypes of this `PredictRequestPayload` instance.
    Parameters:
      `parseDataTypes` - Whether to parse the data types of the columns. If set to True, numeric columns will be parsed to float or integer and dates in ISO format YYYY-MM-DD will be parsed.

  - ### dataSchema

    @Nonnull public PredictRequestPayload dataSchema(@Nullable Map<String,SchemaFieldConfig> dataSchema)
    Set the dataSchema of this `PredictRequestPayload` instance and return the same instance.
    Parameters:
      `dataSchema` - Optional schema defining the data types of each column. If provided, this will override automatic data type parsing.
    Returns:
      The same instance of this `PredictRequestPayload` class

  - ### putdataSchemaItem

    @Nonnull public PredictRequestPayload putdataSchemaItem(@Nonnull String key, @Nonnull SchemaFieldConfig dataSchemaItem)
    Put one dataSchema instance to this `PredictRequestPayload` instance.
    Parameters:
      `key` - The String key of this dataSchema instance
      `dataSchemaItem` - The dataSchema that should be added under the given key
    Returns:
      The same instance of type `PredictRequestPayload`

  - ### getDataSchema

    @Nullable public Map<String,SchemaFieldConfig> getDataSchema()
    Optional schema defining the data types of each column. If provided, this will override automatic data type parsing.
    Returns:
      dataSchema The dataSchema of this `PredictRequestPayload` instance.

  - ### setDataSchema

    public void setDataSchema(@Nullable Map<String,SchemaFieldConfig> dataSchema)
    Set the dataSchema of this `PredictRequestPayload` instance.
    Parameters:
      `dataSchema` - Optional schema defining the data types of each column. If provided, this will override automatic data type parsing.

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `PredictRequestPayload`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `PredictRequestPayload` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `PredictRequestPayload` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `PredictRequestPayload` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static PredictRequestPayload.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `PredictRequestPayload` instance with all required arguments.