Interface SearchMemoriesRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<SearchMemoriesRequest.Builder,,SearchMemoriesRequest> OpenSearchMemoryRequest.Builder,SdkBuilder<SearchMemoriesRequest.Builder,,SearchMemoriesRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
SearchMemoriesRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe actor whose memories to search (exact match).maxResults(Integer maxResults) The maximum number of memories to return, from 1 to 100.memoryStrategies(Collection<StrategySelector> memoryStrategies) The strategies to search, as a list of selectors.memoryStrategies(Consumer<StrategySelector.Builder>... memoryStrategies) The strategies to search, as a list of selectors.memoryStrategies(StrategySelector... memoryStrategies) The strategies to search, as a list of selectors.The token for the next set of results.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.The query: a subset of the OpenSearch Query DSL (seeSearchQuery).The sort order (seeSearchSort).The space to search.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.opensearchmemory.model.OpenSearchMemoryRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
spaceId
The space to search. Use
actorIdto narrow the search within it.- Parameters:
spaceId- The space to search. UseactorIdto narrow the search within it.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryStrategies
The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector without
memoryStrategyNamessearches every strategy of its type, and omittingmemoryStrategiessearches every strategy in the space. A name that is not a declared strategy of that type fails withValidationException.- Parameters:
memoryStrategies- The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector withoutmemoryStrategyNamessearches every strategy of its type, and omittingmemoryStrategiessearches every strategy in the space. A name that is not a declared strategy of that type fails withValidationException.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryStrategies
The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector without
memoryStrategyNamessearches every strategy of its type, and omittingmemoryStrategiessearches every strategy in the space. A name that is not a declared strategy of that type fails withValidationException.- Parameters:
memoryStrategies- The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector withoutmemoryStrategyNamessearches every strategy of its type, and omittingmemoryStrategiessearches every strategy in the space. A name that is not a declared strategy of that type fails withValidationException.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryStrategies
SearchMemoriesRequest.Builder memoryStrategies(Consumer<StrategySelector.Builder>... memoryStrategies) The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector without
This is a convenience method that creates an instance of thememoryStrategyNamessearches every strategy of its type, and omittingmemoryStrategiessearches every strategy in the space. A name that is not a declared strategy of that type fails withValidationException.StrategySelector.Builderavoiding the need to create one manually viaStrategySelector.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomemoryStrategies(List<StrategySelector>).- Parameters:
memoryStrategies- a consumer that will call methods onStrategySelector.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
actorId
The actor whose memories to search (exact match). Required: every search covers exactly one actor, and a memory stored without an actor is never returned. This is the only way to filter by actor: a query that references
system_metadata.actor_idfails withValidationException(reasonnonFilterableField).- Parameters:
actorId- The actor whose memories to search (exact match). Required: every search covers exactly one actor, and a memory stored without an actor is never returned. This is the only way to filter by actor: a query that referencessystem_metadata.actor_idfails withValidationException(reasonnonFilterableField).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
query
The query: a subset of the OpenSearch Query DSL (see
SearchQuery). You can't use the actor and session fieldssystem_metadata.actor_idandsystem_metadata.session_idhere. Use the top-levelactorIdto filter by actor. Searching memories doesn't filter by session.- Parameters:
query- The query: a subset of the OpenSearch Query DSL (seeSearchQuery). You can't use the actor and session fieldssystem_metadata.actor_idandsystem_metadata.session_idhere. Use the top-levelactorIdto filter by actor. Searching memories doesn't filter by session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sort
The sort order (see
SearchSort). Omit to return the most relevant memories first.- Parameters:
sort- The sort order (seeSearchSort). Omit to return the most relevant memories first.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maxResults
The maximum number of memories to return, from 1 to 100. The default is 20.
- Parameters:
maxResults- The maximum number of memories to return, from 1 to 100. The default is 20.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
nextToken
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
- Parameters:
nextToken- The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
SearchMemoriesRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
SearchMemoriesRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-