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