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