{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatJoinRequest where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import Data.Time.Clock.POSIX (POSIXTime)
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.Common
import Telegram.Bot.API.Types.Chat
import Telegram.Bot.API.Types.ChatInviteLink
import Telegram.Bot.API.Types.User
import Telegram.Bot.API.Internal.Utils
data ChatJoinRequest = ChatJoinRequest
{ ChatJoinRequest -> Chat
chatJoinRequestChat :: Chat
, ChatJoinRequest -> User
chatJoinRequestFrom :: User
, ChatJoinRequest -> ChatId
chatJoinRequestUserChatId :: ChatId
, ChatJoinRequest -> POSIXTime
chatJoinRequestDate :: POSIXTime
, ChatJoinRequest -> Maybe Text
chatJoinRequestBio :: Maybe Text
, ChatJoinRequest -> Maybe ChatInviteLink
chatJoinRequestInviteLink :: Maybe ChatInviteLink
}
deriving (forall x. Rep ChatJoinRequest x -> ChatJoinRequest
forall x. ChatJoinRequest -> Rep ChatJoinRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatJoinRequest x -> ChatJoinRequest
$cfrom :: forall x. ChatJoinRequest -> Rep ChatJoinRequest x
Generic, Int -> ChatJoinRequest -> ShowS
[ChatJoinRequest] -> ShowS
ChatJoinRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatJoinRequest] -> ShowS
$cshowList :: [ChatJoinRequest] -> ShowS
show :: ChatJoinRequest -> String
$cshow :: ChatJoinRequest -> String
showsPrec :: Int -> ChatJoinRequest -> ShowS
$cshowsPrec :: Int -> ChatJoinRequest -> ShowS
Show)
instance ToJSON ChatJoinRequest where toJSON :: ChatJoinRequest -> 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 ChatJoinRequest where parseJSON :: Value -> Parser ChatJoinRequest
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON