{-# 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.SES.Types.IdentityDkimAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.VerificationStatus
data IdentityDkimAttributes = IdentityDkimAttributes'
{
IdentityDkimAttributes -> Maybe [Text]
dkimTokens :: Prelude.Maybe [Prelude.Text],
IdentityDkimAttributes -> Bool
dkimEnabled :: Prelude.Bool,
IdentityDkimAttributes -> VerificationStatus
dkimVerificationStatus :: VerificationStatus
}
deriving (IdentityDkimAttributes -> IdentityDkimAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityDkimAttributes -> IdentityDkimAttributes -> Bool
$c/= :: IdentityDkimAttributes -> IdentityDkimAttributes -> Bool
== :: IdentityDkimAttributes -> IdentityDkimAttributes -> Bool
$c== :: IdentityDkimAttributes -> IdentityDkimAttributes -> Bool
Prelude.Eq, ReadPrec [IdentityDkimAttributes]
ReadPrec IdentityDkimAttributes
Int -> ReadS IdentityDkimAttributes
ReadS [IdentityDkimAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityDkimAttributes]
$creadListPrec :: ReadPrec [IdentityDkimAttributes]
readPrec :: ReadPrec IdentityDkimAttributes
$creadPrec :: ReadPrec IdentityDkimAttributes
readList :: ReadS [IdentityDkimAttributes]
$creadList :: ReadS [IdentityDkimAttributes]
readsPrec :: Int -> ReadS IdentityDkimAttributes
$creadsPrec :: Int -> ReadS IdentityDkimAttributes
Prelude.Read, Int -> IdentityDkimAttributes -> ShowS
[IdentityDkimAttributes] -> ShowS
IdentityDkimAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityDkimAttributes] -> ShowS
$cshowList :: [IdentityDkimAttributes] -> ShowS
show :: IdentityDkimAttributes -> String
$cshow :: IdentityDkimAttributes -> String
showsPrec :: Int -> IdentityDkimAttributes -> ShowS
$cshowsPrec :: Int -> IdentityDkimAttributes -> ShowS
Prelude.Show, forall x. Rep IdentityDkimAttributes x -> IdentityDkimAttributes
forall x. IdentityDkimAttributes -> Rep IdentityDkimAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IdentityDkimAttributes x -> IdentityDkimAttributes
$cfrom :: forall x. IdentityDkimAttributes -> Rep IdentityDkimAttributes x
Prelude.Generic)
newIdentityDkimAttributes ::
Prelude.Bool ->
VerificationStatus ->
IdentityDkimAttributes
newIdentityDkimAttributes :: Bool -> VerificationStatus -> IdentityDkimAttributes
newIdentityDkimAttributes
Bool
pDkimEnabled_
VerificationStatus
pDkimVerificationStatus_ =
IdentityDkimAttributes'
{ $sel:dkimTokens:IdentityDkimAttributes' :: Maybe [Text]
dkimTokens =
forall a. Maybe a
Prelude.Nothing,
$sel:dkimEnabled:IdentityDkimAttributes' :: Bool
dkimEnabled = Bool
pDkimEnabled_,
$sel:dkimVerificationStatus:IdentityDkimAttributes' :: VerificationStatus
dkimVerificationStatus = VerificationStatus
pDkimVerificationStatus_
}
identityDkimAttributes_dkimTokens :: Lens.Lens' IdentityDkimAttributes (Prelude.Maybe [Prelude.Text])
identityDkimAttributes_dkimTokens :: Lens' IdentityDkimAttributes (Maybe [Text])
identityDkimAttributes_dkimTokens = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityDkimAttributes' {Maybe [Text]
dkimTokens :: Maybe [Text]
$sel:dkimTokens:IdentityDkimAttributes' :: IdentityDkimAttributes -> Maybe [Text]
dkimTokens} -> Maybe [Text]
dkimTokens) (\s :: IdentityDkimAttributes
s@IdentityDkimAttributes' {} Maybe [Text]
a -> IdentityDkimAttributes
s {$sel:dkimTokens:IdentityDkimAttributes' :: Maybe [Text]
dkimTokens = Maybe [Text]
a} :: IdentityDkimAttributes) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
identityDkimAttributes_dkimEnabled :: Lens.Lens' IdentityDkimAttributes Prelude.Bool
identityDkimAttributes_dkimEnabled :: Lens' IdentityDkimAttributes Bool
identityDkimAttributes_dkimEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityDkimAttributes' {Bool
dkimEnabled :: Bool
$sel:dkimEnabled:IdentityDkimAttributes' :: IdentityDkimAttributes -> Bool
dkimEnabled} -> Bool
dkimEnabled) (\s :: IdentityDkimAttributes
s@IdentityDkimAttributes' {} Bool
a -> IdentityDkimAttributes
s {$sel:dkimEnabled:IdentityDkimAttributes' :: Bool
dkimEnabled = Bool
a} :: IdentityDkimAttributes)
identityDkimAttributes_dkimVerificationStatus :: Lens.Lens' IdentityDkimAttributes VerificationStatus
identityDkimAttributes_dkimVerificationStatus :: Lens' IdentityDkimAttributes VerificationStatus
identityDkimAttributes_dkimVerificationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityDkimAttributes' {VerificationStatus
dkimVerificationStatus :: VerificationStatus
$sel:dkimVerificationStatus:IdentityDkimAttributes' :: IdentityDkimAttributes -> VerificationStatus
dkimVerificationStatus} -> VerificationStatus
dkimVerificationStatus) (\s :: IdentityDkimAttributes
s@IdentityDkimAttributes' {} VerificationStatus
a -> IdentityDkimAttributes
s {$sel:dkimVerificationStatus:IdentityDkimAttributes' :: VerificationStatus
dkimVerificationStatus = VerificationStatus
a} :: IdentityDkimAttributes)
instance Data.FromXML IdentityDkimAttributes where
parseXML :: [Node] -> Either String IdentityDkimAttributes
parseXML [Node]
x =
Maybe [Text]
-> Bool -> VerificationStatus -> IdentityDkimAttributes
IdentityDkimAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DkimTokens"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"DkimEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"DkimVerificationStatus")
instance Prelude.Hashable IdentityDkimAttributes where
hashWithSalt :: Int -> IdentityDkimAttributes -> Int
hashWithSalt Int
_salt IdentityDkimAttributes' {Bool
Maybe [Text]
VerificationStatus
dkimVerificationStatus :: VerificationStatus
dkimEnabled :: Bool
dkimTokens :: Maybe [Text]
$sel:dkimVerificationStatus:IdentityDkimAttributes' :: IdentityDkimAttributes -> VerificationStatus
$sel:dkimEnabled:IdentityDkimAttributes' :: IdentityDkimAttributes -> Bool
$sel:dkimTokens:IdentityDkimAttributes' :: IdentityDkimAttributes -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
dkimTokens
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
dkimEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VerificationStatus
dkimVerificationStatus
instance Prelude.NFData IdentityDkimAttributes where
rnf :: IdentityDkimAttributes -> ()
rnf IdentityDkimAttributes' {Bool
Maybe [Text]
VerificationStatus
dkimVerificationStatus :: VerificationStatus
dkimEnabled :: Bool
dkimTokens :: Maybe [Text]
$sel:dkimVerificationStatus:IdentityDkimAttributes' :: IdentityDkimAttributes -> VerificationStatus
$sel:dkimEnabled:IdentityDkimAttributes' :: IdentityDkimAttributes -> Bool
$sel:dkimTokens:IdentityDkimAttributes' :: IdentityDkimAttributes -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
dkimTokens
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
dkimEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VerificationStatus
dkimVerificationStatus