module TD.Query.GetStatisticalGraph
(GetStatisticalGraph(..)
, defaultGetStatisticalGraph
) 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 GetStatisticalGraph
= GetStatisticalGraph
{ GetStatisticalGraph -> Maybe Int
chat_id :: Maybe Int
, GetStatisticalGraph -> Maybe Text
token :: Maybe T.Text
, GetStatisticalGraph -> Maybe Int
x :: Maybe Int
}
deriving (GetStatisticalGraph -> GetStatisticalGraph -> Bool
(GetStatisticalGraph -> GetStatisticalGraph -> Bool)
-> (GetStatisticalGraph -> GetStatisticalGraph -> Bool)
-> Eq GetStatisticalGraph
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetStatisticalGraph -> GetStatisticalGraph -> Bool
== :: GetStatisticalGraph -> GetStatisticalGraph -> Bool
$c/= :: GetStatisticalGraph -> GetStatisticalGraph -> Bool
/= :: GetStatisticalGraph -> GetStatisticalGraph -> Bool
Eq, Int -> GetStatisticalGraph -> ShowS
[GetStatisticalGraph] -> ShowS
GetStatisticalGraph -> String
(Int -> GetStatisticalGraph -> ShowS)
-> (GetStatisticalGraph -> String)
-> ([GetStatisticalGraph] -> ShowS)
-> Show GetStatisticalGraph
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetStatisticalGraph -> ShowS
showsPrec :: Int -> GetStatisticalGraph -> ShowS
$cshow :: GetStatisticalGraph -> String
show :: GetStatisticalGraph -> String
$cshowList :: [GetStatisticalGraph] -> ShowS
showList :: [GetStatisticalGraph] -> ShowS
Show)
instance I.ShortShow GetStatisticalGraph where
shortShow :: GetStatisticalGraph -> String
shortShow
GetStatisticalGraph
{ chat_id :: GetStatisticalGraph -> Maybe Int
chat_id = Maybe Int
chat_id_
, token :: GetStatisticalGraph -> Maybe Text
token = Maybe Text
token_
, x :: GetStatisticalGraph -> Maybe Int
x = Maybe Int
x_
}
= String
"GetStatisticalGraph"
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
"token" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
token_
, String
"x" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
x_
]
instance AT.ToJSON GetStatisticalGraph where
toJSON :: GetStatisticalGraph -> Value
toJSON
GetStatisticalGraph
{ chat_id :: GetStatisticalGraph -> Maybe Int
chat_id = Maybe Int
chat_id_
, token :: GetStatisticalGraph -> Maybe Text
token = Maybe Text
token_
, x :: GetStatisticalGraph -> Maybe Int
x = Maybe Int
x_
}
= [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
"getStatisticalGraph"
, 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
"token" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
token_
, Key
"x" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
x_
]
defaultGetStatisticalGraph :: GetStatisticalGraph
defaultGetStatisticalGraph :: GetStatisticalGraph
defaultGetStatisticalGraph =
GetStatisticalGraph
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, token :: Maybe Text
token = Maybe Text
forall a. Maybe a
Nothing
, x :: Maybe Int
x = Maybe Int
forall a. Maybe a
Nothing
}