{-# 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.
KeyboardButtonRequestChat -> Rep KeyboardButtonRequestChat x)
-> (forall x.
Rep KeyboardButtonRequestChat x -> KeyboardButtonRequestChat)
-> Generic KeyboardButtonRequestChat
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
$cfrom :: forall x.
KeyboardButtonRequestChat -> Rep KeyboardButtonRequestChat x
from :: forall x.
KeyboardButtonRequestChat -> Rep KeyboardButtonRequestChat x
$cto :: forall x.
Rep KeyboardButtonRequestChat x -> KeyboardButtonRequestChat
to :: forall x.
Rep KeyboardButtonRequestChat x -> KeyboardButtonRequestChat
Generic, Int -> KeyboardButtonRequestChat -> ShowS
[KeyboardButtonRequestChat] -> ShowS
KeyboardButtonRequestChat -> String
(Int -> KeyboardButtonRequestChat -> ShowS)
-> (KeyboardButtonRequestChat -> String)
-> ([KeyboardButtonRequestChat] -> ShowS)
-> Show KeyboardButtonRequestChat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyboardButtonRequestChat -> ShowS
showsPrec :: Int -> KeyboardButtonRequestChat -> ShowS
$cshow :: KeyboardButtonRequestChat -> String
show :: KeyboardButtonRequestChat -> String
$cshowList :: [KeyboardButtonRequestChat] -> ShowS
showList :: [KeyboardButtonRequestChat] -> ShowS
Show)
instance ToJSON KeyboardButtonRequestChat where toJSON :: KeyboardButtonRequestChat -> Value
toJSON = KeyboardButtonRequestChat -> Value
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 = Value -> Parser KeyboardButtonRequestChat
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON