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