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