{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ArchivalSummary = ArchivalSummary'
{
ArchivalSummary -> Maybe Text
archivalReason :: Prelude.Maybe Prelude.Text,
ArchivalSummary -> Maybe POSIX
archivalDateTime :: Prelude.Maybe Core.POSIX,
ArchivalSummary -> Maybe Text
archivalBackupArn :: Prelude.Maybe Prelude.Text
}
deriving (ArchivalSummary -> ArchivalSummary -> Bool
(ArchivalSummary -> ArchivalSummary -> Bool)
-> (ArchivalSummary -> ArchivalSummary -> Bool)
-> Eq ArchivalSummary
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]
(Int -> ReadS ArchivalSummary)
-> ReadS [ArchivalSummary]
-> ReadPrec ArchivalSummary
-> ReadPrec [ArchivalSummary]
-> Read 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
(Int -> ArchivalSummary -> ShowS)
-> (ArchivalSummary -> String)
-> ([ArchivalSummary] -> ShowS)
-> Show ArchivalSummary
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. ArchivalSummary -> Rep ArchivalSummary x)
-> (forall x. Rep ArchivalSummary x -> ArchivalSummary)
-> Generic ArchivalSummary
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' :: Maybe Text -> Maybe POSIX -> Maybe Text -> ArchivalSummary
ArchivalSummary'
{ $sel:archivalReason:ArchivalSummary' :: Maybe Text
archivalReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:archivalDateTime:ArchivalSummary' :: Maybe POSIX
archivalDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:archivalBackupArn:ArchivalSummary' :: Maybe Text
archivalBackupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
archivalSummary_archivalReason :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.Text)
archivalSummary_archivalReason :: (Maybe Text -> f (Maybe Text))
-> ArchivalSummary -> f ArchivalSummary
archivalSummary_archivalReason = (ArchivalSummary -> Maybe Text)
-> (ArchivalSummary -> Maybe Text -> ArchivalSummary)
-> Lens ArchivalSummary ArchivalSummary (Maybe Text) (Maybe Text)
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)
archivalSummary_archivalDateTime :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.UTCTime)
archivalSummary_archivalDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ArchivalSummary -> f ArchivalSummary
archivalSummary_archivalDateTime = (ArchivalSummary -> Maybe POSIX)
-> (ArchivalSummary -> Maybe POSIX -> ArchivalSummary)
-> Lens ArchivalSummary ArchivalSummary (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> ArchivalSummary -> f ArchivalSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ArchivalSummary
-> f ArchivalSummary
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
archivalSummary_archivalBackupArn :: Lens.Lens' ArchivalSummary (Prelude.Maybe Prelude.Text)
archivalSummary_archivalBackupArn :: (Maybe Text -> f (Maybe Text))
-> ArchivalSummary -> f ArchivalSummary
archivalSummary_archivalBackupArn = (ArchivalSummary -> Maybe Text)
-> (ArchivalSummary -> Maybe Text -> ArchivalSummary)
-> Lens ArchivalSummary ArchivalSummary (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON ArchivalSummary where
parseJSON :: Value -> Parser ArchivalSummary
parseJSON =
String
-> (Object -> Parser ArchivalSummary)
-> Value
-> Parser ArchivalSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ArchivalSummary"
( \Object
x ->
Maybe Text -> Maybe POSIX -> Maybe Text -> ArchivalSummary
ArchivalSummary'
(Maybe Text -> Maybe POSIX -> Maybe Text -> ArchivalSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> ArchivalSummary)
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
"ArchivalReason")
Parser (Maybe POSIX -> Maybe Text -> ArchivalSummary)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> ArchivalSummary)
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
"ArchivalDateTime")
Parser (Maybe Text -> ArchivalSummary)
-> Parser (Maybe Text) -> Parser ArchivalSummary
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
"ArchivalBackupArn")
)
instance Prelude.Hashable ArchivalSummary
instance Prelude.NFData ArchivalSummary