{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatInviteLink 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.User
import Telegram.Bot.API.Internal.Utils
data ChatInviteLink = ChatInviteLink
{ ChatInviteLink -> Text
chatInviteLinkInviteLink :: Text
, ChatInviteLink -> User
chatInviteLinkCreator :: User
, ChatInviteLink -> Bool
chatInviteLinkCreatesJoinRequest :: Bool
, ChatInviteLink -> Bool
chatInviteLinkIsPrimary :: Bool
, ChatInviteLink -> Bool
chatInviteLinkIsRevoked :: Bool
, ChatInviteLink -> Maybe Text
chatInviteLinkName :: Maybe Text
, ChatInviteLink -> Maybe POSIXTime
chatInviteLinkExpireDate :: Maybe POSIXTime
, ChatInviteLink -> Maybe Int
chatInviteLinkMemberLimit :: Maybe Int
, ChatInviteLink -> Maybe Int
chatInviteLinkPendingJoinRequestCount :: Maybe Int
}
deriving (forall x. Rep ChatInviteLink x -> ChatInviteLink
forall x. ChatInviteLink -> Rep ChatInviteLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatInviteLink x -> ChatInviteLink
$cfrom :: forall x. ChatInviteLink -> Rep ChatInviteLink x
Generic, Int -> ChatInviteLink -> ShowS
[ChatInviteLink] -> ShowS
ChatInviteLink -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatInviteLink] -> ShowS
$cshowList :: [ChatInviteLink] -> ShowS
show :: ChatInviteLink -> String
$cshow :: ChatInviteLink -> String
showsPrec :: Int -> ChatInviteLink -> ShowS
$cshowsPrec :: Int -> ChatInviteLink -> ShowS
Show)
instance ToJSON ChatInviteLink where toJSON :: ChatInviteLink -> 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 ChatInviteLink where parseJSON :: Value -> Parser ChatInviteLink
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON