Package com.sap.ai.sdk.grounding.model
Class CollectionRequest
java.lang.Object
com.sap.ai.sdk.grounding.model.CollectionRequest
A request for creating a new, single collection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for CollectionRequest. -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(VectorKeyValueListPair metadataItem) Add one metadata instance to thisCollectionRequest.static CollectionRequest.Buildercreate()Create a type-safe, fluent-api builder object to construct a newCollectionRequestinstance with all required arguments.embeddingConfig(EmbeddingConfig embeddingConfig) Set the embeddingConfig of thisCollectionRequestinstance and return the same instance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theCollectionRequest.Get embeddingConfiggetId()Unique identifier of a collection.Metadata attached to collection.getTitle()Get titleinthashCode()Set the id of thisCollectionRequestinstance and return the same instance.metadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisCollectionRequestinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisCollectionRequestinstance.voidsetEmbeddingConfig(EmbeddingConfig embeddingConfig) Set the embeddingConfig of thisCollectionRequestinstance.voidSet the id of thisCollectionRequestinstance.voidsetMetadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisCollectionRequestinstance.voidSet the title of thisCollectionRequestinstance.Set the title of thisCollectionRequestinstance and return the same instance.toMap()Get the value of all properties of thisCollectionRequestinstance including unrecognized properties.toString()
-
Constructor Details
-
CollectionRequest
protected CollectionRequest()Default constructor for CollectionRequest.
-
-
Method Details
-
title
Set the title of thisCollectionRequestinstance and return the same instance.- Parameters:
title- The title of thisCollectionRequest- Returns:
- The same instance of this
CollectionRequestclass
-
getTitle
Get title- Returns:
- title The title of this
CollectionRequestinstance.
-
setTitle
Set the title of thisCollectionRequestinstance.- Parameters:
title- The title of thisCollectionRequest
-
embeddingConfig
Set the embeddingConfig of thisCollectionRequestinstance and return the same instance.- Parameters:
embeddingConfig- The embeddingConfig of thisCollectionRequest- Returns:
- The same instance of this
CollectionRequestclass
-
getEmbeddingConfig
Get embeddingConfig- Returns:
- embeddingConfig The embeddingConfig of this
CollectionRequestinstance.
-
setEmbeddingConfig
Set the embeddingConfig of thisCollectionRequestinstance.- Parameters:
embeddingConfig- The embeddingConfig of thisCollectionRequest
-
metadata
Set the metadata of thisCollectionRequestinstance and return the same instance.- Parameters:
metadata- Metadata attached to collection. Useful to restrict search to a subset of collections.- Returns:
- The same instance of this
CollectionRequestclass
-
addMetadataItem
Add one metadata instance to thisCollectionRequest.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
CollectionRequest
-
getMetadata
Metadata attached to collection. Useful to restrict search to a subset of collections.- Returns:
- metadata The metadata of this
CollectionRequestinstance.
-
setMetadata
Set the metadata of thisCollectionRequestinstance.- Parameters:
metadata- Metadata attached to collection. Useful to restrict search to a subset of collections.
-
id
Set the id of thisCollectionRequestinstance and return the same instance.- Parameters:
id- Unique identifier of a collection.- Returns:
- The same instance of this
CollectionRequestclass
-
getId
Unique identifier of a collection.- Returns:
- id The id of this
CollectionRequestinstance.
-
setId
Set the id of thisCollectionRequestinstance.- Parameters:
id- Unique identifier of a collection.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theCollectionRequest.- 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 thisCollectionRequestinstance.- 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 thisCollectionRequestinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisCollectionRequestinstance. 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 newCollectionRequestinstance with all required arguments.
-
toMap()instead.