Interface ApplyGuardrailResponse.Builder
- All Superinterfaces:
AwsResponse.Builder
,BedrockRuntimeResponse.Builder
,Buildable
,CopyableBuilder<ApplyGuardrailResponse.Builder,
,ApplyGuardrailResponse> SdkBuilder<ApplyGuardrailResponse.Builder,
,ApplyGuardrailResponse> SdkPojo
,SdkResponse.Builder
- Enclosing class:
ApplyGuardrailResponse
-
Method Summary
Modifier and TypeMethodDescriptionThe action taken in the response from the guardrail.action
(GuardrailAction action) The action taken in the response from the guardrail.actionReason
(String actionReason) The reason for the action taken when harmful content is detected.assessments
(Collection<GuardrailAssessment> assessments) The assessment details in the response from the guardrail.assessments
(Consumer<GuardrailAssessment.Builder>... assessments) The assessment details in the response from the guardrail.assessments
(GuardrailAssessment... assessments) The assessment details in the response from the guardrail.default ApplyGuardrailResponse.Builder
guardrailCoverage
(Consumer<GuardrailCoverage.Builder> guardrailCoverage) The guardrail coverage details in the apply guardrail response.guardrailCoverage
(GuardrailCoverage guardrailCoverage) The guardrail coverage details in the apply guardrail response.outputs
(Collection<GuardrailOutputContent> outputs) The output details in the response from the guardrail.outputs
(Consumer<GuardrailOutputContent.Builder>... outputs) The output details in the response from the guardrail.outputs
(GuardrailOutputContent... outputs) The output details in the response from the guardrail.default ApplyGuardrailResponse.Builder
usage
(Consumer<GuardrailUsage.Builder> usage) The usage details in the response from the guardrail.usage
(GuardrailUsage usage) The usage details in the response from the guardrail.Methods inherited from interface software.amazon.awssdk.services.bedrockruntime.model.BedrockRuntimeResponse.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
-
usage
The usage details in the response from the guardrail.
- Parameters:
usage
- The usage details in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usage
The usage details in the response from the guardrail.
This is a convenience method that creates an instance of theGuardrailUsage.Builder
avoiding the need to create one manually viaGuardrailUsage.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tousage(GuardrailUsage)
.- Parameters:
usage
- a consumer that will call methods onGuardrailUsage.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
action
The action taken in the response from the guardrail.
- Parameters:
action
- The action taken in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
action
The action taken in the response from the guardrail.
- Parameters:
action
- The action taken in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
actionReason
The reason for the action taken when harmful content is detected.
- Parameters:
actionReason
- The reason for the action taken when harmful content is detected.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputs
The output details in the response from the guardrail.
- Parameters:
outputs
- The output details in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputs
The output details in the response from the guardrail.
- Parameters:
outputs
- The output details in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputs
The output details in the response from the guardrail.
This is a convenience method that creates an instance of theGuardrailOutputContent.Builder
avoiding the need to create one manually viaGuardrailOutputContent.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tooutputs(List<GuardrailOutputContent>)
.- Parameters:
outputs
- a consumer that will call methods onGuardrailOutputContent.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
assessments
The assessment details in the response from the guardrail.
- Parameters:
assessments
- The assessment details in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
assessments
The assessment details in the response from the guardrail.
- Parameters:
assessments
- The assessment details in the response from the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
assessments
The assessment details in the response from the guardrail.
This is a convenience method that creates an instance of theGuardrailAssessment.Builder
avoiding the need to create one manually viaGuardrailAssessment.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toassessments(List<GuardrailAssessment>)
.- Parameters:
assessments
- a consumer that will call methods onGuardrailAssessment.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
guardrailCoverage
The guardrail coverage details in the apply guardrail response.
- Parameters:
guardrailCoverage
- The guardrail coverage details in the apply guardrail response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailCoverage
default ApplyGuardrailResponse.Builder guardrailCoverage(Consumer<GuardrailCoverage.Builder> guardrailCoverage) The guardrail coverage details in the apply guardrail response.
This is a convenience method that creates an instance of theGuardrailCoverage.Builder
avoiding the need to create one manually viaGuardrailCoverage.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toguardrailCoverage(GuardrailCoverage)
.- Parameters:
guardrailCoverage
- a consumer that will call methods onGuardrailCoverage.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-