Interface Message.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<Message.Builder,,Message> SdkBuilder<Message.Builder,,Message> SdkPojo
- Enclosing class:
Message
@Mutable
@NotThreadSafe
public static interface Message.Builder
extends SdkPojo, CopyableBuilder<Message.Builder,Message>
-
Method Summary
Modifier and TypeMethodDescriptioncontent(Collection<ContentBlock> content) The content in the message.content(Consumer<ContentBlock.Builder>... content) The content in the message.content(ContentBlock... content) The content in the message.The role that the message belongs to.role(ConversationRole role) The role that the message belongs to.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
role
The role that the message belongs to.
- Parameters:
role- The role that the message belongs to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
role
The role that the message belongs to.
- Parameters:
role- The role that the message belongs to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
content
The content in the message.
- Parameters:
content- The content in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The content in the message.
- Parameters:
content- The content in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The content in the message.
This is a convenience method that creates an instance of theContentBlock.Builderavoiding the need to create one manually viaContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontent(List<ContentBlock>).- Parameters:
content- a consumer that will call methods onContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-