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