{-# 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.GuardianAttributes 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.SESV2.Types.FeatureStatus
data GuardianAttributes = GuardianAttributes'
{
GuardianAttributes -> Maybe FeatureStatus
optimizedSharedDelivery :: Prelude.Maybe FeatureStatus
}
deriving (GuardianAttributes -> GuardianAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GuardianAttributes -> GuardianAttributes -> Bool
$c/= :: GuardianAttributes -> GuardianAttributes -> Bool
== :: GuardianAttributes -> GuardianAttributes -> Bool
$c== :: GuardianAttributes -> GuardianAttributes -> Bool
Prelude.Eq, ReadPrec [GuardianAttributes]
ReadPrec GuardianAttributes
Int -> ReadS GuardianAttributes
ReadS [GuardianAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GuardianAttributes]
$creadListPrec :: ReadPrec [GuardianAttributes]
readPrec :: ReadPrec GuardianAttributes
$creadPrec :: ReadPrec GuardianAttributes
readList :: ReadS [GuardianAttributes]
$creadList :: ReadS [GuardianAttributes]
readsPrec :: Int -> ReadS GuardianAttributes
$creadsPrec :: Int -> ReadS GuardianAttributes
Prelude.Read, Int -> GuardianAttributes -> ShowS
[GuardianAttributes] -> ShowS
GuardianAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GuardianAttributes] -> ShowS
$cshowList :: [GuardianAttributes] -> ShowS
show :: GuardianAttributes -> String
$cshow :: GuardianAttributes -> String
showsPrec :: Int -> GuardianAttributes -> ShowS
$cshowsPrec :: Int -> GuardianAttributes -> ShowS
Prelude.Show, forall x. Rep GuardianAttributes x -> GuardianAttributes
forall x. GuardianAttributes -> Rep GuardianAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GuardianAttributes x -> GuardianAttributes
$cfrom :: forall x. GuardianAttributes -> Rep GuardianAttributes x
Prelude.Generic)
newGuardianAttributes ::
GuardianAttributes
newGuardianAttributes :: GuardianAttributes
newGuardianAttributes =
GuardianAttributes'
{ $sel:optimizedSharedDelivery:GuardianAttributes' :: Maybe FeatureStatus
optimizedSharedDelivery =
forall a. Maybe a
Prelude.Nothing
}
guardianAttributes_optimizedSharedDelivery :: Lens.Lens' GuardianAttributes (Prelude.Maybe FeatureStatus)
guardianAttributes_optimizedSharedDelivery :: Lens' GuardianAttributes (Maybe FeatureStatus)
guardianAttributes_optimizedSharedDelivery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GuardianAttributes' {Maybe FeatureStatus
optimizedSharedDelivery :: Maybe FeatureStatus
$sel:optimizedSharedDelivery:GuardianAttributes' :: GuardianAttributes -> Maybe FeatureStatus
optimizedSharedDelivery} -> Maybe FeatureStatus
optimizedSharedDelivery) (\s :: GuardianAttributes
s@GuardianAttributes' {} Maybe FeatureStatus
a -> GuardianAttributes
s {$sel:optimizedSharedDelivery:GuardianAttributes' :: Maybe FeatureStatus
optimizedSharedDelivery = Maybe FeatureStatus
a} :: GuardianAttributes)
instance Data.FromJSON GuardianAttributes where
parseJSON :: Value -> Parser GuardianAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GuardianAttributes"
( \Object
x ->
Maybe FeatureStatus -> GuardianAttributes
GuardianAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OptimizedSharedDelivery")
)
instance Prelude.Hashable GuardianAttributes where
hashWithSalt :: Int -> GuardianAttributes -> Int
hashWithSalt Int
_salt GuardianAttributes' {Maybe FeatureStatus
optimizedSharedDelivery :: Maybe FeatureStatus
$sel:optimizedSharedDelivery:GuardianAttributes' :: GuardianAttributes -> Maybe FeatureStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FeatureStatus
optimizedSharedDelivery
instance Prelude.NFData GuardianAttributes where
rnf :: GuardianAttributes -> ()
rnf GuardianAttributes' {Maybe FeatureStatus
optimizedSharedDelivery :: Maybe FeatureStatus
$sel:optimizedSharedDelivery:GuardianAttributes' :: GuardianAttributes -> Maybe FeatureStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe FeatureStatus
optimizedSharedDelivery
instance Data.ToJSON GuardianAttributes where
toJSON :: GuardianAttributes -> Value
toJSON GuardianAttributes' {Maybe FeatureStatus
optimizedSharedDelivery :: Maybe FeatureStatus
$sel:optimizedSharedDelivery:GuardianAttributes' :: GuardianAttributes -> Maybe FeatureStatus
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"OptimizedSharedDelivery" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FeatureStatus
optimizedSharedDelivery
]
)