« blib/lib/Paws/LexRuntime/PredictedIntent.pm
↑ Summary
blib/lib/Paws/LexRuntime/PutSessionResponse.pm »
| 1 | |||
| 2 | package Paws::LexRuntime::PutSession; | ||
| 3 | use Moose; | ||
| 4 | has Accept => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'Accept'); | ||
| 5 | has ActiveContexts => (is => 'ro', isa => 'ArrayRef[Paws::LexRuntime::ActiveContext]', traits => ['NameInRequest'], request_name => 'activeContexts'); | ||
| 6 | has BotAlias => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botAlias', required => 1); | ||
| 7 | has BotName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botName', required => 1); | ||
| 8 | has DialogAction => (is => 'ro', isa => 'Paws::LexRuntime::DialogAction', traits => ['NameInRequest'], request_name => 'dialogAction'); | ||
| 9 | has RecentIntentSummaryView => (is => 'ro', isa => 'ArrayRef[Paws::LexRuntime::IntentSummary]', traits => ['NameInRequest'], request_name => 'recentIntentSummaryView'); | ||
| 10 | has SessionAttributes => (is => 'ro', isa => 'Paws::LexRuntime::StringMap', traits => ['NameInRequest'], request_name => 'sessionAttributes'); | ||
| 11 | has UserId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'userId', required => 1); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutSession'); | ||
| 16 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bot/{botName}/alias/{botAlias}/user/{userId}/session'); | ||
| 17 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 18 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexRuntime::PutSessionResponse'); | ||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::LexRuntime::PutSession - Arguments for method PutSession on L<Paws::LexRuntime> | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This class represents the parameters used for calling the method PutSession on the | ||
| 30 | L<Amazon Lex Runtime Service|Paws::LexRuntime> service. Use the attributes of this class | ||
| 31 | as arguments to method PutSession. | ||
| 32 | |||
| 33 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutSession. | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | my $runtime.lex = Paws->service('LexRuntime'); | ||
| 38 | my $PutSessionResponse = $runtime . lex->PutSession( | ||
| 39 | BotAlias => 'MyBotAlias', | ||
| 40 | BotName => 'MyBotName', | ||
| 41 | UserId => 'MyUserId', | ||
| 42 | Accept => 'MyAccept', # OPTIONAL | ||
| 43 | ActiveContexts => [ | ||
| 44 | { | ||
| 45 | Name => 'MyActiveContextName', # min: 1, max: 100 | ||
| 46 | Parameters => { | ||
| 47 | 'MyParameterName' => | ||
| 48 | 'MyText', # key: min: 1, max: 100, value: min: 1, max: 1024 | ||
| 49 | }, # max: 10 | ||
| 50 | TimeToLive => { | ||
| 51 | TimeToLiveInSeconds => 1, # min: 5, max: 86400; OPTIONAL | ||
| 52 | TurnsToLive => 1, # min: 1, max: 20; OPTIONAL | ||
| 53 | }, | ||
| 54 | |||
| 55 | }, | ||
| 56 | ... | ||
| 57 | ], # OPTIONAL | ||
| 58 | DialogAction => { | ||
| 59 | Type => 'ElicitIntent' | ||
| 60 | , # values: ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate | ||
| 61 | FulfillmentState => 'Fulfilled' | ||
| 62 | , # values: Fulfilled, Failed, ReadyForFulfillment; OPTIONAL | ||
| 63 | IntentName => 'MyIntentName', # OPTIONAL | ||
| 64 | Message => 'MyText', # min: 1, max: 1024 | ||
| 65 | MessageFormat => 'PlainText' | ||
| 66 | , # values: PlainText, CustomPayload, SSML, Composite; OPTIONAL | ||
| 67 | SlotToElicit => 'MyString', # OPTIONAL | ||
| 68 | Slots => { | ||
| 69 | 'MyString' => 'MyString', # key: OPTIONAL, value: OPTIONAL | ||
| 70 | }, # OPTIONAL | ||
| 71 | }, # OPTIONAL | ||
| 72 | RecentIntentSummaryView => [ | ||
| 73 | { | ||
| 74 | DialogActionType => 'ElicitIntent' | ||
| 75 | , # values: ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate | ||
| 76 | CheckpointLabel => | ||
| 77 | 'MyIntentSummaryCheckpointLabel', # min: 1, max: 255; OPTIONAL | ||
| 78 | ConfirmationStatus => | ||
| 79 | 'None', # values: None, Confirmed, Denied; OPTIONAL | ||
| 80 | FulfillmentState => 'Fulfilled' | ||
| 81 | , # values: Fulfilled, Failed, ReadyForFulfillment; OPTIONAL | ||
| 82 | IntentName => 'MyIntentName', # OPTIONAL | ||
| 83 | SlotToElicit => 'MyString', # OPTIONAL | ||
| 84 | Slots => { | ||
| 85 | 'MyString' => 'MyString', # key: OPTIONAL, value: OPTIONAL | ||
| 86 | }, # OPTIONAL | ||
| 87 | }, | ||
| 88 | ... | ||
| 89 | ], # OPTIONAL | ||
| 90 | SessionAttributes => { | ||
| 91 | 'MyString' => 'MyString', # key: OPTIONAL, value: OPTIONAL | ||
| 92 | }, # OPTIONAL | ||
| 93 | ); | ||
| 94 | |||
| 95 | # Results: | ||
| 96 | my $ActiveContexts = $PutSessionResponse->ActiveContexts; | ||
| 97 | my $AudioStream = $PutSessionResponse->AudioStream; | ||
| 98 | my $ContentType = $PutSessionResponse->ContentType; | ||
| 99 | my $DialogState = $PutSessionResponse->DialogState; | ||
| 100 | my $EncodedMessage = $PutSessionResponse->EncodedMessage; | ||
| 101 | my $IntentName = $PutSessionResponse->IntentName; | ||
| 102 | my $Message = $PutSessionResponse->Message; | ||
| 103 | my $MessageFormat = $PutSessionResponse->MessageFormat; | ||
| 104 | my $SessionAttributes = $PutSessionResponse->SessionAttributes; | ||
| 105 | my $SessionId = $PutSessionResponse->SessionId; | ||
| 106 | my $SlotToElicit = $PutSessionResponse->SlotToElicit; | ||
| 107 | my $Slots = $PutSessionResponse->Slots; | ||
| 108 | |||
| 109 | # Returns a L<Paws::LexRuntime::PutSessionResponse> object. | ||
| 110 | |||
| 111 | 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. | ||
| 112 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime.lex/PutSession> | ||
| 113 | |||
| 114 | =head1 ATTRIBUTES | ||
| 115 | |||
| 116 | |||
| 117 | =head2 Accept => Str | ||
| 118 | |||
| 119 | The message that Amazon Lex returns in the response can be either text | ||
| 120 | or speech based depending on the value of this field. | ||
| 121 | |||
| 122 | =over | ||
| 123 | |||
| 124 | =item * | ||
| 125 | |||
| 126 | If the value is C<text/plain; charset=utf-8>, Amazon Lex returns text | ||
| 127 | in the response. | ||
| 128 | |||
| 129 | =item * | ||
| 130 | |||
| 131 | If the value begins with C<audio/>, Amazon Lex returns speech in the | ||
| 132 | response. Amazon Lex uses Amazon Polly to generate the speech in the | ||
| 133 | configuration that you specify. For example, if you specify | ||
| 134 | C<audio/mpeg> as the value, Amazon Lex returns speech in the MPEG | ||
| 135 | format. | ||
| 136 | |||
| 137 | =item * | ||
| 138 | |||
| 139 | If the value is C<audio/pcm>, the speech is returned as C<audio/pcm> in | ||
| 140 | 16-bit, little endian format. | ||
| 141 | |||
| 142 | =item * | ||
| 143 | |||
| 144 | The following are the accepted values: | ||
| 145 | |||
| 146 | =over | ||
| 147 | |||
| 148 | =item * | ||
| 149 | |||
| 150 | C<audio/mpeg> | ||
| 151 | |||
| 152 | =item * | ||
| 153 | |||
| 154 | C<audio/ogg> | ||
| 155 | |||
| 156 | =item * | ||
| 157 | |||
| 158 | C<audio/pcm> | ||
| 159 | |||
| 160 | =item * | ||
| 161 | |||
| 162 | C<audio/*> (defaults to mpeg) | ||
| 163 | |||
| 164 | =item * | ||
| 165 | |||
| 166 | C<text/plain; charset=utf-8> | ||
| 167 | |||
| 168 | =back | ||
| 169 | |||
| 170 | =back | ||
| 171 | |||
| 172 | |||
| 173 | |||
| 174 | |||
| 175 | =head2 ActiveContexts => ArrayRef[L<Paws::LexRuntime::ActiveContext>] | ||
| 176 | |||
| 177 | A list of contexts active for the request. A context can be activated | ||
| 178 | when a previous intent is fulfilled, or by including the context in the | ||
| 179 | request, | ||
| 180 | |||
| 181 | If you don't specify a list of contexts, Amazon Lex will use the | ||
| 182 | current list of contexts for the session. If you specify an empty list, | ||
| 183 | all contexts for the session are cleared. | ||
| 184 | |||
| 185 | |||
| 186 | |||
| 187 | =head2 B<REQUIRED> BotAlias => Str | ||
| 188 | |||
| 189 | The alias in use for the bot that contains the session data. | ||
| 190 | |||
| 191 | |||
| 192 | |||
| 193 | =head2 B<REQUIRED> BotName => Str | ||
| 194 | |||
| 195 | The name of the bot that contains the session data. | ||
| 196 | |||
| 197 | |||
| 198 | |||
| 199 | =head2 DialogAction => L<Paws::LexRuntime::DialogAction> | ||
| 200 | |||
| 201 | Sets the next action that the bot should take to fulfill the | ||
| 202 | conversation. | ||
| 203 | |||
| 204 | |||
| 205 | |||
| 206 | =head2 RecentIntentSummaryView => ArrayRef[L<Paws::LexRuntime::IntentSummary>] | ||
| 207 | |||
| 208 | A summary of the recent intents for the bot. You can use the intent | ||
| 209 | summary view to set a checkpoint label on an intent and modify | ||
| 210 | attributes of intents. You can also use it to remove or add intent | ||
| 211 | summary objects to the list. | ||
| 212 | |||
| 213 | An intent that you modify or add to the list must make sense for the | ||
| 214 | bot. For example, the intent name must be valid for the bot. You must | ||
| 215 | provide valid values for: | ||
| 216 | |||
| 217 | =over | ||
| 218 | |||
| 219 | =item * | ||
| 220 | |||
| 221 | C<intentName> | ||
| 222 | |||
| 223 | =item * | ||
| 224 | |||
| 225 | slot names | ||
| 226 | |||
| 227 | =item * | ||
| 228 | |||
| 229 | C<slotToElict> | ||
| 230 | |||
| 231 | =back | ||
| 232 | |||
| 233 | If you send the C<recentIntentSummaryView> parameter in a C<PutSession> | ||
| 234 | request, the contents of the new summary view replaces the old summary | ||
| 235 | view. For example, if a C<GetSession> request returns three intents in | ||
| 236 | the summary view and you call C<PutSession> with one intent in the | ||
| 237 | summary view, the next call to C<GetSession> will only return one | ||
| 238 | intent. | ||
| 239 | |||
| 240 | |||
| 241 | |||
| 242 | =head2 SessionAttributes => L<Paws::LexRuntime::StringMap> | ||
| 243 | |||
| 244 | Map of key/value pairs representing the session-specific context | ||
| 245 | information. It contains application information passed between Amazon | ||
| 246 | Lex and a client application. | ||
| 247 | |||
| 248 | |||
| 249 | |||
| 250 | =head2 B<REQUIRED> UserId => Str | ||
| 251 | |||
| 252 | The ID of the client application user. Amazon Lex uses this to identify | ||
| 253 | a user's conversation with your bot. | ||
| 254 | |||
| 255 | |||
| 256 | |||
| 257 | |||
| 258 | =head1 SEE ALSO | ||
| 259 | |||
| 260 | This class forms part of L<Paws>, documenting arguments for method PutSession in L<Paws::LexRuntime> | ||
| 261 | |||
| 262 | =head1 BUGS and CONTRIBUTIONS | ||
| 263 | |||
| 264 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 265 | |||
| 266 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 267 | |||
| 268 | =cut | ||
| 269 |