blib/lib/Paws/LexRuntimeV2.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 11 totaltotal 0.0% 0 / 54 CC 1 SCAR 6.9
CC
1
Cov
0%
service
2.0
signing_name
2.0
version
2.0
CRAP 2.0
1 package Paws::LexRuntimeV2;
2 use Moose;
3 sub service { 'runtime-v2-lex' }
4 sub signing_name { 'lex' }
5 sub version { '2020-08-07' }
6 sub flattened_arrays { 0 }
7 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8 has retry => (is => 'ro', isa => 'HashRef', default => sub {
9 { base => 'rand', type => 'exponential', growth_factor => 2 }
10 });
11 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12 ] });
13  
14 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller';
15  
16
17 sub DeleteSession {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::DeleteSession', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub GetSession {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::GetSession', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub PutSession {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::PutSession', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub RecognizeText {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::RecognizeText', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub RecognizeUtterance {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::RecognizeUtterance', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub StartConversation {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::LexRuntimeV2::StartConversation', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47
48  
49  
50 sub operations { qw/DeleteSession GetSession PutSession RecognizeText RecognizeUtterance StartConversation / }
51  
52 1;
53  
54 ### main pod documentation begin ###
55  
56 =head1 NAME
57  
58 Paws::LexRuntimeV2 - Perl Interface to AWS Amazon Lex Runtime V2
59  
60 =head1 SYNOPSIS
61  
62 use Paws;
63  
64 my $obj = Paws->service('LexRuntimeV2');
65 my $res = $obj->Method(
66 Arg1 => $val1,
67 Arg2 => [ 'V1', 'V2' ],
68 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
69 # of the arguments type
70 Arg3 => { Att1 => 'Val1' },
71 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
72 # the constructor of the arguments type
73 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
74 );
75  
76 =head1 DESCRIPTION
77  
78  
79  
80 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime-v2-lex-2020-08-07>
81  
82  
83 =head1 METHODS
84  
85 =head2 DeleteSession
86  
87 =over
88  
89 =item BotAliasId => Str
90  
91 =item BotId => Str
92  
93 =item LocaleId => Str
94  
95 =item SessionId => Str
96  
97  
98 =back
99  
100 Each argument is described in detail in: L<Paws::LexRuntimeV2::DeleteSession>
101  
102 Returns: a L<Paws::LexRuntimeV2::DeleteSessionResponse> instance
103  
104 Removes session information for a specified bot, alias, and user ID.
105  
106 You can use this operation to restart a conversation with a bot. When
107 you remove a session, the entire history of the session is removed so
108 that you can start again.
109  
110 You don't need to delete a session. Sessions have a time limit and will
111 expire. Set the session time limit when you create the bot. The default
112 is 5 minutes, but you can specify anything between 1 minute and 24
113 hours.
114  
115 If you specify a bot or alias ID that doesn't exist, you receive a
116 C<BadRequestException.>
117  
118 If the locale doesn't exist in the bot, or if the locale hasn't been
119 enables for the alias, you receive a C<BadRequestException>.
120  
121  
122 =head2 GetSession
123  
124 =over
125  
126 =item BotAliasId => Str
127  
128 =item BotId => Str
129  
130 =item LocaleId => Str
131  
132 =item SessionId => Str
133  
134  
135 =back
136  
137 Each argument is described in detail in: L<Paws::LexRuntimeV2::GetSession>
138  
139 Returns: a L<Paws::LexRuntimeV2::GetSessionResponse> instance
140  
141 Returns session information for a specified bot, alias, and user.
142  
143 For example, you can use this operation to retrieve session information
144 for a user that has left a long-running session in use.
145  
146 If the bot, alias, or session identifier doesn't exist, Amazon Lex V2
147 returns a C<BadRequestException>. If the locale doesn't exist or is not
148 enabled for the alias, you receive a C<BadRequestException>.
149  
150  
151 =head2 PutSession
152  
153 =over
154  
155 =item BotAliasId => Str
156  
157 =item BotId => Str
158  
159 =item LocaleId => Str
160  
161 =item SessionId => Str
162  
163 =item SessionState => L<Paws::LexRuntimeV2::SessionState>
164  
165 =item [Messages => ArrayRef[L<Paws::LexRuntimeV2::Message>]]
166  
167 =item [RequestAttributes => L<Paws::LexRuntimeV2::StringMap>]
168  
169 =item [ResponseContentType => Str]
170  
171  
172 =back
173  
174 Each argument is described in detail in: L<Paws::LexRuntimeV2::PutSession>
175  
176 Returns: a L<Paws::LexRuntimeV2::PutSessionResponse> instance
177  
178 Creates a new session or modifies an existing session with an Amazon
179 Lex V2 bot. Use this operation to enable your application to set the
180 state of the bot.
181  
182  
183 =head2 RecognizeText
184  
185 =over
186  
187 =item BotAliasId => Str
188  
189 =item BotId => Str
190  
191 =item LocaleId => Str
192  
193 =item SessionId => Str
194  
195 =item Text => Str
196  
197 =item [RequestAttributes => L<Paws::LexRuntimeV2::StringMap>]
198  
199 =item [SessionState => L<Paws::LexRuntimeV2::SessionState>]
200  
201  
202 =back
203  
204 Each argument is described in detail in: L<Paws::LexRuntimeV2::RecognizeText>
205  
206 Returns: a L<Paws::LexRuntimeV2::RecognizeTextResponse> instance
207  
208 Sends user input to Amazon Lex V2. Client applications use this API to
209 send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then
210 interprets the user input using the machine learning model that it
211 build for the bot.
212  
213 In response, Amazon Lex V2 returns the next message to convey to the
214 user and an optional response card to display.
215  
216  
217 =head2 RecognizeUtterance
218  
219 =over
220  
221 =item BotAliasId => Str
222  
223 =item BotId => Str
224  
225 =item LocaleId => Str
226  
227 =item RequestContentType => Str
228  
229 =item SessionId => Str
230  
231 =item [InputStream => Str]
232  
233 =item [RequestAttributes => Str]
234  
235 =item [ResponseContentType => Str]
236  
237 =item [SessionState => Str]
238  
239  
240 =back
241  
242 Each argument is described in detail in: L<Paws::LexRuntimeV2::RecognizeUtterance>
243  
244 Returns: a L<Paws::LexRuntimeV2::RecognizeUtteranceResponse> instance
245  
246 Sends user input to Amazon Lex V2. You can send text or speech. Clients
247 use this API to send text and audio requests to Amazon Lex V2 at
248 runtime. Amazon Lex V2 interprets the user input using the machine
249 learning model built for the bot.
250  
251 The following request fields must be compressed with gzip and then
252 base64 encoded before you send them to Amazon Lex V2.
253  
254 =over
255  
256 =item *
257  
258 requestAttributes
259  
260 =item *
261  
262 sessionState
263  
264 =back
265  
266 The following response fields are compressed using gzip and then base64
267 encoded by Amazon Lex V2. Before you can use these fields, you must
268 decode and decompress them.
269  
270 =over
271  
272 =item *
273  
274 inputTranscript
275  
276 =item *
277  
278 interpretations
279  
280 =item *
281  
282 messages
283  
284 =item *
285  
286 requestAttributes
287  
288 =item *
289  
290 sessionState
291  
292 =back
293  
294 The example contains a Java application that compresses and encodes a
295 Java object to send to Amazon Lex V2, and a second that decodes and
296 decompresses a response from Amazon Lex V2.
297  
298  
299 =head2 StartConversation
300  
301 =over
302  
303 =item BotAliasId => Str
304  
305 =item BotId => Str
306  
307 =item LocaleId => Str
308  
309 =item RequestEventStream => L<Paws::LexRuntimeV2::StartConversationRequestEventStream>
310  
311 =item SessionId => Str
312  
313 =item [ConversationMode => Str]
314  
315  
316 =back
317  
318 Each argument is described in detail in: L<Paws::LexRuntimeV2::StartConversation>
319  
320 Returns: a L<Paws::LexRuntimeV2::StartConversationResponse> instance
321  
322 Starts an HTTP/2 bidirectional event stream that enables you to send
323 audio, text, or DTMF input in real time. After your application starts
324 a conversation, users send input to Amazon Lex V2 as a stream of
325 events. Amazon Lex V2 processes the incoming events and responds with
326 streaming text or audio events.
327  
328 Audio input must be in the following format: C<audio/lpcm
329 sample-rate=8000 sample-size-bits=16 channel-count=1;
330 is-big-endian=false>.
331  
332 The C<StartConversation> operation is supported only in the following
333 SDKs:
334  
335 =over
336  
337 =item *
338  
339 AWS SDK for C++
340 (https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation)
341  
342 =item *
343  
344 AWS SDK for Java V2
345 (https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation)
346  
347 =item *
348  
349 AWS SDK for Ruby V3
350 (https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation)
351  
352 =back
353  
354  
355  
356  
357  
358 =head1 PAGINATORS
359  
360 Paginator methods are helpers that repetively call methods that return partial results
361  
362  
363  
364  
365 =head1 SEE ALSO
366  
367 This service class forms part of L<Paws>
368  
369 =head1 BUGS and CONTRIBUTIONS
370  
371 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
372  
373 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
374  
375 =cut
376