« blib/lib/Paws/LexRuntime/PostContentResponse.pm
↑ Summary
blib/lib/Paws/LexRuntime/PostTextResponse.pm »
| 1 | |||
| 2 | package Paws::LexRuntime::PostText; | ||
| 3 | use Moose; | ||
| 4 | has ActiveContexts => (is => 'ro', isa => 'ArrayRef[Paws::LexRuntime::ActiveContext]', traits => ['NameInRequest'], request_name => 'activeContexts'); | ||
| 5 | has BotAlias => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botAlias', required => 1); | ||
| 6 | has BotName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botName', required => 1); | ||
| 7 | has InputText => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'inputText', required => 1); | ||
| 8 | has RequestAttributes => (is => 'ro', isa => 'Paws::LexRuntime::StringMap', traits => ['NameInRequest'], request_name => 'requestAttributes'); | ||
| 9 | has SessionAttributes => (is => 'ro', isa => 'Paws::LexRuntime::StringMap', traits => ['NameInRequest'], request_name => 'sessionAttributes'); | ||
| 10 | has UserId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'userId', required => 1); | ||
| 11 | |||
| 12 | use MooseX::ClassAttribute; | ||
| 13 | |||
| 14 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'PostText'); | ||
| 15 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bot/{botName}/alias/{botAlias}/user/{userId}/text'); | ||
| 16 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 17 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexRuntime::PostTextResponse'); | ||
| 18 | 1; | ||
| 19 | |||
| 20 | ### main pod documentation begin ### | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Paws::LexRuntime::PostText - Arguments for method PostText on L<Paws::LexRuntime> | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This class represents the parameters used for calling the method PostText on the | ||
| 29 | L<Amazon Lex Runtime Service|Paws::LexRuntime> service. Use the attributes of this class | ||
| 30 | as arguments to method PostText. | ||
| 31 | |||
| 32 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PostText. | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | my $runtime.lex = Paws->service('LexRuntime'); | ||
| 37 | my $PostTextResponse = $runtime . lex->PostText( | ||
| 38 | BotAlias => 'MyBotAlias', | ||
| 39 | BotName => 'MyBotName', | ||
| 40 | InputText => 'MyText', | ||
| 41 | UserId => 'MyUserId', | ||
| 42 | ActiveContexts => [ | ||
| 43 | { | ||
| 44 | Name => 'MyActiveContextName', # min: 1, max: 100 | ||
| 45 | Parameters => { | ||
| 46 | 'MyParameterName' => | ||
| 47 | 'MyText', # key: min: 1, max: 100, value: min: 1, max: 1024 | ||
| 48 | }, # max: 10 | ||
| 49 | TimeToLive => { | ||
| 50 | TimeToLiveInSeconds => 1, # min: 5, max: 86400; OPTIONAL | ||
| 51 | TurnsToLive => 1, # min: 1, max: 20; OPTIONAL | ||
| 52 | }, | ||
| 53 | |||
| 54 | }, | ||
| 55 | ... | ||
| 56 | ], # OPTIONAL | ||
| 57 | RequestAttributes => { 'MyString' => 'MyString', }, # OPTIONAL | ||
| 58 | SessionAttributes => { 'MyString' => 'MyString', }, # OPTIONAL | ||
| 59 | ); | ||
| 60 | |||
| 61 | # Results: | ||
| 62 | my $ActiveContexts = $PostTextResponse->ActiveContexts; | ||
| 63 | my $AlternativeIntents = $PostTextResponse->AlternativeIntents; | ||
| 64 | my $BotVersion = $PostTextResponse->BotVersion; | ||
| 65 | my $DialogState = $PostTextResponse->DialogState; | ||
| 66 | my $IntentName = $PostTextResponse->IntentName; | ||
| 67 | my $Message = $PostTextResponse->Message; | ||
| 68 | my $MessageFormat = $PostTextResponse->MessageFormat; | ||
| 69 | my $NluIntentConfidence = $PostTextResponse->NluIntentConfidence; | ||
| 70 | my $ResponseCard = $PostTextResponse->ResponseCard; | ||
| 71 | my $SentimentResponse = $PostTextResponse->SentimentResponse; | ||
| 72 | my $SessionAttributes = $PostTextResponse->SessionAttributes; | ||
| 73 | my $SessionId = $PostTextResponse->SessionId; | ||
| 74 | my $SlotToElicit = $PostTextResponse->SlotToElicit; | ||
| 75 | my $Slots = $PostTextResponse->Slots; | ||
| 76 | |||
| 77 | # Returns a L<Paws::LexRuntime::PostTextResponse> object. | ||
| 78 | |||
| 79 | 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. | ||
| 80 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime.lex/PostText> | ||
| 81 | |||
| 82 | =head1 ATTRIBUTES | ||
| 83 | |||
| 84 | |||
| 85 | =head2 ActiveContexts => ArrayRef[L<Paws::LexRuntime::ActiveContext>] | ||
| 86 | |||
| 87 | A list of contexts active for the request. A context can be activated | ||
| 88 | when a previous intent is fulfilled, or by including the context in the | ||
| 89 | request, | ||
| 90 | |||
| 91 | If you don't specify a list of contexts, Amazon Lex will use the | ||
| 92 | current list of contexts for the session. If you specify an empty list, | ||
| 93 | all contexts for the session are cleared. | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | =head2 B<REQUIRED> BotAlias => Str | ||
| 98 | |||
| 99 | The alias of the Amazon Lex bot. | ||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | =head2 B<REQUIRED> BotName => Str | ||
| 104 | |||
| 105 | The name of the Amazon Lex bot. | ||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | =head2 B<REQUIRED> InputText => Str | ||
| 110 | |||
| 111 | The text that the user entered (Amazon Lex interprets this text). | ||
| 112 | |||
| 113 | |||
| 114 | |||
| 115 | =head2 RequestAttributes => L<Paws::LexRuntime::StringMap> | ||
| 116 | |||
| 117 | Request-specific information passed between Amazon Lex and a client | ||
| 118 | application. | ||
| 119 | |||
| 120 | The namespace C<x-amz-lex:> is reserved for special attributes. Don't | ||
| 121 | create any request attributes with the prefix C<x-amz-lex:>. | ||
| 122 | |||
| 123 | For more information, see Setting Request Attributes | ||
| 124 | (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs). | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | =head2 SessionAttributes => L<Paws::LexRuntime::StringMap> | ||
| 129 | |||
| 130 | Application-specific information passed between Amazon Lex and a client | ||
| 131 | application. | ||
| 132 | |||
| 133 | For more information, see Setting Session Attributes | ||
| 134 | (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs). | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | =head2 B<REQUIRED> UserId => Str | ||
| 139 | |||
| 140 | The ID of the client application user. Amazon Lex uses this to identify | ||
| 141 | a user's conversation with your bot. At runtime, each request must | ||
| 142 | contain the C<userID> field. | ||
| 143 | |||
| 144 | To decide the user ID to use for your application, consider the | ||
| 145 | following factors. | ||
| 146 | |||
| 147 | =over | ||
| 148 | |||
| 149 | =item * | ||
| 150 | |||
| 151 | The C<userID> field must not contain any personally identifiable | ||
| 152 | information of the user, for example, name, personal identification | ||
| 153 | numbers, or other end user personal information. | ||
| 154 | |||
| 155 | =item * | ||
| 156 | |||
| 157 | If you want a user to start a conversation on one device and continue | ||
| 158 | on another device, use a user-specific identifier. | ||
| 159 | |||
| 160 | =item * | ||
| 161 | |||
| 162 | If you want the same user to be able to have two independent | ||
| 163 | conversations on two different devices, choose a device-specific | ||
| 164 | identifier. | ||
| 165 | |||
| 166 | =item * | ||
| 167 | |||
| 168 | A user can't have two independent conversations with two different | ||
| 169 | versions of the same bot. For example, a user can't have a conversation | ||
| 170 | with the PROD and BETA versions of the same bot. If you anticipate that | ||
| 171 | a user will need to have conversation with two different versions, for | ||
| 172 | example, while testing, include the bot alias in the user ID to | ||
| 173 | separate the two conversations. | ||
| 174 | |||
| 175 | =back | ||
| 176 | |||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | =head1 SEE ALSO | ||
| 182 | |||
| 183 | This class forms part of L<Paws>, documenting arguments for method PostText in L<Paws::LexRuntime> | ||
| 184 | |||
| 185 | =head1 BUGS and CONTRIBUTIONS | ||
| 186 | |||
| 187 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 188 | |||
| 189 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 190 | |||
| 191 | =cut | ||
| 192 |