/* * 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 runtime.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.LexRuntimeV2.Model { /// /// Contains information about the contexts that a user is using in a session. You can /// configure Amazon Lex V2 to set a context when an intent is fulfilled, or you can set /// a context using the , , or operations. /// /// /// /// Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up /// intents. For example, if the active context is order-fulfilled, only /// intents that have order-fulfilled configured as a trigger are considered /// for follow up. /// /// public partial class ActiveContext { private Dictionary _contextAttributes = new Dictionary(); private string _name; private ActiveContextTimeToLive _timeToLive; /// /// Gets and sets the property ContextAttributes. /// /// A list of contexts active for the request. A context can be activated when a previous /// intent is fulfilled, or by including the context in the request. /// /// /// /// If you don't specify a list of contexts, Amazon Lex V2 will use the current list of /// contexts for the session. If you specify an empty list, all contexts for the session /// are cleared. /// /// [AWSProperty(Required=true, Min=0, Max=10)] public Dictionary ContextAttributes { get { return this._contextAttributes; } set { this._contextAttributes = value; } } // Check to see if ContextAttributes property is set internal bool IsSetContextAttributes() { return this._contextAttributes != null && this._contextAttributes.Count > 0; } /// /// Gets and sets the property Name. /// /// The name of the context. /// /// [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 TimeToLive. /// /// Indicates the number of turns or seconds that the context is active. Once the time /// to live expires, the context is no longer returned in a response. /// /// [AWSProperty(Required=true)] public ActiveContextTimeToLive TimeToLive { get { return this._timeToLive; } set { this._timeToLive = value; } } // Check to see if TimeToLive property is set internal bool IsSetTimeToLive() { return this._timeToLive != null; } } }