/* * 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.lexruntimev2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The next action that Amazon Lex V2 should take. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DialogAction implements Serializable, Cloneable, StructuredPojo { /** ** The next action that the bot should take in its interaction with the user. The possible values are: *
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* The name of the slot that should be elicited from the user. *
*/ private String slotToElicit; /** ** Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can * spell out their input to make it clear to your bot. *
** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . *
*/ private String slotElicitationStyle; /** ** The name of the constituent sub slot of the composite slot specified in slotToElicit that should be elicited from * the user. *
*/ private ElicitSubSlot subSlotToElicit; /** ** The next action that the bot should take in its interaction with the user. The possible values are: *
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* The next action that the bot should take in its interaction with the user. The possible values are: *
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* Close
- Indicates that there will not be a response from the user. For example, the
* statement "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* The next action that the bot should take in its interaction with the user. The possible values are: *
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* The next action that the bot should take in its interaction with the user. The possible values are: *
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* Close
- Indicates that there will not be a response from the user. For example, the statement
* "Your order has been placed" does not require a response.
*
* ConfirmIntent
- The next action is asking the user if the intent is complete and ready to be
* fulfilled. This is a yes/no question such as "Place the order?"
*
* Delegate
- The next action is determined by Amazon Lex V2.
*
* ElicitIntent
- The next action is to elicit an intent from the user.
*
* ElicitSlot
- The next action is to elicit a slot value from the user.
*
* The name of the slot that should be elicited from the user. *
* * @param slotToElicit * The name of the slot that should be elicited from the user. */ public void setSlotToElicit(String slotToElicit) { this.slotToElicit = slotToElicit; } /** ** The name of the slot that should be elicited from the user. *
* * @return The name of the slot that should be elicited from the user. */ public String getSlotToElicit() { return this.slotToElicit; } /** ** The name of the slot that should be elicited from the user. *
* * @param slotToElicit * The name of the slot that should be elicited from the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DialogAction withSlotToElicit(String slotToElicit) { setSlotToElicit(slotToElicit); return this; } /** ** Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can * spell out their input to make it clear to your bot. *
** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . *
* * @param slotElicitationStyle * Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users * can spell out their input to make it clear to your bot. ** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . * @see StyleType */ public void setSlotElicitationStyle(String slotElicitationStyle) { this.slotElicitationStyle = slotElicitationStyle; } /** *
* Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can * spell out their input to make it clear to your bot. *
** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . *
* * @return Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users * can spell out their input to make it clear to your bot. ** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see * Using spelling to enter slot values . * @see StyleType */ public String getSlotElicitationStyle() { return this.slotElicitationStyle; } /** *
* Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can * spell out their input to make it clear to your bot. *
** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . *
* * @param slotElicitationStyle * Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users * can spell out their input to make it clear to your bot. ** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . * @return Returns a reference to this object so that method calls can be chained together. * @see StyleType */ public DialogAction withSlotElicitationStyle(String slotElicitationStyle) { setSlotElicitationStyle(slotElicitationStyle); return this; } /** *
* Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can * spell out their input to make it clear to your bot. *
** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . *
* * @param slotElicitationStyle * Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users * can spell out their input to make it clear to your bot. ** Spell by letter - "b" "o" "b" *
** Spell by word - "b as in boy" "o as in oscar" "b as in boy" *
** For more information, see Using * spelling to enter slot values . * @return Returns a reference to this object so that method calls can be chained together. * @see StyleType */ public DialogAction withSlotElicitationStyle(StyleType slotElicitationStyle) { this.slotElicitationStyle = slotElicitationStyle.toString(); return this; } /** *
* The name of the constituent sub slot of the composite slot specified in slotToElicit that should be elicited from * the user. *
* * @param subSlotToElicit * The name of the constituent sub slot of the composite slot specified in slotToElicit that should be * elicited from the user. */ public void setSubSlotToElicit(ElicitSubSlot subSlotToElicit) { this.subSlotToElicit = subSlotToElicit; } /** ** The name of the constituent sub slot of the composite slot specified in slotToElicit that should be elicited from * the user. *
* * @return The name of the constituent sub slot of the composite slot specified in slotToElicit that should be * elicited from the user. */ public ElicitSubSlot getSubSlotToElicit() { return this.subSlotToElicit; } /** ** The name of the constituent sub slot of the composite slot specified in slotToElicit that should be elicited from * the user. *
* * @param subSlotToElicit * The name of the constituent sub slot of the composite slot specified in slotToElicit that should be * elicited from the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DialogAction withSubSlotToElicit(ElicitSubSlot subSlotToElicit) { setSubSlotToElicit(subSlotToElicit); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getSlotToElicit() != null) sb.append("SlotToElicit: ").append(getSlotToElicit()).append(","); if (getSlotElicitationStyle() != null) sb.append("SlotElicitationStyle: ").append(getSlotElicitationStyle()).append(","); if (getSubSlotToElicit() != null) sb.append("SubSlotToElicit: ").append(getSubSlotToElicit()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DialogAction == false) return false; DialogAction other = (DialogAction) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getSlotToElicit() == null ^ this.getSlotToElicit() == null) return false; if (other.getSlotToElicit() != null && other.getSlotToElicit().equals(this.getSlotToElicit()) == false) return false; if (other.getSlotElicitationStyle() == null ^ this.getSlotElicitationStyle() == null) return false; if (other.getSlotElicitationStyle() != null && other.getSlotElicitationStyle().equals(this.getSlotElicitationStyle()) == false) return false; if (other.getSubSlotToElicit() == null ^ this.getSubSlotToElicit() == null) return false; if (other.getSubSlotToElicit() != null && other.getSubSlotToElicit().equals(this.getSubSlotToElicit()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getSlotToElicit() == null) ? 0 : getSlotToElicit().hashCode()); hashCode = prime * hashCode + ((getSlotElicitationStyle() == null) ? 0 : getSlotElicitationStyle().hashCode()); hashCode = prime * hashCode + ((getSubSlotToElicit() == null) ? 0 : getSubSlotToElicit().hashCode()); return hashCode; } @Override public DialogAction clone() { try { return (DialogAction) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lexruntimev2.model.transform.DialogActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }