NAME

Paws::LexRuntime::PutSession - Arguments for method PutSession on Paws::LexRuntime

DESCRIPTION

This class represents the parameters used for calling the method PutSession on the Amazon Lex Runtime Service service. Use the attributes of this class as arguments to method PutSession.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutSession.

SYNOPSIS

my $runtime.lex = Paws->service('LexRuntime');
my $PutSessionResponse = $runtime . lex->PutSession(
  BotAlias       => 'MyBotAlias',
  BotName        => 'MyBotName',
  UserId         => 'MyUserId',
  Accept         => 'MyAccept',     # OPTIONAL
  ActiveContexts => [
    {
      Name       => 'MyActiveContextName',    # min: 1, max: 100
      Parameters => {
        'MyParameterName' =>
          'MyText',    # key: min: 1, max: 100, value: min: 1, max: 1024
      },    # max: 10
      TimeToLive => {
        TimeToLiveInSeconds => 1,    # min: 5, max: 86400; OPTIONAL
        TurnsToLive         => 1,    # min: 1, max: 20; OPTIONAL
      },

    },
    ...
  ],    # OPTIONAL
  DialogAction => {
    Type => 'ElicitIntent'
    ,    # values: ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate
    FulfillmentState => 'Fulfilled'
    ,    # values: Fulfilled, Failed, ReadyForFulfillment; OPTIONAL
    IntentName    => 'MyIntentName',    # OPTIONAL
    Message       => 'MyText',          # min: 1, max: 1024
    MessageFormat => 'PlainText'
    ,    # values: PlainText, CustomPayload, SSML, Composite; OPTIONAL
    SlotToElicit => 'MyString',    # OPTIONAL
    Slots        => {
      'MyString' => 'MyString',    # key: OPTIONAL, value: OPTIONAL
    },    # OPTIONAL
  },    # OPTIONAL
  RecentIntentSummaryView => [
    {
      DialogActionType => 'ElicitIntent'
      ,   # values: ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate
      CheckpointLabel =>
        'MyIntentSummaryCheckpointLabel',    # min: 1, max: 255; OPTIONAL
      ConfirmationStatus =>
        'None',    # values: None, Confirmed, Denied; OPTIONAL
      FulfillmentState => 'Fulfilled'
      ,    # values: Fulfilled, Failed, ReadyForFulfillment; OPTIONAL
      IntentName   => 'MyIntentName',    # OPTIONAL
      SlotToElicit => 'MyString',        # OPTIONAL
      Slots        => {
        'MyString' => 'MyString',        # key: OPTIONAL, value: OPTIONAL
      },    # OPTIONAL
    },
    ...
  ],    # OPTIONAL
  SessionAttributes => {
    'MyString' => 'MyString',    # key: OPTIONAL, value: OPTIONAL
  },    # OPTIONAL
);

# Results:
my $ActiveContexts    = $PutSessionResponse->ActiveContexts;
my $AudioStream       = $PutSessionResponse->AudioStream;
my $ContentType       = $PutSessionResponse->ContentType;
my $DialogState       = $PutSessionResponse->DialogState;
my $EncodedMessage    = $PutSessionResponse->EncodedMessage;
my $IntentName        = $PutSessionResponse->IntentName;
my $Message           = $PutSessionResponse->Message;
my $MessageFormat     = $PutSessionResponse->MessageFormat;
my $SessionAttributes = $PutSessionResponse->SessionAttributes;
my $SessionId         = $PutSessionResponse->SessionId;
my $SlotToElicit      = $PutSessionResponse->SlotToElicit;
my $Slots             = $PutSessionResponse->Slots;

# Returns a L<Paws::LexRuntime::PutSessionResponse> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex/PutSession

ATTRIBUTES

Accept => Str

The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.

  • If the value is text/plain; charset=utf-8, Amazon Lex returns text in the response.

  • If the value begins with audio/, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech in the configuration that you specify. For example, if you specify audio/mpeg as the value, Amazon Lex returns speech in the MPEG format.

  • If the value is audio/pcm, the speech is returned as audio/pcm in 16-bit, little endian format.

  • The following are the accepted values:

    • audio/mpeg

    • audio/ogg

    • audio/pcm

    • audio/* (defaults to mpeg)

    • text/plain; charset=utf-8

ActiveContexts => ArrayRef[Paws::LexRuntime::ActiveContext]

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 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

REQUIRED BotAlias => Str

The alias in use for the bot that contains the session data.

REQUIRED BotName => Str

The name of the bot that contains the session data.

DialogAction => Paws::LexRuntime::DialogAction

Sets the next action that the bot should take to fulfill the conversation.

RecentIntentSummaryView => ArrayRef[Paws::LexRuntime::IntentSummary]

A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

  • intentName

  • slot names

  • slotToElict

If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

SessionAttributes => Paws::LexRuntime::StringMap

Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.

REQUIRED UserId => Str

The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.

SEE ALSO

This class forms part of Paws, documenting arguments for method PutSession in Paws::LexRuntime

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues