{-# 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.SecurityHub.Types.AwsCertificateManagerCertificateRenewalSummary
-- 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.SecurityHub.Types.AwsCertificateManagerCertificateRenewalSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsCertificateManagerCertificateDomainValidationOption

-- | Contains information about the Certificate Manager managed renewal for
-- an @AMAZON_ISSUED@ certificate.
--
-- /See:/ 'newAwsCertificateManagerCertificateRenewalSummary' smart constructor.
data AwsCertificateManagerCertificateRenewalSummary = AwsCertificateManagerCertificateRenewalSummary'
  { -- | The status of the Certificate Manager managed renewal of the
    -- certificate.
    --
    -- Valid values: @PENDING_AUTO_RENEWAL@ | @PENDING_VALIDATION@ | @SUCCESS@
    -- | @FAILED@
    AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
renewalStatus :: Prelude.Maybe Prelude.Text,
    -- | Indicates when the renewal summary was last updated.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
updatedAt :: Prelude.Maybe Prelude.Text,
    -- | Information about the validation of each domain name in the certificate,
    -- as it pertains to Certificate Manager managed renewal. Provided only
    -- when the certificate type is @AMAZON_ISSUED@.
    AwsCertificateManagerCertificateRenewalSummary
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions :: Prelude.Maybe [AwsCertificateManagerCertificateDomainValidationOption],
    -- | The reason that a renewal request was unsuccessful.
    --
    -- Valid values: @NO_AVAILABLE_CONTACTS@ |
    -- @ADDITIONAL_VERIFICATION_REQUIRED@ | @DOMAIN_NOT_ALLOWED@ |
    -- @INVALID_PUBLIC_DOMAIN@ | @DOMAIN_VALIDATION_DENIED@ | @CAA_ERROR@ |
    -- @PCA_LIMIT_EXCEEDED@ | @PCA_INVALID_ARN@ | @PCA_INVALID_STATE@ |
    -- @PCA_REQUEST_FAILED@ | @PCA_NAME_CONSTRAINTS_VALIDATION@ |
    -- @PCA_RESOURCE_NOT_FOUND@ | @PCA_INVALID_ARGS@ | @PCA_INVALID_DURATION@ |
    -- @PCA_ACCESS_DENIED@ | @SLR_NOT_FOUND@ | @OTHER@
    AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
renewalStatusReason :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsCertificateManagerCertificateRenewalSummary
-> AwsCertificateManagerCertificateRenewalSummary -> Bool
(AwsCertificateManagerCertificateRenewalSummary
 -> AwsCertificateManagerCertificateRenewalSummary -> Bool)
-> (AwsCertificateManagerCertificateRenewalSummary
    -> AwsCertificateManagerCertificateRenewalSummary -> Bool)
-> Eq AwsCertificateManagerCertificateRenewalSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCertificateManagerCertificateRenewalSummary
-> AwsCertificateManagerCertificateRenewalSummary -> Bool
$c/= :: AwsCertificateManagerCertificateRenewalSummary
-> AwsCertificateManagerCertificateRenewalSummary -> Bool
== :: AwsCertificateManagerCertificateRenewalSummary
-> AwsCertificateManagerCertificateRenewalSummary -> Bool
$c== :: AwsCertificateManagerCertificateRenewalSummary
-> AwsCertificateManagerCertificateRenewalSummary -> Bool
Prelude.Eq, ReadPrec [AwsCertificateManagerCertificateRenewalSummary]
ReadPrec AwsCertificateManagerCertificateRenewalSummary
Int -> ReadS AwsCertificateManagerCertificateRenewalSummary
ReadS [AwsCertificateManagerCertificateRenewalSummary]
(Int -> ReadS AwsCertificateManagerCertificateRenewalSummary)
-> ReadS [AwsCertificateManagerCertificateRenewalSummary]
-> ReadPrec AwsCertificateManagerCertificateRenewalSummary
-> ReadPrec [AwsCertificateManagerCertificateRenewalSummary]
-> Read AwsCertificateManagerCertificateRenewalSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCertificateManagerCertificateRenewalSummary]
$creadListPrec :: ReadPrec [AwsCertificateManagerCertificateRenewalSummary]
readPrec :: ReadPrec AwsCertificateManagerCertificateRenewalSummary
$creadPrec :: ReadPrec AwsCertificateManagerCertificateRenewalSummary
readList :: ReadS [AwsCertificateManagerCertificateRenewalSummary]
$creadList :: ReadS [AwsCertificateManagerCertificateRenewalSummary]
readsPrec :: Int -> ReadS AwsCertificateManagerCertificateRenewalSummary
$creadsPrec :: Int -> ReadS AwsCertificateManagerCertificateRenewalSummary
Prelude.Read, Int -> AwsCertificateManagerCertificateRenewalSummary -> ShowS
[AwsCertificateManagerCertificateRenewalSummary] -> ShowS
AwsCertificateManagerCertificateRenewalSummary -> String
(Int -> AwsCertificateManagerCertificateRenewalSummary -> ShowS)
-> (AwsCertificateManagerCertificateRenewalSummary -> String)
-> ([AwsCertificateManagerCertificateRenewalSummary] -> ShowS)
-> Show AwsCertificateManagerCertificateRenewalSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCertificateManagerCertificateRenewalSummary] -> ShowS
$cshowList :: [AwsCertificateManagerCertificateRenewalSummary] -> ShowS
show :: AwsCertificateManagerCertificateRenewalSummary -> String
$cshow :: AwsCertificateManagerCertificateRenewalSummary -> String
showsPrec :: Int -> AwsCertificateManagerCertificateRenewalSummary -> ShowS
$cshowsPrec :: Int -> AwsCertificateManagerCertificateRenewalSummary -> ShowS
Prelude.Show, (forall x.
 AwsCertificateManagerCertificateRenewalSummary
 -> Rep AwsCertificateManagerCertificateRenewalSummary x)
-> (forall x.
    Rep AwsCertificateManagerCertificateRenewalSummary x
    -> AwsCertificateManagerCertificateRenewalSummary)
-> Generic AwsCertificateManagerCertificateRenewalSummary
forall x.
Rep AwsCertificateManagerCertificateRenewalSummary x
-> AwsCertificateManagerCertificateRenewalSummary
forall x.
AwsCertificateManagerCertificateRenewalSummary
-> Rep AwsCertificateManagerCertificateRenewalSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCertificateManagerCertificateRenewalSummary x
-> AwsCertificateManagerCertificateRenewalSummary
$cfrom :: forall x.
AwsCertificateManagerCertificateRenewalSummary
-> Rep AwsCertificateManagerCertificateRenewalSummary x
Prelude.Generic)

-- |
-- Create a value of 'AwsCertificateManagerCertificateRenewalSummary' 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:
--
-- 'renewalStatus', 'awsCertificateManagerCertificateRenewalSummary_renewalStatus' - The status of the Certificate Manager managed renewal of the
-- certificate.
--
-- Valid values: @PENDING_AUTO_RENEWAL@ | @PENDING_VALIDATION@ | @SUCCESS@
-- | @FAILED@
--
-- 'updatedAt', 'awsCertificateManagerCertificateRenewalSummary_updatedAt' - Indicates when the renewal summary was last updated.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
--
-- 'domainValidationOptions', 'awsCertificateManagerCertificateRenewalSummary_domainValidationOptions' - Information about the validation of each domain name in the certificate,
-- as it pertains to Certificate Manager managed renewal. Provided only
-- when the certificate type is @AMAZON_ISSUED@.
--
-- 'renewalStatusReason', 'awsCertificateManagerCertificateRenewalSummary_renewalStatusReason' - The reason that a renewal request was unsuccessful.
--
-- Valid values: @NO_AVAILABLE_CONTACTS@ |
-- @ADDITIONAL_VERIFICATION_REQUIRED@ | @DOMAIN_NOT_ALLOWED@ |
-- @INVALID_PUBLIC_DOMAIN@ | @DOMAIN_VALIDATION_DENIED@ | @CAA_ERROR@ |
-- @PCA_LIMIT_EXCEEDED@ | @PCA_INVALID_ARN@ | @PCA_INVALID_STATE@ |
-- @PCA_REQUEST_FAILED@ | @PCA_NAME_CONSTRAINTS_VALIDATION@ |
-- @PCA_RESOURCE_NOT_FOUND@ | @PCA_INVALID_ARGS@ | @PCA_INVALID_DURATION@ |
-- @PCA_ACCESS_DENIED@ | @SLR_NOT_FOUND@ | @OTHER@
newAwsCertificateManagerCertificateRenewalSummary ::
  AwsCertificateManagerCertificateRenewalSummary
newAwsCertificateManagerCertificateRenewalSummary :: AwsCertificateManagerCertificateRenewalSummary
newAwsCertificateManagerCertificateRenewalSummary =
  AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
-> Maybe Text
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
-> Maybe Text
-> AwsCertificateManagerCertificateRenewalSummary
AwsCertificateManagerCertificateRenewalSummary'
    { $sel:renewalStatus:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
renewalStatus =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
updatedAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainValidationOptions:AwsCertificateManagerCertificateRenewalSummary' :: Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions =
        Maybe [AwsCertificateManagerCertificateDomainValidationOption]
forall a. Maybe a
Prelude.Nothing,
      $sel:renewalStatusReason:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
renewalStatusReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the Certificate Manager managed renewal of the
-- certificate.
--
-- Valid values: @PENDING_AUTO_RENEWAL@ | @PENDING_VALIDATION@ | @SUCCESS@
-- | @FAILED@
awsCertificateManagerCertificateRenewalSummary_renewalStatus :: Lens.Lens' AwsCertificateManagerCertificateRenewalSummary (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateRenewalSummary_renewalStatus :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateRenewalSummary
-> f AwsCertificateManagerCertificateRenewalSummary
awsCertificateManagerCertificateRenewalSummary_renewalStatus = (AwsCertificateManagerCertificateRenewalSummary -> Maybe Text)
-> (AwsCertificateManagerCertificateRenewalSummary
    -> Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
-> Lens
     AwsCertificateManagerCertificateRenewalSummary
     AwsCertificateManagerCertificateRenewalSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateRenewalSummary' {Maybe Text
renewalStatus :: Maybe Text
$sel:renewalStatus:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
renewalStatus} -> Maybe Text
renewalStatus) (\s :: AwsCertificateManagerCertificateRenewalSummary
s@AwsCertificateManagerCertificateRenewalSummary' {} Maybe Text
a -> AwsCertificateManagerCertificateRenewalSummary
s {$sel:renewalStatus:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
renewalStatus = Maybe Text
a} :: AwsCertificateManagerCertificateRenewalSummary)

-- | Indicates when the renewal summary was last updated.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsCertificateManagerCertificateRenewalSummary_updatedAt :: Lens.Lens' AwsCertificateManagerCertificateRenewalSummary (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateRenewalSummary_updatedAt :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateRenewalSummary
-> f AwsCertificateManagerCertificateRenewalSummary
awsCertificateManagerCertificateRenewalSummary_updatedAt = (AwsCertificateManagerCertificateRenewalSummary -> Maybe Text)
-> (AwsCertificateManagerCertificateRenewalSummary
    -> Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
-> Lens
     AwsCertificateManagerCertificateRenewalSummary
     AwsCertificateManagerCertificateRenewalSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateRenewalSummary' {Maybe Text
updatedAt :: Maybe Text
$sel:updatedAt:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
updatedAt} -> Maybe Text
updatedAt) (\s :: AwsCertificateManagerCertificateRenewalSummary
s@AwsCertificateManagerCertificateRenewalSummary' {} Maybe Text
a -> AwsCertificateManagerCertificateRenewalSummary
s {$sel:updatedAt:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
updatedAt = Maybe Text
a} :: AwsCertificateManagerCertificateRenewalSummary)

-- | Information about the validation of each domain name in the certificate,
-- as it pertains to Certificate Manager managed renewal. Provided only
-- when the certificate type is @AMAZON_ISSUED@.
awsCertificateManagerCertificateRenewalSummary_domainValidationOptions :: Lens.Lens' AwsCertificateManagerCertificateRenewalSummary (Prelude.Maybe [AwsCertificateManagerCertificateDomainValidationOption])
awsCertificateManagerCertificateRenewalSummary_domainValidationOptions :: (Maybe [AwsCertificateManagerCertificateDomainValidationOption]
 -> f (Maybe
         [AwsCertificateManagerCertificateDomainValidationOption]))
-> AwsCertificateManagerCertificateRenewalSummary
-> f AwsCertificateManagerCertificateRenewalSummary
awsCertificateManagerCertificateRenewalSummary_domainValidationOptions = (AwsCertificateManagerCertificateRenewalSummary
 -> Maybe [AwsCertificateManagerCertificateDomainValidationOption])
-> (AwsCertificateManagerCertificateRenewalSummary
    -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
    -> AwsCertificateManagerCertificateRenewalSummary)
-> Lens
     AwsCertificateManagerCertificateRenewalSummary
     AwsCertificateManagerCertificateRenewalSummary
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateRenewalSummary' {Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions :: Maybe [AwsCertificateManagerCertificateDomainValidationOption]
$sel:domainValidationOptions:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions} -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions) (\s :: AwsCertificateManagerCertificateRenewalSummary
s@AwsCertificateManagerCertificateRenewalSummary' {} Maybe [AwsCertificateManagerCertificateDomainValidationOption]
a -> AwsCertificateManagerCertificateRenewalSummary
s {$sel:domainValidationOptions:AwsCertificateManagerCertificateRenewalSummary' :: Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions = Maybe [AwsCertificateManagerCertificateDomainValidationOption]
a} :: AwsCertificateManagerCertificateRenewalSummary) ((Maybe [AwsCertificateManagerCertificateDomainValidationOption]
  -> f (Maybe
          [AwsCertificateManagerCertificateDomainValidationOption]))
 -> AwsCertificateManagerCertificateRenewalSummary
 -> f AwsCertificateManagerCertificateRenewalSummary)
-> ((Maybe [AwsCertificateManagerCertificateDomainValidationOption]
     -> f (Maybe
             [AwsCertificateManagerCertificateDomainValidationOption]))
    -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
    -> f (Maybe
            [AwsCertificateManagerCertificateDomainValidationOption]))
-> (Maybe [AwsCertificateManagerCertificateDomainValidationOption]
    -> f (Maybe
            [AwsCertificateManagerCertificateDomainValidationOption]))
-> AwsCertificateManagerCertificateRenewalSummary
-> f AwsCertificateManagerCertificateRenewalSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
-> Iso
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
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
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
  [AwsCertificateManagerCertificateDomainValidationOption]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The reason that a renewal request was unsuccessful.
--
-- Valid values: @NO_AVAILABLE_CONTACTS@ |
-- @ADDITIONAL_VERIFICATION_REQUIRED@ | @DOMAIN_NOT_ALLOWED@ |
-- @INVALID_PUBLIC_DOMAIN@ | @DOMAIN_VALIDATION_DENIED@ | @CAA_ERROR@ |
-- @PCA_LIMIT_EXCEEDED@ | @PCA_INVALID_ARN@ | @PCA_INVALID_STATE@ |
-- @PCA_REQUEST_FAILED@ | @PCA_NAME_CONSTRAINTS_VALIDATION@ |
-- @PCA_RESOURCE_NOT_FOUND@ | @PCA_INVALID_ARGS@ | @PCA_INVALID_DURATION@ |
-- @PCA_ACCESS_DENIED@ | @SLR_NOT_FOUND@ | @OTHER@
awsCertificateManagerCertificateRenewalSummary_renewalStatusReason :: Lens.Lens' AwsCertificateManagerCertificateRenewalSummary (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateRenewalSummary_renewalStatusReason :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateRenewalSummary
-> f AwsCertificateManagerCertificateRenewalSummary
awsCertificateManagerCertificateRenewalSummary_renewalStatusReason = (AwsCertificateManagerCertificateRenewalSummary -> Maybe Text)
-> (AwsCertificateManagerCertificateRenewalSummary
    -> Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
-> Lens
     AwsCertificateManagerCertificateRenewalSummary
     AwsCertificateManagerCertificateRenewalSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateRenewalSummary' {Maybe Text
renewalStatusReason :: Maybe Text
$sel:renewalStatusReason:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
renewalStatusReason} -> Maybe Text
renewalStatusReason) (\s :: AwsCertificateManagerCertificateRenewalSummary
s@AwsCertificateManagerCertificateRenewalSummary' {} Maybe Text
a -> AwsCertificateManagerCertificateRenewalSummary
s {$sel:renewalStatusReason:AwsCertificateManagerCertificateRenewalSummary' :: Maybe Text
renewalStatusReason = Maybe Text
a} :: AwsCertificateManagerCertificateRenewalSummary)

instance
  Core.FromJSON
    AwsCertificateManagerCertificateRenewalSummary
  where
  parseJSON :: Value -> Parser AwsCertificateManagerCertificateRenewalSummary
parseJSON =
    String
-> (Object
    -> Parser AwsCertificateManagerCertificateRenewalSummary)
-> Value
-> Parser AwsCertificateManagerCertificateRenewalSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsCertificateManagerCertificateRenewalSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
-> Maybe Text
-> AwsCertificateManagerCertificateRenewalSummary
AwsCertificateManagerCertificateRenewalSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
 -> Maybe Text
 -> AwsCertificateManagerCertificateRenewalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
      -> Maybe Text
      -> AwsCertificateManagerCertificateRenewalSummary)
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
"RenewalStatus")
              Parser
  (Maybe Text
   -> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
   -> Maybe Text
   -> AwsCertificateManagerCertificateRenewalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption]
      -> Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
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
"UpdatedAt")
              Parser
  (Maybe [AwsCertificateManagerCertificateDomainValidationOption]
   -> Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
-> Parser
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
-> Parser
     (Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser
     (Maybe
        (Maybe [AwsCertificateManagerCertificateDomainValidationOption]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainValidationOptions"
                              Parser
  (Maybe
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption]))
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
-> Parser
     (Maybe [AwsCertificateManagerCertificateDomainValidationOption])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsCertificateManagerCertificateDomainValidationOption]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe Text -> AwsCertificateManagerCertificateRenewalSummary)
-> Parser (Maybe Text)
-> Parser AwsCertificateManagerCertificateRenewalSummary
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
"RenewalStatusReason")
      )

instance
  Prelude.Hashable
    AwsCertificateManagerCertificateRenewalSummary

instance
  Prelude.NFData
    AwsCertificateManagerCertificateRenewalSummary

instance
  Core.ToJSON
    AwsCertificateManagerCertificateRenewalSummary
  where
  toJSON :: AwsCertificateManagerCertificateRenewalSummary -> Value
toJSON
    AwsCertificateManagerCertificateRenewalSummary' {Maybe [AwsCertificateManagerCertificateDomainValidationOption]
Maybe Text
renewalStatusReason :: Maybe Text
domainValidationOptions :: Maybe [AwsCertificateManagerCertificateDomainValidationOption]
updatedAt :: Maybe Text
renewalStatus :: Maybe Text
$sel:renewalStatusReason:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
$sel:domainValidationOptions:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
$sel:updatedAt:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
$sel:renewalStatus:AwsCertificateManagerCertificateRenewalSummary' :: AwsCertificateManagerCertificateRenewalSummary -> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"RenewalStatus" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
renewalStatus,
              (Text
"UpdatedAt" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
updatedAt,
              (Text
"DomainValidationOptions" Text
-> [AwsCertificateManagerCertificateDomainValidationOption] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                ([AwsCertificateManagerCertificateDomainValidationOption] -> Pair)
-> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsCertificateManagerCertificateDomainValidationOption]
domainValidationOptions,
              (Text
"RenewalStatusReason" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
renewalStatusReason
            ]
        )