module TD.Query.GetMessageAvailableReactions
(GetMessageAvailableReactions(..)
, defaultGetMessageAvailableReactions
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data GetMessageAvailableReactions
= GetMessageAvailableReactions
{ GetMessageAvailableReactions -> Maybe Int
chat_id :: Maybe Int
, GetMessageAvailableReactions -> Maybe Int
message_id :: Maybe Int
, GetMessageAvailableReactions -> Maybe Int
row_size :: Maybe Int
}
deriving (GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool
(GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool)
-> (GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool)
-> Eq GetMessageAvailableReactions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool
== :: GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool
$c/= :: GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool
/= :: GetMessageAvailableReactions
-> GetMessageAvailableReactions -> Bool
Eq, Int -> GetMessageAvailableReactions -> ShowS
[GetMessageAvailableReactions] -> ShowS
GetMessageAvailableReactions -> String
(Int -> GetMessageAvailableReactions -> ShowS)
-> (GetMessageAvailableReactions -> String)
-> ([GetMessageAvailableReactions] -> ShowS)
-> Show GetMessageAvailableReactions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetMessageAvailableReactions -> ShowS
showsPrec :: Int -> GetMessageAvailableReactions -> ShowS
$cshow :: GetMessageAvailableReactions -> String
show :: GetMessageAvailableReactions -> String
$cshowList :: [GetMessageAvailableReactions] -> ShowS
showList :: [GetMessageAvailableReactions] -> ShowS
Show)
instance I.ShortShow GetMessageAvailableReactions where
shortShow :: GetMessageAvailableReactions -> String
shortShow
GetMessageAvailableReactions
{ chat_id :: GetMessageAvailableReactions -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: GetMessageAvailableReactions -> Maybe Int
message_id = Maybe Int
message_id_
, row_size :: GetMessageAvailableReactions -> Maybe Int
row_size = Maybe Int
row_size_
}
= String
"GetMessageAvailableReactions"
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_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
, String
"row_size" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
row_size_
]
instance AT.ToJSON GetMessageAvailableReactions where
toJSON :: GetMessageAvailableReactions -> Value
toJSON
GetMessageAvailableReactions
{ chat_id :: GetMessageAvailableReactions -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: GetMessageAvailableReactions -> Maybe Int
message_id = Maybe Int
message_id_
, row_size :: GetMessageAvailableReactions -> Maybe Int
row_size = Maybe Int
row_size_
}
= [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
"getMessageAvailableReactions"
, 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_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
"row_size" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
row_size_
]
defaultGetMessageAvailableReactions :: GetMessageAvailableReactions
defaultGetMessageAvailableReactions :: GetMessageAvailableReactions
defaultGetMessageAvailableReactions =
GetMessageAvailableReactions
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
, row_size :: Maybe Int
row_size = Maybe Int
forall a. Maybe a
Nothing
}