{-# 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.BackupSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.BackupStatus
import Amazonka.DynamoDB.Types.BackupType
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data BackupSummary = BackupSummary'
{
BackupSummary -> Maybe Text
backupArn :: Prelude.Maybe Prelude.Text,
BackupSummary -> Maybe POSIX
backupCreationDateTime :: Prelude.Maybe Data.POSIX,
BackupSummary -> Maybe POSIX
backupExpiryDateTime :: Prelude.Maybe Data.POSIX,
BackupSummary -> Maybe Text
backupName :: Prelude.Maybe Prelude.Text,
BackupSummary -> Maybe Natural
backupSizeBytes :: Prelude.Maybe Prelude.Natural,
BackupSummary -> Maybe BackupStatus
backupStatus :: Prelude.Maybe BackupStatus,
BackupSummary -> Maybe BackupType
backupType :: Prelude.Maybe BackupType,
BackupSummary -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text,
BackupSummary -> Maybe Text
tableId :: Prelude.Maybe Prelude.Text,
BackupSummary -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
}
deriving (BackupSummary -> BackupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupSummary -> BackupSummary -> Bool
$c/= :: BackupSummary -> BackupSummary -> Bool
== :: BackupSummary -> BackupSummary -> Bool
$c== :: BackupSummary -> BackupSummary -> Bool
Prelude.Eq, ReadPrec [BackupSummary]
ReadPrec BackupSummary
Int -> ReadS BackupSummary
ReadS [BackupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackupSummary]
$creadListPrec :: ReadPrec [BackupSummary]
readPrec :: ReadPrec BackupSummary
$creadPrec :: ReadPrec BackupSummary
readList :: ReadS [BackupSummary]
$creadList :: ReadS [BackupSummary]
readsPrec :: Int -> ReadS BackupSummary
$creadsPrec :: Int -> ReadS BackupSummary
Prelude.Read, Int -> BackupSummary -> ShowS
[BackupSummary] -> ShowS
BackupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupSummary] -> ShowS
$cshowList :: [BackupSummary] -> ShowS
show :: BackupSummary -> String
$cshow :: BackupSummary -> String
showsPrec :: Int -> BackupSummary -> ShowS
$cshowsPrec :: Int -> BackupSummary -> ShowS
Prelude.Show, forall x. Rep BackupSummary x -> BackupSummary
forall x. BackupSummary -> Rep BackupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupSummary x -> BackupSummary
$cfrom :: forall x. BackupSummary -> Rep BackupSummary x
Prelude.Generic)
newBackupSummary ::
BackupSummary
newBackupSummary :: BackupSummary
newBackupSummary =
BackupSummary'
{ $sel:backupArn:BackupSummary' :: Maybe Text
backupArn = forall a. Maybe a
Prelude.Nothing,
$sel:backupCreationDateTime:BackupSummary' :: Maybe POSIX
backupCreationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:backupExpiryDateTime:BackupSummary' :: Maybe POSIX
backupExpiryDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:backupName:BackupSummary' :: Maybe Text
backupName = forall a. Maybe a
Prelude.Nothing,
$sel:backupSizeBytes:BackupSummary' :: Maybe Natural
backupSizeBytes = forall a. Maybe a
Prelude.Nothing,
$sel:backupStatus:BackupSummary' :: Maybe BackupStatus
backupStatus = forall a. Maybe a
Prelude.Nothing,
$sel:backupType:BackupSummary' :: Maybe BackupType
backupType = forall a. Maybe a
Prelude.Nothing,
$sel:tableArn:BackupSummary' :: Maybe Text
tableArn = forall a. Maybe a
Prelude.Nothing,
$sel:tableId:BackupSummary' :: Maybe Text
tableId = forall a. Maybe a
Prelude.Nothing,
$sel:tableName:BackupSummary' :: Maybe Text
tableName = forall a. Maybe a
Prelude.Nothing
}
backupSummary_backupArn :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_backupArn :: Lens' BackupSummary (Maybe Text)
backupSummary_backupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
backupArn :: Maybe Text
$sel:backupArn:BackupSummary' :: BackupSummary -> Maybe Text
backupArn} -> Maybe Text
backupArn) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:backupArn:BackupSummary' :: Maybe Text
backupArn = Maybe Text
a} :: BackupSummary)
backupSummary_backupCreationDateTime :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.UTCTime)
backupSummary_backupCreationDateTime :: Lens' BackupSummary (Maybe UTCTime)
backupSummary_backupCreationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe POSIX
backupCreationDateTime :: Maybe POSIX
$sel:backupCreationDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
backupCreationDateTime} -> Maybe POSIX
backupCreationDateTime) (\s :: BackupSummary
s@BackupSummary' {} Maybe POSIX
a -> BackupSummary
s {$sel:backupCreationDateTime:BackupSummary' :: Maybe POSIX
backupCreationDateTime = Maybe POSIX
a} :: BackupSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
backupSummary_backupExpiryDateTime :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.UTCTime)
backupSummary_backupExpiryDateTime :: Lens' BackupSummary (Maybe UTCTime)
backupSummary_backupExpiryDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe POSIX
backupExpiryDateTime :: Maybe POSIX
$sel:backupExpiryDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
backupExpiryDateTime} -> Maybe POSIX
backupExpiryDateTime) (\s :: BackupSummary
s@BackupSummary' {} Maybe POSIX
a -> BackupSummary
s {$sel:backupExpiryDateTime:BackupSummary' :: Maybe POSIX
backupExpiryDateTime = Maybe POSIX
a} :: BackupSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
backupSummary_backupName :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_backupName :: Lens' BackupSummary (Maybe Text)
backupSummary_backupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
backupName :: Maybe Text
$sel:backupName:BackupSummary' :: BackupSummary -> Maybe Text
backupName} -> Maybe Text
backupName) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:backupName:BackupSummary' :: Maybe Text
backupName = Maybe Text
a} :: BackupSummary)
backupSummary_backupSizeBytes :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Natural)
backupSummary_backupSizeBytes :: Lens' BackupSummary (Maybe Natural)
backupSummary_backupSizeBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Natural
backupSizeBytes :: Maybe Natural
$sel:backupSizeBytes:BackupSummary' :: BackupSummary -> Maybe Natural
backupSizeBytes} -> Maybe Natural
backupSizeBytes) (\s :: BackupSummary
s@BackupSummary' {} Maybe Natural
a -> BackupSummary
s {$sel:backupSizeBytes:BackupSummary' :: Maybe Natural
backupSizeBytes = Maybe Natural
a} :: BackupSummary)
backupSummary_backupStatus :: Lens.Lens' BackupSummary (Prelude.Maybe BackupStatus)
backupSummary_backupStatus :: Lens' BackupSummary (Maybe BackupStatus)
backupSummary_backupStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe BackupStatus
backupStatus :: Maybe BackupStatus
$sel:backupStatus:BackupSummary' :: BackupSummary -> Maybe BackupStatus
backupStatus} -> Maybe BackupStatus
backupStatus) (\s :: BackupSummary
s@BackupSummary' {} Maybe BackupStatus
a -> BackupSummary
s {$sel:backupStatus:BackupSummary' :: Maybe BackupStatus
backupStatus = Maybe BackupStatus
a} :: BackupSummary)
backupSummary_backupType :: Lens.Lens' BackupSummary (Prelude.Maybe BackupType)
backupSummary_backupType :: Lens' BackupSummary (Maybe BackupType)
backupSummary_backupType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe BackupType
backupType :: Maybe BackupType
$sel:backupType:BackupSummary' :: BackupSummary -> Maybe BackupType
backupType} -> Maybe BackupType
backupType) (\s :: BackupSummary
s@BackupSummary' {} Maybe BackupType
a -> BackupSummary
s {$sel:backupType:BackupSummary' :: Maybe BackupType
backupType = Maybe BackupType
a} :: BackupSummary)
backupSummary_tableArn :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableArn :: Lens' BackupSummary (Maybe Text)
backupSummary_tableArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:BackupSummary' :: BackupSummary -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableArn:BackupSummary' :: Maybe Text
tableArn = Maybe Text
a} :: BackupSummary)
backupSummary_tableId :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableId :: Lens' BackupSummary (Maybe Text)
backupSummary_tableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableId :: Maybe Text
$sel:tableId:BackupSummary' :: BackupSummary -> Maybe Text
tableId} -> Maybe Text
tableId) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableId:BackupSummary' :: Maybe Text
tableId = Maybe Text
a} :: BackupSummary)
backupSummary_tableName :: Lens.Lens' BackupSummary (Prelude.Maybe Prelude.Text)
backupSummary_tableName :: Lens' BackupSummary (Maybe Text)
backupSummary_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSummary' {Maybe Text
tableName :: Maybe Text
$sel:tableName:BackupSummary' :: BackupSummary -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: BackupSummary
s@BackupSummary' {} Maybe Text
a -> BackupSummary
s {$sel:tableName:BackupSummary' :: Maybe Text
tableName = Maybe Text
a} :: BackupSummary)
instance Data.FromJSON BackupSummary where
parseJSON :: Value -> Parser BackupSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BackupSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> Maybe BackupStatus
-> Maybe BackupType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BackupSummary
BackupSummary'
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
"BackupArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupCreationDateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupExpiryDateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupSizeBytes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BackupType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TableArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TableId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TableName")
)
instance Prelude.Hashable BackupSummary where
hashWithSalt :: Int -> BackupSummary -> Int
hashWithSalt Int
_salt BackupSummary' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe BackupType
Maybe BackupStatus
tableName :: Maybe Text
tableId :: Maybe Text
tableArn :: Maybe Text
backupType :: Maybe BackupType
backupStatus :: Maybe BackupStatus
backupSizeBytes :: Maybe Natural
backupName :: Maybe Text
backupExpiryDateTime :: Maybe POSIX
backupCreationDateTime :: Maybe POSIX
backupArn :: Maybe Text
$sel:tableName:BackupSummary' :: BackupSummary -> Maybe Text
$sel:tableId:BackupSummary' :: BackupSummary -> Maybe Text
$sel:tableArn:BackupSummary' :: BackupSummary -> Maybe Text
$sel:backupType:BackupSummary' :: BackupSummary -> Maybe BackupType
$sel:backupStatus:BackupSummary' :: BackupSummary -> Maybe BackupStatus
$sel:backupSizeBytes:BackupSummary' :: BackupSummary -> Maybe Natural
$sel:backupName:BackupSummary' :: BackupSummary -> Maybe Text
$sel:backupExpiryDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
$sel:backupCreationDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
$sel:backupArn:BackupSummary' :: BackupSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
backupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
backupCreationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
backupExpiryDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
backupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
backupSizeBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BackupStatus
backupStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BackupType
backupType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableName
instance Prelude.NFData BackupSummary where
rnf :: BackupSummary -> ()
rnf BackupSummary' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe BackupType
Maybe BackupStatus
tableName :: Maybe Text
tableId :: Maybe Text
tableArn :: Maybe Text
backupType :: Maybe BackupType
backupStatus :: Maybe BackupStatus
backupSizeBytes :: Maybe Natural
backupName :: Maybe Text
backupExpiryDateTime :: Maybe POSIX
backupCreationDateTime :: Maybe POSIX
backupArn :: Maybe Text
$sel:tableName:BackupSummary' :: BackupSummary -> Maybe Text
$sel:tableId:BackupSummary' :: BackupSummary -> Maybe Text
$sel:tableArn:BackupSummary' :: BackupSummary -> Maybe Text
$sel:backupType:BackupSummary' :: BackupSummary -> Maybe BackupType
$sel:backupStatus:BackupSummary' :: BackupSummary -> Maybe BackupStatus
$sel:backupSizeBytes:BackupSummary' :: BackupSummary -> Maybe Natural
$sel:backupName:BackupSummary' :: BackupSummary -> Maybe Text
$sel:backupExpiryDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
$sel:backupCreationDateTime:BackupSummary' :: BackupSummary -> Maybe POSIX
$sel:backupArn:BackupSummary' :: BackupSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
backupCreationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
backupExpiryDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
backupSizeBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BackupStatus
backupStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BackupType
backupType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableName