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