Package com.sap.ai.sdk.orchestration.model

# Class EmbeddingsResponse

java.lang.Object
com.sap.ai.sdk.orchestration.model.EmbeddingsResponse

public class EmbeddingsResponse extends Object
The response from request to embedding model following OpenAI specification.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `EmbeddingsResponse.Builder`
  Builder helper class.
  `static interface`
  `EmbeddingsResponse.Builder1`
  Builder helper class.
  `static interface`
  `EmbeddingsResponse.Builder2`
  Builder helper class.
  `static interface`
  `EmbeddingsResponse.Builder3`
  Builder helper class.
  `static enum`
  `EmbeddingsResponse.ObjectEnum`
  The object type, which is always \"list\".

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EmbeddingsResponse`
  `_object(EmbeddingsResponse.ObjectEnum _object)`
  Set the _object of this `EmbeddingsResponse` instance and return the same instance.
  `EmbeddingsResponse`
  `addDataItem(EmbeddingResult dataItem)`
  Add one data instance to this `EmbeddingsResponse`.
  `static EmbeddingsResponse.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `EmbeddingsResponse` instance with all required arguments.
  `EmbeddingsResponse`
  `data(List<EmbeddingResult> data)`
  Set the data of this `EmbeddingsResponse` instance and return the same instance.
  `boolean`
  `equals(Object o)`
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `EmbeddingsResponse`.
  `List<EmbeddingResult>`
  `getData()`
  The list of embeddings generated by the model.
  `String`
  `getModel()`
  The name of the model used to generate the embedding.
  `EmbeddingsResponse.ObjectEnum`
  `getObject()`
  The object type, which is always \"list\".
  `EmbeddingsUsage`
  `getUsage()`
  Get usage
  `int`
  `hashCode()`
  `EmbeddingsResponse`
  `model(String model)`
  Set the model of this `EmbeddingsResponse` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `EmbeddingsResponse` instance.
  `void`
  `setData(List<EmbeddingResult> data)`
  Set the data of this `EmbeddingsResponse` instance.
  `void`
  `setModel(String model)`
  Set the model of this `EmbeddingsResponse` instance.
  `void`
  `setObject(EmbeddingsResponse.ObjectEnum _object)`
  Set the _object of this `EmbeddingsResponse` instance.
  `void`
  `setUsage(EmbeddingsUsage usage)`
  Set the usage of this `EmbeddingsResponse` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `EmbeddingsResponse` instance including unrecognized properties.
  `String`
  `toString()`
  `EmbeddingsResponse`
  `usage(EmbeddingsUsage usage)`
  Set the usage of this `EmbeddingsResponse` instance and return the same instance.

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

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

- ## Constructor Details

  - ### EmbeddingsResponse

    protected EmbeddingsResponse()
    Default constructor for EmbeddingsResponse.

- ## Method Details

  - ### _object

    @Nonnull public EmbeddingsResponse _object(@Nonnull EmbeddingsResponse.ObjectEnum _object)
    Set the _object of this `EmbeddingsResponse` instance and return the same instance.
    Parameters:
      `_object` - The object type, which is always \"list\".
    Returns:
      The same instance of this `EmbeddingsResponse` class

  - ### getObject

    @Nonnull public EmbeddingsResponse.ObjectEnum getObject()
    The object type, which is always \"list\".
    Returns:
      _object The _object of this `EmbeddingsResponse` instance.

  - ### setObject

    public void setObject(@Nonnull EmbeddingsResponse.ObjectEnum _object)
    Set the _object of this `EmbeddingsResponse` instance.
    Parameters:
      `_object` - The object type, which is always \"list\".

  - ### data

    @Nonnull public EmbeddingsResponse data(@Nonnull List<EmbeddingResult> data)
    Set the data of this `EmbeddingsResponse` instance and return the same instance.
    Parameters:
      `data` - The list of embeddings generated by the model.
    Returns:
      The same instance of this `EmbeddingsResponse` class

  - ### addDataItem

    @Nonnull public EmbeddingsResponse addDataItem(@Nonnull EmbeddingResult dataItem)
    Add one data instance to this `EmbeddingsResponse`.
    Parameters:
      `dataItem` - The data that should be added
    Returns:
      The same instance of type `EmbeddingsResponse`

  - ### getData

    @Nonnull public List<EmbeddingResult> getData()
    The list of embeddings generated by the model.
    Returns:
      data The data of this `EmbeddingsResponse` instance.

  - ### setData

    public void setData(@Nonnull List<EmbeddingResult> data)
    Set the data of this `EmbeddingsResponse` instance.
    Parameters:
      `data` - The list of embeddings generated by the model.

  - ### model

    @Nonnull public EmbeddingsResponse model(@Nonnull String model)
    Set the model of this `EmbeddingsResponse` instance and return the same instance.
    Parameters:
      `model` - The name of the model used to generate the embedding.
    Returns:
      The same instance of this `EmbeddingsResponse` class

  - ### getModel

    @Nonnull public String getModel()
    The name of the model used to generate the embedding.
    Returns:
      model The model of this `EmbeddingsResponse` instance.

  - ### setModel

    public void setModel(@Nonnull String model)
    Set the model of this `EmbeddingsResponse` instance.
    Parameters:
      `model` - The name of the model used to generate the embedding.

  - ### usage

    @Nonnull public EmbeddingsResponse usage(@Nonnull EmbeddingsUsage usage)
    Set the usage of this `EmbeddingsResponse` instance and return the same instance.
    Parameters:
      `usage` - The usage of this `EmbeddingsResponse`
    Returns:
      The same instance of this `EmbeddingsResponse` class

  - ### getUsage

    @Nonnull public EmbeddingsUsage getUsage()
    Get usage
    Returns:
      usage The usage of this `EmbeddingsResponse` instance.

  - ### setUsage

    public void setUsage(@Nonnull EmbeddingsUsage usage)
    Set the usage of this `EmbeddingsResponse` instance.
    Parameters:
      `usage` - The usage of this `EmbeddingsResponse`

  - ### getCustomFieldNames

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