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