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- Specifies the action to take when harmful content is detected. Supported values include:.BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
inputModalities
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder inputModalities(List<String> inputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getInputModalities()- Parameters:
inputModalities- The input modalities selected for the guardrail content filter configuration.- Returns:
this
-
outputAction
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputAction(String outputAction) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputAction()- Parameters:
outputAction- Specifies the action to take when harmful content is detected in the output. Supported values include:.BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()- Parameters:
outputEnabled- Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputEnabled()- Parameters:
outputEnabled- Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
outputModalities
@Stability(Stable) public CfnGuardrail.ContentFilterConfigProperty.Builder outputModalities(List<String> outputModalities) Sets the value ofCfnGuardrail.ContentFilterConfigProperty.getOutputModalities()- Parameters:
outputModalities- The output modalities selected for the guardrail content filter configuration.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnGuardrail.ContentFilterConfigProperty>- Returns:
- a new instance of
CfnGuardrail.ContentFilterConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-