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