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