| Copyright | (c) Mauricio Fierro 2019 |
|---|---|
| License | BSD3-Clause |
| Maintainer | Mauricio Fierro <mauriciofierrom@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Dialogflow.V2.Fulfillment.Payload.Google
Description
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.
Constructors
| GooglePayload | |
Fields | |
Instances
| Eq GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods (==) :: GooglePayload -> GooglePayload -> Bool # (/=) :: GooglePayload -> GooglePayload -> Bool # | |
| Show GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> GooglePayload -> ShowS # show :: GooglePayload -> String # showList :: [GooglePayload] -> ShowS # | |
| ToJSON GooglePayload Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: GooglePayload -> Value # toEncoding :: GooglePayload -> Encoding # toJSONList :: [GooglePayload] -> Value # toEncodingList :: [GooglePayload] -> Encoding # | |
An image.
Constructors
| Image | |
data BasicCardContent Source #
A BasicCard can either contain an image or formatted text.
Constructors
| BasicCardImage Image | |
| BasicCardFormattedText String |
Instances
| Eq BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods (==) :: BasicCardContent -> BasicCardContent -> Bool # (/=) :: BasicCardContent -> BasicCardContent -> Bool # | |
| Show BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> BasicCardContent -> ShowS # show :: BasicCardContent -> String # showList :: [BasicCardContent] -> ShowS # | |
| ToJSON BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: BasicCardContent -> Value # toEncoding :: BasicCardContent -> Encoding # toJSONList :: [BasicCardContent] -> Value # toEncodingList :: [BasicCardContent] -> Encoding # | |
| FromJSON BasicCardContent Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods 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.
Constructors
| DEFAULT | Fill the gaps between the |
| WHITE | Fill the gaps between the |
| CROPPED |
|
Instances
The type of the media within the response.
Constructors
| 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.
Constructors
| MediaObject | |
Fields
| |
Instances
| Eq MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
| Show MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> MediaObject -> ShowS # show :: MediaObject -> String # showList :: [MediaObject] -> ShowS # | |
| ToJSON MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: MediaObject -> Value # toEncoding :: MediaObject -> Encoding # toJSONList :: [MediaObject] -> Value # toEncodingList :: [MediaObject] -> Encoding # | |
| FromJSON MediaObject Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
data RichMessageType Source #
The possible types of RichMessages.
Constructors
| RMTSimpleResponse | |
| RMTBasicCard | |
| RMTMediaResponse |
The response items.
Constructors
| 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. |
Fields
| |
| MediaResponse | The response indicating a set of media to be played within the conversation. |
Fields
| |
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 Methods parseJSON :: Value -> Parser (Res 'RMTSimpleResponse) # parseJSONList :: Value -> Parser [Res 'RMTSimpleResponse] # | |
| FromJSON (Res 'RMTBasicCard) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods parseJSON :: Value -> Parser (Res 'RMTBasicCard) # parseJSONList :: Value -> Parser [Res 'RMTBasicCard] # | |
| FromJSON (Res 'RMTMediaResponse) Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods 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.
Constructors
| RichResponse | |
Fields
| |
Instances
| Eq RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
| Show RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> RichResponse -> ShowS # show :: RichResponse -> String # showList :: [RichResponse] -> ShowS # | |
| ToJSON RichResponse Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: RichResponse -> Value # toEncoding :: RichResponse -> Encoding # toJSONList :: [RichResponse] -> Value # toEncodingList :: [RichResponse] -> Encoding # | |
The response sent by the fulfillment to Google Assistant.
Constructors
| Response | |
Fields
| |
data UrlTypeHint Source #
Different types of url hints.
Constructors
| 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 | |
| Read UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods readsPrec :: Int -> ReadS UrlTypeHint # readList :: ReadS [UrlTypeHint] # readPrec :: ReadPrec UrlTypeHint # readListPrec :: ReadPrec [UrlTypeHint] # | |
| Show UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> UrlTypeHint -> ShowS # show :: UrlTypeHint -> String # showList :: [UrlTypeHint] -> ShowS # | |
| ToJSON UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: UrlTypeHint -> Value # toEncoding :: UrlTypeHint -> Encoding # toJSONList :: [UrlTypeHint] -> Value # toEncodingList :: [UrlTypeHint] -> Encoding # | |
| FromJSON UrlTypeHint Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
data VersionFilter Source #
VersionFilter should be included if specific version/s of the App are required.
Constructors
| VersionFilter | |
Fields
| |
Instances
| Eq VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods (==) :: VersionFilter -> VersionFilter -> Bool # (/=) :: VersionFilter -> VersionFilter -> Bool # | |
| Read VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods readsPrec :: Int -> ReadS VersionFilter # readList :: ReadS [VersionFilter] # | |
| Show VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> VersionFilter -> ShowS # show :: VersionFilter -> String # showList :: [VersionFilter] -> ShowS # | |
| ToJSON VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: VersionFilter -> Value # toEncoding :: VersionFilter -> Encoding # toJSONList :: [VersionFilter] -> Value # toEncodingList :: [VersionFilter] -> Encoding # | |
| FromJSON VersionFilter Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods parseJSON :: Value -> Parser VersionFilter # parseJSONList :: Value -> Parser [VersionFilter] # | |
data AndroidApp Source #
Specification of the Android App for fulfillment restrictions.
Constructors
| AndroidApp | |
Fields
| |
Instances
| Eq AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
| Read AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods readsPrec :: Int -> ReadS AndroidApp # readList :: ReadS [AndroidApp] # readPrec :: ReadPrec AndroidApp # readListPrec :: ReadPrec [AndroidApp] # | |
| Show AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> AndroidApp -> ShowS # show :: AndroidApp -> String # showList :: [AndroidApp] -> ShowS # | |
| ToJSON AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: AndroidApp -> Value # toEncoding :: AndroidApp -> Encoding # toJSONList :: [AndroidApp] -> Value # toEncodingList :: [AndroidApp] -> Encoding # | |
| FromJSON AndroidApp Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
data OpenUrlAction Source #
Opens the given url.
Constructors
| OpenUrlAction | |
Fields
| |
Instances
| Eq OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods (==) :: OpenUrlAction -> OpenUrlAction -> Bool # (/=) :: OpenUrlAction -> OpenUrlAction -> Bool # | |
| Read OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods readsPrec :: Int -> ReadS OpenUrlAction # readList :: ReadS [OpenUrlAction] # | |
| Show OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> OpenUrlAction -> ShowS # show :: OpenUrlAction -> String # showList :: [OpenUrlAction] -> ShowS # | |
| ToJSON OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: OpenUrlAction -> Value # toEncoding :: OpenUrlAction -> Encoding # toJSONList :: [OpenUrlAction] -> Value # toEncodingList :: [OpenUrlAction] -> Encoding # | |
| FromJSON OpenUrlAction Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods 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.
Constructors
| LinkOutSuggestion | |
Fields
| |
Instances
| Eq LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods (==) :: LinkOutSuggestion -> LinkOutSuggestion -> Bool # (/=) :: LinkOutSuggestion -> LinkOutSuggestion -> Bool # | |
| Show LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> LinkOutSuggestion -> ShowS # show :: LinkOutSuggestion -> String # showList :: [LinkOutSuggestion] -> ShowS # | |
| ToJSON LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: LinkOutSuggestion -> Value # toEncoding :: LinkOutSuggestion -> Encoding # toJSONList :: [LinkOutSuggestion] -> Value # toEncodingList :: [LinkOutSuggestion] -> Encoding # | |
| FromJSON LinkOutSuggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods 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.
Constructors
| Suggestion | |
Fields | |
Instances
| Eq Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |
| Show Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods showsPrec :: Int -> Suggestion -> ShowS # show :: Suggestion -> String # showList :: [Suggestion] -> ShowS # | |
| ToJSON Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google Methods toJSON :: Suggestion -> Value # toEncoding :: Suggestion -> Encoding # toJSONList :: [Suggestion] -> Value # toEncodingList :: [Suggestion] -> Encoding # | |
| FromJSON Suggestion Source # | |
Defined in Dialogflow.V2.Fulfillment.Payload.Google | |