{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.PassportData where
import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.EncryptedCredentials
import Telegram.Bot.API.Types.EncryptedPassportElement
import Telegram.Bot.API.Internal.Utils
data PassportData = PassportData
{ PassportData -> [EncryptedPassportElement]
passportDataData :: [EncryptedPassportElement]
, PassportData -> EncryptedCredentials
passportDataCredentials :: EncryptedCredentials
}
deriving ((forall x. PassportData -> Rep PassportData x)
-> (forall x. Rep PassportData x -> PassportData)
-> Generic PassportData
forall x. Rep PassportData x -> PassportData
forall x. PassportData -> Rep PassportData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PassportData -> Rep PassportData x
from :: forall x. PassportData -> Rep PassportData x
$cto :: forall x. Rep PassportData x -> PassportData
to :: forall x. Rep PassportData x -> PassportData
Generic, Int -> PassportData -> ShowS
[PassportData] -> ShowS
PassportData -> String
(Int -> PassportData -> ShowS)
-> (PassportData -> String)
-> ([PassportData] -> ShowS)
-> Show PassportData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PassportData -> ShowS
showsPrec :: Int -> PassportData -> ShowS
$cshow :: PassportData -> String
show :: PassportData -> String
$cshowList :: [PassportData] -> ShowS
showList :: [PassportData] -> ShowS
Show)
instance ToJSON PassportData where toJSON :: PassportData -> Value
toJSON = PassportData -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON PassportData where parseJSON :: Value -> Parser PassportData
parseJSON = Value -> Parser PassportData
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON