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