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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.inputAction
(String inputAction) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputAction()
inputEnabled
(Boolean inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()
inputEnabled
(IResolvable inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()
inputModalities
(List<String> inputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputModalities()
inputStrength
(String inputStrength) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputStrength()
outputAction
(String outputAction) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputAction()
outputEnabled
(Boolean outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()
outputEnabled
(IResolvable outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()
outputModalities
(List<String> outputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputModalities()
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
-
inputAction
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputAction(String inputAction) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputAction()
- Parameters:
inputAction
- the value to be set.- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()
- Parameters:
inputEnabled
- the value to be set.- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()
- Parameters:
inputEnabled
- the value to be set.- Returns:
this
-
inputModalities
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputModalities(List<String> inputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputModalities()
- Parameters:
inputModalities
- List of modalities.- Returns:
this
-
outputAction
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputAction(String outputAction) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputAction()
- Parameters:
outputAction
- the value to be set.- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()
- Parameters:
outputEnabled
- the value to be set.- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()
- Parameters:
outputEnabled
- the value to be set.- Returns:
this
-
outputModalities
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputModalities(List<String> outputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputModalities()
- Parameters:
outputModalities
- List of modalities.- 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
-