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

# Class PredictResponsePayload

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

public class PredictResponsePayload extends Object
Response payload for prediction requests. Contains a list of prediction results.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `PredictResponsePayload.Builder`
  Builder helper class.
  `static interface`
  `PredictResponsePayload.Builder1`
  Builder helper class.
  `static interface`
  `PredictResponsePayload.Builder2`
  Builder helper class.
  `static interface`
  `PredictResponsePayload.Builder3`
  Builder helper class.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PredictResponsePayload`
  `addPredictionsItem(Map<String,PredictionsInnerValue> predictionsItem)`
  Add one predictions instance to this `PredictResponsePayload`.
  `static PredictResponsePayload.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `PredictResponsePayload` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `PredictResponsePayload`.
  `String`
  `getId()`
  Unique ID for the request.
  `PredictResponseMetadata`
  `getMetadata()`
  Get metadata
  `List<Map<String,PredictionsInnerValue>>`
  `getPredictions()`
  Mapping of column names to their list of prediction results or index column.
  `PredictResponseStatus`
  `getStatus()`
  Status message that can indicate warnings (e.g.
  `int`
  `hashCode()`
  `PredictResponsePayload`
  `id(String id)`
  Set the id of this `PredictResponsePayload` instance and return the same instance.
  `PredictResponsePayload`
  `metadata(PredictResponseMetadata metadata)`
  Set the metadata of this `PredictResponsePayload` instance and return the same instance.
  `PredictResponsePayload`
  `predictions(List<Map<String,PredictionsInnerValue>> predictions)`
  Set the predictions of this `PredictResponsePayload` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `PredictResponsePayload` instance.
  `void`
  `setId(String id)`
  Set the id of this `PredictResponsePayload` instance.
  `void`
  `setMetadata(PredictResponseMetadata metadata)`
  Set the metadata of this `PredictResponsePayload` instance.
  `void`
  `setPredictions(List<Map<String,PredictionsInnerValue>> predictions)`
  Set the predictions of this `PredictResponsePayload` instance.
  `void`
  `setStatus(PredictResponseStatus status)`
  Set the status of this `PredictResponsePayload` instance.
  `PredictResponsePayload`
  `status(PredictResponseStatus status)`
  Set the status of this `PredictResponsePayload` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `PredictResponsePayload` instance including unrecognized properties.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### PredictResponsePayload

    protected PredictResponsePayload()
    Default constructor for PredictResponsePayload.

- ## Method Details

  - ### id

    @Nonnull public PredictResponsePayload id(@Nonnull String id)
    Set the id of this `PredictResponsePayload` instance and return the same instance.
    Parameters:
      `id` - Unique ID for the request.
    Returns:
      The same instance of this `PredictResponsePayload` class

  - ### getId

    @Nonnull public String getId()
    Unique ID for the request.
    Returns:
      id The id of this `PredictResponsePayload` instance.

  - ### setId

    public void setId(@Nonnull String id)
    Set the id of this `PredictResponsePayload` instance.
    Parameters:
      `id` - Unique ID for the request.

  - ### status

    @Nonnull public PredictResponsePayload status(@Nonnull PredictResponseStatus status)
    Set the status of this `PredictResponsePayload` instance and return the same instance.
    Parameters:
      `status` - Status message that can indicate warnings (e.g. about suboptimal data).
    Returns:
      The same instance of this `PredictResponsePayload` class

  - ### getStatus

    @Nonnull public PredictResponseStatus getStatus()
    Status message that can indicate warnings (e.g. about suboptimal data).
    Returns:
      status The status of this `PredictResponsePayload` instance.

  - ### setStatus

    public void setStatus(@Nonnull PredictResponseStatus status)
    Set the status of this `PredictResponsePayload` instance.
    Parameters:
      `status` - Status message that can indicate warnings (e.g. about suboptimal data).

  - ### predictions

    @Nonnull public PredictResponsePayload predictions(@Nonnull List<Map<String,PredictionsInnerValue>> predictions)
    Set the predictions of this `PredictResponsePayload` instance and return the same instance.
    Parameters:
      `predictions` - Mapping of column names to their list of prediction results or index column.
    Returns:
      The same instance of this `PredictResponsePayload` class

  - ### addPredictionsItem

    @Nonnull public PredictResponsePayload addPredictionsItem(@Nonnull Map<String,PredictionsInnerValue> predictionsItem)
    Add one predictions instance to this `PredictResponsePayload`.
    Parameters:
      `predictionsItem` - The predictions that should be added
    Returns:
      The same instance of type `PredictResponsePayload`

  - ### getPredictions

    @Nonnull public List<Map<String,PredictionsInnerValue>> getPredictions()
    Mapping of column names to their list of prediction results or index column.
    Returns:
      predictions The predictions of this `PredictResponsePayload` instance.

  - ### setPredictions

    public void setPredictions(@Nonnull List<Map<String,PredictionsInnerValue>> predictions)
    Set the predictions of this `PredictResponsePayload` instance.
    Parameters:
      `predictions` - Mapping of column names to their list of prediction results or index column.

  - ### metadata

    @Nonnull public PredictResponsePayload metadata(@Nonnull PredictResponseMetadata metadata)
    Set the metadata of this `PredictResponsePayload` instance and return the same instance.
    Parameters:
      `metadata` - The metadata of this `PredictResponsePayload`
    Returns:
      The same instance of this `PredictResponsePayload` class

  - ### getMetadata

    @Nonnull public PredictResponseMetadata getMetadata()
    Get metadata
    Returns:
      metadata The metadata of this `PredictResponsePayload` instance.

  - ### setMetadata

    public void setMetadata(@Nonnull PredictResponseMetadata metadata)
    Set the metadata of this `PredictResponsePayload` instance.
    Parameters:
      `metadata` - The metadata of this `PredictResponsePayload`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `PredictResponsePayload`.
    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 `PredictResponsePayload` 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 `PredictResponsePayload` 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 `PredictResponsePayload` 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 PredictResponsePayload.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `PredictResponsePayload` instance with all required arguments.