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