{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DMS.Types.Certificate
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.Certificate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The SSL certificate that can be used to encrypt connections between the
-- endpoints and the replication instance.
--
-- /See:/ 'newCertificate' smart constructor.
data Certificate = Certificate'
  { -- | The owner of the certificate.
    Certificate -> Maybe Text
certificateOwner :: Prelude.Maybe Prelude.Text,
    -- | The signing algorithm for the certificate.
    Certificate -> Maybe Text
signingAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | The beginning date that the certificate is valid.
    Certificate -> Maybe POSIX
validFromDate :: Prelude.Maybe Core.POSIX,
    -- | The contents of a @.pem@ file, which contains an X.509 certificate.
    Certificate -> Maybe Text
certificatePem :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the certificate.
    Certificate -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The date that the certificate was created.
    Certificate -> Maybe POSIX
certificateCreationDate :: Prelude.Maybe Core.POSIX,
    -- | A customer-assigned name for the certificate. Identifiers must begin
    -- with a letter and must contain only ASCII letters, digits, and hyphens.
    -- They can\'t end with a hyphen or contain two consecutive hyphens.
    Certificate -> Maybe Text
certificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The location of an imported Oracle Wallet certificate for use with SSL.
    Certificate -> Maybe Base64
certificateWallet :: Prelude.Maybe Core.Base64,
    -- | The key length of the cryptographic algorithm being used.
    Certificate -> Maybe Int
keyLength :: Prelude.Maybe Prelude.Int,
    -- | The final date that the certificate is valid.
    Certificate -> Maybe POSIX
validToDate :: Prelude.Maybe Core.POSIX
  }
  deriving (Certificate -> Certificate -> Bool
(Certificate -> Certificate -> Bool)
-> (Certificate -> Certificate -> Bool) -> Eq Certificate
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]
(Int -> ReadS Certificate)
-> ReadS [Certificate]
-> ReadPrec Certificate
-> ReadPrec [Certificate]
-> Read 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
(Int -> Certificate -> ShowS)
-> (Certificate -> String)
-> ([Certificate] -> ShowS)
-> Show Certificate
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. Certificate -> Rep Certificate x)
-> (forall x. Rep Certificate x -> Certificate)
-> Generic Certificate
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)

-- |
-- Create a value of 'Certificate' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'certificateOwner', 'certificate_certificateOwner' - The owner of the certificate.
--
-- 'signingAlgorithm', 'certificate_signingAlgorithm' - The signing algorithm for the certificate.
--
-- 'validFromDate', 'certificate_validFromDate' - The beginning date that the certificate is valid.
--
-- 'certificatePem', 'certificate_certificatePem' - The contents of a @.pem@ file, which contains an X.509 certificate.
--
-- 'certificateArn', 'certificate_certificateArn' - The Amazon Resource Name (ARN) for the certificate.
--
-- 'certificateCreationDate', 'certificate_certificateCreationDate' - The date that the certificate was created.
--
-- 'certificateIdentifier', 'certificate_certificateIdentifier' - A customer-assigned name for the certificate. Identifiers must begin
-- with a letter and must contain only ASCII letters, digits, and hyphens.
-- They can\'t end with a hyphen or contain two consecutive hyphens.
--
-- 'certificateWallet', 'certificate_certificateWallet' - The location of an imported Oracle Wallet certificate for use with SSL.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
--
-- 'keyLength', 'certificate_keyLength' - The key length of the cryptographic algorithm being used.
--
-- 'validToDate', 'certificate_validToDate' - The final date that the certificate is valid.
newCertificate ::
  Certificate
newCertificate :: Certificate
newCertificate =
  Certificate' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Base64
-> Maybe Int
-> Maybe POSIX
-> Certificate
Certificate'
    { $sel:certificateOwner:Certificate' :: Maybe Text
certificateOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signingAlgorithm:Certificate' :: Maybe Text
signingAlgorithm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:validFromDate:Certificate' :: Maybe POSIX
validFromDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:certificatePem:Certificate' :: Maybe Text
certificatePem = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateArn:Certificate' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateCreationDate:Certificate' :: Maybe POSIX
certificateCreationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateIdentifier:Certificate' :: Maybe Text
certificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateWallet:Certificate' :: Maybe Base64
certificateWallet = Maybe Base64
forall a. Maybe a
Prelude.Nothing,
      $sel:keyLength:Certificate' :: Maybe Int
keyLength = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:validToDate:Certificate' :: Maybe POSIX
validToDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The owner of the certificate.
certificate_certificateOwner :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateOwner :: (Maybe Text -> f (Maybe Text)) -> Certificate -> f Certificate
certificate_certificateOwner = (Certificate -> Maybe Text)
-> (Certificate -> Maybe Text -> Certificate)
-> Lens Certificate Certificate (Maybe Text) (Maybe Text)
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)

-- | The signing algorithm for the certificate.
certificate_signingAlgorithm :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_signingAlgorithm :: (Maybe Text -> f (Maybe Text)) -> Certificate -> f Certificate
certificate_signingAlgorithm = (Certificate -> Maybe Text)
-> (Certificate -> Maybe Text -> Certificate)
-> Lens Certificate Certificate (Maybe Text) (Maybe Text)
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)

-- | The beginning date that the certificate is valid.
certificate_validFromDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_validFromDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate -> f Certificate
certificate_validFromDate = (Certificate -> Maybe POSIX)
-> (Certificate -> Maybe POSIX -> Certificate)
-> Lens Certificate Certificate (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Certificate -> f Certificate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate
-> f Certificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The contents of a @.pem@ file, which contains an X.509 certificate.
certificate_certificatePem :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificatePem :: (Maybe Text -> f (Maybe Text)) -> Certificate -> f Certificate
certificate_certificatePem = (Certificate -> Maybe Text)
-> (Certificate -> Maybe Text -> Certificate)
-> Lens Certificate Certificate (Maybe Text) (Maybe Text)
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)

-- | The Amazon Resource Name (ARN) for the certificate.
certificate_certificateArn :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateArn :: (Maybe Text -> f (Maybe Text)) -> Certificate -> f Certificate
certificate_certificateArn = (Certificate -> Maybe Text)
-> (Certificate -> Maybe Text -> Certificate)
-> Lens Certificate Certificate (Maybe Text) (Maybe Text)
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)

-- | The date that the certificate was created.
certificate_certificateCreationDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_certificateCreationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate -> f Certificate
certificate_certificateCreationDate = (Certificate -> Maybe POSIX)
-> (Certificate -> Maybe POSIX -> Certificate)
-> Lens Certificate Certificate (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Certificate -> f Certificate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate
-> f Certificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A customer-assigned name for the certificate. Identifiers must begin
-- with a letter and must contain only ASCII letters, digits, and hyphens.
-- They can\'t end with a hyphen or contain two consecutive hyphens.
certificate_certificateIdentifier :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_certificateIdentifier :: (Maybe Text -> f (Maybe Text)) -> Certificate -> f Certificate
certificate_certificateIdentifier = (Certificate -> Maybe Text)
-> (Certificate -> Maybe Text -> Certificate)
-> Lens Certificate Certificate (Maybe Text) (Maybe Text)
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)

-- | The location of an imported Oracle Wallet certificate for use with SSL.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
certificate_certificateWallet :: Lens.Lens' Certificate (Prelude.Maybe Prelude.ByteString)
certificate_certificateWallet :: (Maybe ByteString -> f (Maybe ByteString))
-> Certificate -> f Certificate
certificate_certificateWallet = (Certificate -> Maybe Base64)
-> (Certificate -> Maybe Base64 -> Certificate)
-> Lens Certificate Certificate (Maybe Base64) (Maybe Base64)
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) ((Maybe Base64 -> f (Maybe Base64))
 -> Certificate -> f Certificate)
-> ((Maybe ByteString -> f (Maybe ByteString))
    -> Maybe Base64 -> f (Maybe Base64))
-> (Maybe ByteString -> f (Maybe ByteString))
-> Certificate
-> f Certificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso Base64 Base64 ByteString ByteString
-> Iso
     (Maybe Base64) (Maybe Base64) (Maybe ByteString) (Maybe ByteString)
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 AnIso Base64 Base64 ByteString ByteString
Iso' Base64 ByteString
Core._Base64

-- | The key length of the cryptographic algorithm being used.
certificate_keyLength :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Int)
certificate_keyLength :: (Maybe Int -> f (Maybe Int)) -> Certificate -> f Certificate
certificate_keyLength = (Certificate -> Maybe Int)
-> (Certificate -> Maybe Int -> Certificate)
-> Lens Certificate Certificate (Maybe Int) (Maybe Int)
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)

-- | The final date that the certificate is valid.
certificate_validToDate :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_validToDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate -> f Certificate
certificate_validToDate = (Certificate -> Maybe POSIX)
-> (Certificate -> Maybe POSIX -> Certificate)
-> Lens Certificate Certificate (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Certificate -> f Certificate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Certificate
-> f Certificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON Certificate where
  parseJSON :: Value -> Parser Certificate
parseJSON =
    String
-> (Object -> Parser Certificate) -> Value -> Parser Certificate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Certificate"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Base64
-> Maybe Int
-> Maybe POSIX
-> Certificate
Certificate'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Base64
 -> Maybe Int
 -> Maybe POSIX
 -> Certificate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Base64
      -> Maybe Int
      -> Maybe POSIX
      -> Certificate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateOwner")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Base64
   -> Maybe Int
   -> Maybe POSIX
   -> Certificate)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Base64
      -> Maybe Int
      -> Maybe POSIX
      -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SigningAlgorithm")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Base64
   -> Maybe Int
   -> Maybe POSIX
   -> Certificate)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Base64
      -> Maybe Int
      -> Maybe POSIX
      -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ValidFromDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Base64
   -> Maybe Int
   -> Maybe POSIX
   -> Certificate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Base64
      -> Maybe Int
      -> Maybe POSIX
      -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificatePem")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Base64
   -> Maybe Int
   -> Maybe POSIX
   -> Certificate)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Base64
      -> Maybe Int
      -> Maybe POSIX
      -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateArn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Base64
   -> Maybe Int
   -> Maybe POSIX
   -> Certificate)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Base64 -> Maybe Int -> Maybe POSIX -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateCreationDate")
            Parser
  (Maybe Text
   -> Maybe Base64 -> Maybe Int -> Maybe POSIX -> Certificate)
-> Parser (Maybe Text)
-> Parser (Maybe Base64 -> Maybe Int -> Maybe POSIX -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateIdentifier")
            Parser (Maybe Base64 -> Maybe Int -> Maybe POSIX -> Certificate)
-> Parser (Maybe Base64)
-> Parser (Maybe Int -> Maybe POSIX -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Base64)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateWallet")
            Parser (Maybe Int -> Maybe POSIX -> Certificate)
-> Parser (Maybe Int) -> Parser (Maybe POSIX -> Certificate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeyLength")
            Parser (Maybe POSIX -> Certificate)
-> Parser (Maybe POSIX) -> Parser Certificate
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ValidToDate")
      )

instance Prelude.Hashable Certificate

instance Prelude.NFData Certificate