Class ContentBlockDelta
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockruntime.model.ContentBlockDelta
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ContentBlockDelta.Builder,ContentBlockDelta>
@Generated("software.amazon.awssdk:codegen") public final class ContentBlockDelta extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContentBlockDelta.Builder,ContentBlockDelta>
A block of content in a streaming response.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceContentBlockDelta.Builderstatic classContentBlockDelta.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentBlockDelta.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static ContentBlockDeltafromReasoningContent(Consumer<ReasoningContentBlockDelta.Builder> reasoningContent)Create an instance of this class withreasoningContent()initialized to the given value.static ContentBlockDeltafromReasoningContent(ReasoningContentBlockDelta reasoningContent)Create an instance of this class withreasoningContent()initialized to the given value.static ContentBlockDeltafromText(String text)Create an instance of this class withtext()initialized to the given value.static ContentBlockDeltafromToolUse(Consumer<ToolUseBlockDelta.Builder> toolUse)Create an instance of this class withtoolUse()initialized to the given value.static ContentBlockDeltafromToolUse(ToolUseBlockDelta toolUse)Create an instance of this class withtoolUse()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()ReasoningContentBlockDeltareasoningContent()Contains content regarding the reasoning that is carried out by the model.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends ContentBlockDelta.Builder>serializableBuilderClass()Stringtext()The content text.ContentBlockDelta.BuildertoBuilder()ToolUseBlockDeltatoolUse()Information about a tool that the model is requesting to use.StringtoString()Returns a string representation of this object.ContentBlockDelta.Typetype()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, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
text
public final String text()
The content text.
- Returns:
- The content text.
-
toolUse
public final ToolUseBlockDelta toolUse()
Information about a tool that the model is requesting to use.
- Returns:
- Information about a tool that the model is requesting to use.
-
reasoningContent
public final ReasoningContentBlockDelta reasoningContent()
Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
- Returns:
- Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
-
toBuilder
public ContentBlockDelta.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ContentBlockDelta.Builder,ContentBlockDelta>
-
builder
public static ContentBlockDelta.Builder builder()
-
serializableBuilderClass
public static Class<? extends ContentBlockDelta.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
fromText
public static ContentBlockDelta fromText(String text)
Create an instance of this class withtext()initialized to the given value.The content text.
- Parameters:
text- The content text.
-
fromToolUse
public static ContentBlockDelta fromToolUse(ToolUseBlockDelta toolUse)
Create an instance of this class withtoolUse()initialized to the given value.Information about a tool that the model is requesting to use.
- Parameters:
toolUse- Information about a tool that the model is requesting to use.
-
fromToolUse
public static ContentBlockDelta fromToolUse(Consumer<ToolUseBlockDelta.Builder> toolUse)
Create an instance of this class withtoolUse()initialized to the given value.Information about a tool that the model is requesting to use.
- Parameters:
toolUse- Information about a tool that the model is requesting to use.
-
fromReasoningContent
public static ContentBlockDelta fromReasoningContent(ReasoningContentBlockDelta reasoningContent)
Create an instance of this class withreasoningContent()initialized to the given value.Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
- Parameters:
reasoningContent- Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
-
fromReasoningContent
public static ContentBlockDelta fromReasoningContent(Consumer<ReasoningContentBlockDelta.Builder> reasoningContent)
Create an instance of this class withreasoningContent()initialized to the given value.Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
- Parameters:
reasoningContent- Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
-
type
public ContentBlockDelta.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beContentBlockDelta.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 beContentBlockDelta.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-