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