« blib/lib/Paws/LexModelsV2/CreateSlotResponse.pm
↑ Summary
blib/lib/Paws/LexModelsV2/CreateSlotTypeResponse.pm »
| 1 | |||
| 2 | package Paws::LexModelsV2::CreateSlotType; | ||
| 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 LocaleId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'localeId', required => 1); | ||
| 8 | has ParentSlotTypeSignature => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'parentSlotTypeSignature'); | ||
| 9 | has SlotTypeName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'slotTypeName', required => 1); | ||
| 10 | has SlotTypeValues => (is => 'ro', isa => 'ArrayRef[Paws::LexModelsV2::SlotTypeValue]', traits => ['NameInRequest'], request_name => 'slotTypeValues'); | ||
| 11 | has ValueSelectionSetting => (is => 'ro', isa => 'Paws::LexModelsV2::SlotValueSelectionSetting', traits => ['NameInRequest'], request_name => 'valueSelectionSetting', required => 1); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateSlotType'); | ||
| 16 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes/'); | ||
| 17 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | ||
| 18 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModelsV2::CreateSlotTypeResponse'); | ||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::LexModelsV2::CreateSlotType - Arguments for method CreateSlotType on L<Paws::LexModelsV2> | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This class represents the parameters used for calling the method CreateSlotType on the | ||
| 30 | L<Amazon Lex Model Building V2|Paws::LexModelsV2> service. Use the attributes of this class | ||
| 31 | as arguments to method CreateSlotType. | ||
| 32 | |||
| 33 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateSlotType. | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | my $models-v2-lex = Paws->service('LexModelsV2'); | ||
| 38 | my $CreateSlotTypeResponse = $models - v2 -lex->CreateSlotType( | ||
| 39 | BotId => 'MyId', | ||
| 40 | BotVersion => 'MyDraftBotVersion', | ||
| 41 | LocaleId => 'MyLocaleId', | ||
| 42 | SlotTypeName => 'MyName', | ||
| 43 | ValueSelectionSetting => { | ||
| 44 | ResolutionStrategy => | ||
| 45 | 'OriginalValue', # values: OriginalValue, TopResolution | ||
| 46 | RegexFilter => { | ||
| 47 | Pattern => 'MyRegexPattern', # min: 1, max: 100 | ||
| 48 | |||
| 49 | }, # OPTIONAL | ||
| 50 | }, | ||
| 51 | Description => 'MyDescription', # OPTIONAL | ||
| 52 | ParentSlotTypeSignature => 'MySlotTypeSignature', # OPTIONAL | ||
| 53 | SlotTypeValues => [ | ||
| 54 | { | ||
| 55 | SampleValue => { | ||
| 56 | Value => 'MyValue', # min: 1, max: 140 | ||
| 57 | |||
| 58 | }, # OPTIONAL | ||
| 59 | Synonyms => [ | ||
| 60 | { | ||
| 61 | Value => 'MyValue', # min: 1, max: 140 | ||
| 62 | |||
| 63 | }, | ||
| 64 | ... # OPTIONAL | ||
| 65 | ], # min: 1, max: 10000; OPTIONAL | ||
| 66 | }, | ||
| 67 | ... | ||
| 68 | ], # OPTIONAL | ||
| 69 | ); | ||
| 70 | |||
| 71 | # Results: | ||
| 72 | my $BotId = $CreateSlotTypeResponse->BotId; | ||
| 73 | my $BotVersion = $CreateSlotTypeResponse->BotVersion; | ||
| 74 | my $CreationDateTime = $CreateSlotTypeResponse->CreationDateTime; | ||
| 75 | my $Description = $CreateSlotTypeResponse->Description; | ||
| 76 | my $LocaleId = $CreateSlotTypeResponse->LocaleId; | ||
| 77 | my $ParentSlotTypeSignature = | ||
| 78 | $CreateSlotTypeResponse->ParentSlotTypeSignature; | ||
| 79 | my $SlotTypeId = $CreateSlotTypeResponse->SlotTypeId; | ||
| 80 | my $SlotTypeName = $CreateSlotTypeResponse->SlotTypeName; | ||
| 81 | my $SlotTypeValues = $CreateSlotTypeResponse->SlotTypeValues; | ||
| 82 | my $ValueSelectionSetting = $CreateSlotTypeResponse->ValueSelectionSetting; | ||
| 83 | |||
| 84 | # Returns a L<Paws::LexModelsV2::CreateSlotTypeResponse> object. | ||
| 85 | |||
| 86 | 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. | ||
| 87 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/models-v2-lex/CreateSlotType> | ||
| 88 | |||
| 89 | =head1 ATTRIBUTES | ||
| 90 | |||
| 91 | |||
| 92 | =head2 B<REQUIRED> BotId => Str | ||
| 93 | |||
| 94 | The identifier of the bot associated with this slot type. | ||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | =head2 B<REQUIRED> BotVersion => Str | ||
| 99 | |||
| 100 | The identifier of the bot version associated with this slot type. | ||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | =head2 Description => Str | ||
| 105 | |||
| 106 | A description of the slot type. Use the description to help identify | ||
| 107 | the slot type in lists. | ||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | =head2 B<REQUIRED> LocaleId => Str | ||
| 112 | |||
| 113 | The identifier of the language and locale that the slot type will be | ||
| 114 | used in. The string must match one of the supported locales. All of the | ||
| 115 | bots, intents, and slots used by the slot type must have the same | ||
| 116 | locale. For more information, see Supported languages | ||
| 117 | (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html). | ||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | =head2 ParentSlotTypeSignature => Str | ||
| 122 | |||
| 123 | The built-in slot type used as a parent of this slot type. When you | ||
| 124 | define a parent slot type, the new slot type has the configuration of | ||
| 125 | the parent slot type. | ||
| 126 | |||
| 127 | Only C<AMAZON.AlphaNumeric> is supported. | ||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | =head2 B<REQUIRED> SlotTypeName => Str | ||
| 132 | |||
| 133 | The name for the slot. A slot type name must be unique within the | ||
| 134 | account. | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | =head2 SlotTypeValues => ArrayRef[L<Paws::LexModelsV2::SlotTypeValue>] | ||
| 139 | |||
| 140 | A list of C<SlotTypeValue> objects that defines the values that the | ||
| 141 | slot type can take. Each value can have a list of synonyms, additional | ||
| 142 | values that help train the machine learning model about the values that | ||
| 143 | it resolves for a slot. | ||
| 144 | |||
| 145 | |||
| 146 | |||
| 147 | =head2 B<REQUIRED> ValueSelectionSetting => L<Paws::LexModelsV2::SlotValueSelectionSetting> | ||
| 148 | |||
| 149 | Determines the strategy that Amazon Lex uses to select a value from the | ||
| 150 | list of possible values. The field can be set to one of the following | ||
| 151 | values: | ||
| 152 | |||
| 153 | =over | ||
| 154 | |||
| 155 | =item * | ||
| 156 | |||
| 157 | C<OriginalValue> - Returns the value entered by the user, if the user | ||
| 158 | value is similar to the slot value. | ||
| 159 | |||
| 160 | =item * | ||
| 161 | |||
| 162 | C<TopResolution> - If there is a resolution list for the slot, return | ||
| 163 | the first value in the resolution list. If there is no resolution list, | ||
| 164 | return null. | ||
| 165 | |||
| 166 | =back | ||
| 167 | |||
| 168 | If you don't specify the C<valueSelectionSetting> parameter, the | ||
| 169 | default is C<OriginalValue>. | ||
| 170 | |||
| 171 | |||
| 172 | |||
| 173 | |||
| 174 | =head1 SEE ALSO | ||
| 175 | |||
| 176 | This class forms part of L<Paws>, documenting arguments for method CreateSlotType in L<Paws::LexModelsV2> | ||
| 177 | |||
| 178 | =head1 BUGS and CONTRIBUTIONS | ||
| 179 | |||
| 180 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 181 | |||
| 182 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 183 | |||
| 184 | =cut | ||
| 185 |