{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SESV2.Types.DkimSigningAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.DkimSigningKeyLength
data DkimSigningAttributes = DkimSigningAttributes'
{
DkimSigningAttributes -> Maybe DkimSigningKeyLength
nextSigningKeyLength :: Prelude.Maybe DkimSigningKeyLength,
DkimSigningAttributes -> Maybe (Sensitive Text)
domainSigningPrivateKey :: Prelude.Maybe (Core.Sensitive Prelude.Text),
DkimSigningAttributes -> Maybe Text
domainSigningSelector :: Prelude.Maybe Prelude.Text
}
deriving (DkimSigningAttributes -> DkimSigningAttributes -> Bool
(DkimSigningAttributes -> DkimSigningAttributes -> Bool)
-> (DkimSigningAttributes -> DkimSigningAttributes -> Bool)
-> Eq DkimSigningAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DkimSigningAttributes -> DkimSigningAttributes -> Bool
$c/= :: DkimSigningAttributes -> DkimSigningAttributes -> Bool
== :: DkimSigningAttributes -> DkimSigningAttributes -> Bool
$c== :: DkimSigningAttributes -> DkimSigningAttributes -> Bool
Prelude.Eq, Int -> DkimSigningAttributes -> ShowS
[DkimSigningAttributes] -> ShowS
DkimSigningAttributes -> String
(Int -> DkimSigningAttributes -> ShowS)
-> (DkimSigningAttributes -> String)
-> ([DkimSigningAttributes] -> ShowS)
-> Show DkimSigningAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DkimSigningAttributes] -> ShowS
$cshowList :: [DkimSigningAttributes] -> ShowS
show :: DkimSigningAttributes -> String
$cshow :: DkimSigningAttributes -> String
showsPrec :: Int -> DkimSigningAttributes -> ShowS
$cshowsPrec :: Int -> DkimSigningAttributes -> ShowS
Prelude.Show, (forall x. DkimSigningAttributes -> Rep DkimSigningAttributes x)
-> (forall x. Rep DkimSigningAttributes x -> DkimSigningAttributes)
-> Generic DkimSigningAttributes
forall x. Rep DkimSigningAttributes x -> DkimSigningAttributes
forall x. DkimSigningAttributes -> Rep DkimSigningAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DkimSigningAttributes x -> DkimSigningAttributes
$cfrom :: forall x. DkimSigningAttributes -> Rep DkimSigningAttributes x
Prelude.Generic)
newDkimSigningAttributes ::
DkimSigningAttributes
newDkimSigningAttributes :: DkimSigningAttributes
newDkimSigningAttributes =
DkimSigningAttributes' :: Maybe DkimSigningKeyLength
-> Maybe (Sensitive Text) -> Maybe Text -> DkimSigningAttributes
DkimSigningAttributes'
{ $sel:nextSigningKeyLength:DkimSigningAttributes' :: Maybe DkimSigningKeyLength
nextSigningKeyLength =
Maybe DkimSigningKeyLength
forall a. Maybe a
Prelude.Nothing,
$sel:domainSigningPrivateKey:DkimSigningAttributes' :: Maybe (Sensitive Text)
domainSigningPrivateKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:domainSigningSelector:DkimSigningAttributes' :: Maybe Text
domainSigningSelector = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dkimSigningAttributes_nextSigningKeyLength :: Lens.Lens' DkimSigningAttributes (Prelude.Maybe DkimSigningKeyLength)
dkimSigningAttributes_nextSigningKeyLength :: (Maybe DkimSigningKeyLength -> f (Maybe DkimSigningKeyLength))
-> DkimSigningAttributes -> f DkimSigningAttributes
dkimSigningAttributes_nextSigningKeyLength = (DkimSigningAttributes -> Maybe DkimSigningKeyLength)
-> (DkimSigningAttributes
-> Maybe DkimSigningKeyLength -> DkimSigningAttributes)
-> Lens
DkimSigningAttributes
DkimSigningAttributes
(Maybe DkimSigningKeyLength)
(Maybe DkimSigningKeyLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimSigningAttributes' {Maybe DkimSigningKeyLength
nextSigningKeyLength :: Maybe DkimSigningKeyLength
$sel:nextSigningKeyLength:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe DkimSigningKeyLength
nextSigningKeyLength} -> Maybe DkimSigningKeyLength
nextSigningKeyLength) (\s :: DkimSigningAttributes
s@DkimSigningAttributes' {} Maybe DkimSigningKeyLength
a -> DkimSigningAttributes
s {$sel:nextSigningKeyLength:DkimSigningAttributes' :: Maybe DkimSigningKeyLength
nextSigningKeyLength = Maybe DkimSigningKeyLength
a} :: DkimSigningAttributes)
dkimSigningAttributes_domainSigningPrivateKey :: Lens.Lens' DkimSigningAttributes (Prelude.Maybe Prelude.Text)
dkimSigningAttributes_domainSigningPrivateKey :: (Maybe Text -> f (Maybe Text))
-> DkimSigningAttributes -> f DkimSigningAttributes
dkimSigningAttributes_domainSigningPrivateKey = (DkimSigningAttributes -> Maybe (Sensitive Text))
-> (DkimSigningAttributes
-> Maybe (Sensitive Text) -> DkimSigningAttributes)
-> Lens
DkimSigningAttributes
DkimSigningAttributes
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimSigningAttributes' {Maybe (Sensitive Text)
domainSigningPrivateKey :: Maybe (Sensitive Text)
$sel:domainSigningPrivateKey:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe (Sensitive Text)
domainSigningPrivateKey} -> Maybe (Sensitive Text)
domainSigningPrivateKey) (\s :: DkimSigningAttributes
s@DkimSigningAttributes' {} Maybe (Sensitive Text)
a -> DkimSigningAttributes
s {$sel:domainSigningPrivateKey:DkimSigningAttributes' :: Maybe (Sensitive Text)
domainSigningPrivateKey = Maybe (Sensitive Text)
a} :: DkimSigningAttributes) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> DkimSigningAttributes -> f DkimSigningAttributes)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DkimSigningAttributes
-> f DkimSigningAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
dkimSigningAttributes_domainSigningSelector :: Lens.Lens' DkimSigningAttributes (Prelude.Maybe Prelude.Text)
dkimSigningAttributes_domainSigningSelector :: (Maybe Text -> f (Maybe Text))
-> DkimSigningAttributes -> f DkimSigningAttributes
dkimSigningAttributes_domainSigningSelector = (DkimSigningAttributes -> Maybe Text)
-> (DkimSigningAttributes -> Maybe Text -> DkimSigningAttributes)
-> Lens
DkimSigningAttributes
DkimSigningAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimSigningAttributes' {Maybe Text
domainSigningSelector :: Maybe Text
$sel:domainSigningSelector:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe Text
domainSigningSelector} -> Maybe Text
domainSigningSelector) (\s :: DkimSigningAttributes
s@DkimSigningAttributes' {} Maybe Text
a -> DkimSigningAttributes
s {$sel:domainSigningSelector:DkimSigningAttributes' :: Maybe Text
domainSigningSelector = Maybe Text
a} :: DkimSigningAttributes)
instance Prelude.Hashable DkimSigningAttributes
instance Prelude.NFData DkimSigningAttributes
instance Core.ToJSON DkimSigningAttributes where
toJSON :: DkimSigningAttributes -> Value
toJSON DkimSigningAttributes' {Maybe Text
Maybe (Sensitive Text)
Maybe DkimSigningKeyLength
domainSigningSelector :: Maybe Text
domainSigningPrivateKey :: Maybe (Sensitive Text)
nextSigningKeyLength :: Maybe DkimSigningKeyLength
$sel:domainSigningSelector:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe Text
$sel:domainSigningPrivateKey:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe (Sensitive Text)
$sel:nextSigningKeyLength:DkimSigningAttributes' :: DkimSigningAttributes -> Maybe DkimSigningKeyLength
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextSigningKeyLength" Text -> DkimSigningKeyLength -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DkimSigningKeyLength -> Pair)
-> Maybe DkimSigningKeyLength -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DkimSigningKeyLength
nextSigningKeyLength,
(Text
"DomainSigningPrivateKey" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
domainSigningPrivateKey,
(Text
"DomainSigningSelector" 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
domainSigningSelector
]
)