Package com.sap.ai.sdk.foundationmodels.openai

# Record Class OpenAiBatchInput.SingleRequest

java.lang.Object
java.lang.Record
com.sap.ai.sdk.foundationmodels.openai.OpenAiBatchInput.SingleRequest

Record Components:
  `customId` - a custom identifier for the request, used for tracking in batch processing
  `method` - the HTTP method for the request, e.g., "POST"
  `url` - the endpoint URL for the request, e.g., "/v1/chat/completions"
  `body` - the body of the request, which is a CreateChatCompletionRequest

Enclosing class:
  `OpenAiBatchInput`

public static record OpenAiBatchInput.SingleRequest(String customId, String method, String url, CreateChatCompletionRequest body) extends Record
Represents a single batch request in OpenAI batch format.

Since:
  1.20.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SingleRequest(String customId, String method, String url, CreateChatCompletionRequest body)`
  Creates an instance of a `SingleRequest` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CreateChatCompletionRequest`
  `body()`
  Returns the value of the `body` record component.
  `String`
  `customId()`
  Returns the value of the `customId` record component.
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `String`
  `method()`
  Returns the value of the `method` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `String`
  `url()`
  Returns the value of the `url` record component.

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

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

- ## Constructor Details

  - ### SingleRequest

    public SingleRequest(String customId, String method, String url, CreateChatCompletionRequest body)
    Creates an instance of a `SingleRequest` record class.
    Parameters:
      `customId` - the value for the `customId` record component
      `method` - the value for the `method` record component
      `url` - the value for the `url` record component
      `body` - the value for the `body` record component

- ## Method Details

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### customId

    public String customId()
    Returns the value of the `customId` record component.
    Returns:
      the value of the `customId` record component

  - ### method

    public String method()
    Returns the value of the `method` record component.
    Returns:
      the value of the `method` record component

  - ### url

    public String url()
    Returns the value of the `url` record component.
    Returns:
      the value of the `url` record component

  - ### body

    public CreateChatCompletionRequest body()
    Returns the value of the `body` record component.
    Returns:
      the value of the `body` record component