Package com.sap.ai.sdk.grounding.model
Class DocumentCreateRequest
java.lang.Object
com.sap.ai.sdk.grounding.model.DocumentCreateRequest
A create request containing one or more new documents to create and store in a collection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for DocumentCreateRequest. -
Method Summary
Modifier and TypeMethodDescriptionaddDocumentsItem(BaseDocument documentsItem) Add one documents instance to thisDocumentCreateRequest.create()Create a type-safe, fluent-api builder object to construct a newDocumentCreateRequestinstance with all required arguments.documents(List<BaseDocument> documents) Set the documents of thisDocumentCreateRequestinstance and return the same instance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theDocumentCreateRequest.Get documentsinthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisDocumentCreateRequestinstance.voidsetDocuments(List<BaseDocument> documents) Set the documents of thisDocumentCreateRequestinstance.toMap()Get the value of all properties of thisDocumentCreateRequestinstance including unrecognized properties.toString()
-
Constructor Details
-
DocumentCreateRequest
protected DocumentCreateRequest()Default constructor for DocumentCreateRequest.
-
-
Method Details
-
documents
Set the documents of thisDocumentCreateRequestinstance and return the same instance.- Parameters:
documents- The documents of thisDocumentCreateRequest- Returns:
- The same instance of this
DocumentCreateRequestclass
-
addDocumentsItem
Add one documents instance to thisDocumentCreateRequest.- Parameters:
documentsItem- The documents that should be added- Returns:
- The same instance of type
DocumentCreateRequest
-
getDocuments
Get documents- Returns:
- documents The documents of this
DocumentCreateRequestinstance.
-
setDocuments
Set the documents of thisDocumentCreateRequestinstance.- Parameters:
documents- The documents of thisDocumentCreateRequest
-
getCustomFieldNames
Get the names of the unrecognizable properties of theDocumentCreateRequest.- 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 thisDocumentCreateRequestinstance.- 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 thisDocumentCreateRequestinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisDocumentCreateRequestinstance. 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 newDocumentCreateRequestinstance with all required arguments.
-
toMap()instead.