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