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