blib/lib/Paws/LexRuntimeV2/PutSession.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 28 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::LexRuntimeV2::PutSession;
3 use Moose;
4 has BotAliasId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botAliasId', required => 1);
5 has BotId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botId', required => 1);
6 has LocaleId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'localeId', required => 1);
7 has Messages => (is => 'ro', isa => 'ArrayRef[Paws::LexRuntimeV2::Message]', traits => ['NameInRequest'], request_name => 'messages');
8 has RequestAttributes => (is => 'ro', isa => 'Paws::LexRuntimeV2::StringMap', traits => ['NameInRequest'], request_name => 'requestAttributes');
9 has ResponseContentType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'ResponseContentType');
10 has SessionId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'sessionId', required => 1);
11 has SessionState => (is => 'ro', isa => 'Paws::LexRuntimeV2::SessionState', traits => ['NameInRequest'], request_name => 'sessionState', 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 => '/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}');
17 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexRuntimeV2::PutSessionResponse');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::LexRuntimeV2::PutSession - Arguments for method PutSession on L<Paws::LexRuntimeV2>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method PutSession on the
30 L<Amazon Lex Runtime V2|Paws::LexRuntimeV2> 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-v2-lex = Paws->service('LexRuntimeV2');
38 my $PutSessionResponse = $runtime - v2 -lex->PutSession(
39 BotAliasId => 'MyBotAliasIdentifier',
40 BotId => 'MyBotIdentifier',
41 LocaleId => 'MyLocaleId',
42 SessionId => 'MySessionId',
43 SessionState => {
44 ActiveContexts => [
45 {
46 ContextAttributes => {
47 'MyParameterName' =>
48 'MyText', # key: min: 1, max: 100, value: min: 1, max: 1024
49 }, # max: 10
50 Name => 'MyActiveContextName', # min: 1, max: 100
51 TimeToLive => {
52 TimeToLiveInSeconds => 1, # min: 5, max: 86400
53 TurnsToLive => 1, # min: 1, max: 20
54  
55 },
56  
57 },
58 ...
59 ], # max: 20; OPTIONAL
60 DialogAction => {
61 Type => 'Close'
62 , # values: Close, ConfirmIntent, Delegate, ElicitIntent, ElicitSlot
63 SlotToElicit => 'MyNonEmptyString', # min: 1; OPTIONAL
64 }, # OPTIONAL
65 Intent => {
66 Name => 'MyNonEmptyString', # min: 1; OPTIONAL
67 ConfirmationState =>
68 'Confirmed', # values: Confirmed, Denied, None; OPTIONAL
69 Slots => {
70 'MyNonEmptyString' => {
71 Shape => 'Scalar', # values: Scalar, List; OPTIONAL
72 Value => {
73 InterpretedValue => 'MyNonEmptyString', # min: 1; OPTIONAL
74 OriginalValue => 'MyNonEmptyString', # min: 1; OPTIONAL
75 ResolvedValues => [
76 'MyNonEmptyString', ... # min: 1; OPTIONAL
77 ], # OPTIONAL
78 }, # OPTIONAL
79 Values => [ <Slot>, ... ], # OPTIONAL
80 }, # key: min: 1; OPTIONAL
81 }, # OPTIONAL
82 State => 'Failed'
83 , # values: Failed, Fulfilled, InProgress, ReadyForFulfillment, Waiting; OPTIONAL
84 }, # OPTIONAL
85 OriginatingRequestId => 'MyNonEmptyString', # min: 1; OPTIONAL
86 SessionAttributes => {
87 'MyNonEmptyString' => 'MyString', # key: min: 1; OPTIONAL
88 }, # OPTIONAL
89 },
90 Messages => [
91 {
92 ContentType => 'CustomPayload'
93 , # values: CustomPayload, ImageResponseCard, PlainText, SSML
94 Content => 'MyText', # min: 1, max: 1024
95 ImageResponseCard => {
96 Title => 'MyAttachmentTitle', # min: 1, max: 250
97 Buttons => [
98 {
99 Text => 'MyButtonText', # min: 1, max: 50
100 Value => 'MyButtonValue', # min: 1, max: 50
101  
102 },
103 ...
104 ], # max: 5; OPTIONAL
105 ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL
106 Subtitle => 'MyAttachmentTitle', # min: 1, max: 250
107 }, # OPTIONAL
108 },
109 ...
110 ], # OPTIONAL
111 RequestAttributes => {
112 'MyNonEmptyString' => 'MyString', # key: min: 1; OPTIONAL
113 }, # OPTIONAL
114 ResponseContentType => 'MyNonEmptyString', # OPTIONAL
115 );
116  
117 # Results:
118 my $AudioStream = $PutSessionResponse->AudioStream;
119 my $ContentType = $PutSessionResponse->ContentType;
120 my $Messages = $PutSessionResponse->Messages;
121 my $RequestAttributes = $PutSessionResponse->RequestAttributes;
122 my $SessionId = $PutSessionResponse->SessionId;
123 my $SessionState = $PutSessionResponse->SessionState;
124  
125 # Returns a L<Paws::LexRuntimeV2::PutSessionResponse> object.
126  
127 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.
128 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime-v2-lex/PutSession>
129  
130 =head1 ATTRIBUTES
131  
132  
133 =head2 B<REQUIRED> BotAliasId => Str
134  
135 The alias identifier of the bot that receives the session data.
136  
137  
138  
139 =head2 B<REQUIRED> BotId => Str
140  
141 The identifier of the bot that receives the session data.
142  
143  
144  
145 =head2 B<REQUIRED> LocaleId => Str
146  
147 The locale where the session is in use.
148  
149  
150  
151 =head2 Messages => ArrayRef[L<Paws::LexRuntimeV2::Message>]
152  
153 A list of messages to send to the user. Messages are sent in the order
154 that they are defined in the list.
155  
156  
157  
158 =head2 RequestAttributes => L<Paws::LexRuntimeV2::StringMap>
159  
160 Request-specific information passed between Amazon Lex V2 and the
161 client application.
162  
163 The namespace C<x-amz-lex:> is reserved for special attributes. Don't
164 create any request attributes with the prefix C<x-amz-lex:>.
165  
166  
167  
168 =head2 ResponseContentType => Str
169  
170 The message that Amazon Lex V2 returns in the response can be either
171 text or speech depending on the value of this parameter.
172  
173 =over
174  
175 =item *
176  
177 If the value is C<text/plain; charset=utf-8>, Amazon Lex V2 returns
178 text in the response.
179  
180 =back
181  
182  
183  
184  
185 =head2 B<REQUIRED> SessionId => Str
186  
187 The identifier of the session that receives the session data.
188  
189  
190  
191 =head2 B<REQUIRED> SessionState => L<Paws::LexRuntimeV2::SessionState>
192  
193 Sets the state of the session with the user. You can use this to set
194 the current intent, attributes, context, and dialog action. Use the
195 dialog action to determine the next step that Amazon Lex V2 should use
196 in the conversation with the user.
197  
198  
199  
200  
201 =head1 SEE ALSO
202  
203 This class forms part of L<Paws>, documenting arguments for method PutSession in L<Paws::LexRuntimeV2>
204  
205 =head1 BUGS and CONTRIBUTIONS
206  
207 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
208  
209 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
210  
211 =cut
212