amazonka-lex-runtime-1.5.0: Amazon Lex Runtime Service SDK.

Copyright(c) 2013-2017 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.LexRuntime

Contents

Description

Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of operations (API). Your conversational bot uses the runtime API to understand user utterances (user input text or voice). For example, suppose a user says "I want pizza", your bot sends this input to Amazon Lex using the runtime API. Amazon Lex recognizes that the user request is for the OrderPizza intent (one of the intents defined in the bot). Then Amazon Lex engages in user conversation on behalf of the bot to elicit required information (slot values, such as pizza size and crust type), and then performs fulfillment activity (that you configured when you created the bot). You use the build-time API to create and manage your Amazon Lex bot. For a list of build-time operations, see the build-time API, .

Synopsis

Service Configuration

lexRuntime :: Service Source #

API version 2016-11-28 of the Amazon Lex Runtime Service SDK configuration.

Errors

Error matchers are designed for use with the functions provided by Control.Exception.Lens. This allows catching (and rethrowing) service specific errors returned by LexRuntime.

NotAcceptableException

_NotAcceptableException :: AsError a => Getting (First ServiceError) a ServiceError Source #

The accept header in the request does not have a valid value.

DependencyFailedException

_DependencyFailedException :: AsError a => Getting (First ServiceError) a ServiceError Source #

One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception. For example,

  • If Amazon Lex does not have sufficient permissions to call a Lambda function.
  • If a Lambda function takes longer than 30 seconds to execute.
  • If a fulfillment Lambda function returns a Delegate dialog action without removing any slot values.

UnsupportedMediaTypeException

_UnsupportedMediaTypeException :: AsError a => Getting (First ServiceError) a ServiceError Source #

The Content-Type header (PostContent API) has an invalid value.

ConflictException

_ConflictException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Two clients are using the same AWS account, Amazon Lex bot, and user ID.

NotFoundException

_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #

The resource (such as the Amazon Lex bot or an alias) that is referred to is not found.

RequestTimeoutException

LoopDetectedException

InternalFailureException

_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Internal service error. Retry the call.

BadGatewayException

_BadGatewayException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Either the Amazon Lex bot is still building, or one of the dependent services (Amazon Polly, AWS Lambda) failed with an internal service error.

BadRequestException

_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Request validation failed, there is no usable message in the context, or the bot build failed, is still in progress, or contains unbuilt changes.

LimitExceededException

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies.

Operations

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

PostText

PostContent

Types

ContentType

data ContentType Source #

Instances

Bounded ContentType Source # 
Enum ContentType Source # 
Eq ContentType Source # 
Data ContentType Source # 

Methods

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

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

toConstr :: ContentType -> Constr #

dataTypeOf :: ContentType -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ContentType Source # 
Read ContentType Source # 
Show ContentType Source # 
Generic ContentType Source # 

Associated Types

type Rep ContentType :: * -> * #

Hashable ContentType Source # 
FromJSON ContentType Source # 
NFData ContentType Source # 

Methods

rnf :: ContentType -> () #

ToQuery ContentType Source # 
ToHeader ContentType Source # 
ToByteString ContentType Source # 
FromText ContentType Source # 
ToText ContentType Source # 

Methods

toText :: ContentType -> Text #

type Rep ContentType Source # 
type Rep ContentType = D1 (MetaData "ContentType" "Network.AWS.LexRuntime.Types.Sum" "amazonka-lex-runtime-1.5.0-IoAt9d2Jc34LNXDbJn3CLr" False) (C1 (MetaCons "ApplicationVnd_Amazonaws_Card_Generic" PrefixI False) U1)

DialogState

data DialogState Source #

Instances

Bounded DialogState Source # 
Enum DialogState Source # 
Eq DialogState Source # 
Data DialogState Source # 

Methods

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

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

toConstr :: DialogState -> Constr #

dataTypeOf :: DialogState -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord DialogState Source # 
Read DialogState Source # 
Show DialogState Source # 
Generic DialogState Source # 

Associated Types

type Rep DialogState :: * -> * #

Hashable DialogState Source # 
FromJSON DialogState Source # 
NFData DialogState Source # 

Methods

rnf :: DialogState -> () #

ToQuery DialogState Source # 
ToHeader DialogState Source # 
ToByteString DialogState Source # 
FromText DialogState Source # 
ToText DialogState Source # 

Methods

toText :: DialogState -> Text #

type Rep DialogState Source # 
type Rep DialogState = D1 (MetaData "DialogState" "Network.AWS.LexRuntime.Types.Sum" "amazonka-lex-runtime-1.5.0-IoAt9d2Jc34LNXDbJn3CLr" False) ((:+:) ((:+:) (C1 (MetaCons "ConfirmIntent" PrefixI False) U1) ((:+:) (C1 (MetaCons "ElicitIntent" PrefixI False) U1) (C1 (MetaCons "ElicitSlot" PrefixI False) U1))) ((:+:) (C1 (MetaCons "Failed" PrefixI False) U1) ((:+:) (C1 (MetaCons "Fulfilled" PrefixI False) U1) (C1 (MetaCons "ReadyForFulfillment" PrefixI False) U1))))

Button

data Button Source #

Represents an option to be shown on the client platform (Facebook, Slack, etc.)

See: button smart constructor.

Instances

Eq Button Source # 

Methods

(==) :: Button -> Button -> Bool #

(/=) :: Button -> Button -> Bool #

Data Button Source # 

Methods

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

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

toConstr :: Button -> Constr #

dataTypeOf :: Button -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Button Source # 
Show Button Source # 
Generic Button Source # 

Associated Types

type Rep Button :: * -> * #

Methods

from :: Button -> Rep Button x #

to :: Rep Button x -> Button #

Hashable Button Source # 

Methods

hashWithSalt :: Int -> Button -> Int #

hash :: Button -> Int #

FromJSON Button Source # 
NFData Button Source # 

Methods

rnf :: Button -> () #

type Rep Button Source # 
type Rep Button = D1 (MetaData "Button" "Network.AWS.LexRuntime.Types.Product" "amazonka-lex-runtime-1.5.0-IoAt9d2Jc34LNXDbJn3CLr" False) (C1 (MetaCons "Button'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_bText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_bValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))

button Source #

Arguments

:: Text

bText

-> Text

bValue

-> Button 

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

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

  • bText - Text that is visible to the user on the button.
  • bValue - The value sent to Amazon Lex when a user chooses the button. For example, consider button text "NYC." When the user chooses the button, the value sent can be "New York City."

bText :: Lens' Button Text Source #

Text that is visible to the user on the button.

bValue :: Lens' Button Text Source #

The value sent to Amazon Lex when a user chooses the button. For example, consider button text "NYC." When the user chooses the button, the value sent can be "New York City."

GenericAttachment

data GenericAttachment Source #

Represents an option rendered to the user when a prompt is shown. It could be an image, a button, a link, or text.

See: genericAttachment smart constructor.

Instances

Eq GenericAttachment Source # 
Data GenericAttachment Source # 

Methods

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

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

toConstr :: GenericAttachment -> Constr #

dataTypeOf :: GenericAttachment -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GenericAttachment Source # 
Show GenericAttachment Source # 
Generic GenericAttachment Source # 
Hashable GenericAttachment Source # 
FromJSON GenericAttachment Source # 
NFData GenericAttachment Source # 

Methods

rnf :: GenericAttachment -> () #

type Rep GenericAttachment Source # 
type Rep GenericAttachment = D1 (MetaData "GenericAttachment" "Network.AWS.LexRuntime.Types.Product" "amazonka-lex-runtime-1.5.0-IoAt9d2Jc34LNXDbJn3CLr" False) (C1 (MetaCons "GenericAttachment'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_gaButtons") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Button]))) (S1 (MetaSel (Just Symbol "_gaSubTitle") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_gaImageURL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_gaAttachmentLinkURL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_gaTitle") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))))

genericAttachment :: GenericAttachment Source #

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

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

gaButtons :: Lens' GenericAttachment [Button] Source #

The list of options to show to the user.

gaSubTitle :: Lens' GenericAttachment (Maybe Text) Source #

The subtitle shown below the title.

gaImageURL :: Lens' GenericAttachment (Maybe Text) Source #

The URL of an image that is displayed to the user.

gaAttachmentLinkURL :: Lens' GenericAttachment (Maybe Text) Source #

The URL of an attachment to the response card.

gaTitle :: Lens' GenericAttachment (Maybe Text) Source #

The title of the option.

ResponseCard

data ResponseCard Source #

If you configure a response card when creating your bots, Amazon Lex substitutes the session attributes and slot values that are available, and then returns it. The response card can also come from a Lambda function ( dialogCodeHook and fulfillmentActivity on an intent).

See: responseCard smart constructor.

Instances

Eq ResponseCard Source # 
Data ResponseCard Source # 

Methods

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

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

toConstr :: ResponseCard -> Constr #

dataTypeOf :: ResponseCard -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ResponseCard Source # 
Show ResponseCard Source # 
Generic ResponseCard Source # 

Associated Types

type Rep ResponseCard :: * -> * #

Hashable ResponseCard Source # 
FromJSON ResponseCard Source # 
NFData ResponseCard Source # 

Methods

rnf :: ResponseCard -> () #

type Rep ResponseCard Source # 
type Rep ResponseCard = D1 (MetaData "ResponseCard" "Network.AWS.LexRuntime.Types.Product" "amazonka-lex-runtime-1.5.0-IoAt9d2Jc34LNXDbJn3CLr" False) (C1 (MetaCons "ResponseCard'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_rcGenericAttachments") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GenericAttachment]))) ((:*:) (S1 (MetaSel (Just Symbol "_rcVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_rcContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ContentType))))))

responseCard :: ResponseCard Source #

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

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

rcGenericAttachments :: Lens' ResponseCard [GenericAttachment] Source #

An array of attachment objects representing options.

rcVersion :: Lens' ResponseCard (Maybe Text) Source #

The version of the response card format.

rcContentType :: Lens' ResponseCard (Maybe ContentType) Source #

The content type of the response.