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.BuilderguardrailCoverage(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.Builderusage(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, responseMetadataMethods 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, sdkFieldsMethods 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.Builderavoiding the need to create one manually viaGuardrailUsage.builder().When the
Consumercompletes,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.Builderavoiding the need to create one manually viaGuardrailOutputContent.builder().When the
Consumercompletes,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.Builderavoiding the need to create one manually viaGuardrailAssessment.builder().When the
Consumercompletes,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.Builderavoiding the need to create one manually viaGuardrailCoverage.builder().When the
Consumercompletes,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:
-