{-# 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.ArchivalSummary 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.WriteRequest
import qualified Amazonka.Prelude as Prelude
data ArchivalSummary = ArchivalSummary'
{
ArchivalSummary -> Maybe Text
archivalBackupArn :: Prelude.Maybe Prelude.Text,
ArchivalSummary -> Maybe POSIX
archivalDateTime :: Prelude.Maybe Data.POSIX,
ArchivalSummary -> Maybe Text
archivalReason :: Prelude.Maybe Prelude.Text
}
deriving (ArchivalSummary -> ArchivalSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArchivalSummary -> ArchivalSummary -> Bool
$c/= :: ArchivalSummary -> ArchivalSummary -> Bool
== :: ArchivalSummary -> ArchivalSummary -> Bool
$c== :: ArchivalSummary -> ArchivalSummary -> Bool
Prelude.Eq, ReadPrec [ArchivalSummary]
ReadPrec ArchivalSummary
Int -> ReadS ArchivalSummary
ReadS [ArchivalSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArchivalSummary]
$creadListPrec :: ReadPrec [ArchivalSummary]
readPrec :: ReadPrec ArchivalSummary
$creadPrec :: ReadPrec ArchivalSummary
readList :: ReadS [ArchivalSummary]
$creadList :: ReadS [ArchivalSummary]
readsPrec :: Int -> ReadS ArchivalSummary
$creadsPrec :: Int -> ReadS ArchivalSummary
Prelude.Read, Int -> ArchivalSummary -> ShowS
[ArchivalSummary] -> ShowS
ArchivalSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArchivalSummary] -> ShowS
$cshowList :: [ArchivalSummary] -> ShowS
show :: ArchivalSummary -> String
$cshow :: ArchivalSummary -> String
showsPrec :: Int -> ArchivalSummary -> ShowS
$cshowsPrec :: Int -> ArchivalSummary -> ShowS
Prelude.Show, forall x. Rep ArchivalSummary x -> ArchivalSummary
forall x. ArchivalSummary -> Rep ArchivalSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArchivalSummary x -> ArchivalSummary
$cfrom :: forall x. ArchivalSummary -> Rep ArchivalSummary x
Prelude.Generic)
newArchivalSummary ::
ArchivalSummary
newArchivalSummary :: ArchivalSummary
newArchivalSummary =
ArchivalSummary'
{ $sel:archivalBackupArn:ArchivalSummary' :: Maybe Text
archivalBackupArn =
forall a. Maybe a
Prelude.Nothing,
$sel:archivalDateTime:ArchivalSummary' :: Maybe POSIX
archivalDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:archivalReason:ArchivalSummary' :: Maybe Text
archivalReason = forall a. Maybe a
Prelude.Nothing
}
archivalSummary_archivalBackupArn :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.Text)
archivalSummary_archivalBackupArn :: Lens' ArchivalSummary (Maybe Text)
archivalSummary_archivalBackupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchivalSummary' {Maybe Text
archivalBackupArn :: Maybe Text
$sel:archivalBackupArn:ArchivalSummary' :: ArchivalSummary -> Maybe Text
archivalBackupArn} -> Maybe Text
archivalBackupArn) (\s :: ArchivalSummary
s@ArchivalSummary' {} Maybe Text
a -> ArchivalSummary
s {$sel:archivalBackupArn:ArchivalSummary' :: Maybe Text
archivalBackupArn = Maybe Text
a} :: ArchivalSummary)
archivalSummary_archivalDateTime :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.UTCTime)
archivalSummary_archivalDateTime :: Lens' ArchivalSummary (Maybe UTCTime)
archivalSummary_archivalDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchivalSummary' {Maybe POSIX
archivalDateTime :: Maybe POSIX
$sel:archivalDateTime:ArchivalSummary' :: ArchivalSummary -> Maybe POSIX
archivalDateTime} -> Maybe POSIX
archivalDateTime) (\s :: ArchivalSummary
s@ArchivalSummary' {} Maybe POSIX
a -> ArchivalSummary
s {$sel:archivalDateTime:ArchivalSummary' :: Maybe POSIX
archivalDateTime = Maybe POSIX
a} :: ArchivalSummary) 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
archivalSummary_archivalReason :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.Text)
archivalSummary_archivalReason :: Lens' ArchivalSummary (Maybe Text)
archivalSummary_archivalReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchivalSummary' {Maybe Text
archivalReason :: Maybe Text
$sel:archivalReason:ArchivalSummary' :: ArchivalSummary -> Maybe Text
archivalReason} -> Maybe Text
archivalReason) (\s :: ArchivalSummary
s@ArchivalSummary' {} Maybe Text
a -> ArchivalSummary
s {$sel:archivalReason:ArchivalSummary' :: Maybe Text
archivalReason = Maybe Text
a} :: ArchivalSummary)
instance Data.FromJSON ArchivalSummary where
parseJSON :: Value -> Parser ArchivalSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ArchivalSummary"
( \Object
x ->
Maybe Text -> Maybe POSIX -> Maybe Text -> ArchivalSummary
ArchivalSummary'
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
"ArchivalBackupArn")
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
"ArchivalDateTime")
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
"ArchivalReason")
)
instance Prelude.Hashable ArchivalSummary where
hashWithSalt :: Int -> ArchivalSummary -> Int
hashWithSalt Int
_salt ArchivalSummary' {Maybe Text
Maybe POSIX
archivalReason :: Maybe Text
archivalDateTime :: Maybe POSIX
archivalBackupArn :: Maybe Text
$sel:archivalReason:ArchivalSummary' :: ArchivalSummary -> Maybe Text
$sel:archivalDateTime:ArchivalSummary' :: ArchivalSummary -> Maybe POSIX
$sel:archivalBackupArn:ArchivalSummary' :: ArchivalSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
archivalBackupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
archivalDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
archivalReason
instance Prelude.NFData ArchivalSummary where
rnf :: ArchivalSummary -> ()
rnf ArchivalSummary' {Maybe Text
Maybe POSIX
archivalReason :: Maybe Text
archivalDateTime :: Maybe POSIX
archivalBackupArn :: Maybe Text
$sel:archivalReason:ArchivalSummary' :: ArchivalSummary -> Maybe Text
$sel:archivalDateTime:ArchivalSummary' :: ArchivalSummary -> Maybe POSIX
$sel:archivalBackupArn:ArchivalSummary' :: ArchivalSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
archivalBackupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
archivalDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
archivalReason