{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.WebAppData where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
data WebAppData = WebAppData
{ WebAppData -> Text
webAppDataData :: Text
, WebAppData -> Text
webAppDataButtonText :: Text
}
deriving (forall x. Rep WebAppData x -> WebAppData
forall x. WebAppData -> Rep WebAppData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WebAppData x -> WebAppData
$cfrom :: forall x. WebAppData -> Rep WebAppData x
Generic, Int -> WebAppData -> ShowS
[WebAppData] -> ShowS
WebAppData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebAppData] -> ShowS
$cshowList :: [WebAppData] -> ShowS
show :: WebAppData -> String
$cshow :: WebAppData -> String
showsPrec :: Int -> WebAppData -> ShowS
$cshowsPrec :: Int -> WebAppData -> ShowS
Show)
instance ToJSON WebAppData where toJSON :: WebAppData -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON WebAppData where parseJSON :: Value -> Parser WebAppData
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON