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