public class Confirmation implements HelperIntent
Helper intent response to ask user for confirmation.
@ForIntent("askForConfirmation")
public CompletableFuture
The following code demonstrates how to handle the confirmation response from the user.
@ForIntent("actions_intent_confirmation")
public CompletableFuture handleConfirmationResponse(
    ActionRequest request) {
  boolean userResponse = request.getUserConfirmation() != null &&
    request.getUserConfirmation().booleanValue();
  ResponseBuilder responseBuilder = getResponseBuilder();
  responseBuilder.add(
    userResponse ? "Thank you for confirming" :
      "No problem. We won't bother you");
  return CompletableFuture.completedFuture(responseBuilder.build());
}
 | Constructor and Description | 
|---|
| Confirmation()Helper intent response to ask user for confirmation. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.String | getName() | 
| java.util.Map<java.lang.String,java.lang.Object> | getParameters() | 
| Confirmation | setConfirmationText(java.lang.String confirmationText) | 
getName, getParameterspublic Confirmation()
Helper intent response to ask user for confirmation.
@ForIntent("askForConfirmation")
public CompletableFuture
The following code demonstrates how to handle the confirmation response from the user.
@ForIntent("actions_intent_confirmation")
public CompletableFuture handleConfirmationResponse(
    ActionRequest request) {
  boolean userResponse = request.getUserConfirmation() != null &&
    request.getUserConfirmation().booleanValue();
  ResponseBuilder responseBuilder = getResponseBuilder();
  responseBuilder.add(
    userResponse ? "Thank you for confirming" :
      "No problem. We won't bother you");
  return CompletableFuture.completedFuture(responseBuilder.build());
}
 public Confirmation setConfirmationText(java.lang.String confirmationText)
public java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.Object> getParameters()