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

# Class DocumentsChunk

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

public class DocumentsChunk extends Object
DocumentsChunk

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `DocumentsChunk.Builder`
  Builder helper class.
  `static interface`
  `DocumentsChunk.Builder1`
  Builder helper class.
  `static interface`
  `DocumentsChunk.Builder2`
  Builder helper class.

- ## Constructor Summary

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

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### DocumentsChunk

    protected DocumentsChunk()
    Default constructor for DocumentsChunk.

- ## Method Details

  - ### id

    @Nonnull public DocumentsChunk id(@Nonnull UUID id)
    Set the id of this `DocumentsChunk` instance and return the same instance.
    Parameters:
      `id` - The id of this `DocumentsChunk`
    Returns:
      The same instance of this `DocumentsChunk` class

  - ### getId

    @Nonnull public UUID getId()
    Get id
    Returns:
      id The id of this `DocumentsChunk` instance.

  - ### setId

    public void setId(@Nonnull UUID id)
    Set the id of this `DocumentsChunk` instance.
    Parameters:
      `id` - The id of this `DocumentsChunk`

  - ### title

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

  - ### getTitle

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

  - ### setTitle

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

  - ### metadata

    @Nonnull public DocumentsChunk metadata(@Nullable List<VectorKeyValueListPair> metadata)
    Set the metadata of this `DocumentsChunk` instance and return the same instance.
    Parameters:
      `metadata` - The metadata of this `DocumentsChunk`
    Returns:
      The same instance of this `DocumentsChunk` class

  - ### addMetadataItem

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

  - ### getMetadata

    @Nonnull public List<VectorKeyValueListPair> getMetadata()
    Get metadata
    Returns:
      metadata The metadata of this `DocumentsChunk` instance.

  - ### setMetadata

    public void setMetadata(@Nullable List<VectorKeyValueListPair> metadata)
    Set the metadata of this `DocumentsChunk` instance.
    Parameters:
      `metadata` - The metadata of this `DocumentsChunk`

  - ### documents

    @Nonnull public DocumentsChunk documents(@Nonnull List<DocumentOutput> documents)
    Set the documents of this `DocumentsChunk` instance and return the same instance.
    Parameters:
      `documents` - The documents of this `DocumentsChunk`
    Returns:
      The same instance of this `DocumentsChunk` class

  - ### addDocumentsItem

    @Nonnull public DocumentsChunk addDocumentsItem(@Nonnull DocumentOutput documentsItem)
    Add one documents instance to this `DocumentsChunk`.
    Parameters:
      `documentsItem` - The documents that should be added
    Returns:
      The same instance of type `DocumentsChunk`

  - ### getDocuments

    @Nonnull public List<DocumentOutput> getDocuments()
    Get documents
    Returns:
      documents The documents of this `DocumentsChunk` instance.

  - ### setDocuments

    public void setDocuments(@Nonnull List<DocumentOutput> documents)
    Set the documents of this `DocumentsChunk` instance.
    Parameters:
      `documents` - The documents of this `DocumentsChunk`

  - ### getCustomFieldNames

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