{-# 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.DynamoDB.Types.SSEDescription where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.SSEStatus
import Amazonka.DynamoDB.Types.SSEType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SSEDescription = SSEDescription'
{
SSEDescription -> Maybe SSEStatus
status :: Prelude.Maybe SSEStatus,
SSEDescription -> Maybe POSIX
inaccessibleEncryptionDateTime :: Prelude.Maybe Core.POSIX,
SSEDescription -> Maybe SSEType
sSEType :: Prelude.Maybe SSEType,
SSEDescription -> Maybe Text
kmsMasterKeyArn :: Prelude.Maybe Prelude.Text
}
deriving (SSEDescription -> SSEDescription -> Bool
(SSEDescription -> SSEDescription -> Bool)
-> (SSEDescription -> SSEDescription -> Bool) -> Eq SSEDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SSEDescription -> SSEDescription -> Bool
$c/= :: SSEDescription -> SSEDescription -> Bool
== :: SSEDescription -> SSEDescription -> Bool
$c== :: SSEDescription -> SSEDescription -> Bool
Prelude.Eq, ReadPrec [SSEDescription]
ReadPrec SSEDescription
Int -> ReadS SSEDescription
ReadS [SSEDescription]
(Int -> ReadS SSEDescription)
-> ReadS [SSEDescription]
-> ReadPrec SSEDescription
-> ReadPrec [SSEDescription]
-> Read SSEDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SSEDescription]
$creadListPrec :: ReadPrec [SSEDescription]
readPrec :: ReadPrec SSEDescription
$creadPrec :: ReadPrec SSEDescription
readList :: ReadS [SSEDescription]
$creadList :: ReadS [SSEDescription]
readsPrec :: Int -> ReadS SSEDescription
$creadsPrec :: Int -> ReadS SSEDescription
Prelude.Read, Int -> SSEDescription -> ShowS
[SSEDescription] -> ShowS
SSEDescription -> String
(Int -> SSEDescription -> ShowS)
-> (SSEDescription -> String)
-> ([SSEDescription] -> ShowS)
-> Show SSEDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSEDescription] -> ShowS
$cshowList :: [SSEDescription] -> ShowS
show :: SSEDescription -> String
$cshow :: SSEDescription -> String
showsPrec :: Int -> SSEDescription -> ShowS
$cshowsPrec :: Int -> SSEDescription -> ShowS
Prelude.Show, (forall x. SSEDescription -> Rep SSEDescription x)
-> (forall x. Rep SSEDescription x -> SSEDescription)
-> Generic SSEDescription
forall x. Rep SSEDescription x -> SSEDescription
forall x. SSEDescription -> Rep SSEDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SSEDescription x -> SSEDescription
$cfrom :: forall x. SSEDescription -> Rep SSEDescription x
Prelude.Generic)
newSSEDescription ::
SSEDescription
newSSEDescription :: SSEDescription
newSSEDescription =
SSEDescription' :: Maybe SSEStatus
-> Maybe POSIX -> Maybe SSEType -> Maybe Text -> SSEDescription
SSEDescription'
{ $sel:status:SSEDescription' :: Maybe SSEStatus
status = Maybe SSEStatus
forall a. Maybe a
Prelude.Nothing,
$sel:inaccessibleEncryptionDateTime:SSEDescription' :: Maybe POSIX
inaccessibleEncryptionDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sSEType:SSEDescription' :: Maybe SSEType
sSEType = Maybe SSEType
forall a. Maybe a
Prelude.Nothing,
$sel:kmsMasterKeyArn:SSEDescription' :: Maybe Text
kmsMasterKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sSEDescription_status :: Lens.Lens' SSEDescription (Prelude.Maybe SSEStatus)
sSEDescription_status :: (Maybe SSEStatus -> f (Maybe SSEStatus))
-> SSEDescription -> f SSEDescription
sSEDescription_status = (SSEDescription -> Maybe SSEStatus)
-> (SSEDescription -> Maybe SSEStatus -> SSEDescription)
-> Lens
SSEDescription SSEDescription (Maybe SSEStatus) (Maybe SSEStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEDescription' {Maybe SSEStatus
status :: Maybe SSEStatus
$sel:status:SSEDescription' :: SSEDescription -> Maybe SSEStatus
status} -> Maybe SSEStatus
status) (\s :: SSEDescription
s@SSEDescription' {} Maybe SSEStatus
a -> SSEDescription
s {$sel:status:SSEDescription' :: Maybe SSEStatus
status = Maybe SSEStatus
a} :: SSEDescription)
sSEDescription_inaccessibleEncryptionDateTime :: Lens.Lens' SSEDescription (Prelude.Maybe Prelude.UTCTime)
sSEDescription_inaccessibleEncryptionDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SSEDescription -> f SSEDescription
sSEDescription_inaccessibleEncryptionDateTime = (SSEDescription -> Maybe POSIX)
-> (SSEDescription -> Maybe POSIX -> SSEDescription)
-> Lens SSEDescription SSEDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEDescription' {Maybe POSIX
inaccessibleEncryptionDateTime :: Maybe POSIX
$sel:inaccessibleEncryptionDateTime:SSEDescription' :: SSEDescription -> Maybe POSIX
inaccessibleEncryptionDateTime} -> Maybe POSIX
inaccessibleEncryptionDateTime) (\s :: SSEDescription
s@SSEDescription' {} Maybe POSIX
a -> SSEDescription
s {$sel:inaccessibleEncryptionDateTime:SSEDescription' :: Maybe POSIX
inaccessibleEncryptionDateTime = Maybe POSIX
a} :: SSEDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> SSEDescription -> f SSEDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SSEDescription
-> f SSEDescription
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
sSEDescription_sSEType :: Lens.Lens' SSEDescription (Prelude.Maybe SSEType)
sSEDescription_sSEType :: (Maybe SSEType -> f (Maybe SSEType))
-> SSEDescription -> f SSEDescription
sSEDescription_sSEType = (SSEDescription -> Maybe SSEType)
-> (SSEDescription -> Maybe SSEType -> SSEDescription)
-> Lens
SSEDescription SSEDescription (Maybe SSEType) (Maybe SSEType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEDescription' {Maybe SSEType
sSEType :: Maybe SSEType
$sel:sSEType:SSEDescription' :: SSEDescription -> Maybe SSEType
sSEType} -> Maybe SSEType
sSEType) (\s :: SSEDescription
s@SSEDescription' {} Maybe SSEType
a -> SSEDescription
s {$sel:sSEType:SSEDescription' :: Maybe SSEType
sSEType = Maybe SSEType
a} :: SSEDescription)
sSEDescription_kmsMasterKeyArn :: Lens.Lens' SSEDescription (Prelude.Maybe Prelude.Text)
sSEDescription_kmsMasterKeyArn :: (Maybe Text -> f (Maybe Text))
-> SSEDescription -> f SSEDescription
sSEDescription_kmsMasterKeyArn = (SSEDescription -> Maybe Text)
-> (SSEDescription -> Maybe Text -> SSEDescription)
-> Lens SSEDescription SSEDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEDescription' {Maybe Text
kmsMasterKeyArn :: Maybe Text
$sel:kmsMasterKeyArn:SSEDescription' :: SSEDescription -> Maybe Text
kmsMasterKeyArn} -> Maybe Text
kmsMasterKeyArn) (\s :: SSEDescription
s@SSEDescription' {} Maybe Text
a -> SSEDescription
s {$sel:kmsMasterKeyArn:SSEDescription' :: Maybe Text
kmsMasterKeyArn = Maybe Text
a} :: SSEDescription)
instance Core.FromJSON SSEDescription where
parseJSON :: Value -> Parser SSEDescription
parseJSON =
String
-> (Object -> Parser SSEDescription)
-> Value
-> Parser SSEDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SSEDescription"
( \Object
x ->
Maybe SSEStatus
-> Maybe POSIX -> Maybe SSEType -> Maybe Text -> SSEDescription
SSEDescription'
(Maybe SSEStatus
-> Maybe POSIX -> Maybe SSEType -> Maybe Text -> SSEDescription)
-> Parser (Maybe SSEStatus)
-> Parser
(Maybe POSIX -> Maybe SSEType -> Maybe Text -> SSEDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SSEStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe POSIX -> Maybe SSEType -> Maybe Text -> SSEDescription)
-> Parser (Maybe POSIX)
-> Parser (Maybe SSEType -> Maybe Text -> SSEDescription)
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
"InaccessibleEncryptionDateTime")
Parser (Maybe SSEType -> Maybe Text -> SSEDescription)
-> Parser (Maybe SSEType) -> Parser (Maybe Text -> SSEDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SSEType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SSEType")
Parser (Maybe Text -> SSEDescription)
-> Parser (Maybe Text) -> Parser SSEDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KMSMasterKeyArn")
)
instance Prelude.Hashable SSEDescription
instance Prelude.NFData SSEDescription