{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.KeyboardButtonRequestChat where
import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.ChatAdministratorRights
import Telegram.Bot.API.Types.Common
import Telegram.Bot.API.Internal.Utils
data KeyboardButtonRequestChat = KeyboardButtonRequestChat
{ KeyboardButtonRequestChat -> RequestId
keyboardButtonRequestChatRequestId :: RequestId
, KeyboardButtonRequestChat -> Bool
keyboardButtonRequestChatChatIsChannel :: Bool
, KeyboardButtonRequestChat -> Maybe Bool
keyboardButtonRequestChatChatIsForum :: Maybe Bool
, KeyboardButtonRequestChat -> Maybe Bool
keyboardButtonRequestChatChatHasUsername :: Maybe Bool
, KeyboardButtonRequestChat -> Maybe Bool
keyboardButtonRequestChatChatIsCreated :: Maybe Bool
, KeyboardButtonRequestChat -> Maybe ChatAdministratorRights
keyboardButtonRequestChatUserAdministratorRights :: Maybe ChatAdministratorRights
, KeyboardButtonRequestChat -> Maybe ChatAdministratorRights
keyboardButtonRequestChatBotAdministratorRights :: Maybe ChatAdministratorRights
, KeyboardButtonRequestChat -> Maybe Bool
keyboardButtonRequestChatBotIsMember :: Maybe Bool
}
deriving (forall x.
Rep KeyboardButtonRequestChat x -> KeyboardButtonRequestChat
forall x.
KeyboardButtonRequestChat -> Rep KeyboardButtonRequestChat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KeyboardButtonRequestChat x -> KeyboardButtonRequestChat
$cfrom :: forall x.
KeyboardButtonRequestChat -> Rep KeyboardButtonRequestChat x
Generic, Int -> KeyboardButtonRequestChat -> ShowS
[KeyboardButtonRequestChat] -> ShowS
KeyboardButtonRequestChat -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KeyboardButtonRequestChat] -> ShowS
$cshowList :: [KeyboardButtonRequestChat] -> ShowS
show :: KeyboardButtonRequestChat -> String
$cshow :: KeyboardButtonRequestChat -> String
showsPrec :: Int -> KeyboardButtonRequestChat -> ShowS
$cshowsPrec :: Int -> KeyboardButtonRequestChat -> ShowS
Show)
instance ToJSON KeyboardButtonRequestChat where toJSON :: KeyboardButtonRequestChat -> 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 KeyboardButtonRequestChat where parseJSON :: Value -> Parser KeyboardButtonRequestChat
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON