{-# 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.DkimAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.DkimSigningAttributesOrigin
import Amazonka.SESV2.Types.DkimSigningKeyLength
import Amazonka.SESV2.Types.DkimStatus
data DkimAttributes = DkimAttributes'
{
DkimAttributes -> Maybe DkimStatus
status :: Prelude.Maybe DkimStatus,
DkimAttributes -> Maybe DkimSigningKeyLength
nextSigningKeyLength :: Prelude.Maybe DkimSigningKeyLength,
DkimAttributes -> Maybe [Text]
tokens :: Prelude.Maybe [Prelude.Text],
DkimAttributes -> Maybe Bool
signingEnabled :: Prelude.Maybe Prelude.Bool,
DkimAttributes -> Maybe DkimSigningKeyLength
currentSigningKeyLength :: Prelude.Maybe DkimSigningKeyLength,
DkimAttributes -> Maybe POSIX
lastKeyGenerationTimestamp :: Prelude.Maybe Core.POSIX,
DkimAttributes -> Maybe DkimSigningAttributesOrigin
signingAttributesOrigin :: Prelude.Maybe DkimSigningAttributesOrigin
}
deriving (DkimAttributes -> DkimAttributes -> Bool
(DkimAttributes -> DkimAttributes -> Bool)
-> (DkimAttributes -> DkimAttributes -> Bool) -> Eq DkimAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DkimAttributes -> DkimAttributes -> Bool
$c/= :: DkimAttributes -> DkimAttributes -> Bool
== :: DkimAttributes -> DkimAttributes -> Bool
$c== :: DkimAttributes -> DkimAttributes -> Bool
Prelude.Eq, ReadPrec [DkimAttributes]
ReadPrec DkimAttributes
Int -> ReadS DkimAttributes
ReadS [DkimAttributes]
(Int -> ReadS DkimAttributes)
-> ReadS [DkimAttributes]
-> ReadPrec DkimAttributes
-> ReadPrec [DkimAttributes]
-> Read DkimAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DkimAttributes]
$creadListPrec :: ReadPrec [DkimAttributes]
readPrec :: ReadPrec DkimAttributes
$creadPrec :: ReadPrec DkimAttributes
readList :: ReadS [DkimAttributes]
$creadList :: ReadS [DkimAttributes]
readsPrec :: Int -> ReadS DkimAttributes
$creadsPrec :: Int -> ReadS DkimAttributes
Prelude.Read, Int -> DkimAttributes -> ShowS
[DkimAttributes] -> ShowS
DkimAttributes -> String
(Int -> DkimAttributes -> ShowS)
-> (DkimAttributes -> String)
-> ([DkimAttributes] -> ShowS)
-> Show DkimAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DkimAttributes] -> ShowS
$cshowList :: [DkimAttributes] -> ShowS
show :: DkimAttributes -> String
$cshow :: DkimAttributes -> String
showsPrec :: Int -> DkimAttributes -> ShowS
$cshowsPrec :: Int -> DkimAttributes -> ShowS
Prelude.Show, (forall x. DkimAttributes -> Rep DkimAttributes x)
-> (forall x. Rep DkimAttributes x -> DkimAttributes)
-> Generic DkimAttributes
forall x. Rep DkimAttributes x -> DkimAttributes
forall x. DkimAttributes -> Rep DkimAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DkimAttributes x -> DkimAttributes
$cfrom :: forall x. DkimAttributes -> Rep DkimAttributes x
Prelude.Generic)
newDkimAttributes ::
DkimAttributes
newDkimAttributes :: DkimAttributes
newDkimAttributes =
DkimAttributes' :: Maybe DkimStatus
-> Maybe DkimSigningKeyLength
-> Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes
DkimAttributes'
{ $sel:status:DkimAttributes' :: Maybe DkimStatus
status = Maybe DkimStatus
forall a. Maybe a
Prelude.Nothing,
$sel:nextSigningKeyLength:DkimAttributes' :: Maybe DkimSigningKeyLength
nextSigningKeyLength = Maybe DkimSigningKeyLength
forall a. Maybe a
Prelude.Nothing,
$sel:tokens:DkimAttributes' :: Maybe [Text]
tokens = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:signingEnabled:DkimAttributes' :: Maybe Bool
signingEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:currentSigningKeyLength:DkimAttributes' :: Maybe DkimSigningKeyLength
currentSigningKeyLength = Maybe DkimSigningKeyLength
forall a. Maybe a
Prelude.Nothing,
$sel:lastKeyGenerationTimestamp:DkimAttributes' :: Maybe POSIX
lastKeyGenerationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:signingAttributesOrigin:DkimAttributes' :: Maybe DkimSigningAttributesOrigin
signingAttributesOrigin = Maybe DkimSigningAttributesOrigin
forall a. Maybe a
Prelude.Nothing
}
dkimAttributes_status :: Lens.Lens' DkimAttributes (Prelude.Maybe DkimStatus)
dkimAttributes_status :: (Maybe DkimStatus -> f (Maybe DkimStatus))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_status = (DkimAttributes -> Maybe DkimStatus)
-> (DkimAttributes -> Maybe DkimStatus -> DkimAttributes)
-> Lens
DkimAttributes DkimAttributes (Maybe DkimStatus) (Maybe DkimStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe DkimStatus
status :: Maybe DkimStatus
$sel:status:DkimAttributes' :: DkimAttributes -> Maybe DkimStatus
status} -> Maybe DkimStatus
status) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe DkimStatus
a -> DkimAttributes
s {$sel:status:DkimAttributes' :: Maybe DkimStatus
status = Maybe DkimStatus
a} :: DkimAttributes)
dkimAttributes_nextSigningKeyLength :: Lens.Lens' DkimAttributes (Prelude.Maybe DkimSigningKeyLength)
dkimAttributes_nextSigningKeyLength :: (Maybe DkimSigningKeyLength -> f (Maybe DkimSigningKeyLength))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_nextSigningKeyLength = (DkimAttributes -> Maybe DkimSigningKeyLength)
-> (DkimAttributes -> Maybe DkimSigningKeyLength -> DkimAttributes)
-> Lens
DkimAttributes
DkimAttributes
(Maybe DkimSigningKeyLength)
(Maybe DkimSigningKeyLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe DkimSigningKeyLength
nextSigningKeyLength :: Maybe DkimSigningKeyLength
$sel:nextSigningKeyLength:DkimAttributes' :: DkimAttributes -> Maybe DkimSigningKeyLength
nextSigningKeyLength} -> Maybe DkimSigningKeyLength
nextSigningKeyLength) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe DkimSigningKeyLength
a -> DkimAttributes
s {$sel:nextSigningKeyLength:DkimAttributes' :: Maybe DkimSigningKeyLength
nextSigningKeyLength = Maybe DkimSigningKeyLength
a} :: DkimAttributes)
dkimAttributes_tokens :: Lens.Lens' DkimAttributes (Prelude.Maybe [Prelude.Text])
dkimAttributes_tokens :: (Maybe [Text] -> f (Maybe [Text]))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_tokens = (DkimAttributes -> Maybe [Text])
-> (DkimAttributes -> Maybe [Text] -> DkimAttributes)
-> Lens DkimAttributes DkimAttributes (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe [Text]
tokens :: Maybe [Text]
$sel:tokens:DkimAttributes' :: DkimAttributes -> Maybe [Text]
tokens} -> Maybe [Text]
tokens) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe [Text]
a -> DkimAttributes
s {$sel:tokens:DkimAttributes' :: Maybe [Text]
tokens = Maybe [Text]
a} :: DkimAttributes) ((Maybe [Text] -> f (Maybe [Text]))
-> DkimAttributes -> f DkimAttributes)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DkimAttributes
-> f DkimAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
dkimAttributes_signingEnabled :: Lens.Lens' DkimAttributes (Prelude.Maybe Prelude.Bool)
dkimAttributes_signingEnabled :: (Maybe Bool -> f (Maybe Bool))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_signingEnabled = (DkimAttributes -> Maybe Bool)
-> (DkimAttributes -> Maybe Bool -> DkimAttributes)
-> Lens DkimAttributes DkimAttributes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe Bool
signingEnabled :: Maybe Bool
$sel:signingEnabled:DkimAttributes' :: DkimAttributes -> Maybe Bool
signingEnabled} -> Maybe Bool
signingEnabled) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe Bool
a -> DkimAttributes
s {$sel:signingEnabled:DkimAttributes' :: Maybe Bool
signingEnabled = Maybe Bool
a} :: DkimAttributes)
dkimAttributes_currentSigningKeyLength :: Lens.Lens' DkimAttributes (Prelude.Maybe DkimSigningKeyLength)
dkimAttributes_currentSigningKeyLength :: (Maybe DkimSigningKeyLength -> f (Maybe DkimSigningKeyLength))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_currentSigningKeyLength = (DkimAttributes -> Maybe DkimSigningKeyLength)
-> (DkimAttributes -> Maybe DkimSigningKeyLength -> DkimAttributes)
-> Lens
DkimAttributes
DkimAttributes
(Maybe DkimSigningKeyLength)
(Maybe DkimSigningKeyLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe DkimSigningKeyLength
currentSigningKeyLength :: Maybe DkimSigningKeyLength
$sel:currentSigningKeyLength:DkimAttributes' :: DkimAttributes -> Maybe DkimSigningKeyLength
currentSigningKeyLength} -> Maybe DkimSigningKeyLength
currentSigningKeyLength) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe DkimSigningKeyLength
a -> DkimAttributes
s {$sel:currentSigningKeyLength:DkimAttributes' :: Maybe DkimSigningKeyLength
currentSigningKeyLength = Maybe DkimSigningKeyLength
a} :: DkimAttributes)
dkimAttributes_lastKeyGenerationTimestamp :: Lens.Lens' DkimAttributes (Prelude.Maybe Prelude.UTCTime)
dkimAttributes_lastKeyGenerationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_lastKeyGenerationTimestamp = (DkimAttributes -> Maybe POSIX)
-> (DkimAttributes -> Maybe POSIX -> DkimAttributes)
-> Lens DkimAttributes DkimAttributes (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe POSIX
lastKeyGenerationTimestamp :: Maybe POSIX
$sel:lastKeyGenerationTimestamp:DkimAttributes' :: DkimAttributes -> Maybe POSIX
lastKeyGenerationTimestamp} -> Maybe POSIX
lastKeyGenerationTimestamp) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe POSIX
a -> DkimAttributes
s {$sel:lastKeyGenerationTimestamp:DkimAttributes' :: Maybe POSIX
lastKeyGenerationTimestamp = Maybe POSIX
a} :: DkimAttributes) ((Maybe POSIX -> f (Maybe POSIX))
-> DkimAttributes -> f DkimAttributes)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DkimAttributes
-> f DkimAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
dkimAttributes_signingAttributesOrigin :: Lens.Lens' DkimAttributes (Prelude.Maybe DkimSigningAttributesOrigin)
dkimAttributes_signingAttributesOrigin :: (Maybe DkimSigningAttributesOrigin
-> f (Maybe DkimSigningAttributesOrigin))
-> DkimAttributes -> f DkimAttributes
dkimAttributes_signingAttributesOrigin = (DkimAttributes -> Maybe DkimSigningAttributesOrigin)
-> (DkimAttributes
-> Maybe DkimSigningAttributesOrigin -> DkimAttributes)
-> Lens
DkimAttributes
DkimAttributes
(Maybe DkimSigningAttributesOrigin)
(Maybe DkimSigningAttributesOrigin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DkimAttributes' {Maybe DkimSigningAttributesOrigin
signingAttributesOrigin :: Maybe DkimSigningAttributesOrigin
$sel:signingAttributesOrigin:DkimAttributes' :: DkimAttributes -> Maybe DkimSigningAttributesOrigin
signingAttributesOrigin} -> Maybe DkimSigningAttributesOrigin
signingAttributesOrigin) (\s :: DkimAttributes
s@DkimAttributes' {} Maybe DkimSigningAttributesOrigin
a -> DkimAttributes
s {$sel:signingAttributesOrigin:DkimAttributes' :: Maybe DkimSigningAttributesOrigin
signingAttributesOrigin = Maybe DkimSigningAttributesOrigin
a} :: DkimAttributes)
instance Core.FromJSON DkimAttributes where
parseJSON :: Value -> Parser DkimAttributes
parseJSON =
String
-> (Object -> Parser DkimAttributes)
-> Value
-> Parser DkimAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DkimAttributes"
( \Object
x ->
Maybe DkimStatus
-> Maybe DkimSigningKeyLength
-> Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes
DkimAttributes'
(Maybe DkimStatus
-> Maybe DkimSigningKeyLength
-> Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
-> Parser (Maybe DkimStatus)
-> Parser
(Maybe DkimSigningKeyLength
-> Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DkimStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe DkimSigningKeyLength
-> Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
-> Parser (Maybe DkimSigningKeyLength)
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DkimSigningKeyLength)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NextSigningKeyLength")
Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tokens" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Bool
-> Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
-> Parser (Maybe Bool)
-> Parser
(Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SigningEnabled")
Parser
(Maybe DkimSigningKeyLength
-> Maybe POSIX
-> Maybe DkimSigningAttributesOrigin
-> DkimAttributes)
-> Parser (Maybe DkimSigningKeyLength)
-> Parser
(Maybe POSIX
-> Maybe DkimSigningAttributesOrigin -> DkimAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DkimSigningKeyLength)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentSigningKeyLength")
Parser
(Maybe POSIX
-> Maybe DkimSigningAttributesOrigin -> DkimAttributes)
-> Parser (Maybe POSIX)
-> Parser (Maybe DkimSigningAttributesOrigin -> DkimAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastKeyGenerationTimestamp")
Parser (Maybe DkimSigningAttributesOrigin -> DkimAttributes)
-> Parser (Maybe DkimSigningAttributesOrigin)
-> Parser DkimAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DkimSigningAttributesOrigin)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SigningAttributesOrigin")
)
instance Prelude.Hashable DkimAttributes
instance Prelude.NFData DkimAttributes