amazonka-lex-models-1.6.0: Amazon Lex Model Building Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.LexModels.PutSlotType

Contents

Description

Creates a custom slot type or replaces an existing custom slot type.

To create a custom slot type, specify a name for the slot type and a set of enumeration values, which are the values that a slot of this type can assume. For more information, see 'how-it-works' .

If you specify the name of an existing slot type, the fields in the request replace the existing values in the > LATEST version of the slot type. Amazon Lex removes the fields that you don't provide in the request. If you don't specify required fields, Amazon Lex throws an exception. When you update the > LATEST version of a slot type, if a bot uses the > LATEST version of an intent that contains the slot type, the bot's status field is set to NOT_BUILT .

This operation requires permissions for the lex:PutSlotType action.

Synopsis

Creating a Request

putSlotType Source #

Arguments

:: Text

pstName

-> PutSlotType 

Creates a value of PutSlotType with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • pstChecksum - Identifies a specific revision of the > LATEST version. When you create a new slot type, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a slot type, set the checksum field to the checksum of the most recent revision of the > LATEST version. If you don't specify the checksum field, or if the checksum does not match the > LATEST version, you get a PreconditionFailedException exception.
  • pstValueSelectionStrategy - Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values: * ORIGINAL_VALUE - Returns the value entered by the user, if the user value is similar to the slot value. * TOP_RESOLUTION - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned. If you don't specify the valueSelectionStrategy , the default is ORIGINAL_VALUE .
  • pstCreateVersion - Undocumented member.
  • pstDescription - A description of the slot type.
  • pstEnumerationValues - A list of EnumerationValue objects that defines the values that the slot type can take. Each value can have a list of synonyms , which are additional values that help train the machine learning model about the values that it resolves for a slot. When Amazon Lex resolves a slot value, it generates a resolution list that contains up to five possible values for the slot. If you are using a Lambda function, this resolution list is passed to the function. If you are not using a Lambda function you can choose to return the value that the user entered or the first value in the resolution list as the slot value. The valueSelectionStrategy field indicates the option to use.
  • pstName - The name of the slot type. The name is not case sensitive. The name can't match a built-in slot type name, or a built-in slot type name with "AMAZON." removed. For example, because there is a built-in slot type called AMAZON.DATE , you can't create a custom slot type called DATE . For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit .

data PutSlotType Source #

See: putSlotType smart constructor.

Instances

Eq PutSlotType Source # 
Data PutSlotType Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutSlotType -> c PutSlotType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutSlotType #

toConstr :: PutSlotType -> Constr #

dataTypeOf :: PutSlotType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutSlotType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutSlotType) #

gmapT :: (forall b. Data b => b -> b) -> PutSlotType -> PutSlotType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutSlotType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutSlotType -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutSlotType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutSlotType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutSlotType -> m PutSlotType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSlotType -> m PutSlotType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSlotType -> m PutSlotType #

Read PutSlotType Source # 
Show PutSlotType Source # 
Generic PutSlotType Source # 

Associated Types

type Rep PutSlotType :: * -> * #

Hashable PutSlotType Source # 
ToJSON PutSlotType Source # 
NFData PutSlotType Source # 

Methods

rnf :: PutSlotType -> () #

AWSRequest PutSlotType Source # 
ToHeaders PutSlotType Source # 

Methods

toHeaders :: PutSlotType -> [Header] #

ToPath PutSlotType Source # 
ToQuery PutSlotType Source # 
type Rep PutSlotType Source # 
type Rep PutSlotType = D1 * (MetaData "PutSlotType" "Network.AWS.LexModels.PutSlotType" "amazonka-lex-models-1.6.0-Iv3mghdDvOI9Mj0nI0DuS4" False) (C1 * (MetaCons "PutSlotType'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_pstChecksum") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstValueSelectionStrategy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe SlotValueSelectionStrategy))) (S1 * (MetaSel (Just Symbol "_pstCreateVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstEnumerationValues") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (List1 EnumerationValue)))) (S1 * (MetaSel (Just Symbol "_pstName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs PutSlotType Source # 

Request Lenses

pstChecksum :: Lens' PutSlotType (Maybe Text) Source #

Identifies a specific revision of the > LATEST version. When you create a new slot type, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a slot type, set the checksum field to the checksum of the most recent revision of the > LATEST version. If you don't specify the checksum field, or if the checksum does not match the > LATEST version, you get a PreconditionFailedException exception.

pstValueSelectionStrategy :: Lens' PutSlotType (Maybe SlotValueSelectionStrategy) Source #

Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values: * ORIGINAL_VALUE - Returns the value entered by the user, if the user value is similar to the slot value. * TOP_RESOLUTION - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned. If you don't specify the valueSelectionStrategy , the default is ORIGINAL_VALUE .

pstDescription :: Lens' PutSlotType (Maybe Text) Source #

A description of the slot type.

pstEnumerationValues :: Lens' PutSlotType (Maybe (NonEmpty EnumerationValue)) Source #

A list of EnumerationValue objects that defines the values that the slot type can take. Each value can have a list of synonyms , which are additional values that help train the machine learning model about the values that it resolves for a slot. When Amazon Lex resolves a slot value, it generates a resolution list that contains up to five possible values for the slot. If you are using a Lambda function, this resolution list is passed to the function. If you are not using a Lambda function you can choose to return the value that the user entered or the first value in the resolution list as the slot value. The valueSelectionStrategy field indicates the option to use.

pstName :: Lens' PutSlotType Text Source #

The name of the slot type. The name is not case sensitive. The name can't match a built-in slot type name, or a built-in slot type name with "AMAZON." removed. For example, because there is a built-in slot type called AMAZON.DATE , you can't create a custom slot type called DATE . For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit .

Destructuring the Response

putSlotTypeResponse Source #

Creates a value of PutSlotTypeResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutSlotTypeResponse Source #

See: putSlotTypeResponse smart constructor.

Instances

Eq PutSlotTypeResponse Source # 
Data PutSlotTypeResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutSlotTypeResponse -> c PutSlotTypeResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutSlotTypeResponse #

toConstr :: PutSlotTypeResponse -> Constr #

dataTypeOf :: PutSlotTypeResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutSlotTypeResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutSlotTypeResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutSlotTypeResponse -> PutSlotTypeResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutSlotTypeResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutSlotTypeResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutSlotTypeResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutSlotTypeResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutSlotTypeResponse -> m PutSlotTypeResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSlotTypeResponse -> m PutSlotTypeResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSlotTypeResponse -> m PutSlotTypeResponse #

Read PutSlotTypeResponse Source # 
Show PutSlotTypeResponse Source # 
Generic PutSlotTypeResponse Source # 
NFData PutSlotTypeResponse Source # 

Methods

rnf :: PutSlotTypeResponse -> () #

type Rep PutSlotTypeResponse Source # 
type Rep PutSlotTypeResponse = D1 * (MetaData "PutSlotTypeResponse" "Network.AWS.LexModels.PutSlotType" "amazonka-lex-models-1.6.0-Iv3mghdDvOI9Mj0nI0DuS4" False) (C1 * (MetaCons "PutSlotTypeResponse'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsChecksum") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_pstrsValueSelectionStrategy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe SlotValueSelectionStrategy)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsCreatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_pstrsVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsLastUpdatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) (S1 * (MetaSel (Just Symbol "_pstrsCreateVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pstrsEnumerationValues") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (List1 EnumerationValue)))) (S1 * (MetaSel (Just Symbol "_pstrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))))

Response Lenses

pstrsChecksum :: Lens' PutSlotTypeResponse (Maybe Text) Source #

Checksum of the > LATEST version of the slot type.

pstrsValueSelectionStrategy :: Lens' PutSlotTypeResponse (Maybe SlotValueSelectionStrategy) Source #

The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType .

pstrsCreatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #

The date that the slot type was created.

pstrsName :: Lens' PutSlotTypeResponse (Maybe Text) Source #

The name of the slot type.

pstrsVersion :: Lens' PutSlotTypeResponse (Maybe Text) Source #

The version of the slot type. For a new slot type, the version is always > LATEST .

pstrsLastUpdatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #

The date that the slot type was updated. When you create a slot type, the creation date and last update date are the same.

pstrsDescription :: Lens' PutSlotTypeResponse (Maybe Text) Source #

A description of the slot type.

pstrsEnumerationValues :: Lens' PutSlotTypeResponse (Maybe (NonEmpty EnumerationValue)) Source #

A list of EnumerationValue objects that defines the values that the slot type can take.

pstrsResponseStatus :: Lens' PutSlotTypeResponse Int Source #

  • - | The response status code.