module TD.Query.BlockMessageSenderFromReplies
(BlockMessageSenderFromReplies(..)
, defaultBlockMessageSenderFromReplies
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data BlockMessageSenderFromReplies
= BlockMessageSenderFromReplies
{ BlockMessageSenderFromReplies -> Maybe Int
message_id :: Maybe Int
, BlockMessageSenderFromReplies -> Maybe Bool
delete_message :: Maybe Bool
, BlockMessageSenderFromReplies -> Maybe Bool
delete_all_messages :: Maybe Bool
, BlockMessageSenderFromReplies -> Maybe Bool
report_spam :: Maybe Bool
}
deriving (BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool
(BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool)
-> (BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool)
-> Eq BlockMessageSenderFromReplies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool
== :: BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool
$c/= :: BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool
/= :: BlockMessageSenderFromReplies
-> BlockMessageSenderFromReplies -> Bool
Eq, Int -> BlockMessageSenderFromReplies -> ShowS
[BlockMessageSenderFromReplies] -> ShowS
BlockMessageSenderFromReplies -> String
(Int -> BlockMessageSenderFromReplies -> ShowS)
-> (BlockMessageSenderFromReplies -> String)
-> ([BlockMessageSenderFromReplies] -> ShowS)
-> Show BlockMessageSenderFromReplies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BlockMessageSenderFromReplies -> ShowS
showsPrec :: Int -> BlockMessageSenderFromReplies -> ShowS
$cshow :: BlockMessageSenderFromReplies -> String
show :: BlockMessageSenderFromReplies -> String
$cshowList :: [BlockMessageSenderFromReplies] -> ShowS
showList :: [BlockMessageSenderFromReplies] -> ShowS
Show)
instance I.ShortShow BlockMessageSenderFromReplies where
shortShow :: BlockMessageSenderFromReplies -> String
shortShow
BlockMessageSenderFromReplies
{ message_id :: BlockMessageSenderFromReplies -> Maybe Int
message_id = Maybe Int
message_id_
, delete_message :: BlockMessageSenderFromReplies -> Maybe Bool
delete_message = Maybe Bool
delete_message_
, delete_all_messages :: BlockMessageSenderFromReplies -> Maybe Bool
delete_all_messages = Maybe Bool
delete_all_messages_
, report_spam :: BlockMessageSenderFromReplies -> Maybe Bool
report_spam = Maybe Bool
report_spam_
}
= String
"BlockMessageSenderFromReplies"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
, String
"delete_message" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
delete_message_
, String
"delete_all_messages" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
delete_all_messages_
, String
"report_spam" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
report_spam_
]
instance AT.ToJSON BlockMessageSenderFromReplies where
toJSON :: BlockMessageSenderFromReplies -> Value
toJSON
BlockMessageSenderFromReplies
{ message_id :: BlockMessageSenderFromReplies -> Maybe Int
message_id = Maybe Int
message_id_
, delete_message :: BlockMessageSenderFromReplies -> Maybe Bool
delete_message = Maybe Bool
delete_message_
, delete_all_messages :: BlockMessageSenderFromReplies -> Maybe Bool
delete_all_messages = Maybe Bool
delete_all_messages_
, report_spam :: BlockMessageSenderFromReplies -> Maybe Bool
report_spam = Maybe Bool
report_spam_
}
= [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
"blockMessageSenderFromReplies"
, Key
"message_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
message_id_
, Key
"delete_message" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
delete_message_
, Key
"delete_all_messages" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
delete_all_messages_
, Key
"report_spam" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
report_spam_
]
defaultBlockMessageSenderFromReplies :: BlockMessageSenderFromReplies
defaultBlockMessageSenderFromReplies :: BlockMessageSenderFromReplies
defaultBlockMessageSenderFromReplies =
BlockMessageSenderFromReplies
{ message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
, delete_message :: Maybe Bool
delete_message = Maybe Bool
forall a. Maybe a
Nothing
, delete_all_messages :: Maybe Bool
delete_all_messages = Maybe Bool
forall a. Maybe a
Nothing
, report_spam :: Maybe Bool
report_spam = Maybe Bool
forall a. Maybe a
Nothing
}