module TD.Query.ReadAllChatPollVotes
(ReadAllChatPollVotes(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ReadAllChatPollVotes
= ReadAllChatPollVotes
{ ReadAllChatPollVotes -> Maybe Int
chat_id :: Maybe Int
}
deriving (ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool
(ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool)
-> (ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool)
-> Eq ReadAllChatPollVotes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool
== :: ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool
$c/= :: ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool
/= :: ReadAllChatPollVotes -> ReadAllChatPollVotes -> Bool
Eq, Int -> ReadAllChatPollVotes -> ShowS
[ReadAllChatPollVotes] -> ShowS
ReadAllChatPollVotes -> String
(Int -> ReadAllChatPollVotes -> ShowS)
-> (ReadAllChatPollVotes -> String)
-> ([ReadAllChatPollVotes] -> ShowS)
-> Show ReadAllChatPollVotes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadAllChatPollVotes -> ShowS
showsPrec :: Int -> ReadAllChatPollVotes -> ShowS
$cshow :: ReadAllChatPollVotes -> String
show :: ReadAllChatPollVotes -> String
$cshowList :: [ReadAllChatPollVotes] -> ShowS
showList :: [ReadAllChatPollVotes] -> ShowS
Show)
instance I.ShortShow ReadAllChatPollVotes where
shortShow :: ReadAllChatPollVotes -> String
shortShow
ReadAllChatPollVotes
{ chat_id :: ReadAllChatPollVotes -> Maybe Int
chat_id = Maybe Int
chat_id_
}
= String
"ReadAllChatPollVotes"
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_
]
instance AT.ToJSON ReadAllChatPollVotes where
toJSON :: ReadAllChatPollVotes -> Value
toJSON
ReadAllChatPollVotes
{ chat_id :: ReadAllChatPollVotes -> Maybe Int
chat_id = Maybe Int
chat_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
"readAllChatPollVotes"
, 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_
]