Interface SendMessageContext.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SendMessageContext.Builder,,SendMessageContext> SdkBuilder<SendMessageContext.Builder,,SendMessageContext> SdkPojo
- Enclosing class:
SendMessageContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault SendMessageContext.BuilderapprovalAction(Consumer<ApprovalAction.Builder> approvalAction) An approval decision supplied when resuming a paused agent execution.approvalAction(ApprovalAction approvalAction) An approval decision supplied when resuming a paused agent execution.currentPage(String currentPage) The current page or view the user is onlastMessage(String lastMessage) The ID of the last message in the conversationuserActionResponse(String userActionResponse) Response to a UI prompt (not a text conversation message).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
-
currentPage
The current page or view the user is on
- Parameters:
currentPage- The current page or view the user is on- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lastMessage
The ID of the last message in the conversation
- Parameters:
lastMessage- The ID of the last message in the conversation- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userActionResponse
Response to a UI prompt (not a text conversation message). Set this to the sentinel value `"APPROVAL_ACTION"` when the request is resuming a paused execution after an approval decision; in that case the structured decision is provided on the sibling `approvalAction` member. Preserved as a String for backward compatibility: clients that predate the typed approval field may still encode UI-prompt responses as JSON in this field.
- Parameters:
userActionResponse- Response to a UI prompt (not a text conversation message). Set this to the sentinel value `"APPROVAL_ACTION"` when the request is resuming a paused execution after an approval decision; in that case the structured decision is provided on the sibling `approvalAction` member. Preserved as a String for backward compatibility: clients that predate the typed approval field may still encode UI-prompt responses as JSON in this field.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
approvalAction
An approval decision supplied when resuming a paused agent execution. When an agent execution pauses to request approval for an elevated action, SendMessage streams an approval request carrying interrupt identifiers. To resume the paused execution, call SendMessage again with `userActionResponse` set to `"APPROVAL_ACTION"` and this member populated with those identifiers and the decision (APPROVED or REJECTED). Optional; omit it for messages that are not resuming an approval.
- Parameters:
approvalAction- An approval decision supplied when resuming a paused agent execution. When an agent execution pauses to request approval for an elevated action, SendMessage streams an approval request carrying interrupt identifiers. To resume the paused execution, call SendMessage again with `userActionResponse` set to `"APPROVAL_ACTION"` and this member populated with those identifiers and the decision (APPROVED or REJECTED). Optional; omit it for messages that are not resuming an approval.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
approvalAction
An approval decision supplied when resuming a paused agent execution. When an agent execution pauses to request approval for an elevated action, SendMessage streams an approval request carrying interrupt identifiers. To resume the paused execution, call SendMessage again with `userActionResponse` set to `"APPROVAL_ACTION"` and this member populated with those identifiers and the decision (APPROVED or REJECTED). Optional; omit it for messages that are not resuming an approval.
This is a convenience method that creates an instance of theApprovalAction.Builderavoiding the need to create one manually viaApprovalAction.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toapprovalAction(ApprovalAction).- Parameters:
approvalAction- a consumer that will call methods onApprovalAction.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-