| 1 | package Paws::LexRuntime; | ||
| 2 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | sub service { 'runtime.lex' } |
|
Subroutine
service: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 4 | 1 | ▶ | sub signing_name { 'lex' } |
|
Subroutine
signing_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 5 | 0 | ▶ | sub version { '2016-11-28' } |
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 6 | 0 | ▶ | sub flattened_arrays { 0 } |
|
Subroutine
flattened_arrays: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 7 | 1 | has max_attempts => (is => 'ro', isa => 'Int', default => 5); | |
| 8 | 1 | ▶ | has retry => (is => 'ro', isa => 'HashRef', default => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 9 | 1 | { base => 'rand', type => 'exponential', growth_factor => 2 } | |
| 10 | 1 | }); | |
| 11 | 1 | ▶ | has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [ |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ] }); | |
| 13 | |||
| 14 | 1 | with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller'; | |
| 15 | |||
| 16 | |||
| 17 | 0 | ▶ | sub DeleteSession { |
|
Subroutine
DeleteSession: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 18 | 0 | my $self = shift; | |
| 19 | 0 | my $call_object = $self->new_with_coercions('Paws::LexRuntime::DeleteSession', @_); | |
| 20 | 0 | return $self->caller->do_call($self, $call_object); | |
| 21 | } | ||
| 22 | 0 | ▶ | sub GetSession { |
|
Subroutine
GetSession: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 23 | 0 | my $self = shift; | |
| 24 | 0 | my $call_object = $self->new_with_coercions('Paws::LexRuntime::GetSession', @_); | |
| 25 | 0 | return $self->caller->do_call($self, $call_object); | |
| 26 | } | ||
| 27 | 0 | ▶ | sub PostContent { |
|
Subroutine
PostContent: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 28 | 0 | my $self = shift; | |
| 29 | 0 | my $call_object = $self->new_with_coercions('Paws::LexRuntime::PostContent', @_); | |
| 30 | 0 | return $self->caller->do_call($self, $call_object); | |
| 31 | } | ||
| 32 | 0 | ▶ | sub PostText { |
|
Subroutine
PostText: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 33 | 0 | my $self = shift; | |
| 34 | 0 | my $call_object = $self->new_with_coercions('Paws::LexRuntime::PostText', @_); | |
| 35 | 0 | return $self->caller->do_call($self, $call_object); | |
| 36 | } | ||
| 37 | 0 | ▶ | sub PutSession { |
|
Subroutine
PutSession: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 38 | 0 | my $self = shift; | |
| 39 | 0 | my $call_object = $self->new_with_coercions('Paws::LexRuntime::PutSession', @_); | |
| 40 | 0 | return $self->caller->do_call($self, $call_object); | |
| 41 | } | ||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | 0 | ▶ | sub operations { qw/DeleteSession GetSession PostContent PostText PutSession / } |
|
Subroutine
operations: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 46 | |||
| 47 | 1 | 1; | |
| 48 | |||
| 49 | ### main pod documentation begin ### | ||
| 50 | |||
| 51 | =head1 NAME | ||
| 52 | |||
| 53 | Paws::LexRuntime - Perl Interface to AWS Amazon Lex Runtime Service | ||
| 54 | |||
| 55 | =head1 SYNOPSIS | ||
| 56 | |||
| 57 | use Paws; | ||
| 58 | |||
| 59 | my $obj = Paws->service('LexRuntime'); | ||
| 60 | my $res = $obj->Method( | ||
| 61 | Arg1 => $val1, | ||
| 62 | Arg2 => [ 'V1', 'V2' ], | ||
| 63 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 64 | # of the arguments type | ||
| 65 | Arg3 => { Att1 => 'Val1' }, | ||
| 66 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 67 | # the constructor of the arguments type | ||
| 68 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 69 | ); | ||
| 70 | |||
| 71 | =head1 DESCRIPTION | ||
| 72 | |||
| 73 | Amazon Lex provides both build and runtime endpoints. Each endpoint | ||
| 74 | provides a set of operations (API). Your conversational bot uses the | ||
| 75 | runtime API to understand user utterances (user input text or voice). | ||
| 76 | For example, suppose a user says "I want pizza", your bot sends this | ||
| 77 | input to Amazon Lex using the runtime API. Amazon Lex recognizes that | ||
| 78 | the user request is for the OrderPizza intent (one of the intents | ||
| 79 | defined in the bot). Then Amazon Lex engages in user conversation on | ||
| 80 | behalf of the bot to elicit required information (slot values, such as | ||
| 81 | pizza size and crust type), and then performs fulfillment activity | ||
| 82 | (that you configured when you created the bot). You use the build-time | ||
| 83 | API to create and manage your Amazon Lex bot. For a list of build-time | ||
| 84 | operations, see the build-time API, . | ||
| 85 | |||
| 86 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28> | ||
| 87 | |||
| 88 | |||
| 89 | =head1 METHODS | ||
| 90 | |||
| 91 | =head2 DeleteSession | ||
| 92 | |||
| 93 | =over | ||
| 94 | |||
| 95 | =item BotAlias => Str | ||
| 96 | |||
| 97 | =item BotName => Str | ||
| 98 | |||
| 99 | =item UserId => Str | ||
| 100 | |||
| 101 | |||
| 102 | =back | ||
| 103 | |||
| 104 | Each argument is described in detail in: L<Paws::LexRuntime::DeleteSession> | ||
| 105 | |||
| 106 | Returns: a L<Paws::LexRuntime::DeleteSessionResponse> instance | ||
| 107 | |||
| 108 | Removes session information for a specified bot, alias, and user ID. | ||
| 109 | |||
| 110 | |||
| 111 | =head2 GetSession | ||
| 112 | |||
| 113 | =over | ||
| 114 | |||
| 115 | =item BotAlias => Str | ||
| 116 | |||
| 117 | =item BotName => Str | ||
| 118 | |||
| 119 | =item UserId => Str | ||
| 120 | |||
| 121 | =item [CheckpointLabelFilter => Str] | ||
| 122 | |||
| 123 | |||
| 124 | =back | ||
| 125 | |||
| 126 | Each argument is described in detail in: L<Paws::LexRuntime::GetSession> | ||
| 127 | |||
| 128 | Returns: a L<Paws::LexRuntime::GetSessionResponse> instance | ||
| 129 | |||
| 130 | Returns session information for a specified bot, alias, and user ID. | ||
| 131 | |||
| 132 | |||
| 133 | =head2 PostContent | ||
| 134 | |||
| 135 | =over | ||
| 136 | |||
| 137 | =item BotAlias => Str | ||
| 138 | |||
| 139 | =item BotName => Str | ||
| 140 | |||
| 141 | =item ContentType => Str | ||
| 142 | |||
| 143 | =item InputStream => Str | ||
| 144 | |||
| 145 | =item UserId => Str | ||
| 146 | |||
| 147 | =item [Accept => Str] | ||
| 148 | |||
| 149 | =item [ActiveContexts => Str] | ||
| 150 | |||
| 151 | =item [RequestAttributes => Str] | ||
| 152 | |||
| 153 | =item [SessionAttributes => Str] | ||
| 154 | |||
| 155 | |||
| 156 | =back | ||
| 157 | |||
| 158 | Each argument is described in detail in: L<Paws::LexRuntime::PostContent> | ||
| 159 | |||
| 160 | Returns: a L<Paws::LexRuntime::PostContentResponse> instance | ||
| 161 | |||
| 162 | Sends user input (text or speech) to Amazon Lex. Clients use this API | ||
| 163 | to send text and audio requests to Amazon Lex at runtime. Amazon Lex | ||
| 164 | interprets the user input using the machine learning model that it | ||
| 165 | built for the bot. | ||
| 166 | |||
| 167 | The C<PostContent> operation supports audio input at 8kHz and 16kHz. | ||
| 168 | You can use 8kHz audio to achieve higher speech recognition accuracy in | ||
| 169 | telephone audio applications. | ||
| 170 | |||
| 171 | In response, Amazon Lex returns the next message to convey to the user. | ||
| 172 | Consider the following example messages: | ||
| 173 | |||
| 174 | =over | ||
| 175 | |||
| 176 | =item * | ||
| 177 | |||
| 178 | For a user input "I would like a pizza," Amazon Lex might return a | ||
| 179 | response with a message eliciting slot data (for example, | ||
| 180 | C<PizzaSize>): "What size pizza would you like?". | ||
| 181 | |||
| 182 | =item * | ||
| 183 | |||
| 184 | After the user provides all of the pizza order information, Amazon Lex | ||
| 185 | might return a response with a message to get user confirmation: "Order | ||
| 186 | the pizza?". | ||
| 187 | |||
| 188 | =item * | ||
| 189 | |||
| 190 | After the user replies "Yes" to the confirmation prompt, Amazon Lex | ||
| 191 | might return a conclusion statement: "Thank you, your cheese pizza has | ||
| 192 | been ordered.". | ||
| 193 | |||
| 194 | =back | ||
| 195 | |||
| 196 | Not all Amazon Lex messages require a response from the user. For | ||
| 197 | example, conclusion statements do not require a response. Some messages | ||
| 198 | require only a yes or no response. In addition to the C<message>, | ||
| 199 | Amazon Lex provides additional context about the message in the | ||
| 200 | response that you can use to enhance client behavior, such as | ||
| 201 | displaying the appropriate client user interface. Consider the | ||
| 202 | following examples: | ||
| 203 | |||
| 204 | =over | ||
| 205 | |||
| 206 | =item * | ||
| 207 | |||
| 208 | If the message is to elicit slot data, Amazon Lex returns the following | ||
| 209 | context information: | ||
| 210 | |||
| 211 | =over | ||
| 212 | |||
| 213 | =item * | ||
| 214 | |||
| 215 | C<x-amz-lex-dialog-state> header set to C<ElicitSlot> | ||
| 216 | |||
| 217 | =item * | ||
| 218 | |||
| 219 | C<x-amz-lex-intent-name> header set to the intent name in the current | ||
| 220 | context | ||
| 221 | |||
| 222 | =item * | ||
| 223 | |||
| 224 | C<x-amz-lex-slot-to-elicit> header set to the slot name for which the | ||
| 225 | C<message> is eliciting information | ||
| 226 | |||
| 227 | =item * | ||
| 228 | |||
| 229 | C<x-amz-lex-slots> header set to a map of slots configured for the | ||
| 230 | intent with their current values | ||
| 231 | |||
| 232 | =back | ||
| 233 | |||
| 234 | =item * | ||
| 235 | |||
| 236 | If the message is a confirmation prompt, the C<x-amz-lex-dialog-state> | ||
| 237 | header is set to C<Confirmation> and the C<x-amz-lex-slot-to-elicit> | ||
| 238 | header is omitted. | ||
| 239 | |||
| 240 | =item * | ||
| 241 | |||
| 242 | If the message is a clarification prompt configured for the intent, | ||
| 243 | indicating that the user intent is not understood, the | ||
| 244 | C<x-amz-dialog-state> header is set to C<ElicitIntent> and the | ||
| 245 | C<x-amz-slot-to-elicit> header is omitted. | ||
| 246 | |||
| 247 | =back | ||
| 248 | |||
| 249 | In addition, Amazon Lex also returns your application-specific | ||
| 250 | C<sessionAttributes>. For more information, see Managing Conversation | ||
| 251 | Context (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html). | ||
| 252 | |||
| 253 | |||
| 254 | =head2 PostText | ||
| 255 | |||
| 256 | =over | ||
| 257 | |||
| 258 | =item BotAlias => Str | ||
| 259 | |||
| 260 | =item BotName => Str | ||
| 261 | |||
| 262 | =item InputText => Str | ||
| 263 | |||
| 264 | =item UserId => Str | ||
| 265 | |||
| 266 | =item [ActiveContexts => ArrayRef[L<Paws::LexRuntime::ActiveContext>]] | ||
| 267 | |||
| 268 | =item [RequestAttributes => L<Paws::LexRuntime::StringMap>] | ||
| 269 | |||
| 270 | =item [SessionAttributes => L<Paws::LexRuntime::StringMap>] | ||
| 271 | |||
| 272 | |||
| 273 | =back | ||
| 274 | |||
| 275 | Each argument is described in detail in: L<Paws::LexRuntime::PostText> | ||
| 276 | |||
| 277 | Returns: a L<Paws::LexRuntime::PostTextResponse> instance | ||
| 278 | |||
| 279 | Sends user input to Amazon Lex. Client applications can use this API to | ||
| 280 | send requests to Amazon Lex at runtime. Amazon Lex then interprets the | ||
| 281 | user input using the machine learning model it built for the bot. | ||
| 282 | |||
| 283 | In response, Amazon Lex returns the next C<message> to convey to the | ||
| 284 | user an optional C<responseCard> to display. Consider the following | ||
| 285 | example messages: | ||
| 286 | |||
| 287 | =over | ||
| 288 | |||
| 289 | =item * | ||
| 290 | |||
| 291 | For a user input "I would like a pizza", Amazon Lex might return a | ||
| 292 | response with a message eliciting slot data (for example, PizzaSize): | ||
| 293 | "What size pizza would you like?" | ||
| 294 | |||
| 295 | =item * | ||
| 296 | |||
| 297 | After the user provides all of the pizza order information, Amazon Lex | ||
| 298 | might return a response with a message to obtain user confirmation | ||
| 299 | "Proceed with the pizza order?". | ||
| 300 | |||
| 301 | =item * | ||
| 302 | |||
| 303 | After the user replies to a confirmation prompt with a "yes", Amazon | ||
| 304 | Lex might return a conclusion statement: "Thank you, your cheese pizza | ||
| 305 | has been ordered.". | ||
| 306 | |||
| 307 | =back | ||
| 308 | |||
| 309 | Not all Amazon Lex messages require a user response. For example, a | ||
| 310 | conclusion statement does not require a response. Some messages require | ||
| 311 | only a "yes" or "no" user response. In addition to the C<message>, | ||
| 312 | Amazon Lex provides additional context about the message in the | ||
| 313 | response that you might use to enhance client behavior, for example, to | ||
| 314 | display the appropriate client user interface. These are the | ||
| 315 | C<slotToElicit>, C<dialogState>, C<intentName>, and C<slots> fields in | ||
| 316 | the response. Consider the following examples: | ||
| 317 | |||
| 318 | =over | ||
| 319 | |||
| 320 | =item * | ||
| 321 | |||
| 322 | If the message is to elicit slot data, Amazon Lex returns the following | ||
| 323 | context information: | ||
| 324 | |||
| 325 | =over | ||
| 326 | |||
| 327 | =item * | ||
| 328 | |||
| 329 | C<dialogState> set to ElicitSlot | ||
| 330 | |||
| 331 | =item * | ||
| 332 | |||
| 333 | C<intentName> set to the intent name in the current context | ||
| 334 | |||
| 335 | =item * | ||
| 336 | |||
| 337 | C<slotToElicit> set to the slot name for which the C<message> is | ||
| 338 | eliciting information | ||
| 339 | |||
| 340 | =item * | ||
| 341 | |||
| 342 | C<slots> set to a map of slots, configured for the intent, with | ||
| 343 | currently known values | ||
| 344 | |||
| 345 | =back | ||
| 346 | |||
| 347 | =item * | ||
| 348 | |||
| 349 | If the message is a confirmation prompt, the C<dialogState> is set to | ||
| 350 | ConfirmIntent and C<SlotToElicit> is set to null. | ||
| 351 | |||
| 352 | =item * | ||
| 353 | |||
| 354 | If the message is a clarification prompt (configured for the intent) | ||
| 355 | that indicates that user intent is not understood, the C<dialogState> | ||
| 356 | is set to ElicitIntent and C<slotToElicit> is set to null. | ||
| 357 | |||
| 358 | =back | ||
| 359 | |||
| 360 | In addition, Amazon Lex also returns your application-specific | ||
| 361 | C<sessionAttributes>. For more information, see Managing Conversation | ||
| 362 | Context (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html). | ||
| 363 | |||
| 364 | |||
| 365 | =head2 PutSession | ||
| 366 | |||
| 367 | =over | ||
| 368 | |||
| 369 | =item BotAlias => Str | ||
| 370 | |||
| 371 | =item BotName => Str | ||
| 372 | |||
| 373 | =item UserId => Str | ||
| 374 | |||
| 375 | =item [Accept => Str] | ||
| 376 | |||
| 377 | =item [ActiveContexts => ArrayRef[L<Paws::LexRuntime::ActiveContext>]] | ||
| 378 | |||
| 379 | =item [DialogAction => L<Paws::LexRuntime::DialogAction>] | ||
| 380 | |||
| 381 | =item [RecentIntentSummaryView => ArrayRef[L<Paws::LexRuntime::IntentSummary>]] | ||
| 382 | |||
| 383 | =item [SessionAttributes => L<Paws::LexRuntime::StringMap>] | ||
| 384 | |||
| 385 | |||
| 386 | =back | ||
| 387 | |||
| 388 | Each argument is described in detail in: L<Paws::LexRuntime::PutSession> | ||
| 389 | |||
| 390 | Returns: a L<Paws::LexRuntime::PutSessionResponse> instance | ||
| 391 | |||
| 392 | Creates a new session or modifies an existing session with an Amazon | ||
| 393 | Lex bot. Use this operation to enable your application to set the state | ||
| 394 | of the bot. | ||
| 395 | |||
| 396 | For more information, see Managing Sessions | ||
| 397 | (https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html). | ||
| 398 | |||
| 399 | |||
| 400 | |||
| 401 | |||
| 402 | =head1 PAGINATORS | ||
| 403 | |||
| 404 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 405 | |||
| 406 | |||
| 407 | |||
| 408 | |||
| 409 | =head1 SEE ALSO | ||
| 410 | |||
| 411 | This service class forms part of L<Paws> | ||
| 412 | |||
| 413 | =head1 BUGS and CONTRIBUTIONS | ||
| 414 | |||
| 415 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 416 | |||
| 417 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 418 | |||
| 419 | =cut | ||
| 420 | |||