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

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::LexRuntimeV2::StartConversation;
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 ConversationMode => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-conversation-mode');
7 has LocaleId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'localeId', required => 1);
8 has RequestEventStream => (is => 'ro', isa => 'Paws::LexRuntimeV2::StartConversationRequestEventStream', traits => ['NameInRequest'], request_name => 'requestEventStream', required => 1);
9 has SessionId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'sessionId', required => 1);
10  
11 use MooseX::ClassAttribute;
12 class_has _stream_param => (is => 'ro', default => 'RequestEventStream');
13 class_has _api_call => (isa => 'Str', is => 'ro', default => 'StartConversation');
14 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation');
15 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexRuntimeV2::StartConversationResponse');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::LexRuntimeV2::StartConversation - Arguments for method StartConversation on L<Paws::LexRuntimeV2>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method StartConversation on the
28 L<Amazon Lex Runtime V2|Paws::LexRuntimeV2> service. Use the attributes of this class
29 as arguments to method StartConversation.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to StartConversation.
32  
33 =head1 SYNOPSIS
34  
35 my $runtime-v2-lex = Paws->service('LexRuntimeV2');
36 my $StartConversationResponse = $runtime - v2 -lex->StartConversation(
37 BotAliasId => 'MyBotAliasIdentifier',
38 BotId => 'MyBotIdentifier',
39 LocaleId => 'MyLocaleId',
40 RequestEventStream => {
41 AudioInputEvent => {
42 ContentType => 'MyNonEmptyString', # min: 1
43 AudioChunk => 'BlobAudioChunk', # OPTIONAL
44 ClientTimestampMillis => 1, # OPTIONAL
45 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
46 }, # OPTIONAL
47 ConfigurationEvent => {
48 ResponseContentType => 'MyNonEmptyString', # min: 1
49 ClientTimestampMillis => 1, # OPTIONAL
50 DisablePlayback => 1, # OPTIONAL
51 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
52 RequestAttributes => {
53 'MyNonEmptyString' => 'MyString', # key: min: 1
54 }, # OPTIONAL
55 SessionState => {
56 ActiveContexts => [
57 {
58 ContextAttributes => {
59 'MyParameterName' =>
60 'MyText', # key: min: 1, max: 100, value: min: 1, max: 1024
61 }, # max: 10
62 Name => 'MyActiveContextName', # min: 1, max: 100
63 TimeToLive => {
64 TimeToLiveInSeconds => 1, # min: 5, max: 86400
65 TurnsToLive => 1, # min: 1, max: 20
66  
67 },
68  
69 },
70 ...
71 ], # max: 20; OPTIONAL
72 DialogAction => {
73 Type => 'Close'
74 , # values: Close, ConfirmIntent, Delegate, ElicitIntent, ElicitSlot
75 SlotToElicit => 'MyNonEmptyString', # min: 1
76 }, # OPTIONAL
77 Intent => {
78 Name => 'MyNonEmptyString', # min: 1
79 ConfirmationState =>
80 'Confirmed', # values: Confirmed, Denied, None; OPTIONAL
81 Slots => {
82 'MyNonEmptyString' => {
83 Shape => 'Scalar', # values: Scalar, List; OPTIONAL
84 Value => {
85 InterpretedValue => 'MyNonEmptyString', # min: 1
86 OriginalValue => 'MyNonEmptyString', # min: 1
87 ResolvedValues => [
88 'MyNonEmptyString', ... # min: 1
89 ], # OPTIONAL
90 }, # OPTIONAL
91 Values => [ <Slot>, ... ], # OPTIONAL
92 }, # key: min: 1
93 }, # OPTIONAL
94 State => 'Failed'
95 , # values: Failed, Fulfilled, InProgress, ReadyForFulfillment, Waiting; OPTIONAL
96 }, # OPTIONAL
97 OriginatingRequestId => 'MyNonEmptyString', # min: 1
98 SessionAttributes => {
99 'MyNonEmptyString' => 'MyString', # key: min: 1
100 }, # OPTIONAL
101 }, # OPTIONAL
102 WelcomeMessages => [
103 {
104 ContentType => 'CustomPayload'
105 , # values: CustomPayload, ImageResponseCard, PlainText, SSML
106 Content => 'MyText', # min: 1, max: 1024
107 ImageResponseCard => {
108 Title => 'MyAttachmentTitle', # min: 1, max: 250
109 Buttons => [
110 {
111 Text => 'MyButtonText', # min: 1, max: 50
112 Value => 'MyButtonValue', # min: 1, max: 50
113  
114 },
115 ...
116 ], # max: 5; OPTIONAL
117 ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL
118 Subtitle => 'MyAttachmentTitle', # min: 1, max: 250
119 }, # OPTIONAL
120 },
121 ...
122 ], # max: 10; OPTIONAL
123 }, # OPTIONAL
124 DTMFInputEvent => {
125 InputCharacter => 'MyDTMFRegex', # min: 1, max: 1
126 ClientTimestampMillis => 1, # OPTIONAL
127 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
128 }, # OPTIONAL
129 DisconnectionEvent => {
130 ClientTimestampMillis => 1, # OPTIONAL
131 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
132 }, # OPTIONAL
133 PlaybackCompletionEvent => {
134 ClientTimestampMillis => 1, # OPTIONAL
135 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
136 }, # OPTIONAL
137 TextInputEvent => {
138 Text => 'MyText', # min: 1, max: 1024
139 ClientTimestampMillis => 1, # OPTIONAL
140 EventId => 'MyEventId', # min: 2, max: 100; OPTIONAL
141 }, # OPTIONAL
142 },
143 SessionId => 'MySessionId',
144 ConversationMode => 'AUDIO', # OPTIONAL
145 );
146  
147 # Results:
148 my $ResponseEventStream = $StartConversationResponse->ResponseEventStream;
149  
150 # Returns a L<Paws::LexRuntimeV2::StartConversationResponse> object.
151  
152 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.
153 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime-v2-lex/StartConversation>
154  
155 =head1 ATTRIBUTES
156  
157  
158 =head2 B<REQUIRED> BotAliasId => Str
159  
160 The alias identifier in use for the bot that processes the request.
161  
162  
163  
164 =head2 B<REQUIRED> BotId => Str
165  
166 The identifier of the bot to process the request.
167  
168  
169  
170 =head2 ConversationMode => Str
171  
172 The conversation type that you are using the Amazon Lex V2. If the
173 conversation mode is C<AUDIO> you can send both audio and DTMF
174 information. If the mode is C<TEXT> you can only send text.
175  
176 Valid values are: C<"AUDIO">, C<"TEXT">
177  
178 =head2 B<REQUIRED> LocaleId => Str
179  
180 The locale where the session is in use.
181  
182  
183  
184 =head2 B<REQUIRED> RequestEventStream => L<Paws::LexRuntimeV2::StartConversationRequestEventStream>
185  
186 Represents the stream of events to Amazon Lex V2 from your application.
187 The events are encoded as HTTP/2 data frames.
188  
189  
190  
191 =head2 B<REQUIRED> SessionId => Str
192  
193 The identifier of the user session that is having the conversation.
194  
195  
196  
197  
198 =head1 SEE ALSO
199  
200 This class forms part of L<Paws>, documenting arguments for method StartConversation in L<Paws::LexRuntimeV2>
201  
202 =head1 BUGS and CONTRIBUTIONS
203  
204 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
205  
206 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
207  
208 =cut
209