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