Package com.sap.ai.sdk.prompt.registry.model

# Class DocumentGroundingFilter

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.DocumentGroundingFilter

All Implemented Interfaces:
  `GroundingModuleConfigConfigFiltersInner`

public class DocumentGroundingFilter extends Object implements GroundingModuleConfigConfigFiltersInner
DocumentGroundingFilter

- ## Nested Class Summary

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

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DocumentGroundingFilter`
  `addChunkMetadataItem(KeyValueListPair chunkMetadataItem)`
  Add one chunkMetadata instance to this `DocumentGroundingFilter`.
  `DocumentGroundingFilter`
  `addDataRepositoriesItem(String dataRepositoriesItem)`
  Add one dataRepositories instance to this `DocumentGroundingFilter`.
  `DocumentGroundingFilter`
  `addDataRepositoryMetadataItem(KeyValueListPair dataRepositoryMetadataItem)`
  Add one dataRepositoryMetadata instance to this `DocumentGroundingFilter`.
  `DocumentGroundingFilter`
  `addDocumentMetadataItem(SearchDocumentKeyValueListPair documentMetadataItem)`
  Add one documentMetadata instance to this `DocumentGroundingFilter`.
  `DocumentGroundingFilter`
  `chunkMetadata(List<KeyValueListPair> chunkMetadata)`
  Set the chunkMetadata of this `DocumentGroundingFilter` instance and return the same instance.
  `static DocumentGroundingFilter.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `DocumentGroundingFilter` instance with all required arguments.
  `DocumentGroundingFilter`
  `dataRepositories(List<String> dataRepositories)`
  Set the dataRepositories of this `DocumentGroundingFilter` instance and return the same instance.
  `DocumentGroundingFilter`
  `dataRepositoryMetadata(List<KeyValueListPair> dataRepositoryMetadata)`
  Set the dataRepositoryMetadata of this `DocumentGroundingFilter` instance and return the same instance.
  `DocumentGroundingFilter`
  `dataRepositoryType(DataRepositoryType dataRepositoryType)`
  Set the dataRepositoryType of this `DocumentGroundingFilter` instance and return the same instance.
  `DocumentGroundingFilter`
  `documentMetadata(List<SearchDocumentKeyValueListPair> documentMetadata)`
  Set the documentMetadata of this `DocumentGroundingFilter` instance and return the same instance.
  `boolean`
  `equals(Object o)`
  `List<KeyValueListPair>`
  `getChunkMetadata()`
  Restrict chunks considered during search to those with the given metadata.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `DocumentGroundingFilter`.
  `List<String>`
  `getDataRepositories()`
  Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.
  `List<KeyValueListPair>`
  `getDataRepositoryMetadata()`
  Restrict DataRepositories considered during search to those annotated with the given metadata.
  `DataRepositoryType`
  `getDataRepositoryType()`
  Get dataRepositoryType
  `List<SearchDocumentKeyValueListPair>`
  `getDocumentMetadata()`
  Restrict documents considered during search to those annotated with the given metadata.
  `String`
  `getId()`
  Identifier of this SearchFilter - unique per request.
  `GroundingFilterSearchConfiguration`
  `getSearchConfig()`
  Get searchConfig
  `int`
  `hashCode()`
  `DocumentGroundingFilter`
  `id(String id)`
  Set the id of this `DocumentGroundingFilter` instance and return the same instance.
  `DocumentGroundingFilter`
  `searchConfig(GroundingFilterSearchConfiguration searchConfig)`
  Set the searchConfig of this `DocumentGroundingFilter` instance and return the same instance.
  `void`
  `setChunkMetadata(List<KeyValueListPair> chunkMetadata)`
  Set the chunkMetadata of this `DocumentGroundingFilter` instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `DocumentGroundingFilter` instance.
  `void`
  `setDataRepositories(List<String> dataRepositories)`
  Set the dataRepositories of this `DocumentGroundingFilter` instance.
  `void`
  `setDataRepositoryMetadata(List<KeyValueListPair> dataRepositoryMetadata)`
  Set the dataRepositoryMetadata of this `DocumentGroundingFilter` instance.
  `void`
  `setDataRepositoryType(DataRepositoryType dataRepositoryType)`
  Set the dataRepositoryType of this `DocumentGroundingFilter` instance.
  `void`
  `setDocumentMetadata(List<SearchDocumentKeyValueListPair> documentMetadata)`
  Set the documentMetadata of this `DocumentGroundingFilter` instance.
  `void`
  `setId(String id)`
  Set the id of this `DocumentGroundingFilter` instance.
  `void`
  `setSearchConfig(GroundingFilterSearchConfiguration searchConfig)`
  Set the searchConfig of this `DocumentGroundingFilter` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `DocumentGroundingFilter` instance including unrecognized properties.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### DocumentGroundingFilter

    protected DocumentGroundingFilter()
    Default constructor for DocumentGroundingFilter.

- ## Method Details

  - ### id

    @Nonnull public DocumentGroundingFilter id(@Nullable String id)
    Set the id of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `id` - Identifier of this SearchFilter - unique per request.
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### getId

    @Nonnull public String getId()
    Identifier of this SearchFilter - unique per request.
    Returns:
      id The id of this `DocumentGroundingFilter` instance.

  - ### setId

    public void setId(@Nullable String id)
    Set the id of this `DocumentGroundingFilter` instance.
    Parameters:
      `id` - Identifier of this SearchFilter - unique per request.

  - ### searchConfig

    @Nonnull public DocumentGroundingFilter searchConfig(@Nullable GroundingFilterSearchConfiguration searchConfig)
    Set the searchConfig of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `searchConfig` - The searchConfig of this `DocumentGroundingFilter`
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### getSearchConfig

    @Nonnull public GroundingFilterSearchConfiguration getSearchConfig()
    Get searchConfig
    Returns:
      searchConfig The searchConfig of this `DocumentGroundingFilter` instance.

  - ### setSearchConfig

    public void setSearchConfig(@Nullable GroundingFilterSearchConfiguration searchConfig)
    Set the searchConfig of this `DocumentGroundingFilter` instance.
    Parameters:
      `searchConfig` - The searchConfig of this `DocumentGroundingFilter`

  - ### dataRepositories

    @Nonnull public DocumentGroundingFilter dataRepositories(@Nullable List<String> dataRepositories)
    Set the dataRepositories of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `dataRepositories` - Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### addDataRepositoriesItem

    @Nonnull public DocumentGroundingFilter addDataRepositoriesItem(@Nonnull String dataRepositoriesItem)
    Add one dataRepositories instance to this `DocumentGroundingFilter`.
    Parameters:
      `dataRepositoriesItem` - The dataRepositories that should be added
    Returns:
      The same instance of type `DocumentGroundingFilter`

  - ### getDataRepositories

    @Nonnull public List<String> getDataRepositories()
    Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.
    Returns:
      dataRepositories The dataRepositories of this `DocumentGroundingFilter` instance.

  - ### setDataRepositories

    public void setDataRepositories(@Nullable List<String> dataRepositories)
    Set the dataRepositories of this `DocumentGroundingFilter` instance.
    Parameters:
      `dataRepositories` - Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.

  - ### dataRepositoryType

    @Nonnull public DocumentGroundingFilter dataRepositoryType(@Nonnull DataRepositoryType dataRepositoryType)
    Set the dataRepositoryType of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `dataRepositoryType` - The dataRepositoryType of this `DocumentGroundingFilter`
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### getDataRepositoryType

    @Nonnull public DataRepositoryType getDataRepositoryType()
    Get dataRepositoryType
    Returns:
      dataRepositoryType The dataRepositoryType of this `DocumentGroundingFilter` instance.

  - ### setDataRepositoryType

    public void setDataRepositoryType(@Nonnull DataRepositoryType dataRepositoryType)
    Set the dataRepositoryType of this `DocumentGroundingFilter` instance.
    Parameters:
      `dataRepositoryType` - The dataRepositoryType of this `DocumentGroundingFilter`

  - ### dataRepositoryMetadata

    @Nonnull public DocumentGroundingFilter dataRepositoryMetadata(@Nullable List<KeyValueListPair> dataRepositoryMetadata)
    Set the dataRepositoryMetadata of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `dataRepositoryMetadata` - Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### addDataRepositoryMetadataItem

    @Nonnull public DocumentGroundingFilter addDataRepositoryMetadataItem(@Nonnull KeyValueListPair dataRepositoryMetadataItem)
    Add one dataRepositoryMetadata instance to this `DocumentGroundingFilter`.
    Parameters:
      `dataRepositoryMetadataItem` - The dataRepositoryMetadata that should be added
    Returns:
      The same instance of type `DocumentGroundingFilter`

  - ### getDataRepositoryMetadata

    @Nonnull public List<KeyValueListPair> getDataRepositoryMetadata()
    Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']
    Returns:
      dataRepositoryMetadata The dataRepositoryMetadata of this `DocumentGroundingFilter` instance.

  - ### setDataRepositoryMetadata

    public void setDataRepositoryMetadata(@Nullable List<KeyValueListPair> dataRepositoryMetadata)
    Set the dataRepositoryMetadata of this `DocumentGroundingFilter` instance.
    Parameters:
      `dataRepositoryMetadata` - Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']

  - ### documentMetadata

    @Nonnull public DocumentGroundingFilter documentMetadata(@Nullable List<SearchDocumentKeyValueListPair> documentMetadata)
    Set the documentMetadata of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `documentMetadata` - Restrict documents considered during search to those annotated with the given metadata.
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### addDocumentMetadataItem

    @Nonnull public DocumentGroundingFilter addDocumentMetadataItem(@Nonnull SearchDocumentKeyValueListPair documentMetadataItem)
    Add one documentMetadata instance to this `DocumentGroundingFilter`.
    Parameters:
      `documentMetadataItem` - The documentMetadata that should be added
    Returns:
      The same instance of type `DocumentGroundingFilter`

  - ### getDocumentMetadata

    @Nonnull public List<SearchDocumentKeyValueListPair> getDocumentMetadata()
    Restrict documents considered during search to those annotated with the given metadata.
    Returns:
      documentMetadata The documentMetadata of this `DocumentGroundingFilter` instance.

  - ### setDocumentMetadata

    public void setDocumentMetadata(@Nullable List<SearchDocumentKeyValueListPair> documentMetadata)
    Set the documentMetadata of this `DocumentGroundingFilter` instance.
    Parameters:
      `documentMetadata` - Restrict documents considered during search to those annotated with the given metadata.

  - ### chunkMetadata

    @Nonnull public DocumentGroundingFilter chunkMetadata(@Nullable List<KeyValueListPair> chunkMetadata)
    Set the chunkMetadata of this `DocumentGroundingFilter` instance and return the same instance.
    Parameters:
      `chunkMetadata` - Restrict chunks considered during search to those with the given metadata.
    Returns:
      The same instance of this `DocumentGroundingFilter` class

  - ### addChunkMetadataItem

    @Nonnull public DocumentGroundingFilter addChunkMetadataItem(@Nonnull KeyValueListPair chunkMetadataItem)
    Add one chunkMetadata instance to this `DocumentGroundingFilter`.
    Parameters:
      `chunkMetadataItem` - The chunkMetadata that should be added
    Returns:
      The same instance of type `DocumentGroundingFilter`

  - ### getChunkMetadata

    @Nonnull public List<KeyValueListPair> getChunkMetadata()
    Restrict chunks considered during search to those with the given metadata.
    Returns:
      chunkMetadata The chunkMetadata of this `DocumentGroundingFilter` instance.

  - ### setChunkMetadata

    public void setChunkMetadata(@Nullable List<KeyValueListPair> chunkMetadata)
    Set the chunkMetadata of this `DocumentGroundingFilter` instance.
    Parameters:
      `chunkMetadata` - Restrict chunks considered during search to those with the given metadata.

  - ### getCustomFieldNames

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