« blib/lib/Paws/LexModels/PutIntentResponse.pm
↑ Summary
blib/lib/Paws/LexModels/PutSlotTypeResponse.pm »
| 1 | |||
| 2 | package Paws::LexModels::PutSlotType; | ||
| 3 | use Moose; | ||
| 4 | has Checksum => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'checksum'); | ||
| 5 | has CreateVersion => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'createVersion'); | ||
| 6 | has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description'); | ||
| 7 | has EnumerationValues => (is => 'ro', isa => 'ArrayRef[Paws::LexModels::EnumerationValue]', traits => ['NameInRequest'], request_name => 'enumerationValues'); | ||
| 8 | has Name => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'name', required => 1); | ||
| 9 | has ParentSlotTypeSignature => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'parentSlotTypeSignature'); | ||
| 10 | has SlotTypeConfigurations => (is => 'ro', isa => 'ArrayRef[Paws::LexModels::SlotTypeConfiguration]', traits => ['NameInRequest'], request_name => 'slotTypeConfigurations'); | ||
| 11 | has ValueSelectionStrategy => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'valueSelectionStrategy'); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutSlotType'); | ||
| 16 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/slottypes/{name}/versions/$LATEST'); | ||
| 17 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | ||
| 18 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModels::PutSlotTypeResponse'); | ||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::LexModels::PutSlotType - Arguments for method PutSlotType on L<Paws::LexModels> | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This class represents the parameters used for calling the method PutSlotType on the | ||
| 30 | L<Amazon Lex Model Building Service|Paws::LexModels> service. Use the attributes of this class | ||
| 31 | as arguments to method PutSlotType. | ||
| 32 | |||
| 33 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutSlotType. | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | my $models.lex = Paws->service('LexModels'); | ||
| 38 | # To Create a Slot Type | ||
| 39 | # This example shows how to create a slot type that describes pizza sauces. | ||
| 40 | my $PutSlotTypeResponse = $models . lex->PutSlotType( | ||
| 41 | 'Description' => 'Available pizza sauces', | ||
| 42 | 'EnumerationValues' => [ | ||
| 43 | |||
| 44 | { | ||
| 45 | 'Value' => 'red' | ||
| 46 | }, | ||
| 47 | |||
| 48 | { | ||
| 49 | 'Value' => 'white' | ||
| 50 | } | ||
| 51 | ], | ||
| 52 | 'Name' => 'PizzaSauceType' | ||
| 53 | ); | ||
| 54 | |||
| 55 | # Results: | ||
| 56 | my $checksum = $PutSlotTypeResponse->checksum; | ||
| 57 | my $createdDate = $PutSlotTypeResponse->createdDate; | ||
| 58 | my $description = $PutSlotTypeResponse->description; | ||
| 59 | my $enumerationValues = $PutSlotTypeResponse->enumerationValues; | ||
| 60 | my $lastUpdatedDate = $PutSlotTypeResponse->lastUpdatedDate; | ||
| 61 | my $name = $PutSlotTypeResponse->name; | ||
| 62 | my $version = $PutSlotTypeResponse->version; | ||
| 63 | |||
| 64 | # Returns a L<Paws::LexModels::PutSlotTypeResponse> object. | ||
| 65 | |||
| 66 | 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. | ||
| 67 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/models.lex/PutSlotType> | ||
| 68 | |||
| 69 | =head1 ATTRIBUTES | ||
| 70 | |||
| 71 | |||
| 72 | =head2 Checksum => Str | ||
| 73 | |||
| 74 | Identifies a specific revision of the C<$LATEST> version. | ||
| 75 | |||
| 76 | When you create a new slot type, leave the C<checksum> field blank. If | ||
| 77 | you specify a checksum you get a C<BadRequestException> exception. | ||
| 78 | |||
| 79 | When you want to update a slot type, set the C<checksum> field to the | ||
| 80 | checksum of the most recent revision of the C<$LATEST> version. If you | ||
| 81 | don't specify the C< checksum> field, or if the checksum does not match | ||
| 82 | the C<$LATEST> version, you get a C<PreconditionFailedException> | ||
| 83 | exception. | ||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | =head2 CreateVersion => Bool | ||
| 88 | |||
| 89 | When set to C<true> a new numbered version of the slot type is created. | ||
| 90 | This is the same as calling the C<CreateSlotTypeVersion> operation. If | ||
| 91 | you do not specify C<createVersion>, the default is C<false>. | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | =head2 Description => Str | ||
| 96 | |||
| 97 | A description of the slot type. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 EnumerationValues => ArrayRef[L<Paws::LexModels::EnumerationValue>] | ||
| 102 | |||
| 103 | A list of C<EnumerationValue> objects that defines the values that the | ||
| 104 | slot type can take. Each value can have a list of C<synonyms>, which | ||
| 105 | are additional values that help train the machine learning model about | ||
| 106 | the values that it resolves for a slot. | ||
| 107 | |||
| 108 | A regular expression slot type doesn't require enumeration values. All | ||
| 109 | other slot types require a list of enumeration values. | ||
| 110 | |||
| 111 | When Amazon Lex resolves a slot value, it generates a resolution list | ||
| 112 | that contains up to five possible values for the slot. If you are using | ||
| 113 | a Lambda function, this resolution list is passed to the function. If | ||
| 114 | you are not using a Lambda function you can choose to return the value | ||
| 115 | that the user entered or the first value in the resolution list as the | ||
| 116 | slot value. The C<valueSelectionStrategy> field indicates the option to | ||
| 117 | use. | ||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | =head2 B<REQUIRED> Name => Str | ||
| 122 | |||
| 123 | The name of the slot type. The name is I<not> case sensitive. | ||
| 124 | |||
| 125 | The name can't match a built-in slot type name, or a built-in slot type | ||
| 126 | name with "AMAZON." removed. For example, because there is a built-in | ||
| 127 | slot type called C<AMAZON.DATE>, you can't create a custom slot type | ||
| 128 | called C<DATE>. | ||
| 129 | |||
| 130 | For a list of built-in slot types, see Slot Type Reference | ||
| 131 | (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) | ||
| 132 | in the I<Alexa Skills Kit>. | ||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | =head2 ParentSlotTypeSignature => Str | ||
| 137 | |||
| 138 | The built-in slot type used as the parent of the slot type. When you | ||
| 139 | define a parent slot type, the new slot type has all of the same | ||
| 140 | configuration as the parent. | ||
| 141 | |||
| 142 | Only C<AMAZON.AlphaNumeric> is supported. | ||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | =head2 SlotTypeConfigurations => ArrayRef[L<Paws::LexModels::SlotTypeConfiguration>] | ||
| 147 | |||
| 148 | Configuration information that extends the parent built-in slot type. | ||
| 149 | The configuration is added to the settings for the parent slot type. | ||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | =head2 ValueSelectionStrategy => Str | ||
| 154 | |||
| 155 | Determines the slot resolution strategy that Amazon Lex uses to return | ||
| 156 | slot type values. The field can be set to one of the following values: | ||
| 157 | |||
| 158 | =over | ||
| 159 | |||
| 160 | =item * | ||
| 161 | |||
| 162 | C<ORIGINAL_VALUE> - Returns the value entered by the user, if the user | ||
| 163 | value is similar to the slot value. | ||
| 164 | |||
| 165 | =item * | ||
| 166 | |||
| 167 | C<TOP_RESOLUTION> - If there is a resolution list for the slot, return | ||
| 168 | the first value in the resolution list as the slot type value. If there | ||
| 169 | is no resolution list, null is returned. | ||
| 170 | |||
| 171 | =back | ||
| 172 | |||
| 173 | If you don't specify the C<valueSelectionStrategy>, the default is | ||
| 174 | C<ORIGINAL_VALUE>. | ||
| 175 | |||
| 176 | Valid values are: C<"ORIGINAL_VALUE">, C<"TOP_RESOLUTION"> | ||
| 177 | |||
| 178 | |||
| 179 | =head1 SEE ALSO | ||
| 180 | |||
| 181 | This class forms part of L<Paws>, documenting arguments for method PutSlotType in L<Paws::LexModels> | ||
| 182 | |||
| 183 | =head1 BUGS and CONTRIBUTIONS | ||
| 184 | |||
| 185 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 186 | |||
| 187 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 188 | |||
| 189 | =cut | ||
| 190 |