Class CfnGuardrail.TopicConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnGuardrail.TopicConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardrail.TopicConfigProperty>
- Enclosing interface:
CfnGuardrail.TopicConfigProperty
@Stability(Stable)
public static final class CfnGuardrail.TopicConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGuardrail.TopicConfigProperty>
A builder for
CfnGuardrail.TopicConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.definition(String definition) Sets the value ofCfnGuardrail.TopicConfigProperty.getDefinition()Sets the value ofCfnGuardrail.TopicConfigProperty.getExamples()inputAction(String inputAction) Sets the value ofCfnGuardrail.TopicConfigProperty.getInputAction()inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.getInputEnabled()inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.getInputEnabled()Sets the value ofCfnGuardrail.TopicConfigProperty.getName()outputAction(String outputAction) Sets the value ofCfnGuardrail.TopicConfigProperty.getOutputAction()outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.getOutputEnabled()outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.getOutputEnabled()Sets the value ofCfnGuardrail.TopicConfigProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
definition
Sets the value ofCfnGuardrail.TopicConfigProperty.getDefinition()- Parameters:
definition- A definition of the topic to deny. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnGuardrail.TopicConfigProperty.getName()- Parameters:
name- The name of the topic to deny. This parameter is required.- Returns:
this
-
type
Sets the value ofCfnGuardrail.TopicConfigProperty.getType()- Parameters:
type- Specifies to deny the topic. This parameter is required.- Returns:
this
-
examples
Sets the value ofCfnGuardrail.TopicConfigProperty.getExamples()- Parameters:
examples- A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.- Returns:
this
-
inputAction
Sets the value ofCfnGuardrail.TopicConfigProperty.getInputAction()- Parameters:
inputAction- Specifies the action to take when harmful content is detected in the input. 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.TopicConfigProperty.Builder inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.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.TopicConfigProperty.Builder inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.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
-
outputAction
@Stability(Stable) public CfnGuardrail.TopicConfigProperty.Builder outputAction(String outputAction) Sets the value ofCfnGuardrail.TopicConfigProperty.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.TopicConfigProperty.Builder outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.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.TopicConfigProperty.Builder outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.TopicConfigProperty.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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnGuardrail.TopicConfigProperty>- Returns:
- a new instance of
CfnGuardrail.TopicConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-