/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the models.lex.v2-2020-08-07.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.LexModelsV2.Model
{
///
/// Container for the parameters to the CreateIntent operation.
/// Creates an intent.
///
///
///
/// To define the interaction between the user and your bot, you define one or more intents.
/// For example, for a pizza ordering bot you would create an OrderPizza
/// intent.
///
///
///
/// When you create an intent, you must provide a name. You can optionally provide the
/// following:
///
/// -
///
/// Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza."
/// You can't provide utterances for built-in intents.
///
///
-
///
/// Information to be gathered. You specify slots for the information that you bot requests
/// from the user. You can specify standard slot types, such as date and time, or custom
/// slot types for your application.
///
///
-
///
/// How the intent is fulfilled. You can provide a Lambda function or configure the intent
/// to return the intent information to your client application. If you use a Lambda function,
/// Amazon Lex invokes the function when all of the intent information is available.
///
///
-
///
/// A confirmation prompt to send to the user to confirm an intent. For example, "Shall
/// I order your pizza?"
///
///
-
///
/// A conclusion statement to send to the user after the intent is fulfilled. For example,
/// "I ordered your pizza."
///
///
-
///
/// A follow-up prompt that asks the user for additional activity. For example, "Do you
/// want a drink with your pizza?"
///
///
///
public partial class CreateIntentRequest : AmazonLexModelsV2Request
{
private string _botId;
private string _botVersion;
private string _description;
private DialogCodeHookSettings _dialogCodeHook;
private FulfillmentCodeHookSettings _fulfillmentCodeHook;
private InitialResponseSetting _initialResponseSetting;
private List _inputContexts = new List();
private IntentClosingSetting _intentClosingSetting;
private IntentConfirmationSetting _intentConfirmationSetting;
private string _intentName;
private KendraConfiguration _kendraConfiguration;
private string _localeId;
private List _outputContexts = new List();
private string _parentIntentSignature;
private List _sampleUtterances = new List();
///
/// Gets and sets the property BotId.
///
/// The identifier of the bot associated with this intent.
///
///
[AWSProperty(Required=true, Min=10, Max=10)]
public string BotId
{
get { return this._botId; }
set { this._botId = value; }
}
// Check to see if BotId property is set
internal bool IsSetBotId()
{
return this._botId != null;
}
///
/// Gets and sets the property BotVersion.
///
/// The version of the bot associated with this intent.
///
///
[AWSProperty(Required=true, Min=5, Max=5)]
public string BotVersion
{
get { return this._botVersion; }
set { this._botVersion = value; }
}
// Check to see if BotVersion property is set
internal bool IsSetBotVersion()
{
return this._botVersion != null;
}
///
/// Gets and sets the property Description.
///
/// A description of the intent. Use the description to help identify the intent in lists.
///
///
[AWSProperty(Min=0, Max=200)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property DialogCodeHook.
///
/// Specifies that Amazon Lex invokes the alias Lambda function for each user input. You
/// can invoke this Lambda function to personalize user interaction.
///
///
///
/// For example, suppose that your bot determines that the user's name is John. You Lambda
/// function might retrieve John's information from a backend database and prepopulate
/// some of the values. For example, if you find that John is gluten intolerant, you might
/// set the corresponding intent slot, glutenIntolerant
to true
.
/// You might find John's phone number and set the corresponding session attribute.
///
///
public DialogCodeHookSettings DialogCodeHook
{
get { return this._dialogCodeHook; }
set { this._dialogCodeHook = value; }
}
// Check to see if DialogCodeHook property is set
internal bool IsSetDialogCodeHook()
{
return this._dialogCodeHook != null;
}
///
/// Gets and sets the property FulfillmentCodeHook.
///
/// Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready
/// for fulfillment. You can invoke this function to complete the bot's transaction with
/// the user.
///
///
///
/// For example, in a pizza ordering bot, the Lambda function can look up the closest
/// pizza restaurant to the customer's location and then place an order on the customer's
/// behalf.
///
///
public FulfillmentCodeHookSettings FulfillmentCodeHook
{
get { return this._fulfillmentCodeHook; }
set { this._fulfillmentCodeHook = value; }
}
// Check to see if FulfillmentCodeHook property is set
internal bool IsSetFulfillmentCodeHook()
{
return this._fulfillmentCodeHook != null;
}
///
/// Gets and sets the property InitialResponseSetting.
///
/// Configuration settings for the response that is sent to the user at the beginning
/// of a conversation, before eliciting slot values.
///
///
public InitialResponseSetting InitialResponseSetting
{
get { return this._initialResponseSetting; }
set { this._initialResponseSetting = value; }
}
// Check to see if InitialResponseSetting property is set
internal bool IsSetInitialResponseSetting()
{
return this._initialResponseSetting != null;
}
///
/// Gets and sets the property InputContexts.
///
/// A list of contexts that must be active for this intent to be considered by Amazon
/// Lex.
///
///
///
/// When an intent has an input context list, Amazon Lex only considers using the intent
/// in an interaction with the user when the specified contexts are included in the active
/// context list for the session. If the contexts are not active, then Amazon Lex will
/// not use the intent.
///
///
///
/// A context can be automatically activated using the outputContexts
property
/// or it can be set at runtime.
///
///
///
/// For example, if there are two intents with different input contexts that respond
/// to the same utterances, only the intent with the active context will respond.
///
///
///
/// An intent may have up to 5 input contexts. If an intent has multiple input contexts,
/// all of the contexts must be active to consider the intent.
///
///
[AWSProperty(Min=0, Max=5)]
public List InputContexts
{
get { return this._inputContexts; }
set { this._inputContexts = value; }
}
// Check to see if InputContexts property is set
internal bool IsSetInputContexts()
{
return this._inputContexts != null && this._inputContexts.Count > 0;
}
///
/// Gets and sets the property IntentClosingSetting.
///
/// Sets the response that Amazon Lex sends to the user when the intent is closed.
///
///
public IntentClosingSetting IntentClosingSetting
{
get { return this._intentClosingSetting; }
set { this._intentClosingSetting = value; }
}
// Check to see if IntentClosingSetting property is set
internal bool IsSetIntentClosingSetting()
{
return this._intentClosingSetting != null;
}
///
/// Gets and sets the property IntentConfirmationSetting.
///
/// Provides prompts that Amazon Lex sends to the user to confirm the completion of an
/// intent. If the user answers "no," the settings contain a statement that is sent to
/// the user to end the intent.
///
///
public IntentConfirmationSetting IntentConfirmationSetting
{
get { return this._intentConfirmationSetting; }
set { this._intentConfirmationSetting = value; }
}
// Check to see if IntentConfirmationSetting property is set
internal bool IsSetIntentConfirmationSetting()
{
return this._intentConfirmationSetting != null;
}
///
/// Gets and sets the property IntentName.
///
/// The name of the intent. Intent names must be unique in the locale that contains the
/// intent and cannot match the name of any built-in intent.
///
///
[AWSProperty(Required=true, Min=1, Max=100)]
public string IntentName
{
get { return this._intentName; }
set { this._intentName = value; }
}
// Check to see if IntentName property is set
internal bool IsSetIntentName()
{
return this._intentName != null;
}
///
/// Gets and sets the property KendraConfiguration.
///
/// Configuration information required to use the AMAZON.KendraSearchIntent
/// intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent
/// intent is called when Amazon Lex can't determine another intent to invoke.
///
///
public KendraConfiguration KendraConfiguration
{
get { return this._kendraConfiguration; }
set { this._kendraConfiguration = value; }
}
// Check to see if KendraConfiguration property is set
internal bool IsSetKendraConfiguration()
{
return this._kendraConfiguration != null;
}
///
/// Gets and sets the property LocaleId.
///
/// The identifier of the language and locale where this intent is used. All of the bots,
/// slot types, and slots used by the intent must have the same locale. For more information,
/// see Supported
/// languages.
///
///
[AWSProperty(Required=true)]
public string LocaleId
{
get { return this._localeId; }
set { this._localeId = value; }
}
// Check to see if LocaleId property is set
internal bool IsSetLocaleId()
{
return this._localeId != null;
}
///
/// Gets and sets the property OutputContexts.
///
/// A lists of contexts that the intent activates when it is fulfilled.
///
///
///
/// You can use an output context to indicate the intents that Amazon Lex should consider
/// for the next turn of the conversation with a customer.
///
///
///
/// When you use the outputContextsList
property, all of the contexts specified
/// in the list are activated when the intent is fulfilled. You can set up to 10 output
/// contexts. You can also set the number of conversation turns that the context should
/// be active, or the length of time that the context should be active.
///
///
[AWSProperty(Min=0, Max=10)]
public List OutputContexts
{
get { return this._outputContexts; }
set { this._outputContexts = value; }
}
// Check to see if OutputContexts property is set
internal bool IsSetOutputContexts()
{
return this._outputContexts != null && this._outputContexts.Count > 0;
}
///
/// Gets and sets the property ParentIntentSignature.
///
/// A unique identifier for the built-in intent to base this intent on.
///
///
public string ParentIntentSignature
{
get { return this._parentIntentSignature; }
set { this._parentIntentSignature = value; }
}
// Check to see if ParentIntentSignature property is set
internal bool IsSetParentIntentSignature()
{
return this._parentIntentSignature != null;
}
///
/// Gets and sets the property SampleUtterances.
///
/// An array of strings that a user might say to signal the intent. For example, "I want
/// a pizza", or "I want a {PizzaSize} pizza".
///
///
///
/// In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where
/// they should be displayed in the utterance shown to the user..
///
///
public List SampleUtterances
{
get { return this._sampleUtterances; }
set { this._sampleUtterances = value; }
}
// Check to see if SampleUtterances property is set
internal bool IsSetSampleUtterances()
{
return this._sampleUtterances != null && this._sampleUtterances.Count > 0;
}
}
}