{-# 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.Backup.Types.RecoveryPointByResource where
import Amazonka.Backup.Types.RecoveryPointStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RecoveryPointByResource = RecoveryPointByResource'
{
RecoveryPointByResource -> Maybe RecoveryPointStatus
status :: Prelude.Maybe RecoveryPointStatus,
RecoveryPointByResource -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
RecoveryPointByResource -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
RecoveryPointByResource -> Maybe Integer
backupSizeBytes :: Prelude.Maybe Prelude.Integer,
RecoveryPointByResource -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
RecoveryPointByResource -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
RecoveryPointByResource -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text
}
deriving (RecoveryPointByResource -> RecoveryPointByResource -> Bool
(RecoveryPointByResource -> RecoveryPointByResource -> Bool)
-> (RecoveryPointByResource -> RecoveryPointByResource -> Bool)
-> Eq RecoveryPointByResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecoveryPointByResource -> RecoveryPointByResource -> Bool
$c/= :: RecoveryPointByResource -> RecoveryPointByResource -> Bool
== :: RecoveryPointByResource -> RecoveryPointByResource -> Bool
$c== :: RecoveryPointByResource -> RecoveryPointByResource -> Bool
Prelude.Eq, ReadPrec [RecoveryPointByResource]
ReadPrec RecoveryPointByResource
Int -> ReadS RecoveryPointByResource
ReadS [RecoveryPointByResource]
(Int -> ReadS RecoveryPointByResource)
-> ReadS [RecoveryPointByResource]
-> ReadPrec RecoveryPointByResource
-> ReadPrec [RecoveryPointByResource]
-> Read RecoveryPointByResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecoveryPointByResource]
$creadListPrec :: ReadPrec [RecoveryPointByResource]
readPrec :: ReadPrec RecoveryPointByResource
$creadPrec :: ReadPrec RecoveryPointByResource
readList :: ReadS [RecoveryPointByResource]
$creadList :: ReadS [RecoveryPointByResource]
readsPrec :: Int -> ReadS RecoveryPointByResource
$creadsPrec :: Int -> ReadS RecoveryPointByResource
Prelude.Read, Int -> RecoveryPointByResource -> ShowS
[RecoveryPointByResource] -> ShowS
RecoveryPointByResource -> String
(Int -> RecoveryPointByResource -> ShowS)
-> (RecoveryPointByResource -> String)
-> ([RecoveryPointByResource] -> ShowS)
-> Show RecoveryPointByResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecoveryPointByResource] -> ShowS
$cshowList :: [RecoveryPointByResource] -> ShowS
show :: RecoveryPointByResource -> String
$cshow :: RecoveryPointByResource -> String
showsPrec :: Int -> RecoveryPointByResource -> ShowS
$cshowsPrec :: Int -> RecoveryPointByResource -> ShowS
Prelude.Show, (forall x.
RecoveryPointByResource -> Rep RecoveryPointByResource x)
-> (forall x.
Rep RecoveryPointByResource x -> RecoveryPointByResource)
-> Generic RecoveryPointByResource
forall x. Rep RecoveryPointByResource x -> RecoveryPointByResource
forall x. RecoveryPointByResource -> Rep RecoveryPointByResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecoveryPointByResource x -> RecoveryPointByResource
$cfrom :: forall x. RecoveryPointByResource -> Rep RecoveryPointByResource x
Prelude.Generic)
newRecoveryPointByResource ::
RecoveryPointByResource
newRecoveryPointByResource :: RecoveryPointByResource
newRecoveryPointByResource =
RecoveryPointByResource' :: Maybe RecoveryPointStatus
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource
RecoveryPointByResource'
{ $sel:status:RecoveryPointByResource' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:RecoveryPointByResource' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recoveryPointArn:RecoveryPointByResource' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:backupSizeBytes:RecoveryPointByResource' :: Maybe Integer
backupSizeBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKeyArn:RecoveryPointByResource' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:RecoveryPointByResource' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:backupVaultName:RecoveryPointByResource' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
recoveryPointByResource_status :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe RecoveryPointStatus)
recoveryPointByResource_status :: (Maybe RecoveryPointStatus -> f (Maybe RecoveryPointStatus))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_status = (RecoveryPointByResource -> Maybe RecoveryPointStatus)
-> (RecoveryPointByResource
-> Maybe RecoveryPointStatus -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe RecoveryPointStatus)
(Maybe RecoveryPointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe RecoveryPointStatus
status :: Maybe RecoveryPointStatus
$sel:status:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe RecoveryPointStatus
status} -> Maybe RecoveryPointStatus
status) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe RecoveryPointStatus
a -> RecoveryPointByResource
s {$sel:status:RecoveryPointByResource' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
a} :: RecoveryPointByResource)
recoveryPointByResource_statusMessage :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)
recoveryPointByResource_statusMessage :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_statusMessage = (RecoveryPointByResource -> Maybe Text)
-> (RecoveryPointByResource
-> Maybe Text -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe Text
a -> RecoveryPointByResource
s {$sel:statusMessage:RecoveryPointByResource' :: Maybe Text
statusMessage = Maybe Text
a} :: RecoveryPointByResource)
recoveryPointByResource_recoveryPointArn :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)
recoveryPointByResource_recoveryPointArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_recoveryPointArn = (RecoveryPointByResource -> Maybe Text)
-> (RecoveryPointByResource
-> Maybe Text -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe Text
recoveryPointArn :: Maybe Text
$sel:recoveryPointArn:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe Text
recoveryPointArn} -> Maybe Text
recoveryPointArn) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe Text
a -> RecoveryPointByResource
s {$sel:recoveryPointArn:RecoveryPointByResource' :: Maybe Text
recoveryPointArn = Maybe Text
a} :: RecoveryPointByResource)
recoveryPointByResource_backupSizeBytes :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Integer)
recoveryPointByResource_backupSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_backupSizeBytes = (RecoveryPointByResource -> Maybe Integer)
-> (RecoveryPointByResource
-> Maybe Integer -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe Integer
backupSizeBytes :: Maybe Integer
$sel:backupSizeBytes:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe Integer
backupSizeBytes} -> Maybe Integer
backupSizeBytes) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe Integer
a -> RecoveryPointByResource
s {$sel:backupSizeBytes:RecoveryPointByResource' :: Maybe Integer
backupSizeBytes = Maybe Integer
a} :: RecoveryPointByResource)
recoveryPointByResource_encryptionKeyArn :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)
recoveryPointByResource_encryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_encryptionKeyArn = (RecoveryPointByResource -> Maybe Text)
-> (RecoveryPointByResource
-> Maybe Text -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe Text
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe Text
a -> RecoveryPointByResource
s {$sel:encryptionKeyArn:RecoveryPointByResource' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: RecoveryPointByResource)
recoveryPointByResource_creationDate :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.UTCTime)
recoveryPointByResource_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_creationDate = (RecoveryPointByResource -> Maybe POSIX)
-> (RecoveryPointByResource
-> Maybe POSIX -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe POSIX
a -> RecoveryPointByResource
s {$sel:creationDate:RecoveryPointByResource' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: RecoveryPointByResource) ((Maybe POSIX -> f (Maybe POSIX))
-> RecoveryPointByResource -> f RecoveryPointByResource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByResource
-> f RecoveryPointByResource
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
recoveryPointByResource_backupVaultName :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)
recoveryPointByResource_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByResource -> f RecoveryPointByResource
recoveryPointByResource_backupVaultName = (RecoveryPointByResource -> Maybe Text)
-> (RecoveryPointByResource
-> Maybe Text -> RecoveryPointByResource)
-> Lens
RecoveryPointByResource
RecoveryPointByResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByResource' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:RecoveryPointByResource' :: RecoveryPointByResource -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: RecoveryPointByResource
s@RecoveryPointByResource' {} Maybe Text
a -> RecoveryPointByResource
s {$sel:backupVaultName:RecoveryPointByResource' :: Maybe Text
backupVaultName = Maybe Text
a} :: RecoveryPointByResource)
instance Core.FromJSON RecoveryPointByResource where
parseJSON :: Value -> Parser RecoveryPointByResource
parseJSON =
String
-> (Object -> Parser RecoveryPointByResource)
-> Value
-> Parser RecoveryPointByResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RecoveryPointByResource"
( \Object
x ->
Maybe RecoveryPointStatus
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource
RecoveryPointByResource'
(Maybe RecoveryPointStatus
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
-> Parser (Maybe RecoveryPointStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RecoveryPointStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
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
"StatusMessage")
Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
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
"RecoveryPointArn")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByResource)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> RecoveryPointByResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupSizeBytes")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> RecoveryPointByResource)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> RecoveryPointByResource)
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
"EncryptionKeyArn")
Parser (Maybe POSIX -> Maybe Text -> RecoveryPointByResource)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> RecoveryPointByResource)
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
"CreationDate")
Parser (Maybe Text -> RecoveryPointByResource)
-> Parser (Maybe Text) -> Parser RecoveryPointByResource
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
"BackupVaultName")
)
instance Prelude.Hashable RecoveryPointByResource
instance Prelude.NFData RecoveryPointByResource