Interface RetrieveResponse.Builder
- All Superinterfaces:
AwsResponse.Builder
,BedrockAgentRuntimeResponse.Builder
,Buildable
,CopyableBuilder<RetrieveResponse.Builder,
,RetrieveResponse> SdkBuilder<RetrieveResponse.Builder,
,RetrieveResponse> SdkPojo
,SdkResponse.Builder
- Enclosing class:
RetrieveResponse
@Mutable
@NotThreadSafe
public static interface RetrieveResponse.Builder
extends BedrockAgentRuntimeResponse.Builder, SdkPojo, CopyableBuilder<RetrieveResponse.Builder,RetrieveResponse>
-
Method Summary
Modifier and TypeMethodDescriptionguardrailAction
(String guardrailAction) Specifies if there is a guardrail intervention in the response.guardrailAction
(GuadrailAction guardrailAction) Specifies if there is a guardrail intervention in the response.If there are more results than can fit in the response, the response returns anextToken
.retrievalResults
(Collection<KnowledgeBaseRetrievalResult> retrievalResults) A list of results from querying the knowledge base.retrievalResults
(Consumer<KnowledgeBaseRetrievalResult.Builder>... retrievalResults) A list of results from querying the knowledge base.retrievalResults
(KnowledgeBaseRetrievalResult... retrievalResults) A list of results from querying the knowledge base.Methods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.BedrockAgentRuntimeResponse.Builder
build, responseMetadata, responseMetadata
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
Method Details
-
guardrailAction
Specifies if there is a guardrail intervention in the response.
- Parameters:
guardrailAction
- Specifies if there is a guardrail intervention in the response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
guardrailAction
Specifies if there is a guardrail intervention in the response.
- Parameters:
guardrailAction
- Specifies if there is a guardrail intervention in the response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
nextToken
If there are more results than can fit in the response, the response returns a
nextToken
. Use this token in thenextToken
field 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 thenextToken
field 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.
-
retrievalResults
RetrieveResponse.Builder retrievalResults(Collection<KnowledgeBaseRetrievalResult> retrievalResults) A list of results from querying the knowledge base.
- Parameters:
retrievalResults
- A list of results from querying the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalResults
A list of results from querying the knowledge base.
- Parameters:
retrievalResults
- A list of results from querying the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalResults
RetrieveResponse.Builder retrievalResults(Consumer<KnowledgeBaseRetrievalResult.Builder>... retrievalResults) A list of results from querying the knowledge base.
This is a convenience method that creates an instance of theKnowledgeBaseRetrievalResult.Builder
avoiding the need to create one manually viaKnowledgeBaseRetrievalResult.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toretrievalResults(List<KnowledgeBaseRetrievalResult>)
.- Parameters:
retrievalResults
- a consumer that will call methods onKnowledgeBaseRetrievalResult.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-