/*
* 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-2016-11-28.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.Lex.Model
{
///
/// This is the response object from the PutSession operation.
///
public partial class PutSessionResponse : AmazonWebServiceResponse, IDisposable
{
private string _activeContexts;
private Stream _audioStream;
private string _contentType;
private DialogState _dialogState;
private string _encodedMessage;
private string _intentName;
private string _message;
private MessageFormatType _messageFormat;
private string _sessionAttributes;
private string _sessionId;
private string _slots;
private string _slotToElicit;
///
/// Gets and sets the property ActiveContexts.
///
/// A list of active contexts for the session.
///
///
[AWSProperty(Sensitive=true)]
public string ActiveContexts
{
get { return this._activeContexts; }
set { this._activeContexts = value; }
}
// Check to see if ActiveContexts property is set
internal bool IsSetActiveContexts()
{
return this._activeContexts != null;
}
///
/// Gets and sets the property AudioStream.
///
/// The audio version of the message to convey to the user.
///
///
public Stream AudioStream
{
get { return this._audioStream; }
set { this._audioStream = value; }
}
// Check to see if AudioStream property is set
internal bool IsSetAudioStream()
{
return this._audioStream != null;
}
///
/// Gets and sets the property ContentType.
///
/// Content type as specified in the Accept
HTTP header in the request.
///
///
public string ContentType
{
get { return this._contentType; }
set { this._contentType = value; }
}
// Check to see if ContentType property is set
internal bool IsSetContentType()
{
return this._contentType != null;
}
///
/// Gets and sets the property DialogState. -
///
///
ConfirmIntent
- Amazon Lex is expecting a "yes" or "no" response to
/// confirm the intent before fulfilling an intent.
///
/// -
///
///
ElicitIntent
- Amazon Lex wants to elicit the user's intent.
///
/// -
///
///
ElicitSlot
- Amazon Lex is expecting the value of a slot for the current
/// intent.
///
/// -
///
///
Failed
- Conveys that the conversation with the user has failed. This
/// can happen for various reasons, including the user does not provide an appropriate
/// response to prompts from the service, or if the Lambda function fails to fulfill the
/// intent.
///
/// -
///
///
Fulfilled
- Conveys that the Lambda function has sucessfully fulfilled
/// the intent.
///
/// -
///
///
ReadyForFulfillment
- Conveys that the client has to fulfill the intent.
///
///
///
public DialogState DialogState
{
get { return this._dialogState; }
set { this._dialogState = value; }
}
// Check to see if DialogState property is set
internal bool IsSetDialogState()
{
return this._dialogState != null;
}
///
/// Gets and sets the property EncodedMessage.
///
/// The next message that should be presented to the user.
///
///
///
/// The encodedMessage
field is base-64 encoded. You must decode the field
/// before you can use the value.
///
///
[AWSProperty(Sensitive=true, Min=1, Max=1366)]
public string EncodedMessage
{
get { return this._encodedMessage; }
set { this._encodedMessage = value; }
}
// Check to see if EncodedMessage property is set
internal bool IsSetEncodedMessage()
{
return this._encodedMessage != null;
}
///
/// Gets and sets the property IntentName.
///
/// The name of the current intent.
///
///
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 Message.
///
/// The next message that should be presented to the user.
///
///
///
/// You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US,
/// fr-CA, fr-FR, and it-IT locales. In all other locales, the message
field
/// is null. You should use the encodedMessage
field instead.
///
///
[Obsolete("The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales.")]
[AWSProperty(Sensitive=true, Min=1, Max=1024)]
public string Message
{
get { return this._message; }
set { this._message = value; }
}
// Check to see if Message property is set
internal bool IsSetMessage()
{
return this._message != null;
}
///
/// Gets and sets the property MessageFormat.
///
/// The format of the response message. One of the following values:
///
/// -
///
///
PlainText
- The message contains plain UTF-8 text.
///
/// -
///
///
CustomPayload
- The message is a custom format for the client.
///
/// -
///
///
SSML
- The message contains text formatted for voice output.
///
/// -
///
///
Composite
- The message contains an escaped JSON object containing one
/// or more messages from the groups that messages were assigned to when the intent was
/// created.
///
///
///
public MessageFormatType MessageFormat
{
get { return this._messageFormat; }
set { this._messageFormat = value; }
}
// Check to see if MessageFormat property is set
internal bool IsSetMessageFormat()
{
return this._messageFormat != null;
}
///
/// Gets and sets the property SessionAttributes.
///
/// Map of key/value pairs representing session-specific context information.
///
///
public string SessionAttributes
{
get { return this._sessionAttributes; }
set { this._sessionAttributes = value; }
}
// Check to see if SessionAttributes property is set
internal bool IsSetSessionAttributes()
{
return this._sessionAttributes != null;
}
///
/// Gets and sets the property SessionId.
///
/// A unique identifier for the session.
///
///
public string SessionId
{
get { return this._sessionId; }
set { this._sessionId = value; }
}
// Check to see if SessionId property is set
internal bool IsSetSessionId()
{
return this._sessionId != null;
}
///
/// Gets and sets the property Slots.
///
/// Map of zero or more intent slots Amazon Lex detected from the user input during the
/// conversation.
///
///
///
/// Amazon Lex creates a resolution list containing likely values for a slot. The value
/// that it returns is determined by the valueSelectionStrategy
selected
/// when the slot type was created or updated. If valueSelectionStrategy
/// is set to ORIGINAL_VALUE
, the value provided by the user is returned,
/// if the user value is similar to the slot values. If valueSelectionStrategy
/// is set to TOP_RESOLUTION
Amazon Lex returns the first value in the resolution
/// list or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy
/// the default is ORIGINAL_VALUE
.
///
///
public string Slots
{
get { return this._slots; }
set { this._slots = value; }
}
// Check to see if Slots property is set
internal bool IsSetSlots()
{
return this._slots != null;
}
///
/// Gets and sets the property SlotToElicit.
///
/// If the dialogState
is ElicitSlot
, returns the name of the
/// slot for which Amazon Lex is eliciting a value.
///
///
public string SlotToElicit
{
get { return this._slotToElicit; }
set { this._slotToElicit = value; }
}
// Check to see if SlotToElicit property is set
internal bool IsSetSlotToElicit()
{
return this._slotToElicit != null;
}
#region Dispose Pattern
private bool _disposed;
///
/// Disposes of all managed and unmanaged resources.
///
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed)
return;
if (disposing)
{
this._audioStream?.Dispose();
this._audioStream = null;
}
this._disposed = true;
}
#endregion
}
}