Class GuardrailConverseContentBlock
java.lang.Object
software.amazon.awssdk.services.bedrockruntime.model.GuardrailConverseContentBlock
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<GuardrailConverseContentBlock.Builder,GuardrailConverseContentBlock>
@Generated("software.amazon.awssdk:codegen")
public final class GuardrailConverseContentBlock
extends Object
implements SdkPojo, Serializable, ToCopyableBuilder<GuardrailConverseContentBlock.Builder,GuardrailConverseContentBlock>
A content block for selective guarding with the Converse or ConverseStream API operations.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enum -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Create an instance of this class withimage()initialized to the given value.Create an instance of this class withimage()initialized to the given value.Create an instance of this class withtext()initialized to the given value.Create an instance of this class withtext()initialized to the given value.final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()image()Image within converse content block to be evaluated by the guardrail.static Class<? extends GuardrailConverseContentBlock.Builder>text()The text to guard.final StringtoString()Returns a string representation of this object.type()Retrieve an enum value representing which member of this object is populated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
text
The text to guard.
- Returns:
- The text to guard.
-
image
Image within converse content block to be evaluated by the guardrail.
- Returns:
- Image within converse content block to be evaluated by the guardrail.
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<GuardrailConverseContentBlock.Builder,GuardrailConverseContentBlock>
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
fromText
Create an instance of this class withtext()initialized to the given value.The text to guard.
- Parameters:
text- The text to guard.
-
fromText
public static GuardrailConverseContentBlock fromText(Consumer<GuardrailConverseTextBlock.Builder> text) Create an instance of this class withtext()initialized to the given value.The text to guard.
- Parameters:
text- The text to guard.
-
fromImage
Create an instance of this class withimage()initialized to the given value.Image within converse content block to be evaluated by the guardrail.
- Parameters:
image- Image within converse content block to be evaluated by the guardrail.
-
fromImage
public static GuardrailConverseContentBlock fromImage(Consumer<GuardrailConverseImageBlock.Builder> image) Create an instance of this class withimage()initialized to the given value.Image within converse content block to be evaluated by the guardrail.
- Parameters:
image- Image within converse content block to be evaluated by the guardrail.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beGuardrailConverseContentBlock.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beGuardrailConverseContentBlock.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-