Copyright | (c) Mauricio Fierro 2019 |
---|---|
License | BSD3-Clause |
Maintainer | Mauricio Fierro <mauriciofierrom@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
This module contains types for the Google Actions payload to be included in the webhook reponse. See the Dialogflow documentation.
Synopsis
- newtype GooglePayload = GooglePayload {}
- data Image = Image {}
- data BasicCardContent
- data ImageDisplayOption
- data MediaType
- data MediaObject = MediaObject {
- moName :: String
- moDescription :: String
- moContentUrl :: String
- moLargeImage :: Image
- moIcon :: Image
- data RichMessageType
- data Res t where
- SimpleResponse :: SimpleResponse -> Res 'RMTSimpleResponse
- BasicCard :: Maybe String -> Maybe String -> BasicCardContent -> [BasicCardButton] -> ImageDisplayOption -> Res 'RMTBasicCard
- MediaResponse :: MediaType -> [MediaObject] -> Res 'RMTMediaResponse
- data Item where
- data RichResponse = RichResponse {}
- data Response = Response {}
- data UrlTypeHint
- data VersionFilter = VersionFilter {
- minVersion :: Int
- maxVersion :: Int
- data AndroidApp = AndroidApp {}
- data OpenUrlAction = OpenUrlAction {}
- data LinkOutSuggestion = LinkOutSuggestion {}
- newtype Suggestion = Suggestion {}
Documentation
newtype GooglePayload Source #
This field can be used to provide responses for different platforms like Actions on Google.
Instances
Eq GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: GooglePayload -> GooglePayload -> Bool # (/=) :: GooglePayload -> GooglePayload -> Bool # | |
Show GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> GooglePayload -> ShowS # show :: GooglePayload -> String # showList :: [GooglePayload] -> ShowS # | |
ToJSON GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: GooglePayload -> Value # toEncoding :: GooglePayload -> Encoding # toJSONList :: [GooglePayload] -> Value # toEncodingList :: [GooglePayload] -> Encoding # |
An image.
data BasicCardContent Source #
A BasicCard
can either contain an image or formatted text.
Instances
Eq BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: BasicCardContent -> BasicCardContent -> Bool # (/=) :: BasicCardContent -> BasicCardContent -> Bool # | |
Show BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> BasicCardContent -> ShowS # show :: BasicCardContent -> String # showList :: [BasicCardContent] -> ShowS # | |
ToJSON BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: BasicCardContent -> Value # toEncoding :: BasicCardContent -> Encoding # toJSONList :: [BasicCardContent] -> Value # toEncodingList :: [BasicCardContent] -> Encoding # | |
FromJSON BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser BasicCardContent # parseJSONList :: Value -> Parser [BasicCardContent] # |
data ImageDisplayOption Source #
Possible image display options for affecting the presentation of an Image
.
This should be used for when the Image'
s aspect ratio does not match the Image
container's aspect ratio.
DEFAULT | Fill the gaps between the |
WHITE | Fill the gaps between the |
CROPPED |
|
Instances
Eq ImageDisplayOption Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: ImageDisplayOption -> ImageDisplayOption -> Bool # (/=) :: ImageDisplayOption -> ImageDisplayOption -> Bool # | |
Read ImageDisplayOption Source # | |
Show ImageDisplayOption Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> ImageDisplayOption -> ShowS # show :: ImageDisplayOption -> String # showList :: [ImageDisplayOption] -> ShowS # | |
ToJSON ImageDisplayOption Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: ImageDisplayOption -> Value # toEncoding :: ImageDisplayOption -> Encoding # toJSONList :: [ImageDisplayOption] -> Value # toEncodingList :: [ImageDisplayOption] -> Encoding # | |
FromJSON ImageDisplayOption Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser ImageDisplayOption # parseJSONList :: Value -> Parser [ImageDisplayOption] # |
The type of the media within the response.
MEDIA_TYPE_UNSPECIFIED | Unspecified. |
AUDIO | Audio stream. |
data MediaObject Source #
Represents one media noNullObjects which is returned with MediaResponse
.
Contains information about the media, such as name, description, url, etc.
MediaObject | |
|
Instances
Eq MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: MediaObject -> MediaObject -> Bool # (/=) :: MediaObject -> MediaObject -> Bool # | |
Show MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> MediaObject -> ShowS # show :: MediaObject -> String # showList :: [MediaObject] -> ShowS # | |
ToJSON MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: MediaObject -> Value # toEncoding :: MediaObject -> Encoding # toJSONList :: [MediaObject] -> Value # toEncodingList :: [MediaObject] -> Encoding # | |
FromJSON MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser MediaObject # parseJSONList :: Value -> Parser [MediaObject] # |
data RichMessageType Source #
The possible types of RichMessage
s.
The response items.
SimpleResponse :: SimpleResponse -> Res 'RMTSimpleResponse | A simple response containing speech or text to show the user. |
BasicCard | A basic card for displaying some information, e.g. an image and/or text. |
| |
MediaResponse | The response indicating a set of media to be played within the conversation. |
|
Instances
Eq (Res t) Source # | |
Show (Res t) Source # | |
ToJSON (Res t) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
FromJSON (Res 'RMTSimpleResponse) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser (Res 'RMTSimpleResponse) # parseJSONList :: Value -> Parser [Res 'RMTSimpleResponse] # | |
FromJSON (Res 'RMTBasicCard) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser (Res 'RMTBasicCard) # parseJSONList :: Value -> Parser [Res 'RMTBasicCard] # | |
FromJSON (Res 'RMTMediaResponse) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser (Res 'RMTMediaResponse) # parseJSONList :: Value -> Parser [Res 'RMTMediaResponse] # |
The items to include in the RichResponse
data RichResponse Source #
A rich response that can include audio, text, cards, suggestions and structured data.
RichResponse | |
|
Instances
Eq RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: RichResponse -> RichResponse -> Bool # (/=) :: RichResponse -> RichResponse -> Bool # | |
Show RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> RichResponse -> ShowS # show :: RichResponse -> String # showList :: [RichResponse] -> ShowS # | |
ToJSON RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: RichResponse -> Value # toEncoding :: RichResponse -> Encoding # toJSONList :: [RichResponse] -> Value # toEncodingList :: [RichResponse] -> Encoding # |
The response sent by the fulfillment to Google Assistant.
Response | |
|
data UrlTypeHint Source #
Different types of url hints.
URL_TYPE_HINT_UNSPECIFIED | Unspecified. |
AMP_CONTENT | URL that points directly to AMP content, or to a canonical URL which refers to AMP content via . |
Instances
Eq UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: UrlTypeHint -> UrlTypeHint -> Bool # (/=) :: UrlTypeHint -> UrlTypeHint -> Bool # | |
Read UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google readsPrec :: Int -> ReadS UrlTypeHint # readList :: ReadS [UrlTypeHint] # readPrec :: ReadPrec UrlTypeHint # readListPrec :: ReadPrec [UrlTypeHint] # | |
Show UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> UrlTypeHint -> ShowS # show :: UrlTypeHint -> String # showList :: [UrlTypeHint] -> ShowS # | |
ToJSON UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: UrlTypeHint -> Value # toEncoding :: UrlTypeHint -> Encoding # toJSONList :: [UrlTypeHint] -> Value # toEncodingList :: [UrlTypeHint] -> Encoding # | |
FromJSON UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser UrlTypeHint # parseJSONList :: Value -> Parser [UrlTypeHint] # |
data VersionFilter Source #
VersionFilter should be included if specific version/s of the App are required.
VersionFilter | |
|
Instances
Eq VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: VersionFilter -> VersionFilter -> Bool # (/=) :: VersionFilter -> VersionFilter -> Bool # | |
Read VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google readsPrec :: Int -> ReadS VersionFilter # readList :: ReadS [VersionFilter] # | |
Show VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> VersionFilter -> ShowS # show :: VersionFilter -> String # showList :: [VersionFilter] -> ShowS # | |
ToJSON VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: VersionFilter -> Value # toEncoding :: VersionFilter -> Encoding # toJSONList :: [VersionFilter] -> Value # toEncodingList :: [VersionFilter] -> Encoding # | |
FromJSON VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser VersionFilter # parseJSONList :: Value -> Parser [VersionFilter] # |
data AndroidApp Source #
Specification of the Android App for fulfillment restrictions.
AndroidApp | |
|
Instances
Eq AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: AndroidApp -> AndroidApp -> Bool # (/=) :: AndroidApp -> AndroidApp -> Bool # | |
Read AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google readsPrec :: Int -> ReadS AndroidApp # readList :: ReadS [AndroidApp] # readPrec :: ReadPrec AndroidApp # readListPrec :: ReadPrec [AndroidApp] # | |
Show AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> AndroidApp -> ShowS # show :: AndroidApp -> String # showList :: [AndroidApp] -> ShowS # | |
ToJSON AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: AndroidApp -> Value # toEncoding :: AndroidApp -> Encoding # toJSONList :: [AndroidApp] -> Value # toEncodingList :: [AndroidApp] -> Encoding # | |
FromJSON AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser AndroidApp # parseJSONList :: Value -> Parser [AndroidApp] # |
data OpenUrlAction Source #
Opens the given url.
OpenUrlAction | |
|
Instances
Eq OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: OpenUrlAction -> OpenUrlAction -> Bool # (/=) :: OpenUrlAction -> OpenUrlAction -> Bool # | |
Read OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google readsPrec :: Int -> ReadS OpenUrlAction # readList :: ReadS [OpenUrlAction] # | |
Show OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> OpenUrlAction -> ShowS # show :: OpenUrlAction -> String # showList :: [OpenUrlAction] -> ShowS # | |
ToJSON OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: OpenUrlAction -> Value # toEncoding :: OpenUrlAction -> Encoding # toJSONList :: [OpenUrlAction] -> Value # toEncodingList :: [OpenUrlAction] -> Encoding # | |
FromJSON OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser OpenUrlAction # parseJSONList :: Value -> Parser [OpenUrlAction] # |
data LinkOutSuggestion Source #
Creates a suggestion chip that allows the user to jump out to the App or Website associated with this agent.
LinkOutSuggestion | |
|
Instances
Eq LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: LinkOutSuggestion -> LinkOutSuggestion -> Bool # (/=) :: LinkOutSuggestion -> LinkOutSuggestion -> Bool # | |
Show LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> LinkOutSuggestion -> ShowS # show :: LinkOutSuggestion -> String # showList :: [LinkOutSuggestion] -> ShowS # | |
ToJSON LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: LinkOutSuggestion -> Value # toEncoding :: LinkOutSuggestion -> Encoding # toJSONList :: [LinkOutSuggestion] -> Value # toEncodingList :: [LinkOutSuggestion] -> Encoding # | |
FromJSON LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser LinkOutSuggestion # parseJSONList :: Value -> Parser [LinkOutSuggestion] # |
newtype Suggestion Source #
A suggestion chip that the user can tap to quickly post a reply to the conversation.
Instances
Eq Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google (==) :: Suggestion -> Suggestion -> Bool # (/=) :: Suggestion -> Suggestion -> Bool # | |
Show Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google showsPrec :: Int -> Suggestion -> ShowS # show :: Suggestion -> String # showList :: [Suggestion] -> ShowS # | |
ToJSON Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google toJSON :: Suggestion -> Value # toEncoding :: Suggestion -> Encoding # toJSONList :: [Suggestion] -> Value # toEncodingList :: [Suggestion] -> Encoding # | |
FromJSON Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google parseJSON :: Value -> Parser Suggestion # parseJSONList :: Value -> Parser [Suggestion] # |