module TD.Query.GetBotInfoShortDescription
(GetBotInfoShortDescription(..)
, defaultGetBotInfoShortDescription
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data GetBotInfoShortDescription
= GetBotInfoShortDescription
{ GetBotInfoShortDescription -> Maybe Int
bot_user_id :: Maybe Int
, GetBotInfoShortDescription -> Maybe Text
language_code :: Maybe T.Text
}
deriving (GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool
(GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool)
-> (GetBotInfoShortDescription
-> GetBotInfoShortDescription -> Bool)
-> Eq GetBotInfoShortDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool
== :: GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool
$c/= :: GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool
/= :: GetBotInfoShortDescription -> GetBotInfoShortDescription -> Bool
Eq, Int -> GetBotInfoShortDescription -> ShowS
[GetBotInfoShortDescription] -> ShowS
GetBotInfoShortDescription -> String
(Int -> GetBotInfoShortDescription -> ShowS)
-> (GetBotInfoShortDescription -> String)
-> ([GetBotInfoShortDescription] -> ShowS)
-> Show GetBotInfoShortDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetBotInfoShortDescription -> ShowS
showsPrec :: Int -> GetBotInfoShortDescription -> ShowS
$cshow :: GetBotInfoShortDescription -> String
show :: GetBotInfoShortDescription -> String
$cshowList :: [GetBotInfoShortDescription] -> ShowS
showList :: [GetBotInfoShortDescription] -> ShowS
Show)
instance I.ShortShow GetBotInfoShortDescription where
shortShow :: GetBotInfoShortDescription -> String
shortShow
GetBotInfoShortDescription
{ bot_user_id :: GetBotInfoShortDescription -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, language_code :: GetBotInfoShortDescription -> Maybe Text
language_code = Maybe Text
language_code_
}
= String
"GetBotInfoShortDescription"
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_
, String
"language_code" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_code_
]
instance AT.ToJSON GetBotInfoShortDescription where
toJSON :: GetBotInfoShortDescription -> Value
toJSON
GetBotInfoShortDescription
{ bot_user_id :: GetBotInfoShortDescription -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, language_code :: GetBotInfoShortDescription -> Maybe Text
language_code = Maybe Text
language_code_
}
= [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
"getBotInfoShortDescription"
, 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_
, Key
"language_code" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
language_code_
]
defaultGetBotInfoShortDescription :: GetBotInfoShortDescription
defaultGetBotInfoShortDescription :: GetBotInfoShortDescription
defaultGetBotInfoShortDescription =
GetBotInfoShortDescription
{ bot_user_id :: Maybe Int
bot_user_id = Maybe Int
forall a. Maybe a
Nothing
, language_code :: Maybe Text
language_code = Maybe Text
forall a. Maybe a
Nothing
}