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

# Class DefaultApi

java.lang.Object
com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
com.sap.ai.sdk.foundationmodels.rpt.generated.client.DefaultApi

public class DefaultApi extends com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
SAP-RPT-1 Tabular AI in version 0.1.0.

A REST API for in-context learning with the SAP-RPT-1 model.

- ## Field Summary

  ### Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi

  `apiClient, defaultHeaders`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultApi(com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination)`
  Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI.
  `DefaultApi(com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient)`
  Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI based on a given `ApiClient`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PredictResponsePayload`
  `predict(PredictRequestPayload predictRequestPayload)`
  Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).
  `PredictResponsePayload`
  `predictParquet(File _file, String predictionConfig)`
  Make in-context predictions for specified target columns based on provided table data Parquet file.
  `PredictResponsePayload`
  `predictParquet(File _file, String predictionConfig, String indexColumn, Boolean parseDataTypes)`
  Make in-context predictions for specified target columns based on provided table data Parquet file.
  `DefaultApi`
  `withDefaultHeaders(Map<String,String> defaultHeaders)`
  Creates a new API instance with additional default headers.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultApi

    public DefaultApi(@Nonnull com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination)
    Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI.
    Parameters:
      `httpDestination` - The destination that API should be used with

  - ### DefaultApi

    public DefaultApi(@Nonnull com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient)
    Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI based on a given `ApiClient`.
    Parameters:
      `apiClient` - ApiClient to invoke the API on

- ## Method Details

  - ### withDefaultHeaders

    public DefaultApi withDefaultHeaders(@Nonnull Map<String,String> defaultHeaders)
    Creates a new API instance with additional default headers.
    Parameters:
      `defaultHeaders` - Additional headers to include in all requests
    Returns:
      A new API instance with the combined headers

  - ### predict

    @Nonnull public PredictResponsePayload predict(@Nonnull PredictRequestPayload predictRequestPayload) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).

    Make in-context predictions for specified target columns. Either \"rows\" or \"columns\" must be provided and must contain both context and query rows. You can optionally send gzip-compressed JSON payloads and set a \"Content-Encoding: gzip\" header.

    200 - Successful Prediction

    400 - Bad Request - Invalid input data

    413 - Payload Too Large

    422 - Validation Error

    500 - Internal Server Error

    Parameters:
      `predictRequestPayload` - The value for the parameter predictRequestPayload
    Returns:
      PredictResponsePayload
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### predictParquet

    @Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig, @Nullable String indexColumn, @Nullable Boolean parseDataTypes) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Make in-context predictions for specified target columns based on provided table data Parquet file.

    Make in-context predictions for specified target columns based on provided table data Parquet file.

    200 - Successful Prediction

    400 - Bad Request - Invalid input data

    413 - Payload Too Large

    422 - Validation Error

    500 - Internal Server Error

    Parameters:
      `_file` - (required) Parquet file containing the data
      `predictionConfig` - (required) JSON string for prediction_config
      `indexColumn` - (optional) Optional index column name
      `parseDataTypes` - (optional, default to true) Whether to parse data types
    Returns:
      PredictResponsePayload
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### predictParquet

    @Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Make in-context predictions for specified target columns based on provided table data Parquet file.

    Make in-context predictions for specified target columns based on provided table data Parquet file.

    200 - Successful Prediction

    400 - Bad Request - Invalid input data

    413 - Payload Too Large

    422 - Validation Error

    500 - Internal Server Error

    Parameters:
      `_file` - Parquet file containing the data
      `predictionConfig` - JSON string for prediction_config
    Returns:
      PredictResponsePayload
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API