module TD.Query.GetBlockedMessageSenders
(GetBlockedMessageSenders(..)
, defaultGetBlockedMessageSenders
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.BlockList as BlockList
data GetBlockedMessageSenders
= GetBlockedMessageSenders
{ GetBlockedMessageSenders -> Maybe BlockList
block_list :: Maybe BlockList.BlockList
, GetBlockedMessageSenders -> Maybe Int
offset :: Maybe Int
, GetBlockedMessageSenders -> Maybe Int
limit :: Maybe Int
}
deriving (GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool
(GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool)
-> (GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool)
-> Eq GetBlockedMessageSenders
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool
== :: GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool
$c/= :: GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool
/= :: GetBlockedMessageSenders -> GetBlockedMessageSenders -> Bool
Eq, Int -> GetBlockedMessageSenders -> ShowS
[GetBlockedMessageSenders] -> ShowS
GetBlockedMessageSenders -> String
(Int -> GetBlockedMessageSenders -> ShowS)
-> (GetBlockedMessageSenders -> String)
-> ([GetBlockedMessageSenders] -> ShowS)
-> Show GetBlockedMessageSenders
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetBlockedMessageSenders -> ShowS
showsPrec :: Int -> GetBlockedMessageSenders -> ShowS
$cshow :: GetBlockedMessageSenders -> String
show :: GetBlockedMessageSenders -> String
$cshowList :: [GetBlockedMessageSenders] -> ShowS
showList :: [GetBlockedMessageSenders] -> ShowS
Show)
instance I.ShortShow GetBlockedMessageSenders where
shortShow :: GetBlockedMessageSenders -> String
shortShow
GetBlockedMessageSenders
{ block_list :: GetBlockedMessageSenders -> Maybe BlockList
block_list = Maybe BlockList
block_list_
, offset :: GetBlockedMessageSenders -> Maybe Int
offset = Maybe Int
offset_
, limit :: GetBlockedMessageSenders -> Maybe Int
limit = Maybe Int
limit_
}
= String
"GetBlockedMessageSenders"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"block_list" String -> Maybe BlockList -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe BlockList
block_list_
, String
"offset" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
offset_
, String
"limit" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
limit_
]
instance AT.ToJSON GetBlockedMessageSenders where
toJSON :: GetBlockedMessageSenders -> Value
toJSON
GetBlockedMessageSenders
{ block_list :: GetBlockedMessageSenders -> Maybe BlockList
block_list = Maybe BlockList
block_list_
, offset :: GetBlockedMessageSenders -> Maybe Int
offset = Maybe Int
offset_
, limit :: GetBlockedMessageSenders -> 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
"getBlockedMessageSenders"
, Key
"block_list" Key -> Maybe BlockList -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe BlockList
block_list_
, Key
"offset" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
offset_
, 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_
]
defaultGetBlockedMessageSenders :: GetBlockedMessageSenders
defaultGetBlockedMessageSenders :: GetBlockedMessageSenders
defaultGetBlockedMessageSenders =
GetBlockedMessageSenders
{ block_list :: Maybe BlockList
block_list = Maybe BlockList
forall a. Maybe a
Nothing
, offset :: Maybe Int
offset = Maybe Int
forall a. Maybe a
Nothing
, limit :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Nothing
}