module TD.Query.GetUserFullInfo
(GetUserFullInfo(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data GetUserFullInfo
= GetUserFullInfo
{ GetUserFullInfo -> Maybe Int
user_id :: Maybe Int
}
deriving (GetUserFullInfo -> GetUserFullInfo -> Bool
(GetUserFullInfo -> GetUserFullInfo -> Bool)
-> (GetUserFullInfo -> GetUserFullInfo -> Bool)
-> Eq GetUserFullInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetUserFullInfo -> GetUserFullInfo -> Bool
== :: GetUserFullInfo -> GetUserFullInfo -> Bool
$c/= :: GetUserFullInfo -> GetUserFullInfo -> Bool
/= :: GetUserFullInfo -> GetUserFullInfo -> Bool
Eq, Int -> GetUserFullInfo -> ShowS
[GetUserFullInfo] -> ShowS
GetUserFullInfo -> String
(Int -> GetUserFullInfo -> ShowS)
-> (GetUserFullInfo -> String)
-> ([GetUserFullInfo] -> ShowS)
-> Show GetUserFullInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetUserFullInfo -> ShowS
showsPrec :: Int -> GetUserFullInfo -> ShowS
$cshow :: GetUserFullInfo -> String
show :: GetUserFullInfo -> String
$cshowList :: [GetUserFullInfo] -> ShowS
showList :: [GetUserFullInfo] -> ShowS
Show)
instance I.ShortShow GetUserFullInfo where
shortShow :: GetUserFullInfo -> String
shortShow
GetUserFullInfo
{ user_id :: GetUserFullInfo -> Maybe Int
user_id = Maybe Int
user_id_
}
= String
"GetUserFullInfo"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"user_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
user_id_
]
instance AT.ToJSON GetUserFullInfo where
toJSON :: GetUserFullInfo -> Value
toJSON
GetUserFullInfo
{ user_id :: GetUserFullInfo -> Maybe Int
user_id = Maybe Int
user_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
"getUserFullInfo"
, Key
"user_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
user_id_
]