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