Package com.sap.ai.sdk.grounding.model

# Class CollectionRequest

java.lang.Object
com.sap.ai.sdk.grounding.model.CollectionRequest

public class CollectionRequest extends Object
A request for creating a new, single collection.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `CollectionRequest.Builder`
  Builder helper class.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CollectionRequest`
  `addMetadataItem(VectorKeyValueListPair metadataItem)`
  Add one metadata instance to this `CollectionRequest`.
  `static CollectionRequest.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `CollectionRequest` instance with all required arguments.
  `CollectionRequest`
  `embeddingConfig(EmbeddingConfig embeddingConfig)`
  Set the embeddingConfig of this `CollectionRequest` 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 `CollectionRequest`.
  `EmbeddingConfig`
  `getEmbeddingConfig()`
  Get embeddingConfig
  `UUID`
  `getId()`
  Unique identifier of a collection.
  `List<VectorKeyValueListPair>`
  `getMetadata()`
  Metadata attached to collection.
  `String`
  `getTitle()`
  Get title
  `int`
  `hashCode()`
  `CollectionRequest`
  `id(UUID id)`
  Set the id of this `CollectionRequest` instance and return the same instance.
  `CollectionRequest`
  `metadata(List<VectorKeyValueListPair> metadata)`
  Set the metadata of this `CollectionRequest` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `CollectionRequest` instance.
  `void`
  `setEmbeddingConfig(EmbeddingConfig embeddingConfig)`
  Set the embeddingConfig of this `CollectionRequest` instance.
  `void`
  `setId(UUID id)`
  Set the id of this `CollectionRequest` instance.
  `void`
  `setMetadata(List<VectorKeyValueListPair> metadata)`
  Set the metadata of this `CollectionRequest` instance.
  `void`
  `setTitle(String title)`
  Set the title of this `CollectionRequest` instance.
  `CollectionRequest`
  `title(String title)`
  Set the title of this `CollectionRequest` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `CollectionRequest` instance including unrecognized properties.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### CollectionRequest

    protected CollectionRequest()
    Default constructor for CollectionRequest.

- ## Method Details

  - ### title

    @Nonnull public CollectionRequest title(@Nullable String title)
    Set the title of this `CollectionRequest` instance and return the same instance.
    Parameters:
      `title` - The title of this `CollectionRequest`
    Returns:
      The same instance of this `CollectionRequest` class

  - ### getTitle

    @Nullable public String getTitle()
    Get title
    Returns:
      title The title of this `CollectionRequest` instance.

  - ### setTitle

    public void setTitle(@Nullable String title)
    Set the title of this `CollectionRequest` instance.
    Parameters:
      `title` - The title of this `CollectionRequest`

  - ### embeddingConfig

    @Nonnull public CollectionRequest embeddingConfig(@Nonnull EmbeddingConfig embeddingConfig)
    Set the embeddingConfig of this `CollectionRequest` instance and return the same instance.
    Parameters:
      `embeddingConfig` - The embeddingConfig of this `CollectionRequest`
    Returns:
      The same instance of this `CollectionRequest` class

  - ### getEmbeddingConfig

    @Nonnull public EmbeddingConfig getEmbeddingConfig()
    Get embeddingConfig
    Returns:
      embeddingConfig The embeddingConfig of this `CollectionRequest` instance.

  - ### setEmbeddingConfig

    public void setEmbeddingConfig(@Nonnull EmbeddingConfig embeddingConfig)
    Set the embeddingConfig of this `CollectionRequest` instance.
    Parameters:
      `embeddingConfig` - The embeddingConfig of this `CollectionRequest`

  - ### metadata

    @Nonnull public CollectionRequest metadata(@Nullable List<VectorKeyValueListPair> metadata)
    Set the metadata of this `CollectionRequest` instance and return the same instance.
    Parameters:
      `metadata` - Metadata attached to collection. Useful to restrict search to a subset of collections.
    Returns:
      The same instance of this `CollectionRequest` class

  - ### addMetadataItem

    @Nonnull public CollectionRequest addMetadataItem(@Nonnull VectorKeyValueListPair metadataItem)
    Add one metadata instance to this `CollectionRequest`.
    Parameters:
      `metadataItem` - The metadata that should be added
    Returns:
      The same instance of type `CollectionRequest`

  - ### getMetadata

    @Nonnull public List<VectorKeyValueListPair> getMetadata()
    Metadata attached to collection. Useful to restrict search to a subset of collections.
    Returns:
      metadata The metadata of this `CollectionRequest` instance.

  - ### setMetadata

    public void setMetadata(@Nullable List<VectorKeyValueListPair> metadata)
    Set the metadata of this `CollectionRequest` instance.
    Parameters:
      `metadata` - Metadata attached to collection. Useful to restrict search to a subset of collections.

  - ### id

    @Nonnull public CollectionRequest id(@Nullable UUID id)
    Set the id of this `CollectionRequest` instance and return the same instance.
    Parameters:
      `id` - Unique identifier of a collection.
    Returns:
      The same instance of this `CollectionRequest` class

  - ### getId

    @Nullable public UUID getId()
    Unique identifier of a collection.
    Returns:
      id The id of this `CollectionRequest` instance.

  - ### setId

    public void setId(@Nullable UUID id)
    Set the id of this `CollectionRequest` instance.
    Parameters:
      `id` - Unique identifier of a collection.

  - ### getCustomFieldNames

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