{-# 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.Route53.Types.KeySigningKey
-- 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.Route53.Types.KeySigningKey where

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

-- | A key-signing key (KSK) is a complex type that represents a
-- public\/private key pair. The private key is used to generate a digital
-- signature for the zone signing key (ZSK). The public key is stored in
-- the DNS and is used to authenticate the ZSK. A KSK is always associated
-- with a hosted zone; it cannot exist by itself.
--
-- /See:/ 'newKeySigningKey' smart constructor.
data KeySigningKey = KeySigningKey'
  { -- | A string that represents the current key-signing key (KSK) status.
    --
    -- Status can have one of the following values:
    --
    -- [ACTIVE]
    --     The KSK is being used for signing.
    --
    -- [INACTIVE]
    --     The KSK is not being used for signing.
    --
    -- [DELETING]
    --     The KSK is in the process of being deleted.
    --
    -- [ACTION_NEEDED]
    --     There is a problem with the KSK that requires you to take action to
    --     resolve. For example, the customer managed customer master key (CMK)
    --     might have been deleted, or the permissions for the customer managed
    --     CMK might have been changed.
    --
    -- [INTERNAL_FAILURE]
    --     There was an error during a request. Before you can continue to work
    --     with DNSSEC signing, including actions that involve this KSK, you
    --     must correct the problem. For example, you may need to activate or
    --     deactivate the KSK.
    KeySigningKey -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | A string used to represent the signing algorithm. This value must follow
    -- the guidelines provided by
    -- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
    KeySigningKey -> Maybe Text
signingAlgorithmMnemonic :: Prelude.Maybe Prelude.Text,
    -- | A string used to represent the delegation signer digest algorithm. This
    -- value must follow the guidelines provided by
    -- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
    KeySigningKey -> Maybe Text
digestAlgorithmMnemonic :: Prelude.Maybe Prelude.Text,
    -- | The last time that the key-signing key (KSK) was changed.
    KeySigningKey -> Maybe ISO8601
lastModifiedDate :: Prelude.Maybe Core.ISO8601,
    -- | An integer used to identify the DNSSEC record for the domain name. The
    -- process used to calculate the value is described in
    -- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Appendix B>.
    KeySigningKey -> Maybe Natural
keyTag :: Prelude.Maybe Prelude.Natural,
    -- | A string that represents a DNSKEY record.
    KeySigningKey -> Maybe Text
dNSKEYRecord :: Prelude.Maybe Prelude.Text,
    -- | The public key, represented as a Base64 encoding, as required by
    -- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Page 5>.
    KeySigningKey -> Maybe Text
publicKey :: Prelude.Maybe Prelude.Text,
    -- | An integer used to represent the signing algorithm. This value must
    -- follow the guidelines provided by
    -- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
    KeySigningKey -> Maybe Int
signingAlgorithmType :: Prelude.Maybe Prelude.Int,
    -- | The date when the key-signing key (KSK) was created.
    KeySigningKey -> Maybe ISO8601
createdDate :: Prelude.Maybe Core.ISO8601,
    -- | An integer that specifies how the key is used. For key-signing key
    -- (KSK), this value is always 257.
    KeySigningKey -> Maybe Int
flag :: Prelude.Maybe Prelude.Int,
    -- | An integer used to represent the delegation signer digest algorithm.
    -- This value must follow the guidelines provided by
    -- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
    KeySigningKey -> Maybe Int
digestAlgorithmType :: Prelude.Maybe Prelude.Int,
    -- | The status message provided for the following key-signing key (KSK)
    -- statuses: @ACTION_NEEDED@ or @INTERNAL_FAILURE@. The status message
    -- includes information about what the problem might be and steps that you
    -- can take to correct the issue.
    KeySigningKey -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | A string used to identify a key-signing key (KSK). @Name@ can include
    -- numbers, letters, and underscores (_). @Name@ must be unique for each
    -- key-signing key in the same hosted zone.
    KeySigningKey -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A string that represents a delegation signer (DS) record.
    KeySigningKey -> Maybe Text
dSRecord :: Prelude.Maybe Prelude.Text,
    -- | The Amazon resource name (ARN) used to identify the customer managed
    -- customer master key (CMK) in Key Management Service (KMS). The @KmsArn@
    -- must be unique for each key-signing key (KSK) in a single hosted zone.
    --
    -- You must configure the CMK as follows:
    --
    -- [Status]
    --     Enabled
    --
    -- [Key spec]
    --     ECC_NIST_P256
    --
    -- [Key usage]
    --     Sign and verify
    --
    -- [Key policy]
    --     The key policy must give permission for the following actions:
    --
    --     -   DescribeKey
    --
    --     -   GetPublicKey
    --
    --     -   Sign
    --
    --     The key policy must also include the Amazon Route 53 service in the
    --     principal for your account. Specify the following:
    --
    --     -   @\"Service\": \"dnssec-route53.amazonaws.com\"@
    --
    -- For more information about working with the customer managed CMK in KMS,
    -- see
    -- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html Key Management Service concepts>.
    KeySigningKey -> Maybe Text
kmsArn :: Prelude.Maybe Prelude.Text,
    -- | A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records
    -- are used to publish the public key that resolvers can use to verify
    -- DNSSEC signatures that are used to secure certain kinds of information
    -- provided by the DNS system.
    KeySigningKey -> Maybe Text
digestValue :: Prelude.Maybe Prelude.Text
  }
  deriving (KeySigningKey -> KeySigningKey -> Bool
(KeySigningKey -> KeySigningKey -> Bool)
-> (KeySigningKey -> KeySigningKey -> Bool) -> Eq KeySigningKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KeySigningKey -> KeySigningKey -> Bool
$c/= :: KeySigningKey -> KeySigningKey -> Bool
== :: KeySigningKey -> KeySigningKey -> Bool
$c== :: KeySigningKey -> KeySigningKey -> Bool
Prelude.Eq, ReadPrec [KeySigningKey]
ReadPrec KeySigningKey
Int -> ReadS KeySigningKey
ReadS [KeySigningKey]
(Int -> ReadS KeySigningKey)
-> ReadS [KeySigningKey]
-> ReadPrec KeySigningKey
-> ReadPrec [KeySigningKey]
-> Read KeySigningKey
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KeySigningKey]
$creadListPrec :: ReadPrec [KeySigningKey]
readPrec :: ReadPrec KeySigningKey
$creadPrec :: ReadPrec KeySigningKey
readList :: ReadS [KeySigningKey]
$creadList :: ReadS [KeySigningKey]
readsPrec :: Int -> ReadS KeySigningKey
$creadsPrec :: Int -> ReadS KeySigningKey
Prelude.Read, Int -> KeySigningKey -> ShowS
[KeySigningKey] -> ShowS
KeySigningKey -> String
(Int -> KeySigningKey -> ShowS)
-> (KeySigningKey -> String)
-> ([KeySigningKey] -> ShowS)
-> Show KeySigningKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KeySigningKey] -> ShowS
$cshowList :: [KeySigningKey] -> ShowS
show :: KeySigningKey -> String
$cshow :: KeySigningKey -> String
showsPrec :: Int -> KeySigningKey -> ShowS
$cshowsPrec :: Int -> KeySigningKey -> ShowS
Prelude.Show, (forall x. KeySigningKey -> Rep KeySigningKey x)
-> (forall x. Rep KeySigningKey x -> KeySigningKey)
-> Generic KeySigningKey
forall x. Rep KeySigningKey x -> KeySigningKey
forall x. KeySigningKey -> Rep KeySigningKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KeySigningKey x -> KeySigningKey
$cfrom :: forall x. KeySigningKey -> Rep KeySigningKey x
Prelude.Generic)

-- |
-- Create a value of 'KeySigningKey' 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:
--
-- 'status', 'keySigningKey_status' - A string that represents the current key-signing key (KSK) status.
--
-- Status can have one of the following values:
--
-- [ACTIVE]
--     The KSK is being used for signing.
--
-- [INACTIVE]
--     The KSK is not being used for signing.
--
-- [DELETING]
--     The KSK is in the process of being deleted.
--
-- [ACTION_NEEDED]
--     There is a problem with the KSK that requires you to take action to
--     resolve. For example, the customer managed customer master key (CMK)
--     might have been deleted, or the permissions for the customer managed
--     CMK might have been changed.
--
-- [INTERNAL_FAILURE]
--     There was an error during a request. Before you can continue to work
--     with DNSSEC signing, including actions that involve this KSK, you
--     must correct the problem. For example, you may need to activate or
--     deactivate the KSK.
--
-- 'signingAlgorithmMnemonic', 'keySigningKey_signingAlgorithmMnemonic' - A string used to represent the signing algorithm. This value must follow
-- the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
--
-- 'digestAlgorithmMnemonic', 'keySigningKey_digestAlgorithmMnemonic' - A string used to represent the delegation signer digest algorithm. This
-- value must follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
--
-- 'lastModifiedDate', 'keySigningKey_lastModifiedDate' - The last time that the key-signing key (KSK) was changed.
--
-- 'keyTag', 'keySigningKey_keyTag' - An integer used to identify the DNSSEC record for the domain name. The
-- process used to calculate the value is described in
-- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Appendix B>.
--
-- 'dNSKEYRecord', 'keySigningKey_dNSKEYRecord' - A string that represents a DNSKEY record.
--
-- 'publicKey', 'keySigningKey_publicKey' - The public key, represented as a Base64 encoding, as required by
-- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Page 5>.
--
-- 'signingAlgorithmType', 'keySigningKey_signingAlgorithmType' - An integer used to represent the signing algorithm. This value must
-- follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
--
-- 'createdDate', 'keySigningKey_createdDate' - The date when the key-signing key (KSK) was created.
--
-- 'flag', 'keySigningKey_flag' - An integer that specifies how the key is used. For key-signing key
-- (KSK), this value is always 257.
--
-- 'digestAlgorithmType', 'keySigningKey_digestAlgorithmType' - An integer used to represent the delegation signer digest algorithm.
-- This value must follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
--
-- 'statusMessage', 'keySigningKey_statusMessage' - The status message provided for the following key-signing key (KSK)
-- statuses: @ACTION_NEEDED@ or @INTERNAL_FAILURE@. The status message
-- includes information about what the problem might be and steps that you
-- can take to correct the issue.
--
-- 'name', 'keySigningKey_name' - A string used to identify a key-signing key (KSK). @Name@ can include
-- numbers, letters, and underscores (_). @Name@ must be unique for each
-- key-signing key in the same hosted zone.
--
-- 'dSRecord', 'keySigningKey_dSRecord' - A string that represents a delegation signer (DS) record.
--
-- 'kmsArn', 'keySigningKey_kmsArn' - The Amazon resource name (ARN) used to identify the customer managed
-- customer master key (CMK) in Key Management Service (KMS). The @KmsArn@
-- must be unique for each key-signing key (KSK) in a single hosted zone.
--
-- You must configure the CMK as follows:
--
-- [Status]
--     Enabled
--
-- [Key spec]
--     ECC_NIST_P256
--
-- [Key usage]
--     Sign and verify
--
-- [Key policy]
--     The key policy must give permission for the following actions:
--
--     -   DescribeKey
--
--     -   GetPublicKey
--
--     -   Sign
--
--     The key policy must also include the Amazon Route 53 service in the
--     principal for your account. Specify the following:
--
--     -   @\"Service\": \"dnssec-route53.amazonaws.com\"@
--
-- For more information about working with the customer managed CMK in KMS,
-- see
-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html Key Management Service concepts>.
--
-- 'digestValue', 'keySigningKey_digestValue' - A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records
-- are used to publish the public key that resolvers can use to verify
-- DNSSEC signatures that are used to secure certain kinds of information
-- provided by the DNS system.
newKeySigningKey ::
  KeySigningKey
newKeySigningKey :: KeySigningKey
newKeySigningKey =
  KeySigningKey' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe ISO8601
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KeySigningKey
KeySigningKey'
    { $sel:status:KeySigningKey' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signingAlgorithmMnemonic:KeySigningKey' :: Maybe Text
signingAlgorithmMnemonic = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:digestAlgorithmMnemonic:KeySigningKey' :: Maybe Text
digestAlgorithmMnemonic = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:KeySigningKey' :: Maybe ISO8601
lastModifiedDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:keyTag:KeySigningKey' :: Maybe Natural
keyTag = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:dNSKEYRecord:KeySigningKey' :: Maybe Text
dNSKEYRecord = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publicKey:KeySigningKey' :: Maybe Text
publicKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signingAlgorithmType:KeySigningKey' :: Maybe Int
signingAlgorithmType = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:KeySigningKey' :: Maybe ISO8601
createdDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:flag:KeySigningKey' :: Maybe Int
flag = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:digestAlgorithmType:KeySigningKey' :: Maybe Int
digestAlgorithmType = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:KeySigningKey' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:KeySigningKey' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dSRecord:KeySigningKey' :: Maybe Text
dSRecord = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsArn:KeySigningKey' :: Maybe Text
kmsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:digestValue:KeySigningKey' :: Maybe Text
digestValue = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A string that represents the current key-signing key (KSK) status.
--
-- Status can have one of the following values:
--
-- [ACTIVE]
--     The KSK is being used for signing.
--
-- [INACTIVE]
--     The KSK is not being used for signing.
--
-- [DELETING]
--     The KSK is in the process of being deleted.
--
-- [ACTION_NEEDED]
--     There is a problem with the KSK that requires you to take action to
--     resolve. For example, the customer managed customer master key (CMK)
--     might have been deleted, or the permissions for the customer managed
--     CMK might have been changed.
--
-- [INTERNAL_FAILURE]
--     There was an error during a request. Before you can continue to work
--     with DNSSEC signing, including actions that involve this KSK, you
--     must correct the problem. For example, you may need to activate or
--     deactivate the KSK.
keySigningKey_status :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_status :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_status = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
status :: Maybe Text
$sel:status:KeySigningKey' :: KeySigningKey -> Maybe Text
status} -> Maybe Text
status) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:status:KeySigningKey' :: Maybe Text
status = Maybe Text
a} :: KeySigningKey)

-- | A string used to represent the signing algorithm. This value must follow
-- the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
keySigningKey_signingAlgorithmMnemonic :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_signingAlgorithmMnemonic :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_signingAlgorithmMnemonic = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
signingAlgorithmMnemonic :: Maybe Text
$sel:signingAlgorithmMnemonic:KeySigningKey' :: KeySigningKey -> Maybe Text
signingAlgorithmMnemonic} -> Maybe Text
signingAlgorithmMnemonic) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:signingAlgorithmMnemonic:KeySigningKey' :: Maybe Text
signingAlgorithmMnemonic = Maybe Text
a} :: KeySigningKey)

-- | A string used to represent the delegation signer digest algorithm. This
-- value must follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
keySigningKey_digestAlgorithmMnemonic :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_digestAlgorithmMnemonic :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_digestAlgorithmMnemonic = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
digestAlgorithmMnemonic :: Maybe Text
$sel:digestAlgorithmMnemonic:KeySigningKey' :: KeySigningKey -> Maybe Text
digestAlgorithmMnemonic} -> Maybe Text
digestAlgorithmMnemonic) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:digestAlgorithmMnemonic:KeySigningKey' :: Maybe Text
digestAlgorithmMnemonic = Maybe Text
a} :: KeySigningKey)

-- | The last time that the key-signing key (KSK) was changed.
keySigningKey_lastModifiedDate :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.UTCTime)
keySigningKey_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> KeySigningKey -> f KeySigningKey
keySigningKey_lastModifiedDate = (KeySigningKey -> Maybe ISO8601)
-> (KeySigningKey -> Maybe ISO8601 -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe ISO8601
lastModifiedDate :: Maybe ISO8601
$sel:lastModifiedDate:KeySigningKey' :: KeySigningKey -> Maybe ISO8601
lastModifiedDate} -> Maybe ISO8601
lastModifiedDate) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe ISO8601
a -> KeySigningKey
s {$sel:lastModifiedDate:KeySigningKey' :: Maybe ISO8601
lastModifiedDate = Maybe ISO8601
a} :: KeySigningKey) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> KeySigningKey -> f KeySigningKey)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> KeySigningKey
-> f KeySigningKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An integer used to identify the DNSSEC record for the domain name. The
-- process used to calculate the value is described in
-- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Appendix B>.
keySigningKey_keyTag :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Natural)
keySigningKey_keyTag :: (Maybe Natural -> f (Maybe Natural))
-> KeySigningKey -> f KeySigningKey
keySigningKey_keyTag = (KeySigningKey -> Maybe Natural)
-> (KeySigningKey -> Maybe Natural -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Natural
keyTag :: Maybe Natural
$sel:keyTag:KeySigningKey' :: KeySigningKey -> Maybe Natural
keyTag} -> Maybe Natural
keyTag) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Natural
a -> KeySigningKey
s {$sel:keyTag:KeySigningKey' :: Maybe Natural
keyTag = Maybe Natural
a} :: KeySigningKey)

-- | A string that represents a DNSKEY record.
keySigningKey_dNSKEYRecord :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_dNSKEYRecord :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_dNSKEYRecord = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
dNSKEYRecord :: Maybe Text
$sel:dNSKEYRecord:KeySigningKey' :: KeySigningKey -> Maybe Text
dNSKEYRecord} -> Maybe Text
dNSKEYRecord) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:dNSKEYRecord:KeySigningKey' :: Maybe Text
dNSKEYRecord = Maybe Text
a} :: KeySigningKey)

-- | The public key, represented as a Base64 encoding, as required by
-- <https://tools.ietf.org/rfc/rfc4034.txt RFC-4034 Page 5>.
keySigningKey_publicKey :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_publicKey :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_publicKey = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
publicKey :: Maybe Text
$sel:publicKey:KeySigningKey' :: KeySigningKey -> Maybe Text
publicKey} -> Maybe Text
publicKey) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:publicKey:KeySigningKey' :: Maybe Text
publicKey = Maybe Text
a} :: KeySigningKey)

-- | An integer used to represent the signing algorithm. This value must
-- follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.1 RFC-8624 Section 3.1>.
keySigningKey_signingAlgorithmType :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Int)
keySigningKey_signingAlgorithmType :: (Maybe Int -> f (Maybe Int)) -> KeySigningKey -> f KeySigningKey
keySigningKey_signingAlgorithmType = (KeySigningKey -> Maybe Int)
-> (KeySigningKey -> Maybe Int -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Int
signingAlgorithmType :: Maybe Int
$sel:signingAlgorithmType:KeySigningKey' :: KeySigningKey -> Maybe Int
signingAlgorithmType} -> Maybe Int
signingAlgorithmType) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Int
a -> KeySigningKey
s {$sel:signingAlgorithmType:KeySigningKey' :: Maybe Int
signingAlgorithmType = Maybe Int
a} :: KeySigningKey)

-- | The date when the key-signing key (KSK) was created.
keySigningKey_createdDate :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.UTCTime)
keySigningKey_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> KeySigningKey -> f KeySigningKey
keySigningKey_createdDate = (KeySigningKey -> Maybe ISO8601)
-> (KeySigningKey -> Maybe ISO8601 -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe ISO8601
createdDate :: Maybe ISO8601
$sel:createdDate:KeySigningKey' :: KeySigningKey -> Maybe ISO8601
createdDate} -> Maybe ISO8601
createdDate) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe ISO8601
a -> KeySigningKey
s {$sel:createdDate:KeySigningKey' :: Maybe ISO8601
createdDate = Maybe ISO8601
a} :: KeySigningKey) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> KeySigningKey -> f KeySigningKey)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> KeySigningKey
-> f KeySigningKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An integer that specifies how the key is used. For key-signing key
-- (KSK), this value is always 257.
keySigningKey_flag :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Int)
keySigningKey_flag :: (Maybe Int -> f (Maybe Int)) -> KeySigningKey -> f KeySigningKey
keySigningKey_flag = (KeySigningKey -> Maybe Int)
-> (KeySigningKey -> Maybe Int -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Int
flag :: Maybe Int
$sel:flag:KeySigningKey' :: KeySigningKey -> Maybe Int
flag} -> Maybe Int
flag) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Int
a -> KeySigningKey
s {$sel:flag:KeySigningKey' :: Maybe Int
flag = Maybe Int
a} :: KeySigningKey)

-- | An integer used to represent the delegation signer digest algorithm.
-- This value must follow the guidelines provided by
-- <https://tools.ietf.org/html/rfc8624#section-3.3 RFC-8624 Section 3.3>.
keySigningKey_digestAlgorithmType :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Int)
keySigningKey_digestAlgorithmType :: (Maybe Int -> f (Maybe Int)) -> KeySigningKey -> f KeySigningKey
keySigningKey_digestAlgorithmType = (KeySigningKey -> Maybe Int)
-> (KeySigningKey -> Maybe Int -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Int
digestAlgorithmType :: Maybe Int
$sel:digestAlgorithmType:KeySigningKey' :: KeySigningKey -> Maybe Int
digestAlgorithmType} -> Maybe Int
digestAlgorithmType) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Int
a -> KeySigningKey
s {$sel:digestAlgorithmType:KeySigningKey' :: Maybe Int
digestAlgorithmType = Maybe Int
a} :: KeySigningKey)

-- | The status message provided for the following key-signing key (KSK)
-- statuses: @ACTION_NEEDED@ or @INTERNAL_FAILURE@. The status message
-- includes information about what the problem might be and steps that you
-- can take to correct the issue.
keySigningKey_statusMessage :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_statusMessage :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_statusMessage = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:KeySigningKey' :: KeySigningKey -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:statusMessage:KeySigningKey' :: Maybe Text
statusMessage = Maybe Text
a} :: KeySigningKey)

-- | A string used to identify a key-signing key (KSK). @Name@ can include
-- numbers, letters, and underscores (_). @Name@ must be unique for each
-- key-signing key in the same hosted zone.
keySigningKey_name :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_name :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_name = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
name :: Maybe Text
$sel:name:KeySigningKey' :: KeySigningKey -> Maybe Text
name} -> Maybe Text
name) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:name:KeySigningKey' :: Maybe Text
name = Maybe Text
a} :: KeySigningKey)

-- | A string that represents a delegation signer (DS) record.
keySigningKey_dSRecord :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_dSRecord :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_dSRecord = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
dSRecord :: Maybe Text
$sel:dSRecord:KeySigningKey' :: KeySigningKey -> Maybe Text
dSRecord} -> Maybe Text
dSRecord) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:dSRecord:KeySigningKey' :: Maybe Text
dSRecord = Maybe Text
a} :: KeySigningKey)

-- | The Amazon resource name (ARN) used to identify the customer managed
-- customer master key (CMK) in Key Management Service (KMS). The @KmsArn@
-- must be unique for each key-signing key (KSK) in a single hosted zone.
--
-- You must configure the CMK as follows:
--
-- [Status]
--     Enabled
--
-- [Key spec]
--     ECC_NIST_P256
--
-- [Key usage]
--     Sign and verify
--
-- [Key policy]
--     The key policy must give permission for the following actions:
--
--     -   DescribeKey
--
--     -   GetPublicKey
--
--     -   Sign
--
--     The key policy must also include the Amazon Route 53 service in the
--     principal for your account. Specify the following:
--
--     -   @\"Service\": \"dnssec-route53.amazonaws.com\"@
--
-- For more information about working with the customer managed CMK in KMS,
-- see
-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html Key Management Service concepts>.
keySigningKey_kmsArn :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_kmsArn :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_kmsArn = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
kmsArn :: Maybe Text
$sel:kmsArn:KeySigningKey' :: KeySigningKey -> Maybe Text
kmsArn} -> Maybe Text
kmsArn) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:kmsArn:KeySigningKey' :: Maybe Text
kmsArn = Maybe Text
a} :: KeySigningKey)

-- | A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records
-- are used to publish the public key that resolvers can use to verify
-- DNSSEC signatures that are used to secure certain kinds of information
-- provided by the DNS system.
keySigningKey_digestValue :: Lens.Lens' KeySigningKey (Prelude.Maybe Prelude.Text)
keySigningKey_digestValue :: (Maybe Text -> f (Maybe Text)) -> KeySigningKey -> f KeySigningKey
keySigningKey_digestValue = (KeySigningKey -> Maybe Text)
-> (KeySigningKey -> Maybe Text -> KeySigningKey)
-> Lens KeySigningKey KeySigningKey (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KeySigningKey' {Maybe Text
digestValue :: Maybe Text
$sel:digestValue:KeySigningKey' :: KeySigningKey -> Maybe Text
digestValue} -> Maybe Text
digestValue) (\s :: KeySigningKey
s@KeySigningKey' {} Maybe Text
a -> KeySigningKey
s {$sel:digestValue:KeySigningKey' :: Maybe Text
digestValue = Maybe Text
a} :: KeySigningKey)

instance Core.FromXML KeySigningKey where
  parseXML :: [Node] -> Either String KeySigningKey
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe ISO8601
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KeySigningKey
KeySigningKey'
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe ISO8601
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SigningAlgorithmMnemonic")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DigestAlgorithmMnemonic")
      Either
  String
  (Maybe ISO8601
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastModifiedDate")
      Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KeyTag")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DNSKEYRecord")
      Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublicKey")
      Either
  String
  (Maybe Int
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SigningAlgorithmType")
      Either
  String
  (Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CreatedDate")
      Either
  String
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Flag")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DigestAlgorithmType")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StatusMessage")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> KeySigningKey)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Maybe Text -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Name")
      Either
  String (Maybe Text -> Maybe Text -> Maybe Text -> KeySigningKey)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DSRecord")
      Either String (Maybe Text -> Maybe Text -> KeySigningKey)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> KeySigningKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KmsArn")
      Either String (Maybe Text -> KeySigningKey)
-> Either String (Maybe Text) -> Either String KeySigningKey
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DigestValue")

instance Prelude.Hashable KeySigningKey

instance Prelude.NFData KeySigningKey