{-# 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.IoT.Types.CertificateDescription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoT.Types.CertificateDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types.CertificateMode
import Amazonka.IoT.Types.CertificateStatus
import Amazonka.IoT.Types.CertificateValidity
import Amazonka.IoT.Types.TransferData
import qualified Amazonka.Prelude as Prelude

-- | Describes a certificate.
--
-- /See:/ 'newCertificateDescription' smart constructor.
data CertificateDescription = CertificateDescription'
  { -- | The certificate ID of the CA certificate used to sign this certificate.
    CertificateDescription -> Maybe Text
caCertificateId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the certificate.
    CertificateDescription -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the certificate.
    CertificateDescription -> Maybe Text
certificateId :: Prelude.Maybe Prelude.Text,
    -- | The mode of the certificate.
    --
    -- @DEFAULT@: A certificate in @DEFAULT@ mode is either generated by Amazon
    -- Web Services IoT Core or registered with an issuer certificate authority
    -- (CA) in @DEFAULT@ mode. Devices with certificates in @DEFAULT@ mode
    -- aren\'t required to send the Server Name Indication (SNI) extension when
    -- connecting to Amazon Web Services IoT Core. However, to use features
    -- such as custom domains and VPC endpoints, we recommend that you use the
    -- SNI extension when connecting to Amazon Web Services IoT Core.
    --
    -- @SNI_ONLY@: A certificate in @SNI_ONLY@ mode is registered without an
    -- issuer CA. Devices with certificates in @SNI_ONLY@ mode must send the
    -- SNI extension when connecting to Amazon Web Services IoT Core.
    --
    -- For more information about the value for SNI extension, see
    -- <https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html Transport security in IoT>.
    CertificateDescription -> Maybe CertificateMode
certificateMode :: Prelude.Maybe CertificateMode,
    -- | The certificate data, in PEM format.
    CertificateDescription -> Maybe Text
certificatePem :: Prelude.Maybe Prelude.Text,
    -- | The date and time the certificate was created.
    CertificateDescription -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
    -- | The customer version of the certificate.
    CertificateDescription -> Maybe Natural
customerVersion :: Prelude.Maybe Prelude.Natural,
    -- | The generation ID of the certificate.
    CertificateDescription -> Maybe Text
generationId :: Prelude.Maybe Prelude.Text,
    -- | The date and time the certificate was last modified.
    CertificateDescription -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
    -- | The ID of the Amazon Web Services account that owns the certificate.
    CertificateDescription -> Maybe Text
ownedBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Web Services account of the previous owner of the
    -- certificate.
    CertificateDescription -> Maybe Text
previousOwnedBy :: Prelude.Maybe Prelude.Text,
    -- | The status of the certificate.
    CertificateDescription -> Maybe CertificateStatus
status :: Prelude.Maybe CertificateStatus,
    -- | The transfer data.
    CertificateDescription -> Maybe TransferData
transferData :: Prelude.Maybe TransferData,
    -- | When the certificate is valid.
    CertificateDescription -> Maybe CertificateValidity
validity :: Prelude.Maybe CertificateValidity
  }
  deriving (CertificateDescription -> CertificateDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CertificateDescription -> CertificateDescription -> Bool
$c/= :: CertificateDescription -> CertificateDescription -> Bool
== :: CertificateDescription -> CertificateDescription -> Bool
$c== :: CertificateDescription -> CertificateDescription -> Bool
Prelude.Eq, ReadPrec [CertificateDescription]
ReadPrec CertificateDescription
Int -> ReadS CertificateDescription
ReadS [CertificateDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CertificateDescription]
$creadListPrec :: ReadPrec [CertificateDescription]
readPrec :: ReadPrec CertificateDescription
$creadPrec :: ReadPrec CertificateDescription
readList :: ReadS [CertificateDescription]
$creadList :: ReadS [CertificateDescription]
readsPrec :: Int -> ReadS CertificateDescription
$creadsPrec :: Int -> ReadS CertificateDescription
Prelude.Read, Int -> CertificateDescription -> ShowS
[CertificateDescription] -> ShowS
CertificateDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CertificateDescription] -> ShowS
$cshowList :: [CertificateDescription] -> ShowS
show :: CertificateDescription -> String
$cshow :: CertificateDescription -> String
showsPrec :: Int -> CertificateDescription -> ShowS
$cshowsPrec :: Int -> CertificateDescription -> ShowS
Prelude.Show, forall x. Rep CertificateDescription x -> CertificateDescription
forall x. CertificateDescription -> Rep CertificateDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CertificateDescription x -> CertificateDescription
$cfrom :: forall x. CertificateDescription -> Rep CertificateDescription x
Prelude.Generic)

-- |
-- Create a value of 'CertificateDescription' 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:
--
-- 'caCertificateId', 'certificateDescription_caCertificateId' - The certificate ID of the CA certificate used to sign this certificate.
--
-- 'certificateArn', 'certificateDescription_certificateArn' - The ARN of the certificate.
--
-- 'certificateId', 'certificateDescription_certificateId' - The ID of the certificate.
--
-- 'certificateMode', 'certificateDescription_certificateMode' - The mode of the certificate.
--
-- @DEFAULT@: A certificate in @DEFAULT@ mode is either generated by Amazon
-- Web Services IoT Core or registered with an issuer certificate authority
-- (CA) in @DEFAULT@ mode. Devices with certificates in @DEFAULT@ mode
-- aren\'t required to send the Server Name Indication (SNI) extension when
-- connecting to Amazon Web Services IoT Core. However, to use features
-- such as custom domains and VPC endpoints, we recommend that you use the
-- SNI extension when connecting to Amazon Web Services IoT Core.
--
-- @SNI_ONLY@: A certificate in @SNI_ONLY@ mode is registered without an
-- issuer CA. Devices with certificates in @SNI_ONLY@ mode must send the
-- SNI extension when connecting to Amazon Web Services IoT Core.
--
-- For more information about the value for SNI extension, see
-- <https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html Transport security in IoT>.
--
-- 'certificatePem', 'certificateDescription_certificatePem' - The certificate data, in PEM format.
--
-- 'creationDate', 'certificateDescription_creationDate' - The date and time the certificate was created.
--
-- 'customerVersion', 'certificateDescription_customerVersion' - The customer version of the certificate.
--
-- 'generationId', 'certificateDescription_generationId' - The generation ID of the certificate.
--
-- 'lastModifiedDate', 'certificateDescription_lastModifiedDate' - The date and time the certificate was last modified.
--
-- 'ownedBy', 'certificateDescription_ownedBy' - The ID of the Amazon Web Services account that owns the certificate.
--
-- 'previousOwnedBy', 'certificateDescription_previousOwnedBy' - The ID of the Amazon Web Services account of the previous owner of the
-- certificate.
--
-- 'status', 'certificateDescription_status' - The status of the certificate.
--
-- 'transferData', 'certificateDescription_transferData' - The transfer data.
--
-- 'validity', 'certificateDescription_validity' - When the certificate is valid.
newCertificateDescription ::
  CertificateDescription
newCertificateDescription :: CertificateDescription
newCertificateDescription =
  CertificateDescription'
    { $sel:caCertificateId:CertificateDescription' :: Maybe Text
caCertificateId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:certificateArn:CertificateDescription' :: Maybe Text
certificateArn = forall a. Maybe a
Prelude.Nothing,
      $sel:certificateId:CertificateDescription' :: Maybe Text
certificateId = forall a. Maybe a
Prelude.Nothing,
      $sel:certificateMode:CertificateDescription' :: Maybe CertificateMode
certificateMode = forall a. Maybe a
Prelude.Nothing,
      $sel:certificatePem:CertificateDescription' :: Maybe Text
certificatePem = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:CertificateDescription' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
      $sel:customerVersion:CertificateDescription' :: Maybe Natural
customerVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:generationId:CertificateDescription' :: Maybe Text
generationId = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:CertificateDescription' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:ownedBy:CertificateDescription' :: Maybe Text
ownedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:previousOwnedBy:CertificateDescription' :: Maybe Text
previousOwnedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CertificateDescription' :: Maybe CertificateStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:transferData:CertificateDescription' :: Maybe TransferData
transferData = forall a. Maybe a
Prelude.Nothing,
      $sel:validity:CertificateDescription' :: Maybe CertificateValidity
validity = forall a. Maybe a
Prelude.Nothing
    }

-- | The certificate ID of the CA certificate used to sign this certificate.
certificateDescription_caCertificateId :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_caCertificateId :: Lens' CertificateDescription (Maybe Text)
certificateDescription_caCertificateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
caCertificateId :: Maybe Text
$sel:caCertificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
caCertificateId} -> Maybe Text
caCertificateId) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:caCertificateId:CertificateDescription' :: Maybe Text
caCertificateId = Maybe Text
a} :: CertificateDescription)

-- | The ARN of the certificate.
certificateDescription_certificateArn :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_certificateArn :: Lens' CertificateDescription (Maybe Text)
certificateDescription_certificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:CertificateDescription' :: CertificateDescription -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:certificateArn:CertificateDescription' :: Maybe Text
certificateArn = Maybe Text
a} :: CertificateDescription)

-- | The ID of the certificate.
certificateDescription_certificateId :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_certificateId :: Lens' CertificateDescription (Maybe Text)
certificateDescription_certificateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
certificateId :: Maybe Text
$sel:certificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
certificateId} -> Maybe Text
certificateId) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:certificateId:CertificateDescription' :: Maybe Text
certificateId = Maybe Text
a} :: CertificateDescription)

-- | The mode of the certificate.
--
-- @DEFAULT@: A certificate in @DEFAULT@ mode is either generated by Amazon
-- Web Services IoT Core or registered with an issuer certificate authority
-- (CA) in @DEFAULT@ mode. Devices with certificates in @DEFAULT@ mode
-- aren\'t required to send the Server Name Indication (SNI) extension when
-- connecting to Amazon Web Services IoT Core. However, to use features
-- such as custom domains and VPC endpoints, we recommend that you use the
-- SNI extension when connecting to Amazon Web Services IoT Core.
--
-- @SNI_ONLY@: A certificate in @SNI_ONLY@ mode is registered without an
-- issuer CA. Devices with certificates in @SNI_ONLY@ mode must send the
-- SNI extension when connecting to Amazon Web Services IoT Core.
--
-- For more information about the value for SNI extension, see
-- <https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html Transport security in IoT>.
certificateDescription_certificateMode :: Lens.Lens' CertificateDescription (Prelude.Maybe CertificateMode)
certificateDescription_certificateMode :: Lens' CertificateDescription (Maybe CertificateMode)
certificateDescription_certificateMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe CertificateMode
certificateMode :: Maybe CertificateMode
$sel:certificateMode:CertificateDescription' :: CertificateDescription -> Maybe CertificateMode
certificateMode} -> Maybe CertificateMode
certificateMode) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe CertificateMode
a -> CertificateDescription
s {$sel:certificateMode:CertificateDescription' :: Maybe CertificateMode
certificateMode = Maybe CertificateMode
a} :: CertificateDescription)

-- | The certificate data, in PEM format.
certificateDescription_certificatePem :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_certificatePem :: Lens' CertificateDescription (Maybe Text)
certificateDescription_certificatePem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
certificatePem :: Maybe Text
$sel:certificatePem:CertificateDescription' :: CertificateDescription -> Maybe Text
certificatePem} -> Maybe Text
certificatePem) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:certificatePem:CertificateDescription' :: Maybe Text
certificatePem = Maybe Text
a} :: CertificateDescription)

-- | The date and time the certificate was created.
certificateDescription_creationDate :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.UTCTime)
certificateDescription_creationDate :: Lens' CertificateDescription (Maybe UTCTime)
certificateDescription_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe POSIX
a -> CertificateDescription
s {$sel:creationDate:CertificateDescription' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: CertificateDescription) 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

-- | The customer version of the certificate.
certificateDescription_customerVersion :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Natural)
certificateDescription_customerVersion :: Lens' CertificateDescription (Maybe Natural)
certificateDescription_customerVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Natural
customerVersion :: Maybe Natural
$sel:customerVersion:CertificateDescription' :: CertificateDescription -> Maybe Natural
customerVersion} -> Maybe Natural
customerVersion) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Natural
a -> CertificateDescription
s {$sel:customerVersion:CertificateDescription' :: Maybe Natural
customerVersion = Maybe Natural
a} :: CertificateDescription)

-- | The generation ID of the certificate.
certificateDescription_generationId :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_generationId :: Lens' CertificateDescription (Maybe Text)
certificateDescription_generationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
generationId :: Maybe Text
$sel:generationId:CertificateDescription' :: CertificateDescription -> Maybe Text
generationId} -> Maybe Text
generationId) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:generationId:CertificateDescription' :: Maybe Text
generationId = Maybe Text
a} :: CertificateDescription)

-- | The date and time the certificate was last modified.
certificateDescription_lastModifiedDate :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.UTCTime)
certificateDescription_lastModifiedDate :: Lens' CertificateDescription (Maybe UTCTime)
certificateDescription_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe POSIX
a -> CertificateDescription
s {$sel:lastModifiedDate:CertificateDescription' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: CertificateDescription) 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

-- | The ID of the Amazon Web Services account that owns the certificate.
certificateDescription_ownedBy :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_ownedBy :: Lens' CertificateDescription (Maybe Text)
certificateDescription_ownedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
ownedBy :: Maybe Text
$sel:ownedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
ownedBy} -> Maybe Text
ownedBy) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:ownedBy:CertificateDescription' :: Maybe Text
ownedBy = Maybe Text
a} :: CertificateDescription)

-- | The ID of the Amazon Web Services account of the previous owner of the
-- certificate.
certificateDescription_previousOwnedBy :: Lens.Lens' CertificateDescription (Prelude.Maybe Prelude.Text)
certificateDescription_previousOwnedBy :: Lens' CertificateDescription (Maybe Text)
certificateDescription_previousOwnedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe Text
previousOwnedBy :: Maybe Text
$sel:previousOwnedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
previousOwnedBy} -> Maybe Text
previousOwnedBy) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe Text
a -> CertificateDescription
s {$sel:previousOwnedBy:CertificateDescription' :: Maybe Text
previousOwnedBy = Maybe Text
a} :: CertificateDescription)

-- | The status of the certificate.
certificateDescription_status :: Lens.Lens' CertificateDescription (Prelude.Maybe CertificateStatus)
certificateDescription_status :: Lens' CertificateDescription (Maybe CertificateStatus)
certificateDescription_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe CertificateStatus
status :: Maybe CertificateStatus
$sel:status:CertificateDescription' :: CertificateDescription -> Maybe CertificateStatus
status} -> Maybe CertificateStatus
status) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe CertificateStatus
a -> CertificateDescription
s {$sel:status:CertificateDescription' :: Maybe CertificateStatus
status = Maybe CertificateStatus
a} :: CertificateDescription)

-- | The transfer data.
certificateDescription_transferData :: Lens.Lens' CertificateDescription (Prelude.Maybe TransferData)
certificateDescription_transferData :: Lens' CertificateDescription (Maybe TransferData)
certificateDescription_transferData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe TransferData
transferData :: Maybe TransferData
$sel:transferData:CertificateDescription' :: CertificateDescription -> Maybe TransferData
transferData} -> Maybe TransferData
transferData) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe TransferData
a -> CertificateDescription
s {$sel:transferData:CertificateDescription' :: Maybe TransferData
transferData = Maybe TransferData
a} :: CertificateDescription)

-- | When the certificate is valid.
certificateDescription_validity :: Lens.Lens' CertificateDescription (Prelude.Maybe CertificateValidity)
certificateDescription_validity :: Lens' CertificateDescription (Maybe CertificateValidity)
certificateDescription_validity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateDescription' {Maybe CertificateValidity
validity :: Maybe CertificateValidity
$sel:validity:CertificateDescription' :: CertificateDescription -> Maybe CertificateValidity
validity} -> Maybe CertificateValidity
validity) (\s :: CertificateDescription
s@CertificateDescription' {} Maybe CertificateValidity
a -> CertificateDescription
s {$sel:validity:CertificateDescription' :: Maybe CertificateValidity
validity = Maybe CertificateValidity
a} :: CertificateDescription)

instance Data.FromJSON CertificateDescription where
  parseJSON :: Value -> Parser CertificateDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"CertificateDescription"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CertificateMode
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe CertificateStatus
-> Maybe TransferData
-> Maybe CertificateValidity
-> CertificateDescription
CertificateDescription'
            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
"caCertificateId")
            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
"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
"certificateId")
            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
"certificateMode")
            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
"creationDate")
            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
"customerVersion")
            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
"generationId")
            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
"lastModifiedDate")
            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
"ownedBy")
            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
"previousOwnedBy")
            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
"status")
            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
"transferData")
            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
"validity")
      )

instance Prelude.Hashable CertificateDescription where
  hashWithSalt :: Int -> CertificateDescription -> Int
hashWithSalt Int
_salt CertificateDescription' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe CertificateMode
Maybe CertificateStatus
Maybe CertificateValidity
Maybe TransferData
validity :: Maybe CertificateValidity
transferData :: Maybe TransferData
status :: Maybe CertificateStatus
previousOwnedBy :: Maybe Text
ownedBy :: Maybe Text
lastModifiedDate :: Maybe POSIX
generationId :: Maybe Text
customerVersion :: Maybe Natural
creationDate :: Maybe POSIX
certificatePem :: Maybe Text
certificateMode :: Maybe CertificateMode
certificateId :: Maybe Text
certificateArn :: Maybe Text
caCertificateId :: Maybe Text
$sel:validity:CertificateDescription' :: CertificateDescription -> Maybe CertificateValidity
$sel:transferData:CertificateDescription' :: CertificateDescription -> Maybe TransferData
$sel:status:CertificateDescription' :: CertificateDescription -> Maybe CertificateStatus
$sel:previousOwnedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:ownedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:lastModifiedDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
$sel:generationId:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:customerVersion:CertificateDescription' :: CertificateDescription -> Maybe Natural
$sel:creationDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
$sel:certificatePem:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:certificateMode:CertificateDescription' :: CertificateDescription -> Maybe CertificateMode
$sel:certificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:certificateArn:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:caCertificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
caCertificateId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateMode
certificateMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificatePem
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
customerVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
generationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
previousOwnedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TransferData
transferData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateValidity
validity

instance Prelude.NFData CertificateDescription where
  rnf :: CertificateDescription -> ()
rnf CertificateDescription' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe CertificateMode
Maybe CertificateStatus
Maybe CertificateValidity
Maybe TransferData
validity :: Maybe CertificateValidity
transferData :: Maybe TransferData
status :: Maybe CertificateStatus
previousOwnedBy :: Maybe Text
ownedBy :: Maybe Text
lastModifiedDate :: Maybe POSIX
generationId :: Maybe Text
customerVersion :: Maybe Natural
creationDate :: Maybe POSIX
certificatePem :: Maybe Text
certificateMode :: Maybe CertificateMode
certificateId :: Maybe Text
certificateArn :: Maybe Text
caCertificateId :: Maybe Text
$sel:validity:CertificateDescription' :: CertificateDescription -> Maybe CertificateValidity
$sel:transferData:CertificateDescription' :: CertificateDescription -> Maybe TransferData
$sel:status:CertificateDescription' :: CertificateDescription -> Maybe CertificateStatus
$sel:previousOwnedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:ownedBy:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:lastModifiedDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
$sel:generationId:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:customerVersion:CertificateDescription' :: CertificateDescription -> Maybe Natural
$sel:creationDate:CertificateDescription' :: CertificateDescription -> Maybe POSIX
$sel:certificatePem:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:certificateMode:CertificateDescription' :: CertificateDescription -> Maybe CertificateMode
$sel:certificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:certificateArn:CertificateDescription' :: CertificateDescription -> Maybe Text
$sel:caCertificateId:CertificateDescription' :: CertificateDescription -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
caCertificateId
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
certificateId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateMode
certificateMode
      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 POSIX
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
customerVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
generationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
previousOwnedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TransferData
transferData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateValidity
validity