amazonka-lex-models-1.6.1: 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 # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Data PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

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 # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Show PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Generic PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Associated Types

type Rep PutSlotType :: Type -> Type #

Hashable PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

ToJSON PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

AWSRequest PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Associated Types

type Rs PutSlotType :: Type #

ToHeaders PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Methods

toHeaders :: PutSlotType -> [Header] #

ToPath PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

ToQuery PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

NFData PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Methods

rnf :: PutSlotType -> () #

type Rep PutSlotType Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

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

Defined in Network.AWS.LexModels.PutSlotType

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 # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Data PutSlotTypeResponse Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

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 # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Show PutSlotTypeResponse Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Generic PutSlotTypeResponse Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Associated Types

type Rep PutSlotTypeResponse :: Type -> Type #

NFData PutSlotTypeResponse Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

Methods

rnf :: PutSlotTypeResponse -> () #

type Rep PutSlotTypeResponse Source # 
Instance details

Defined in Network.AWS.LexModels.PutSlotType

type Rep PutSlotTypeResponse = D1 (MetaData "PutSlotTypeResponse" "Network.AWS.LexModels.PutSlotType" "amazonka-lex-models-1.6.1-16JSA2D34IH7p8RxcjidTj" False) (C1 (MetaCons "PutSlotTypeResponse'" PrefixI True) (((S1 (MetaSel (Just "_pstrsChecksum") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_pstrsValueSelectionStrategy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe SlotValueSelectionStrategy))) :*: (S1 (MetaSel (Just "_pstrsCreatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 (MetaSel (Just "_pstrsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_pstrsVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 (MetaSel (Just "_pstrsLastUpdatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 (MetaSel (Just "_pstrsCreateVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 (MetaSel (Just "_pstrsDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_pstrsEnumerationValues") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (List1 EnumerationValue))) :*: S1 (MetaSel (Just "_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.