module TD.Query.ClickAnimatedEmojiMessage
(ClickAnimatedEmojiMessage(..)
, defaultClickAnimatedEmojiMessage
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ClickAnimatedEmojiMessage
= ClickAnimatedEmojiMessage
{ ClickAnimatedEmojiMessage -> Maybe Int
chat_id :: Maybe Int
, ClickAnimatedEmojiMessage -> Maybe Int
message_id :: Maybe Int
}
deriving (ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool
(ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool)
-> (ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool)
-> Eq ClickAnimatedEmojiMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool
== :: ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool
$c/= :: ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool
/= :: ClickAnimatedEmojiMessage -> ClickAnimatedEmojiMessage -> Bool
Eq, Int -> ClickAnimatedEmojiMessage -> ShowS
[ClickAnimatedEmojiMessage] -> ShowS
ClickAnimatedEmojiMessage -> String
(Int -> ClickAnimatedEmojiMessage -> ShowS)
-> (ClickAnimatedEmojiMessage -> String)
-> ([ClickAnimatedEmojiMessage] -> ShowS)
-> Show ClickAnimatedEmojiMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClickAnimatedEmojiMessage -> ShowS
showsPrec :: Int -> ClickAnimatedEmojiMessage -> ShowS
$cshow :: ClickAnimatedEmojiMessage -> String
show :: ClickAnimatedEmojiMessage -> String
$cshowList :: [ClickAnimatedEmojiMessage] -> ShowS
showList :: [ClickAnimatedEmojiMessage] -> ShowS
Show)
instance I.ShortShow ClickAnimatedEmojiMessage where
shortShow :: ClickAnimatedEmojiMessage -> String
shortShow
ClickAnimatedEmojiMessage
{ chat_id :: ClickAnimatedEmojiMessage -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: ClickAnimatedEmojiMessage -> Maybe Int
message_id = Maybe Int
message_id_
}
= String
"ClickAnimatedEmojiMessage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
]
instance AT.ToJSON ClickAnimatedEmojiMessage where
toJSON :: ClickAnimatedEmojiMessage -> Value
toJSON
ClickAnimatedEmojiMessage
{ chat_id :: ClickAnimatedEmojiMessage -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: ClickAnimatedEmojiMessage -> Maybe Int
message_id = Maybe Int
message_id_
}
= [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
"clickAnimatedEmojiMessage"
, Key
"chat_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
chat_id_
, Key
"message_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
message_id_
]
defaultClickAnimatedEmojiMessage :: ClickAnimatedEmojiMessage
defaultClickAnimatedEmojiMessage :: ClickAnimatedEmojiMessage
defaultClickAnimatedEmojiMessage =
ClickAnimatedEmojiMessage
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
}