module TD.Query.GetEmojiReaction
(GetEmojiReaction(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data GetEmojiReaction
= GetEmojiReaction
{ GetEmojiReaction -> Maybe Text
emoji :: Maybe T.Text
}
deriving (GetEmojiReaction -> GetEmojiReaction -> Bool
(GetEmojiReaction -> GetEmojiReaction -> Bool)
-> (GetEmojiReaction -> GetEmojiReaction -> Bool)
-> Eq GetEmojiReaction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetEmojiReaction -> GetEmojiReaction -> Bool
== :: GetEmojiReaction -> GetEmojiReaction -> Bool
$c/= :: GetEmojiReaction -> GetEmojiReaction -> Bool
/= :: GetEmojiReaction -> GetEmojiReaction -> Bool
Eq, Int -> GetEmojiReaction -> ShowS
[GetEmojiReaction] -> ShowS
GetEmojiReaction -> String
(Int -> GetEmojiReaction -> ShowS)
-> (GetEmojiReaction -> String)
-> ([GetEmojiReaction] -> ShowS)
-> Show GetEmojiReaction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetEmojiReaction -> ShowS
showsPrec :: Int -> GetEmojiReaction -> ShowS
$cshow :: GetEmojiReaction -> String
show :: GetEmojiReaction -> String
$cshowList :: [GetEmojiReaction] -> ShowS
showList :: [GetEmojiReaction] -> ShowS
Show)
instance I.ShortShow GetEmojiReaction where
shortShow :: GetEmojiReaction -> String
shortShow
GetEmojiReaction
{ emoji :: GetEmojiReaction -> Maybe Text
emoji = Maybe Text
emoji_
}
= String
"GetEmojiReaction"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"emoji" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
emoji_
]
instance AT.ToJSON GetEmojiReaction where
toJSON :: GetEmojiReaction -> Value
toJSON
GetEmojiReaction
{ emoji :: GetEmojiReaction -> Maybe Text
emoji = Maybe Text
emoji_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"getEmojiReaction"
, Key
"emoji" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
emoji_
]