Interface CfnBot.PromptSpecificationProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnBot.PromptSpecificationProperty.Jsii$Proxy
Enclosing class:
CfnBot

@Stability(Stable) public static interface CfnBot.PromptSpecificationProperty extends software.amazon.jsii.JsiiSerializable
Specifies a list of message groups that Amazon Lex sends to a user to elicit a response.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lex.*;
 PromptSpecificationProperty promptSpecificationProperty = PromptSpecificationProperty.builder()
         .maxRetries(123)
         .messageGroupsList(List.of(MessageGroupProperty.builder()
                 .message(MessageProperty.builder()
                         .customPayload(CustomPayloadProperty.builder()
                                 .value("value")
                                 .build())
                         .imageResponseCard(ImageResponseCardProperty.builder()
                                 .title("title")
                                 // the properties below are optional
                                 .buttons(List.of(ButtonProperty.builder()
                                         .text("text")
                                         .value("value")
                                         .build()))
                                 .imageUrl("imageUrl")
                                 .subtitle("subtitle")
                                 .build())
                         .plainTextMessage(PlainTextMessageProperty.builder()
                                 .value("value")
                                 .build())
                         .ssmlMessage(SSMLMessageProperty.builder()
                                 .value("value")
                                 .build())
                         .build())
                 // the properties below are optional
                 .variations(List.of(MessageProperty.builder()
                         .customPayload(CustomPayloadProperty.builder()
                                 .value("value")
                                 .build())
                         .imageResponseCard(ImageResponseCardProperty.builder()
                                 .title("title")
                                 // the properties below are optional
                                 .buttons(List.of(ButtonProperty.builder()
                                         .text("text")
                                         .value("value")
                                         .build()))
                                 .imageUrl("imageUrl")
                                 .subtitle("subtitle")
                                 .build())
                         .plainTextMessage(PlainTextMessageProperty.builder()
                                 .value("value")
                                 .build())
                         .ssmlMessage(SSMLMessageProperty.builder()
                                 .value("value")
                                 .build())
                         .build()))
                 .build()))
         // the properties below are optional
         .allowInterrupt(false)
         .messageSelectionStrategy("messageSelectionStrategy")
         .promptAttemptsSpecification(Map.of(
                 "promptAttemptsSpecificationKey", PromptAttemptSpecificationProperty.builder()
                         .allowedInputTypes(AllowedInputTypesProperty.builder()
                                 .allowAudioInput(false)
                                 .allowDtmfInput(false)
                                 .build())
                         // the properties below are optional
                         .allowInterrupt(false)
                         .audioAndDtmfInputSpecification(AudioAndDTMFInputSpecificationProperty.builder()
                                 .startTimeoutMs(123)
                                 // the properties below are optional
                                 .audioSpecification(AudioSpecificationProperty.builder()
                                         .endTimeoutMs(123)
                                         .maxLengthMs(123)
                                         .build())
                                 .dtmfSpecification(DTMFSpecificationProperty.builder()
                                         .deletionCharacter("deletionCharacter")
                                         .endCharacter("endCharacter")
                                         .endTimeoutMs(123)
                                         .maxLength(123)
                                         .build())
                                 .build())
                         .textInputSpecification(TextInputSpecificationProperty.builder()
                                 .startTimeoutMs(123)
                                 .build())
                         .build()))
         .build();
 
  • Method Details

    • getMaxRetries

      @Stability(Stable) @NotNull Number getMaxRetries()
      The maximum number of times the bot tries to elicit a response from the user using this prompt.
    • getMessageGroupsList

      @Stability(Stable) @NotNull Object getMessageGroupsList()
      A collection of messages that Amazon Lex can send to the user.

      Amazon Lex chooses the actual message to send at runtime.

    • getAllowInterrupt

      @Stability(Stable) @Nullable default Object getAllowInterrupt()
      Indicates whether the user can interrupt a speech prompt from the bot.
    • getMessageSelectionStrategy

      @Stability(Stable) @Nullable default String getMessageSelectionStrategy()
      Indicates how a message is selected from a message group among retries.
    • getPromptAttemptsSpecification

      @Stability(Stable) @Nullable default Object getPromptAttemptsSpecification()
      Specifies the advanced settings on each attempt of the prompt.
    • builder

      @Stability(Stable) static CfnBot.PromptSpecificationProperty.Builder builder()
      Returns:
      a CfnBot.PromptSpecificationProperty.Builder of CfnBot.PromptSpecificationProperty