Interface RetrieveRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,BedrockAgentRuntimeRequest.Builder,Buildable,CopyableBuilder<RetrieveRequest.Builder,,RetrieveRequest> SdkBuilder<RetrieveRequest.Builder,,RetrieveRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
RetrieveRequest
-
Method Summary
Modifier and TypeMethodDescriptiondefault RetrieveRequest.BuilderguardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Guardrail settings.guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) Guardrail settings.knowledgeBaseId(String knowledgeBaseId) The unique identifier of the knowledge base to query.If there are more results than can fit in the response, the response returns anextToken.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default RetrieveRequest.BuilderretrievalConfiguration(Consumer<KnowledgeBaseRetrievalConfiguration.Builder> retrievalConfiguration) Contains configurations for the knowledge base query and retrieval process.retrievalConfiguration(KnowledgeBaseRetrievalConfiguration retrievalConfiguration) Contains configurations for the knowledge base query and retrieval process.default RetrieveRequest.BuilderretrievalQuery(Consumer<KnowledgeBaseQuery.Builder> retrievalQuery) Contains the query to send the knowledge base.retrievalQuery(KnowledgeBaseQuery retrievalQuery) Contains the query to send the knowledge base.default RetrieveRequest.BuilderuserContext(Consumer<UserContext.Builder> userContext) Contains information about the user making the request.userContext(UserContext userContext) Contains information about the user making the request.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.BedrockAgentRuntimeRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
guardrailConfiguration
Guardrail settings.
- Parameters:
guardrailConfiguration- Guardrail settings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
default RetrieveRequest.Builder guardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Guardrail settings.
This is a convenience method that creates an instance of theGuardrailConfiguration.Builderavoiding the need to create one manually viaGuardrailConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toguardrailConfiguration(GuardrailConfiguration).- Parameters:
guardrailConfiguration- a consumer that will call methods onGuardrailConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
knowledgeBaseId
The unique identifier of the knowledge base to query.
- Parameters:
knowledgeBaseId- The unique identifier of the knowledge base to query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
nextToken
If there are more results than can fit in the response, the response returns a
nextToken. Use this token in thenextTokenfield of another request to retrieve the next batch of results.- Parameters:
nextToken- If there are more results than can fit in the response, the response returns anextToken. Use this token in thenextTokenfield of another request to retrieve the next batch of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalConfiguration
RetrieveRequest.Builder retrievalConfiguration(KnowledgeBaseRetrievalConfiguration retrievalConfiguration) Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
- Parameters:
retrievalConfiguration- Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalConfiguration
default RetrieveRequest.Builder retrievalConfiguration(Consumer<KnowledgeBaseRetrievalConfiguration.Builder> retrievalConfiguration) Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
This is a convenience method that creates an instance of theKnowledgeBaseRetrievalConfiguration.Builderavoiding the need to create one manually viaKnowledgeBaseRetrievalConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toretrievalConfiguration(KnowledgeBaseRetrievalConfiguration).- Parameters:
retrievalConfiguration- a consumer that will call methods onKnowledgeBaseRetrievalConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
retrievalQuery
Contains the query to send the knowledge base.
- Parameters:
retrievalQuery- Contains the query to send the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalQuery
Contains the query to send the knowledge base.
This is a convenience method that creates an instance of theKnowledgeBaseQuery.Builderavoiding the need to create one manually viaKnowledgeBaseQuery.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toretrievalQuery(KnowledgeBaseQuery).- Parameters:
retrievalQuery- a consumer that will call methods onKnowledgeBaseQuery.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
userContext
Contains information about the user making the request. This is used for access control filtering to ensure that retrieval results only include documents the user is authorized to access.
- Parameters:
userContext- Contains information about the user making the request. This is used for access control filtering to ensure that retrieval results only include documents the user is authorized to access.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userContext
Contains information about the user making the request. This is used for access control filtering to ensure that retrieval results only include documents the user is authorized to access.
This is a convenience method that creates an instance of theUserContext.Builderavoiding the need to create one manually viaUserContext.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed touserContext(UserContext).- Parameters:
userContext- a consumer that will call methods onUserContext.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
RetrieveRequest.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
RetrieveRequest.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.
-