Package com.sap.ai.sdk.grounding.model
Class DocumentInput
java.lang.Object
com.sap.ai.sdk.grounding.model.DocumentInput
A single document stored in a collection by ID.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddChunksItem(TextOnlyBaseChunkCreate chunksItem) Add one chunks instance to thisDocumentInput.addMetadataItem(VectorDocumentKeyValueListPair metadataItem) Add one metadata instance to thisDocumentInput.chunks(List<TextOnlyBaseChunkCreate> chunks) Set the chunks of thisDocumentInputinstance and return the same instance.static DocumentInput.Buildercreate()Create a type-safe, fluent-api builder object to construct a newDocumentInputinstance with all required arguments.booleanGet chunksgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theDocumentInput.getId()Unique identifier of a document.Get metadatainthashCode()Set the id of thisDocumentInputinstance and return the same instance.metadata(List<VectorDocumentKeyValueListPair> metadata) Set the metadata of thisDocumentInputinstance and return the same instance.voidsetChunks(List<TextOnlyBaseChunkCreate> chunks) Set the chunks of thisDocumentInputinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisDocumentInputinstance.voidSet the id of thisDocumentInputinstance.voidsetMetadata(List<VectorDocumentKeyValueListPair> metadata) Set the metadata of thisDocumentInputinstance.toMap()Get the value of all properties of thisDocumentInputinstance including unrecognized properties.toString()
-
Constructor Details
-
DocumentInput
protected DocumentInput()Default constructor for DocumentInput.
-
-
Method Details
-
chunks
Set the chunks of thisDocumentInputinstance and return the same instance.- Parameters:
chunks- The chunks of thisDocumentInput- Returns:
- The same instance of this
DocumentInputclass
-
addChunksItem
Add one chunks instance to thisDocumentInput.- Parameters:
chunksItem- The chunks that should be added- Returns:
- The same instance of type
DocumentInput
-
getChunks
Get chunks- Returns:
- chunks The chunks of this
DocumentInputinstance.
-
setChunks
Set the chunks of thisDocumentInputinstance.- Parameters:
chunks- The chunks of thisDocumentInput
-
metadata
Set the metadata of thisDocumentInputinstance and return the same instance.- Parameters:
metadata- The metadata of thisDocumentInput- Returns:
- The same instance of this
DocumentInputclass
-
addMetadataItem
Add one metadata instance to thisDocumentInput.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
DocumentInput
-
getMetadata
Get metadata- Returns:
- metadata The metadata of this
DocumentInputinstance.
-
setMetadata
Set the metadata of thisDocumentInputinstance.- Parameters:
metadata- The metadata of thisDocumentInput
-
id
Set the id of thisDocumentInputinstance and return the same instance.- Parameters:
id- Unique identifier of a document.- Returns:
- The same instance of this
DocumentInputclass
-
getId
Unique identifier of a document.- Returns:
- id The id of this
DocumentInputinstance.
-
setId
Set the id of thisDocumentInputinstance.- Parameters:
id- Unique identifier of a document.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theDocumentInput.- 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 thisDocumentInputinstance.- 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 thisDocumentInputinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisDocumentInputinstance. 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 newDocumentInputinstance with all required arguments.
-
toMap()instead.