/* * 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 lex-models-2017-04-19.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.LexModelBuildingService.Model { /// /// Container for the parameters to the PutIntent operation. /// Creates an intent or replaces an existing intent. /// /// /// /// To define the interaction between the user and your bot, you use one or more intents. /// For a pizza ordering bot, for example, you would create an OrderPizza /// intent. /// /// /// /// To create an intent or replace an existing intent, you must provide the following: /// /// /// /// You can specify other optional information in the request, such as: /// /// /// /// If you specify an existing intent name to update the intent, Amazon Lex replaces the /// values in the $LATEST version of the intent with the values in the request. /// Amazon Lex removes fields that you don't provide in the request. If you don't specify /// the required fields, Amazon Lex throws an exception. When you update the $LATEST /// version of an intent, the status field of any bot that uses the $LATEST /// version of the intent is set to NOT_BUILT. /// /// /// /// For more information, see how-it-works. /// /// /// /// This operation requires permissions for the lex:PutIntent action. /// /// public partial class PutIntentRequest : AmazonLexModelBuildingServiceRequest { private string _checksum; private Statement _conclusionStatement; private Prompt _confirmationPrompt; private bool? _createVersion; private string _description; private CodeHook _dialogCodeHook; private FollowUpPrompt _followUpPrompt; private FulfillmentActivity _fulfillmentActivity; private List _inputContexts = new List(); private KendraConfiguration _kendraConfiguration; private string _name; private List _outputContexts = new List(); private string _parentIntentSignature; private Statement _rejectionStatement; private List _sampleUtterances = new List(); private List _slots = new List(); /// /// Gets and sets the property Checksum. /// /// Identifies a specific revision of the $LATEST version. /// /// /// /// When you create a new intent, leave the checksum field blank. If you /// specify a checksum you get a BadRequestException exception. /// /// /// /// When you want to update a intent, set the checksum field to the checksum /// of the most recent revision of the $LATEST version. If you don't specify /// the checksum field, or if the checksum does not match the $LATEST /// version, you get a PreconditionFailedException exception. /// /// public string Checksum { get { return this._checksum; } set { this._checksum = value; } } // Check to see if Checksum property is set internal bool IsSetChecksum() { return this._checksum != null; } /// /// Gets and sets the property ConclusionStatement. /// /// The statement that you want Amazon Lex to convey to the user after the intent is /// successfully fulfilled by the Lambda function. /// /// /// /// This element is relevant only if you provide a Lambda function in the fulfillmentActivity. /// If you return the intent to the client application, you can't specify this element. /// /// /// /// The followUpPrompt and conclusionStatement are mutually /// exclusive. You can specify only one. /// /// /// public Statement ConclusionStatement { get { return this._conclusionStatement; } set { this._conclusionStatement = value; } } // Check to see if ConclusionStatement property is set internal bool IsSetConclusionStatement() { return this._conclusionStatement != null; } /// /// Gets and sets the property ConfirmationPrompt. /// /// Prompts the user to confirm the intent. This question should have a yes or no answer. /// /// /// /// Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is /// ready for fulfillment. For example, with the OrderPizza intent, you might /// want to confirm that the order is correct before placing it. For other intents, such /// as intents that simply respond to user questions, you might not need to ask the user /// for confirmation before providing the information. /// /// /// /// You you must provide both the rejectionStatement and the confirmationPrompt, /// or neither. /// /// /// public Prompt ConfirmationPrompt { get { return this._confirmationPrompt; } set { this._confirmationPrompt = value; } } // Check to see if ConfirmationPrompt property is set internal bool IsSetConfirmationPrompt() { return this._confirmationPrompt != null; } /// /// Gets and sets the property CreateVersion. /// /// When set to true a new numbered version of the intent is created. This /// is the same as calling the CreateIntentVersion operation. If you do not /// specify createVersion, the default is false. /// /// public bool CreateVersion { get { return this._createVersion.GetValueOrDefault(); } set { this._createVersion = value; } } // Check to see if CreateVersion property is set internal bool IsSetCreateVersion() { return this._createVersion.HasValue; } /// /// Gets and sets the property Description. /// /// A description of the intent. /// /// [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 a Lambda function to invoke for each user input. You can invoke this Lambda /// function to personalize user interaction. /// /// /// /// For example, suppose your bot determines that the user is John. Your 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 CodeHook 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 FollowUpPrompt. /// /// Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. /// For example, after the OrderPizza intent is fulfilled, you might prompt /// the user to order a drink. /// /// /// /// The action that Amazon Lex takes depends on the user's response, as follows: /// ///
  • /// /// If the user says "Yes" it responds with the clarification prompt that is configured /// for the bot. /// ///
  • /// /// if the user says "Yes" and continues with an utterance that triggers an intent it /// starts a conversation for the intent. /// ///
  • /// /// If the user says "No" it responds with the rejection statement configured for the /// the follow-up prompt. /// ///
  • /// /// If it doesn't recognize the utterance it repeats the follow-up prompt again. /// ///
/// /// The followUpPrompt field and the conclusionStatement field /// are mutually exclusive. You can specify only one. /// ///
public FollowUpPrompt FollowUpPrompt { get { return this._followUpPrompt; } set { this._followUpPrompt = value; } } // Check to see if FollowUpPrompt property is set internal bool IsSetFollowUpPrompt() { return this._followUpPrompt != null; } /// /// Gets and sets the property FulfillmentActivity. /// /// Required. Describes how the intent is fulfilled. For example, after a user provides /// all of the information for a pizza order, fulfillmentActivity defines /// how the bot places an order with a local pizza store. /// /// /// /// You might configure Amazon Lex to return all of the intent information to the client /// application, or direct it to invoke a Lambda function that can process the intent /// (for example, place an order with a pizzeria). /// /// public FulfillmentActivity FulfillmentActivity { get { return this._fulfillmentActivity; } set { this._fulfillmentActivity = value; } } // Check to see if FulfillmentActivity property is set internal bool IsSetFulfillmentActivity() { return this._fulfillmentActivity != null; } /// /// Gets and sets the property InputContexts. /// /// An array of InputContext objects that lists the contexts that must be /// active for Amazon Lex to choose the intent in a conversation with the user. /// /// [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 KendraConfiguration. /// /// Configuration information required to use the AMAZON.KendraSearchIntent /// intent to connect to an Amazon Kendra index. For more information, see /// AMAZON.KendraSearchIntent. /// /// 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 Name. /// /// The name of the intent. The name is not case sensitive. /// /// /// /// The name can't match a built-in intent name, or a built-in intent name with "AMAZON." /// removed. For example, because there is a built-in intent called AMAZON.HelpIntent, /// you can't create a custom intent called HelpIntent. /// /// /// /// For a list of built-in intents, see Standard /// Built-in Intents in the Alexa Skills Kit. /// /// [AWSProperty(Required=true, Min=1, Max=100)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// /// Gets and sets the property OutputContexts. /// /// An array of OutputContext objects that lists the contexts that the intent /// activates when the intent is fulfilled. /// /// [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. To find the signature /// for an intent, see Standard /// Built-in Intents in the Alexa Skills Kit. /// /// 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 RejectionStatement. /// /// When the user answers "no" to the question defined in confirmationPrompt, /// Amazon Lex responds with this statement to acknowledge that the intent was canceled. /// /// /// /// /// You must provide both the rejectionStatement and the confirmationPrompt, /// or neither. /// /// /// public Statement RejectionStatement { get { return this._rejectionStatement; } set { this._rejectionStatement = value; } } // Check to see if RejectionStatement property is set internal bool IsSetRejectionStatement() { return this._rejectionStatement != null; } /// /// Gets and sets the property SampleUtterances. /// /// An array of utterances (strings) that a user might say to signal the intent. For example, /// "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". /// /// /// /// In each utterance, a slot name is enclosed in curly braces. /// /// [AWSProperty(Min=0, Max=1500)] 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; } /// /// Gets and sets the property Slots. /// /// An array of intent slots. At runtime, Amazon Lex elicits required slot values from /// the user using prompts defined in the slots. For more information, see how-it-works. /// /// /// [AWSProperty(Min=0, Max=100)] public List Slots { get { return this._slots; } set { this._slots = value; } } // Check to see if Slots property is set internal bool IsSetSlots() { return this._slots != null && this._slots.Count > 0; } } }