« blib/lib/Paws/LexModelsV2/CreateResourcePolicyStatementResponse.pm
↑ Summary
blib/lib/Paws/LexModelsV2/CreateSlotResponse.pm »
| 1 | |||
| 2 | package Paws::LexModelsV2::CreateSlot; | ||
| 3 | use Moose; | ||
| 4 | has BotId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botId', required => 1); | ||
| 5 | has BotVersion => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'botVersion', required => 1); | ||
| 6 | has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description'); | ||
| 7 | has IntentId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'intentId', required => 1); | ||
| 8 | has LocaleId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'localeId', required => 1); | ||
| 9 | has MultipleValuesSetting => (is => 'ro', isa => 'Paws::LexModelsV2::MultipleValuesSetting', traits => ['NameInRequest'], request_name => 'multipleValuesSetting'); | ||
| 10 | has ObfuscationSetting => (is => 'ro', isa => 'Paws::LexModelsV2::ObfuscationSetting', traits => ['NameInRequest'], request_name => 'obfuscationSetting'); | ||
| 11 | has SlotName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'slotName', required => 1); | ||
| 12 | has SlotTypeId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'slotTypeId', required => 1); | ||
| 13 | has ValueElicitationSetting => (is => 'ro', isa => 'Paws::LexModelsV2::SlotValueElicitationSetting', traits => ['NameInRequest'], request_name => 'valueElicitationSetting', required => 1); | ||
| 14 | |||
| 15 | use MooseX::ClassAttribute; | ||
| 16 | |||
| 17 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateSlot'); | ||
| 18 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots/'); | ||
| 19 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | ||
| 20 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModelsV2::CreateSlotResponse'); | ||
| 21 | 1; | ||
| 22 | |||
| 23 | ### main pod documentation begin ### | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | Paws::LexModelsV2::CreateSlot - Arguments for method CreateSlot on L<Paws::LexModelsV2> | ||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | This class represents the parameters used for calling the method CreateSlot on the | ||
| 32 | L<Amazon Lex Model Building V2|Paws::LexModelsV2> service. Use the attributes of this class | ||
| 33 | as arguments to method CreateSlot. | ||
| 34 | |||
| 35 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateSlot. | ||
| 36 | |||
| 37 | =head1 SYNOPSIS | ||
| 38 | |||
| 39 | my $models-v2-lex = Paws->service('LexModelsV2'); | ||
| 40 | my $CreateSlotResponse = $models - v2 -lex->CreateSlot( | ||
| 41 | BotId => 'MyId', | ||
| 42 | BotVersion => 'MyDraftBotVersion', | ||
| 43 | IntentId => 'MyId', | ||
| 44 | LocaleId => 'MyLocaleId', | ||
| 45 | SlotName => 'MyName', | ||
| 46 | SlotTypeId => 'MyBuiltInOrCustomSlotTypeId', | ||
| 47 | ValueElicitationSetting => { | ||
| 48 | SlotConstraint => 'Required', # values: Required, Optional | ||
| 49 | DefaultValueSpecification => { | ||
| 50 | DefaultValueList => [ | ||
| 51 | { | ||
| 52 | DefaultValue => 'MySlotDefaultValueString', # min: 1, max: 202 | ||
| 53 | |||
| 54 | }, | ||
| 55 | ... | ||
| 56 | ], # max: 10 | ||
| 57 | |||
| 58 | }, # OPTIONAL | ||
| 59 | PromptSpecification => { | ||
| 60 | MaxRetries => 1, # max: 5 | ||
| 61 | MessageGroups => [ | ||
| 62 | { | ||
| 63 | Message => { | ||
| 64 | CustomPayload => { | ||
| 65 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 66 | |||
| 67 | }, # OPTIONAL | ||
| 68 | ImageResponseCard => { | ||
| 69 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 70 | Buttons => [ | ||
| 71 | { | ||
| 72 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 73 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 74 | |||
| 75 | }, | ||
| 76 | ... | ||
| 77 | ], # max: 5; OPTIONAL | ||
| 78 | ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 79 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 80 | }, # OPTIONAL | ||
| 81 | PlainTextMessage => { | ||
| 82 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 83 | |||
| 84 | }, # OPTIONAL | ||
| 85 | SsmlMessage => { | ||
| 86 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 87 | |||
| 88 | }, # OPTIONAL | ||
| 89 | }, | ||
| 90 | Variations => [ | ||
| 91 | { | ||
| 92 | CustomPayload => { | ||
| 93 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 94 | |||
| 95 | }, # OPTIONAL | ||
| 96 | ImageResponseCard => { | ||
| 97 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 98 | Buttons => [ | ||
| 99 | { | ||
| 100 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 101 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 102 | |||
| 103 | }, | ||
| 104 | ... | ||
| 105 | ], # max: 5; OPTIONAL | ||
| 106 | ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 107 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 108 | }, # OPTIONAL | ||
| 109 | PlainTextMessage => { | ||
| 110 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 111 | |||
| 112 | }, # OPTIONAL | ||
| 113 | SsmlMessage => { | ||
| 114 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 115 | |||
| 116 | }, # OPTIONAL | ||
| 117 | }, | ||
| 118 | ... | ||
| 119 | ], # max: 2; OPTIONAL | ||
| 120 | }, | ||
| 121 | ... | ||
| 122 | ], # min: 1, max: 5 | ||
| 123 | AllowInterrupt => 1, # OPTIONAL | ||
| 124 | }, # OPTIONAL | ||
| 125 | SampleUtterances => [ | ||
| 126 | { | ||
| 127 | Utterance => 'MyUtterance', | ||
| 128 | |||
| 129 | }, | ||
| 130 | ... | ||
| 131 | ], # OPTIONAL | ||
| 132 | WaitAndContinueSpecification => { | ||
| 133 | ContinueResponse => { | ||
| 134 | MessageGroups => [ | ||
| 135 | { | ||
| 136 | Message => { | ||
| 137 | CustomPayload => { | ||
| 138 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 139 | |||
| 140 | }, # OPTIONAL | ||
| 141 | ImageResponseCard => { | ||
| 142 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 143 | Buttons => [ | ||
| 144 | { | ||
| 145 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 146 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 147 | |||
| 148 | }, | ||
| 149 | ... | ||
| 150 | ], # max: 5; OPTIONAL | ||
| 151 | ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 152 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 153 | }, # OPTIONAL | ||
| 154 | PlainTextMessage => { | ||
| 155 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 156 | |||
| 157 | }, # OPTIONAL | ||
| 158 | SsmlMessage => { | ||
| 159 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 160 | |||
| 161 | }, # OPTIONAL | ||
| 162 | }, | ||
| 163 | Variations => [ | ||
| 164 | { | ||
| 165 | CustomPayload => { | ||
| 166 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 167 | |||
| 168 | }, # OPTIONAL | ||
| 169 | ImageResponseCard => { | ||
| 170 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 171 | Buttons => [ | ||
| 172 | { | ||
| 173 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 174 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 175 | |||
| 176 | }, | ||
| 177 | ... | ||
| 178 | ], # max: 5; OPTIONAL | ||
| 179 | ImageUrl => | ||
| 180 | 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 181 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 182 | }, # OPTIONAL | ||
| 183 | PlainTextMessage => { | ||
| 184 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 185 | |||
| 186 | }, # OPTIONAL | ||
| 187 | SsmlMessage => { | ||
| 188 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 189 | |||
| 190 | }, # OPTIONAL | ||
| 191 | }, | ||
| 192 | ... | ||
| 193 | ], # max: 2; OPTIONAL | ||
| 194 | }, | ||
| 195 | ... | ||
| 196 | ], # min: 1, max: 5 | ||
| 197 | AllowInterrupt => 1, # OPTIONAL | ||
| 198 | }, | ||
| 199 | WaitingResponse => { | ||
| 200 | MessageGroups => [ | ||
| 201 | { | ||
| 202 | Message => { | ||
| 203 | CustomPayload => { | ||
| 204 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 205 | |||
| 206 | }, # OPTIONAL | ||
| 207 | ImageResponseCard => { | ||
| 208 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 209 | Buttons => [ | ||
| 210 | { | ||
| 211 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 212 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 213 | |||
| 214 | }, | ||
| 215 | ... | ||
| 216 | ], # max: 5; OPTIONAL | ||
| 217 | ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 218 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 219 | }, # OPTIONAL | ||
| 220 | PlainTextMessage => { | ||
| 221 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 222 | |||
| 223 | }, # OPTIONAL | ||
| 224 | SsmlMessage => { | ||
| 225 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 226 | |||
| 227 | }, # OPTIONAL | ||
| 228 | }, | ||
| 229 | Variations => [ | ||
| 230 | { | ||
| 231 | CustomPayload => { | ||
| 232 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 233 | |||
| 234 | }, # OPTIONAL | ||
| 235 | ImageResponseCard => { | ||
| 236 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 237 | Buttons => [ | ||
| 238 | { | ||
| 239 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 240 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 241 | |||
| 242 | }, | ||
| 243 | ... | ||
| 244 | ], # max: 5; OPTIONAL | ||
| 245 | ImageUrl => | ||
| 246 | 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 247 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 248 | }, # OPTIONAL | ||
| 249 | PlainTextMessage => { | ||
| 250 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 251 | |||
| 252 | }, # OPTIONAL | ||
| 253 | SsmlMessage => { | ||
| 254 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 255 | |||
| 256 | }, # OPTIONAL | ||
| 257 | }, | ||
| 258 | ... | ||
| 259 | ], # max: 2; OPTIONAL | ||
| 260 | }, | ||
| 261 | ... | ||
| 262 | ], # min: 1, max: 5 | ||
| 263 | AllowInterrupt => 1, # OPTIONAL | ||
| 264 | }, | ||
| 265 | StillWaitingResponse => { | ||
| 266 | FrequencyInSeconds => 1, # min: 1, max: 300 | ||
| 267 | MessageGroups => [ | ||
| 268 | { | ||
| 269 | Message => { | ||
| 270 | CustomPayload => { | ||
| 271 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 272 | |||
| 273 | }, # OPTIONAL | ||
| 274 | ImageResponseCard => { | ||
| 275 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 276 | Buttons => [ | ||
| 277 | { | ||
| 278 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 279 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 280 | |||
| 281 | }, | ||
| 282 | ... | ||
| 283 | ], # max: 5; OPTIONAL | ||
| 284 | ImageUrl => 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 285 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 286 | }, # OPTIONAL | ||
| 287 | PlainTextMessage => { | ||
| 288 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 289 | |||
| 290 | }, # OPTIONAL | ||
| 291 | SsmlMessage => { | ||
| 292 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 293 | |||
| 294 | }, # OPTIONAL | ||
| 295 | }, | ||
| 296 | Variations => [ | ||
| 297 | { | ||
| 298 | CustomPayload => { | ||
| 299 | Value => 'MyCustomPayloadValue', # min: 1, max: 1000 | ||
| 300 | |||
| 301 | }, # OPTIONAL | ||
| 302 | ImageResponseCard => { | ||
| 303 | Title => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 304 | Buttons => [ | ||
| 305 | { | ||
| 306 | Text => 'MyButtonText', # min: 1, max: 50 | ||
| 307 | Value => 'MyButtonValue', # min: 1, max: 50 | ||
| 308 | |||
| 309 | }, | ||
| 310 | ... | ||
| 311 | ], # max: 5; OPTIONAL | ||
| 312 | ImageUrl => | ||
| 313 | 'MyAttachmentUrl', # min: 1, max: 250; OPTIONAL | ||
| 314 | Subtitle => 'MyAttachmentTitle', # min: 1, max: 250 | ||
| 315 | }, # OPTIONAL | ||
| 316 | PlainTextMessage => { | ||
| 317 | Value => 'MyPlainTextMessageValue', # min: 1, max: 1000 | ||
| 318 | |||
| 319 | }, # OPTIONAL | ||
| 320 | SsmlMessage => { | ||
| 321 | Value => 'MySSMLMessageValue', # min: 1, max: 1000 | ||
| 322 | |||
| 323 | }, # OPTIONAL | ||
| 324 | }, | ||
| 325 | ... | ||
| 326 | ], # max: 2; OPTIONAL | ||
| 327 | }, | ||
| 328 | ... | ||
| 329 | ], # min: 1, max: 5 | ||
| 330 | TimeoutInSeconds => 1, # min: 1, max: 900 | ||
| 331 | AllowInterrupt => 1, # OPTIONAL | ||
| 332 | }, # OPTIONAL | ||
| 333 | }, # OPTIONAL | ||
| 334 | }, | ||
| 335 | Description => 'MyDescription', # OPTIONAL | ||
| 336 | MultipleValuesSetting => { | ||
| 337 | AllowMultipleValues => 1, # OPTIONAL | ||
| 338 | }, # OPTIONAL | ||
| 339 | ObfuscationSetting => { | ||
| 340 | ObfuscationSettingType => 'None', # values: None, DefaultObfuscation | ||
| 341 | |||
| 342 | }, # OPTIONAL | ||
| 343 | ); | ||
| 344 | |||
| 345 | # Results: | ||
| 346 | my $BotId = $CreateSlotResponse->BotId; | ||
| 347 | my $BotVersion = $CreateSlotResponse->BotVersion; | ||
| 348 | my $CreationDateTime = $CreateSlotResponse->CreationDateTime; | ||
| 349 | my $Description = $CreateSlotResponse->Description; | ||
| 350 | my $IntentId = $CreateSlotResponse->IntentId; | ||
| 351 | my $LocaleId = $CreateSlotResponse->LocaleId; | ||
| 352 | my $MultipleValuesSetting = $CreateSlotResponse->MultipleValuesSetting; | ||
| 353 | my $ObfuscationSetting = $CreateSlotResponse->ObfuscationSetting; | ||
| 354 | my $SlotId = $CreateSlotResponse->SlotId; | ||
| 355 | my $SlotName = $CreateSlotResponse->SlotName; | ||
| 356 | my $SlotTypeId = $CreateSlotResponse->SlotTypeId; | ||
| 357 | my $ValueElicitationSetting = $CreateSlotResponse->ValueElicitationSetting; | ||
| 358 | |||
| 359 | # Returns a L<Paws::LexModelsV2::CreateSlotResponse> object. | ||
| 360 | |||
| 361 | 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. | ||
| 362 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/models-v2-lex/CreateSlot> | ||
| 363 | |||
| 364 | =head1 ATTRIBUTES | ||
| 365 | |||
| 366 | |||
| 367 | =head2 B<REQUIRED> BotId => Str | ||
| 368 | |||
| 369 | The identifier of the bot associated with the slot. | ||
| 370 | |||
| 371 | |||
| 372 | |||
| 373 | =head2 B<REQUIRED> BotVersion => Str | ||
| 374 | |||
| 375 | The version of the bot associated with the slot. | ||
| 376 | |||
| 377 | |||
| 378 | |||
| 379 | =head2 Description => Str | ||
| 380 | |||
| 381 | A description of the slot. Use this to help identify the slot in lists. | ||
| 382 | |||
| 383 | |||
| 384 | |||
| 385 | =head2 B<REQUIRED> IntentId => Str | ||
| 386 | |||
| 387 | The identifier of the intent that contains the slot. | ||
| 388 | |||
| 389 | |||
| 390 | |||
| 391 | =head2 B<REQUIRED> LocaleId => Str | ||
| 392 | |||
| 393 | The identifier of the language and locale that the slot will be used | ||
| 394 | in. The string must match one of the supported locales. All of the | ||
| 395 | bots, intents, slot types used by the slot must have the same locale. | ||
| 396 | For more information, see Supported languages | ||
| 397 | (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html). | ||
| 398 | |||
| 399 | |||
| 400 | |||
| 401 | =head2 MultipleValuesSetting => L<Paws::LexModelsV2::MultipleValuesSetting> | ||
| 402 | |||
| 403 | Indicates whether the slot returns multiple values in one response. | ||
| 404 | Multi-value slots are only available in the en-US locale. If you set | ||
| 405 | this value to C<true> in any other locale, Amazon Lex throws a | ||
| 406 | C<ValidationException>. | ||
| 407 | |||
| 408 | If the C<multipleValuesSetting> is not set, the default value is | ||
| 409 | C<false>. | ||
| 410 | |||
| 411 | |||
| 412 | |||
| 413 | =head2 ObfuscationSetting => L<Paws::LexModelsV2::ObfuscationSetting> | ||
| 414 | |||
| 415 | Determines how slot values are used in Amazon CloudWatch logs. If the | ||
| 416 | value of the C<obfuscationSetting> parameter is C<DefaultObfuscation>, | ||
| 417 | slot values are obfuscated in the log output. If the value is C<None>, | ||
| 418 | the actual value is present in the log output. | ||
| 419 | |||
| 420 | The default is to obfuscate values in the CloudWatch logs. | ||
| 421 | |||
| 422 | |||
| 423 | |||
| 424 | =head2 B<REQUIRED> SlotName => Str | ||
| 425 | |||
| 426 | The name of the slot. Slot names must be unique within the bot that | ||
| 427 | contains the slot. | ||
| 428 | |||
| 429 | |||
| 430 | |||
| 431 | =head2 B<REQUIRED> SlotTypeId => Str | ||
| 432 | |||
| 433 | The unique identifier for the slot type associated with this slot. The | ||
| 434 | slot type determines the values that can be entered into the slot. | ||
| 435 | |||
| 436 | |||
| 437 | |||
| 438 | =head2 B<REQUIRED> ValueElicitationSetting => L<Paws::LexModelsV2::SlotValueElicitationSetting> | ||
| 439 | |||
| 440 | Specifies prompts that Amazon Lex sends to the user to elicit a | ||
| 441 | response that provides the value for the slot. | ||
| 442 | |||
| 443 | |||
| 444 | |||
| 445 | |||
| 446 | =head1 SEE ALSO | ||
| 447 | |||
| 448 | This class forms part of L<Paws>, documenting arguments for method CreateSlot in L<Paws::LexModelsV2> | ||
| 449 | |||
| 450 | =head1 BUGS and CONTRIBUTIONS | ||
| 451 | |||
| 452 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 453 | |||
| 454 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 455 | |||
| 456 | =cut | ||
| 457 |