{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DMS.Types.Certificate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Certificate = Certificate'
{
Certificate -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
Certificate -> Maybe POSIX
certificateCreationDate :: Prelude.Maybe Data.POSIX,
Certificate -> Maybe Text
certificateIdentifier :: Prelude.Maybe Prelude.Text,
Certificate -> Maybe Text
certificateOwner :: Prelude.Maybe Prelude.Text,
Certificate -> Maybe Text
certificatePem :: Prelude.Maybe Prelude.Text,
Certificate -> Maybe Base64
certificateWallet :: Prelude.Maybe Data.Base64,
Certificate -> Maybe Int
keyLength :: Prelude.Maybe Prelude.Int,
Certificate -> Maybe Text
signingAlgorithm :: Prelude.Maybe Prelude.Text,
Certificate -> Maybe POSIX
validFromDate :: Prelude.Maybe Data.POSIX,
Certificate -> Maybe POSIX
validToDate :: Prelude.Maybe Data.POSIX
}
deriving (Certificate -> Certificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Certificate -> Certificate -> Bool
$c/= :: Certificate -> Certificate -> Bool
== :: Certificate -> Certificate -> Bool
$c== :: Certificate -> Certificate -> Bool
Prelude.Eq, ReadPrec [Certificate]
ReadPrec Certificate
Int -> ReadS Certificate
ReadS [Certificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Certificate]
$creadListPrec :: ReadPrec [Certificate]
readPrec :: ReadPrec Certificate
$creadPrec :: ReadPrec Certificate
readList :: ReadS [Certificate]
$creadList :: ReadS [Certificate]
readsPrec :: Int -> ReadS Certificate
$creadsPrec :: Int -> ReadS Certificate
Prelude.Read, Int -> Certificate -> ShowS
[Certificate] -> ShowS
Certificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Certificate] -> ShowS
$cshowList :: [Certificate] -> ShowS
show :: Certificate -> String
$cshow :: Certificate -> String
showsPrec :: Int -> Certificate -> ShowS
$cshowsPrec :: Int -> Certificate -> ShowS
Prelude.Show, forall x. Rep Certificate x -> Certificate
forall x. Certificate -> Rep Certificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Certificate x -> Certificate
$cfrom :: forall x. Certificate -> Rep Certificate x
Prelude.Generic)
newCertificate ::
Certificate
newCertificate :: Certificate
newCertificate =
Certificate'
{ $sel:certificateArn:Certificate' :: Maybe Text
certificateArn = forall a. Maybe a
Prelude.Nothing,
$sel:certificateCreationDate:Certificate' :: Maybe POSIX
certificateCreationDate = forall a. Maybe a
Prelude.Nothing,
$sel:certificateIdentifier:Certificate' :: Maybe Text
certificateIdentifier = forall a. Maybe a
Prelude.Nothing,
$sel:certificateOwner:Certificate' :: Maybe Text
certificateOwner = forall a. Maybe a
Prelude.Nothing,
$sel:certificatePem:Certificate' :: Maybe Text
certificatePem = forall a. Maybe a
Prelude.Nothing,
$sel:certificateWallet:Certificate' :: Maybe Base64
certificateWallet = forall a. Maybe a
Prelude.Nothing,
$sel:keyLength:Certificate' :: Maybe Int
keyLength = forall a. Maybe a
Prelude.Nothing,
$sel:signingAlgorithm:Certificate' :: Maybe Text
signingAlgorithm = forall a. Maybe a
Prelude.Nothing,
$sel:validFromDate:Certificate' :: Maybe POSIX
validFromDate = forall a. Maybe a
Prelude.Nothing,
$sel:validToDate:Certificate' :: Maybe POSIX
validToDate = forall a. Maybe a
Prelude.Nothing
}
certificate_certificateArn :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateArn :: Lens' Certificate (Maybe Text)
certificate_certificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:Certificate' :: Certificate -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:certificateArn:Certificate' :: Maybe Text
certificateArn = Maybe Text
a} :: Certificate)
certificate_certificateCreationDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_certificateCreationDate :: Lens' Certificate (Maybe UTCTime)
certificate_certificateCreationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
certificateCreationDate :: Maybe POSIX
$sel:certificateCreationDate:Certificate' :: Certificate -> Maybe POSIX
certificateCreationDate} -> Maybe POSIX
certificateCreationDate) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:certificateCreationDate:Certificate' :: Maybe POSIX
certificateCreationDate = Maybe POSIX
a} :: Certificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
certificate_certificateIdentifier :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateIdentifier :: Lens' Certificate (Maybe Text)
certificate_certificateIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
certificateIdentifier :: Maybe Text
$sel:certificateIdentifier:Certificate' :: Certificate -> Maybe Text
certificateIdentifier} -> Maybe Text
certificateIdentifier) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:certificateIdentifier:Certificate' :: Maybe Text
certificateIdentifier = Maybe Text
a} :: Certificate)
certificate_certificateOwner :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateOwner :: Lens' Certificate (Maybe Text)
certificate_certificateOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
certificateOwner :: Maybe Text
$sel:certificateOwner:Certificate' :: Certificate -> Maybe Text
certificateOwner} -> Maybe Text
certificateOwner) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:certificateOwner:Certificate' :: Maybe Text
certificateOwner = Maybe Text
a} :: Certificate)
certificate_certificatePem :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificatePem :: Lens' Certificate (Maybe Text)
certificate_certificatePem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
certificatePem :: Maybe Text
$sel:certificatePem:Certificate' :: Certificate -> Maybe Text
certificatePem} -> Maybe Text
certificatePem) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:certificatePem:Certificate' :: Maybe Text
certificatePem = Maybe Text
a} :: Certificate)
certificate_certificateWallet :: Lens.Lens' Certificate (Prelude.Maybe Prelude.ByteString)
certificate_certificateWallet :: Lens' Certificate (Maybe ByteString)
certificate_certificateWallet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Base64
certificateWallet :: Maybe Base64
$sel:certificateWallet:Certificate' :: Certificate -> Maybe Base64
certificateWallet} -> Maybe Base64
certificateWallet) (\s :: Certificate
s@Certificate' {} Maybe Base64
a -> Certificate
s {$sel:certificateWallet:Certificate' :: Maybe Base64
certificateWallet = Maybe Base64
a} :: Certificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping Iso' Base64 ByteString
Data._Base64
certificate_keyLength :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Int)
certificate_keyLength :: Lens' Certificate (Maybe Int)
certificate_keyLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Int
keyLength :: Maybe Int
$sel:keyLength:Certificate' :: Certificate -> Maybe Int
keyLength} -> Maybe Int
keyLength) (\s :: Certificate
s@Certificate' {} Maybe Int
a -> Certificate
s {$sel:keyLength:Certificate' :: Maybe Int
keyLength = Maybe Int
a} :: Certificate)
certificate_signingAlgorithm :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_signingAlgorithm :: Lens' Certificate (Maybe Text)
certificate_signingAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
signingAlgorithm :: Maybe Text
$sel:signingAlgorithm:Certificate' :: Certificate -> Maybe Text
signingAlgorithm} -> Maybe Text
signingAlgorithm) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:signingAlgorithm:Certificate' :: Maybe Text
signingAlgorithm = Maybe Text
a} :: Certificate)
certificate_validFromDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_validFromDate :: Lens' Certificate (Maybe UTCTime)
certificate_validFromDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
validFromDate :: Maybe POSIX
$sel:validFromDate:Certificate' :: Certificate -> Maybe POSIX
validFromDate} -> Maybe POSIX
validFromDate) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:validFromDate:Certificate' :: Maybe POSIX
validFromDate = Maybe POSIX
a} :: Certificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
certificate_validToDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_validToDate :: Lens' Certificate (Maybe UTCTime)
certificate_validToDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
validToDate :: Maybe POSIX
$sel:validToDate:Certificate' :: Certificate -> Maybe POSIX
validToDate} -> Maybe POSIX
validToDate) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:validToDate:Certificate' :: Maybe POSIX
validToDate = Maybe POSIX
a} :: Certificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON Certificate where
parseJSON :: Value -> Parser Certificate
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Certificate"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Base64
-> Maybe Int
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Certificate
Certificate'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateCreationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateOwner")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificatePem")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateWallet")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"KeyLength")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SigningAlgorithm")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ValidFromDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ValidToDate")
)
instance Prelude.Hashable Certificate where
hashWithSalt :: Int -> Certificate -> Int
hashWithSalt Int
_salt Certificate' {Maybe Int
Maybe Text
Maybe Base64
Maybe POSIX
validToDate :: Maybe POSIX
validFromDate :: Maybe POSIX
signingAlgorithm :: Maybe Text
keyLength :: Maybe Int
certificateWallet :: Maybe Base64
certificatePem :: Maybe Text
certificateOwner :: Maybe Text
certificateIdentifier :: Maybe Text
certificateCreationDate :: Maybe POSIX
certificateArn :: Maybe Text
$sel:validToDate:Certificate' :: Certificate -> Maybe POSIX
$sel:validFromDate:Certificate' :: Certificate -> Maybe POSIX
$sel:signingAlgorithm:Certificate' :: Certificate -> Maybe Text
$sel:keyLength:Certificate' :: Certificate -> Maybe Int
$sel:certificateWallet:Certificate' :: Certificate -> Maybe Base64
$sel:certificatePem:Certificate' :: Certificate -> Maybe Text
$sel:certificateOwner:Certificate' :: Certificate -> Maybe Text
$sel:certificateIdentifier:Certificate' :: Certificate -> Maybe Text
$sel:certificateCreationDate:Certificate' :: Certificate -> Maybe POSIX
$sel:certificateArn:Certificate' :: Certificate -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
certificateCreationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificatePem
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Base64
certificateWallet
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
keyLength
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
signingAlgorithm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
validFromDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
validToDate
instance Prelude.NFData Certificate where
rnf :: Certificate -> ()
rnf Certificate' {Maybe Int
Maybe Text
Maybe Base64
Maybe POSIX
validToDate :: Maybe POSIX
validFromDate :: Maybe POSIX
signingAlgorithm :: Maybe Text
keyLength :: Maybe Int
certificateWallet :: Maybe Base64
certificatePem :: Maybe Text
certificateOwner :: Maybe Text
certificateIdentifier :: Maybe Text
certificateCreationDate :: Maybe POSIX
certificateArn :: Maybe Text
$sel:validToDate:Certificate' :: Certificate -> Maybe POSIX
$sel:validFromDate:Certificate' :: Certificate -> Maybe POSIX
$sel:signingAlgorithm:Certificate' :: Certificate -> Maybe Text
$sel:keyLength:Certificate' :: Certificate -> Maybe Int
$sel:certificateWallet:Certificate' :: Certificate -> Maybe Base64
$sel:certificatePem:Certificate' :: Certificate -> Maybe Text
$sel:certificateOwner:Certificate' :: Certificate -> Maybe Text
$sel:certificateIdentifier:Certificate' :: Certificate -> Maybe Text
$sel:certificateCreationDate:Certificate' :: Certificate -> Maybe POSIX
$sel:certificateArn:Certificate' :: Certificate -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
certificateCreationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificatePem
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Base64
certificateWallet
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
keyLength
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
signingAlgorithm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
validFromDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
validToDate