module TD.Query.UnpinAllMessageThreadMessages
(UnpinAllMessageThreadMessages(..)
, defaultUnpinAllMessageThreadMessages
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data UnpinAllMessageThreadMessages
= UnpinAllMessageThreadMessages
{ UnpinAllMessageThreadMessages -> Maybe Int
chat_id :: Maybe Int
, UnpinAllMessageThreadMessages -> Maybe Int
message_thread_id :: Maybe Int
}
deriving (UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool
(UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool)
-> (UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool)
-> Eq UnpinAllMessageThreadMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool
== :: UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool
$c/= :: UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool
/= :: UnpinAllMessageThreadMessages
-> UnpinAllMessageThreadMessages -> Bool
Eq, Int -> UnpinAllMessageThreadMessages -> ShowS
[UnpinAllMessageThreadMessages] -> ShowS
UnpinAllMessageThreadMessages -> String
(Int -> UnpinAllMessageThreadMessages -> ShowS)
-> (UnpinAllMessageThreadMessages -> String)
-> ([UnpinAllMessageThreadMessages] -> ShowS)
-> Show UnpinAllMessageThreadMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UnpinAllMessageThreadMessages -> ShowS
showsPrec :: Int -> UnpinAllMessageThreadMessages -> ShowS
$cshow :: UnpinAllMessageThreadMessages -> String
show :: UnpinAllMessageThreadMessages -> String
$cshowList :: [UnpinAllMessageThreadMessages] -> ShowS
showList :: [UnpinAllMessageThreadMessages] -> ShowS
Show)
instance I.ShortShow UnpinAllMessageThreadMessages where
shortShow :: UnpinAllMessageThreadMessages -> String
shortShow
UnpinAllMessageThreadMessages
{ chat_id :: UnpinAllMessageThreadMessages -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_thread_id :: UnpinAllMessageThreadMessages -> Maybe Int
message_thread_id = Maybe Int
message_thread_id_
}
= String
"UnpinAllMessageThreadMessages"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"message_thread_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_thread_id_
]
instance AT.ToJSON UnpinAllMessageThreadMessages where
toJSON :: UnpinAllMessageThreadMessages -> Value
toJSON
UnpinAllMessageThreadMessages
{ chat_id :: UnpinAllMessageThreadMessages -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_thread_id :: UnpinAllMessageThreadMessages -> Maybe Int
message_thread_id = Maybe Int
message_thread_id_
}
= [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
"unpinAllMessageThreadMessages"
, Key
"chat_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
chat_id_
, Key
"message_thread_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_thread_id_
]
defaultUnpinAllMessageThreadMessages :: UnpinAllMessageThreadMessages
defaultUnpinAllMessageThreadMessages :: UnpinAllMessageThreadMessages
defaultUnpinAllMessageThreadMessages =
UnpinAllMessageThreadMessages
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_thread_id :: Maybe Int
message_thread_id = Maybe Int
forall a. Maybe a
Nothing
}