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