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 TypeMethodDescriptiondefault Message.Buildercontent(Consumer<MessageContent.Builder> content) The content of the turn.content(MessageContent content) The content of the turn.The author of the turn.role(MessageRole role) The author of the turn.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 author of the turn.
- Parameters:
role- The author of the turn.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
role
The author of the turn.
- Parameters:
role- The author of the turn.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
content
The content of the turn.
- Parameters:
content- The content of the turn.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The content of the turn.
This is a convenience method that creates an instance of theMessageContent.Builderavoiding the need to create one manually viaMessageContent.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontent(MessageContent).- Parameters:
content- a consumer that will call methods onMessageContent.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-