Package com.sap.ai.sdk.grounding.model
Class DocumentMetadata
java.lang.Object
com.sap.ai.sdk.grounding.model.DocumentMetadata
DocumentMetadata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static enumGets or Sets matchMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for DocumentMetadata. -
Method Summary
Modifier and TypeMethodDescriptionaddValueItem(String valueItem) Add one value instance to thisDocumentMetadata.static DocumentMetadata.Buildercreate()Create a type-safe, fluent-api builder object to construct a newDocumentMetadatainstance with all required arguments.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theDocumentMetadata.getKey()Metadata key name.Get matchModegetValue()An array of string values associated with the metadata key.inthashCode()Set the key of thisDocumentMetadatainstance and return the same instance.matchMode(DocumentMetadata.MatchModeEnum matchMode) Set the matchMode of thisDocumentMetadatainstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisDocumentMetadatainstance.voidSet the key of thisDocumentMetadatainstance.voidsetMatchMode(DocumentMetadata.MatchModeEnum matchMode) Set the matchMode of thisDocumentMetadatainstance.voidSet the value of thisDocumentMetadatainstance.toMap()Get the value of all properties of thisDocumentMetadatainstance including unrecognized properties.toString()Set the value of thisDocumentMetadatainstance and return the same instance.
-
Constructor Details
-
DocumentMetadata
protected DocumentMetadata()Default constructor for DocumentMetadata.
-
-
Method Details
-
key
Set the key of thisDocumentMetadatainstance and return the same instance.- Parameters:
key- Metadata key name.- Returns:
- The same instance of this
DocumentMetadataclass
-
getKey
Metadata key name.- Returns:
- key The key of this
DocumentMetadatainstance.
-
setKey
Set the key of thisDocumentMetadatainstance.- Parameters:
key- Metadata key name.
-
value
Set the value of thisDocumentMetadatainstance and return the same instance.- Parameters:
value- An array of string values associated with the metadata key. If the key already exists, its values will be overwritten. Setting the value to null will delete the metadata key-value pair.- Returns:
- The same instance of this
DocumentMetadataclass
-
addValueItem
Add one value instance to thisDocumentMetadata.- Parameters:
valueItem- The value that should be added- Returns:
- The same instance of type
DocumentMetadata
-
getValue
An array of string values associated with the metadata key. If the key already exists, its values will be overwritten. Setting the value to null will delete the metadata key-value pair.- Returns:
- value The value of this
DocumentMetadatainstance.
-
setValue
Set the value of thisDocumentMetadatainstance.- Parameters:
value- An array of string values associated with the metadata key. If the key already exists, its values will be overwritten. Setting the value to null will delete the metadata key-value pair.
-
matchMode
Set the matchMode of thisDocumentMetadatainstance and return the same instance.- Parameters:
matchMode- The matchMode of thisDocumentMetadata- Returns:
- The same instance of this
DocumentMetadataclass
-
getMatchMode
Get matchMode- Returns:
- matchMode The matchMode of this
DocumentMetadatainstance.
-
setMatchMode
Set the matchMode of thisDocumentMetadatainstance.- Parameters:
matchMode- The matchMode of thisDocumentMetadata
-
getCustomFieldNames
Get the names of the unrecognizable properties of theDocumentMetadata.- 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 thisDocumentMetadatainstance.- 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 thisDocumentMetadatainstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisDocumentMetadatainstance. 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 newDocumentMetadatainstance with all required arguments.
-
toMap()instead.