Package com.sap.ai.sdk.grounding.model
Class Documents
java.lang.Object
com.sap.ai.sdk.grounding.model.Documents
A response containing documents retrieved from the server.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddResourcesItem(DocumentWithoutChunks resourcesItem) Add one resources instance to thisDocuments.Set the count of thisDocumentsinstance and return the same instance.static Documents.Buildercreate()Create a type-safe, fluent-api builder object to construct a newDocumentsinstance with all required arguments.booleangetCount()Get countgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theDocuments.Get resourcesinthashCode()resources(List<DocumentWithoutChunks> resources) Set the resources of thisDocumentsinstance and return the same instance.voidSet the count of thisDocumentsinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisDocumentsinstance.voidsetResources(List<DocumentWithoutChunks> resources) Set the resources of thisDocumentsinstance.toMap()Get the value of all properties of thisDocumentsinstance including unrecognized properties.toString()
-
Constructor Details
-
Documents
protected Documents()Default constructor for Documents.
-
-
Method Details
-
count
Set the count of thisDocumentsinstance and return the same instance. -
getCount
Get count- Returns:
- count The count of this
Documentsinstance.
-
setCount
Set the count of thisDocumentsinstance.- Parameters:
count- The count of thisDocuments
-
resources
Set the resources of thisDocumentsinstance and return the same instance. -
addResourcesItem
Add one resources instance to thisDocuments.- Parameters:
resourcesItem- The resources that should be added- Returns:
- The same instance of type
Documents
-
getResources
Get resources- Returns:
- resources The resources of this
Documentsinstance.
-
setResources
Set the resources of thisDocumentsinstance.- Parameters:
resources- The resources of thisDocuments
-
getCustomFieldNames
Get the names of the unrecognizable properties of theDocuments.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisDocumentsinstance.- 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
Get the value of all properties of thisDocumentsinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisDocumentsinstance. 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 propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newDocumentsinstance with all required arguments.
-
toMap()instead.