Class CfnGuardrail.ContentFilterConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnGuardrail.ContentFilterConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardrail.ContentFilterConfigProperty>
- Enclosing interface:
CfnGuardrail.ContentFilterConfigProperty
@Stability(Stable)
public static final class CfnGuardrail.ContentFilterConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGuardrail.ContentFilterConfigProperty>
A builder for
CfnGuardrail.ContentFilterConfigProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.inputStrength
(String inputStrength) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputStrength()
outputStrength
(String outputStrength) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputStrength()
Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
inputStrength
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputStrength(String inputStrength) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputStrength()
- Parameters:
inputStrength
- The strength of the content filter to apply to prompts. This parameter is required. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.- Returns:
this
-
outputStrength
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputStrength(String outputStrength) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputStrength()
- Parameters:
outputStrength
- The strength of the content filter to apply to model responses. This parameter is required. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.- Returns:
this
-
type
Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getType()
- Parameters:
type
- The harmful category that the content filter is applied to. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGuardrail.ContentFilterConfigProperty>
- Returns:
- a new instance of
CfnGuardrail.ContentFilterConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-