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

# Class EmbeddingResult

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

public class EmbeddingResult extends Object
Represents an embedding vector returned by embedding endpoint.

- ## Nested Class Summary

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

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EmbeddingResult`
  `_object(EmbeddingResult.ObjectEnum _object)`
  Set the _object of this `EmbeddingResult` instance and return the same instance.
  `static EmbeddingResult.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `EmbeddingResult` instance with all required arguments.
  `EmbeddingResult`
  `embedding(Embedding embedding)`
  Set the embedding of this `EmbeddingResult` 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 `EmbeddingResult`.
  `Embedding`
  `getEmbedding()`
  Get embedding
  `Integer`
  `getIndex()`
  The index of the embedding in the list of embeddings.
  `EmbeddingResult.ObjectEnum`
  `getObject()`
  The object type, which is always \"embedding\".
  `int`
  `hashCode()`
  `EmbeddingResult`
  `index(Integer index)`
  Set the index of this `EmbeddingResult` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `EmbeddingResult` instance.
  `void`
  `setEmbedding(Embedding embedding)`
  Set the embedding of this `EmbeddingResult` instance.
  `void`
  `setIndex(Integer index)`
  Set the index of this `EmbeddingResult` instance.
  `void`
  `setObject(EmbeddingResult.ObjectEnum _object)`
  Set the _object of this `EmbeddingResult` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `EmbeddingResult` instance including unrecognized properties.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### EmbeddingResult

    protected EmbeddingResult()
    Default constructor for EmbeddingResult.

- ## Method Details

  - ### _object

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

  - ### getObject

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

  - ### setObject

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

  - ### embedding

    @Nonnull public EmbeddingResult embedding(@Nonnull Embedding embedding)
    Set the embedding of this `EmbeddingResult` instance and return the same instance.
    Parameters:
      `embedding` - The embedding of this `EmbeddingResult`
    Returns:
      The same instance of this `EmbeddingResult` class

  - ### getEmbedding

    @Nonnull public Embedding getEmbedding()
    Get embedding
    Returns:
      embedding The embedding of this `EmbeddingResult` instance.

  - ### setEmbedding

    public void setEmbedding(@Nonnull Embedding embedding)
    Set the embedding of this `EmbeddingResult` instance.
    Parameters:
      `embedding` - The embedding of this `EmbeddingResult`

  - ### index

    @Nonnull public EmbeddingResult index(@Nonnull Integer index)
    Set the index of this `EmbeddingResult` instance and return the same instance.
    Parameters:
      `index` - The index of the embedding in the list of embeddings.
    Returns:
      The same instance of this `EmbeddingResult` class

  - ### getIndex

    @Nonnull public Integer getIndex()
    The index of the embedding in the list of embeddings.
    Returns:
      index The index of this `EmbeddingResult` instance.

  - ### setIndex

    public void setIndex(@Nonnull Integer index)
    Set the index of this `EmbeddingResult` instance.
    Parameters:
      `index` - The index of the embedding in the list of embeddings.

  - ### getCustomFieldNames

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