/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lexmodelsv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies a list of message groups that Amazon Lex sends to a user to elicit a response. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PromptSpecification implements Serializable, Cloneable, StructuredPojo { /** ** A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at * runtime. *
*/ private java.util.List* The maximum number of times the bot tries to elicit a response from the user using this prompt. *
*/ private Integer maxRetries; /** ** Indicates whether the user can interrupt a speech prompt from the bot. *
*/ private Boolean allowInterrupt; /** ** Indicates how a message is selected from a message group among retries. *
*/ private String messageSelectionStrategy; /** ** Specifies the advanced settings on each attempt of the prompt. *
*/ private java.util.Map* A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at * runtime. *
* * @return A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to * send at runtime. */ public java.util.List* A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at * runtime. *
* * @param messageGroups * A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to * send at runtime. */ public void setMessageGroups(java.util.Collection* A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at * runtime. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMessageGroups(java.util.Collection)} or {@link #withMessageGroups(java.util.Collection)} if you want * to override the existing values. *
* * @param messageGroups * A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to * send at runtime. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptSpecification withMessageGroups(MessageGroup... messageGroups) { if (this.messageGroups == null) { setMessageGroups(new java.util.ArrayList* A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at * runtime. *
* * @param messageGroups * A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to * send at runtime. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptSpecification withMessageGroups(java.util.Collection* The maximum number of times the bot tries to elicit a response from the user using this prompt. *
* * @param maxRetries * The maximum number of times the bot tries to elicit a response from the user using this prompt. */ public void setMaxRetries(Integer maxRetries) { this.maxRetries = maxRetries; } /** ** The maximum number of times the bot tries to elicit a response from the user using this prompt. *
* * @return The maximum number of times the bot tries to elicit a response from the user using this prompt. */ public Integer getMaxRetries() { return this.maxRetries; } /** ** The maximum number of times the bot tries to elicit a response from the user using this prompt. *
* * @param maxRetries * The maximum number of times the bot tries to elicit a response from the user using this prompt. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptSpecification withMaxRetries(Integer maxRetries) { setMaxRetries(maxRetries); return this; } /** ** Indicates whether the user can interrupt a speech prompt from the bot. *
* * @param allowInterrupt * Indicates whether the user can interrupt a speech prompt from the bot. */ public void setAllowInterrupt(Boolean allowInterrupt) { this.allowInterrupt = allowInterrupt; } /** ** Indicates whether the user can interrupt a speech prompt from the bot. *
* * @return Indicates whether the user can interrupt a speech prompt from the bot. */ public Boolean getAllowInterrupt() { return this.allowInterrupt; } /** ** Indicates whether the user can interrupt a speech prompt from the bot. *
* * @param allowInterrupt * Indicates whether the user can interrupt a speech prompt from the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptSpecification withAllowInterrupt(Boolean allowInterrupt) { setAllowInterrupt(allowInterrupt); return this; } /** ** Indicates whether the user can interrupt a speech prompt from the bot. *
* * @return Indicates whether the user can interrupt a speech prompt from the bot. */ public Boolean isAllowInterrupt() { return this.allowInterrupt; } /** ** Indicates how a message is selected from a message group among retries. *
* * @param messageSelectionStrategy * Indicates how a message is selected from a message group among retries. * @see MessageSelectionStrategy */ public void setMessageSelectionStrategy(String messageSelectionStrategy) { this.messageSelectionStrategy = messageSelectionStrategy; } /** ** Indicates how a message is selected from a message group among retries. *
* * @return Indicates how a message is selected from a message group among retries. * @see MessageSelectionStrategy */ public String getMessageSelectionStrategy() { return this.messageSelectionStrategy; } /** ** Indicates how a message is selected from a message group among retries. *
* * @param messageSelectionStrategy * Indicates how a message is selected from a message group among retries. * @return Returns a reference to this object so that method calls can be chained together. * @see MessageSelectionStrategy */ public PromptSpecification withMessageSelectionStrategy(String messageSelectionStrategy) { setMessageSelectionStrategy(messageSelectionStrategy); return this; } /** ** Indicates how a message is selected from a message group among retries. *
* * @param messageSelectionStrategy * Indicates how a message is selected from a message group among retries. * @return Returns a reference to this object so that method calls can be chained together. * @see MessageSelectionStrategy */ public PromptSpecification withMessageSelectionStrategy(MessageSelectionStrategy messageSelectionStrategy) { this.messageSelectionStrategy = messageSelectionStrategy.toString(); return this; } /** ** Specifies the advanced settings on each attempt of the prompt. *
* * @return Specifies the advanced settings on each attempt of the prompt. */ public java.util.Map* Specifies the advanced settings on each attempt of the prompt. *
* * @param promptAttemptsSpecification * Specifies the advanced settings on each attempt of the prompt. */ public void setPromptAttemptsSpecification(java.util.Map* Specifies the advanced settings on each attempt of the prompt. *
* * @param promptAttemptsSpecification * Specifies the advanced settings on each attempt of the prompt. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptSpecification withPromptAttemptsSpecification(java.util.Map