{-# 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.SecurityHub.Types.AwsDynamoDbTableRestoreSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsDynamoDbTableRestoreSummary = AwsDynamoDbTableRestoreSummary'
{
AwsDynamoDbTableRestoreSummary -> Maybe Text
sourceTableArn :: Prelude.Maybe Prelude.Text,
AwsDynamoDbTableRestoreSummary -> Maybe Text
sourceBackupArn :: Prelude.Maybe Prelude.Text,
AwsDynamoDbTableRestoreSummary -> Maybe Bool
restoreInProgress :: Prelude.Maybe Prelude.Bool,
AwsDynamoDbTableRestoreSummary -> Maybe Text
restoreDateTime :: Prelude.Maybe Prelude.Text
}
deriving (AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool
(AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool)
-> (AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool)
-> Eq AwsDynamoDbTableRestoreSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool
$c/= :: AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool
== :: AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool
$c== :: AwsDynamoDbTableRestoreSummary
-> AwsDynamoDbTableRestoreSummary -> Bool
Prelude.Eq, ReadPrec [AwsDynamoDbTableRestoreSummary]
ReadPrec AwsDynamoDbTableRestoreSummary
Int -> ReadS AwsDynamoDbTableRestoreSummary
ReadS [AwsDynamoDbTableRestoreSummary]
(Int -> ReadS AwsDynamoDbTableRestoreSummary)
-> ReadS [AwsDynamoDbTableRestoreSummary]
-> ReadPrec AwsDynamoDbTableRestoreSummary
-> ReadPrec [AwsDynamoDbTableRestoreSummary]
-> Read AwsDynamoDbTableRestoreSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsDynamoDbTableRestoreSummary]
$creadListPrec :: ReadPrec [AwsDynamoDbTableRestoreSummary]
readPrec :: ReadPrec AwsDynamoDbTableRestoreSummary
$creadPrec :: ReadPrec AwsDynamoDbTableRestoreSummary
readList :: ReadS [AwsDynamoDbTableRestoreSummary]
$creadList :: ReadS [AwsDynamoDbTableRestoreSummary]
readsPrec :: Int -> ReadS AwsDynamoDbTableRestoreSummary
$creadsPrec :: Int -> ReadS AwsDynamoDbTableRestoreSummary
Prelude.Read, Int -> AwsDynamoDbTableRestoreSummary -> ShowS
[AwsDynamoDbTableRestoreSummary] -> ShowS
AwsDynamoDbTableRestoreSummary -> String
(Int -> AwsDynamoDbTableRestoreSummary -> ShowS)
-> (AwsDynamoDbTableRestoreSummary -> String)
-> ([AwsDynamoDbTableRestoreSummary] -> ShowS)
-> Show AwsDynamoDbTableRestoreSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsDynamoDbTableRestoreSummary] -> ShowS
$cshowList :: [AwsDynamoDbTableRestoreSummary] -> ShowS
show :: AwsDynamoDbTableRestoreSummary -> String
$cshow :: AwsDynamoDbTableRestoreSummary -> String
showsPrec :: Int -> AwsDynamoDbTableRestoreSummary -> ShowS
$cshowsPrec :: Int -> AwsDynamoDbTableRestoreSummary -> ShowS
Prelude.Show, (forall x.
AwsDynamoDbTableRestoreSummary
-> Rep AwsDynamoDbTableRestoreSummary x)
-> (forall x.
Rep AwsDynamoDbTableRestoreSummary x
-> AwsDynamoDbTableRestoreSummary)
-> Generic AwsDynamoDbTableRestoreSummary
forall x.
Rep AwsDynamoDbTableRestoreSummary x
-> AwsDynamoDbTableRestoreSummary
forall x.
AwsDynamoDbTableRestoreSummary
-> Rep AwsDynamoDbTableRestoreSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsDynamoDbTableRestoreSummary x
-> AwsDynamoDbTableRestoreSummary
$cfrom :: forall x.
AwsDynamoDbTableRestoreSummary
-> Rep AwsDynamoDbTableRestoreSummary x
Prelude.Generic)
newAwsDynamoDbTableRestoreSummary ::
AwsDynamoDbTableRestoreSummary
newAwsDynamoDbTableRestoreSummary :: AwsDynamoDbTableRestoreSummary
newAwsDynamoDbTableRestoreSummary =
AwsDynamoDbTableRestoreSummary' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary'
{ $sel:sourceTableArn:AwsDynamoDbTableRestoreSummary' :: Maybe Text
sourceTableArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceBackupArn:AwsDynamoDbTableRestoreSummary' :: Maybe Text
sourceBackupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:restoreInProgress:AwsDynamoDbTableRestoreSummary' :: Maybe Bool
restoreInProgress = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:restoreDateTime:AwsDynamoDbTableRestoreSummary' :: Maybe Text
restoreDateTime = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsDynamoDbTableRestoreSummary_sourceTableArn :: Lens.Lens' AwsDynamoDbTableRestoreSummary (Prelude.Maybe Prelude.Text)
awsDynamoDbTableRestoreSummary_sourceTableArn :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableRestoreSummary
-> f AwsDynamoDbTableRestoreSummary
awsDynamoDbTableRestoreSummary_sourceTableArn = (AwsDynamoDbTableRestoreSummary -> Maybe Text)
-> (AwsDynamoDbTableRestoreSummary
-> Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Lens
AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableRestoreSummary' {Maybe Text
sourceTableArn :: Maybe Text
$sel:sourceTableArn:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
sourceTableArn} -> Maybe Text
sourceTableArn) (\s :: AwsDynamoDbTableRestoreSummary
s@AwsDynamoDbTableRestoreSummary' {} Maybe Text
a -> AwsDynamoDbTableRestoreSummary
s {$sel:sourceTableArn:AwsDynamoDbTableRestoreSummary' :: Maybe Text
sourceTableArn = Maybe Text
a} :: AwsDynamoDbTableRestoreSummary)
awsDynamoDbTableRestoreSummary_sourceBackupArn :: Lens.Lens' AwsDynamoDbTableRestoreSummary (Prelude.Maybe Prelude.Text)
awsDynamoDbTableRestoreSummary_sourceBackupArn :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableRestoreSummary
-> f AwsDynamoDbTableRestoreSummary
awsDynamoDbTableRestoreSummary_sourceBackupArn = (AwsDynamoDbTableRestoreSummary -> Maybe Text)
-> (AwsDynamoDbTableRestoreSummary
-> Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Lens
AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableRestoreSummary' {Maybe Text
sourceBackupArn :: Maybe Text
$sel:sourceBackupArn:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
sourceBackupArn} -> Maybe Text
sourceBackupArn) (\s :: AwsDynamoDbTableRestoreSummary
s@AwsDynamoDbTableRestoreSummary' {} Maybe Text
a -> AwsDynamoDbTableRestoreSummary
s {$sel:sourceBackupArn:AwsDynamoDbTableRestoreSummary' :: Maybe Text
sourceBackupArn = Maybe Text
a} :: AwsDynamoDbTableRestoreSummary)
awsDynamoDbTableRestoreSummary_restoreInProgress :: Lens.Lens' AwsDynamoDbTableRestoreSummary (Prelude.Maybe Prelude.Bool)
awsDynamoDbTableRestoreSummary_restoreInProgress :: (Maybe Bool -> f (Maybe Bool))
-> AwsDynamoDbTableRestoreSummary
-> f AwsDynamoDbTableRestoreSummary
awsDynamoDbTableRestoreSummary_restoreInProgress = (AwsDynamoDbTableRestoreSummary -> Maybe Bool)
-> (AwsDynamoDbTableRestoreSummary
-> Maybe Bool -> AwsDynamoDbTableRestoreSummary)
-> Lens
AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableRestoreSummary' {Maybe Bool
restoreInProgress :: Maybe Bool
$sel:restoreInProgress:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Bool
restoreInProgress} -> Maybe Bool
restoreInProgress) (\s :: AwsDynamoDbTableRestoreSummary
s@AwsDynamoDbTableRestoreSummary' {} Maybe Bool
a -> AwsDynamoDbTableRestoreSummary
s {$sel:restoreInProgress:AwsDynamoDbTableRestoreSummary' :: Maybe Bool
restoreInProgress = Maybe Bool
a} :: AwsDynamoDbTableRestoreSummary)
awsDynamoDbTableRestoreSummary_restoreDateTime :: Lens.Lens' AwsDynamoDbTableRestoreSummary (Prelude.Maybe Prelude.Text)
awsDynamoDbTableRestoreSummary_restoreDateTime :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableRestoreSummary
-> f AwsDynamoDbTableRestoreSummary
awsDynamoDbTableRestoreSummary_restoreDateTime = (AwsDynamoDbTableRestoreSummary -> Maybe Text)
-> (AwsDynamoDbTableRestoreSummary
-> Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Lens
AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableRestoreSummary' {Maybe Text
restoreDateTime :: Maybe Text
$sel:restoreDateTime:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
restoreDateTime} -> Maybe Text
restoreDateTime) (\s :: AwsDynamoDbTableRestoreSummary
s@AwsDynamoDbTableRestoreSummary' {} Maybe Text
a -> AwsDynamoDbTableRestoreSummary
s {$sel:restoreDateTime:AwsDynamoDbTableRestoreSummary' :: Maybe Text
restoreDateTime = Maybe Text
a} :: AwsDynamoDbTableRestoreSummary)
instance Core.FromJSON AwsDynamoDbTableRestoreSummary where
parseJSON :: Value -> Parser AwsDynamoDbTableRestoreSummary
parseJSON =
String
-> (Object -> Parser AwsDynamoDbTableRestoreSummary)
-> Value
-> Parser AwsDynamoDbTableRestoreSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsDynamoDbTableRestoreSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> AwsDynamoDbTableRestoreSummary
AwsDynamoDbTableRestoreSummary'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> AwsDynamoDbTableRestoreSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool -> Maybe Text -> AwsDynamoDbTableRestoreSummary)
forall (f :: * -> *) a b. Functor 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
"SourceTableArn")
Parser
(Maybe Text
-> Maybe Bool -> Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool -> Maybe Text -> AwsDynamoDbTableRestoreSummary)
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
"SourceBackupArn")
Parser (Maybe Bool -> Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> AwsDynamoDbTableRestoreSummary)
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
"RestoreInProgress")
Parser (Maybe Text -> AwsDynamoDbTableRestoreSummary)
-> Parser (Maybe Text) -> Parser AwsDynamoDbTableRestoreSummary
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
"RestoreDateTime")
)
instance
Prelude.Hashable
AwsDynamoDbTableRestoreSummary
instance
Prelude.NFData
AwsDynamoDbTableRestoreSummary
instance Core.ToJSON AwsDynamoDbTableRestoreSummary where
toJSON :: AwsDynamoDbTableRestoreSummary -> Value
toJSON AwsDynamoDbTableRestoreSummary' {Maybe Bool
Maybe Text
restoreDateTime :: Maybe Text
restoreInProgress :: Maybe Bool
sourceBackupArn :: Maybe Text
sourceTableArn :: Maybe Text
$sel:restoreDateTime:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
$sel:restoreInProgress:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Bool
$sel:sourceBackupArn:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
$sel:sourceTableArn:AwsDynamoDbTableRestoreSummary' :: AwsDynamoDbTableRestoreSummary -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SourceTableArn" 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
sourceTableArn,
(Text
"SourceBackupArn" 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
sourceBackupArn,
(Text
"RestoreInProgress" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
restoreInProgress,
(Text
"RestoreDateTime" 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
restoreDateTime
]
)