{-# 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.Redshift.Types.ClusterSnapshotCopyStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data ClusterSnapshotCopyStatus = ClusterSnapshotCopyStatus'
{
ClusterSnapshotCopyStatus -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
ClusterSnapshotCopyStatus -> Maybe Integer
retentionPeriod :: Prelude.Maybe Prelude.Integer,
ClusterSnapshotCopyStatus -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
ClusterSnapshotCopyStatus -> Maybe Text
snapshotCopyGrantName :: Prelude.Maybe Prelude.Text
}
deriving (ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
(ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool)
-> (ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool)
-> Eq ClusterSnapshotCopyStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
$c/= :: ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
== :: ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
$c== :: ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
Prelude.Eq, ReadPrec [ClusterSnapshotCopyStatus]
ReadPrec ClusterSnapshotCopyStatus
Int -> ReadS ClusterSnapshotCopyStatus
ReadS [ClusterSnapshotCopyStatus]
(Int -> ReadS ClusterSnapshotCopyStatus)
-> ReadS [ClusterSnapshotCopyStatus]
-> ReadPrec ClusterSnapshotCopyStatus
-> ReadPrec [ClusterSnapshotCopyStatus]
-> Read ClusterSnapshotCopyStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterSnapshotCopyStatus]
$creadListPrec :: ReadPrec [ClusterSnapshotCopyStatus]
readPrec :: ReadPrec ClusterSnapshotCopyStatus
$creadPrec :: ReadPrec ClusterSnapshotCopyStatus
readList :: ReadS [ClusterSnapshotCopyStatus]
$creadList :: ReadS [ClusterSnapshotCopyStatus]
readsPrec :: Int -> ReadS ClusterSnapshotCopyStatus
$creadsPrec :: Int -> ReadS ClusterSnapshotCopyStatus
Prelude.Read, Int -> ClusterSnapshotCopyStatus -> ShowS
[ClusterSnapshotCopyStatus] -> ShowS
ClusterSnapshotCopyStatus -> String
(Int -> ClusterSnapshotCopyStatus -> ShowS)
-> (ClusterSnapshotCopyStatus -> String)
-> ([ClusterSnapshotCopyStatus] -> ShowS)
-> Show ClusterSnapshotCopyStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterSnapshotCopyStatus] -> ShowS
$cshowList :: [ClusterSnapshotCopyStatus] -> ShowS
show :: ClusterSnapshotCopyStatus -> String
$cshow :: ClusterSnapshotCopyStatus -> String
showsPrec :: Int -> ClusterSnapshotCopyStatus -> ShowS
$cshowsPrec :: Int -> ClusterSnapshotCopyStatus -> ShowS
Prelude.Show, (forall x.
ClusterSnapshotCopyStatus -> Rep ClusterSnapshotCopyStatus x)
-> (forall x.
Rep ClusterSnapshotCopyStatus x -> ClusterSnapshotCopyStatus)
-> Generic ClusterSnapshotCopyStatus
forall x.
Rep ClusterSnapshotCopyStatus x -> ClusterSnapshotCopyStatus
forall x.
ClusterSnapshotCopyStatus -> Rep ClusterSnapshotCopyStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClusterSnapshotCopyStatus x -> ClusterSnapshotCopyStatus
$cfrom :: forall x.
ClusterSnapshotCopyStatus -> Rep ClusterSnapshotCopyStatus x
Prelude.Generic)
newClusterSnapshotCopyStatus ::
ClusterSnapshotCopyStatus
newClusterSnapshotCopyStatus :: ClusterSnapshotCopyStatus
newClusterSnapshotCopyStatus =
ClusterSnapshotCopyStatus' :: Maybe Int
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus'
{ $sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Int
manualSnapshotRetentionPeriod =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Integer
retentionPeriod = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:destinationRegion:ClusterSnapshotCopyStatus' :: Maybe Text
destinationRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: Maybe Text
snapshotCopyGrantName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterSnapshotCopyStatus_manualSnapshotRetentionPeriod :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Int)
clusterSnapshotCopyStatus_manualSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> ClusterSnapshotCopyStatus -> f ClusterSnapshotCopyStatus
clusterSnapshotCopyStatus_manualSnapshotRetentionPeriod = (ClusterSnapshotCopyStatus -> Maybe Int)
-> (ClusterSnapshotCopyStatus
-> Maybe Int -> ClusterSnapshotCopyStatus)
-> Lens
ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshotCopyStatus' {Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
$sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Int
manualSnapshotRetentionPeriod} -> Maybe Int
manualSnapshotRetentionPeriod) (\s :: ClusterSnapshotCopyStatus
s@ClusterSnapshotCopyStatus' {} Maybe Int
a -> ClusterSnapshotCopyStatus
s {$sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
a} :: ClusterSnapshotCopyStatus)
clusterSnapshotCopyStatus_retentionPeriod :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Integer)
clusterSnapshotCopyStatus_retentionPeriod :: (Maybe Integer -> f (Maybe Integer))
-> ClusterSnapshotCopyStatus -> f ClusterSnapshotCopyStatus
clusterSnapshotCopyStatus_retentionPeriod = (ClusterSnapshotCopyStatus -> Maybe Integer)
-> (ClusterSnapshotCopyStatus
-> Maybe Integer -> ClusterSnapshotCopyStatus)
-> Lens
ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshotCopyStatus' {Maybe Integer
retentionPeriod :: Maybe Integer
$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Integer
retentionPeriod} -> Maybe Integer
retentionPeriod) (\s :: ClusterSnapshotCopyStatus
s@ClusterSnapshotCopyStatus' {} Maybe Integer
a -> ClusterSnapshotCopyStatus
s {$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Integer
retentionPeriod = Maybe Integer
a} :: ClusterSnapshotCopyStatus)
clusterSnapshotCopyStatus_destinationRegion :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
clusterSnapshotCopyStatus_destinationRegion :: (Maybe Text -> f (Maybe Text))
-> ClusterSnapshotCopyStatus -> f ClusterSnapshotCopyStatus
clusterSnapshotCopyStatus_destinationRegion = (ClusterSnapshotCopyStatus -> Maybe Text)
-> (ClusterSnapshotCopyStatus
-> Maybe Text -> ClusterSnapshotCopyStatus)
-> Lens
ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshotCopyStatus' {Maybe Text
destinationRegion :: Maybe Text
$sel:destinationRegion:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
destinationRegion} -> Maybe Text
destinationRegion) (\s :: ClusterSnapshotCopyStatus
s@ClusterSnapshotCopyStatus' {} Maybe Text
a -> ClusterSnapshotCopyStatus
s {$sel:destinationRegion:ClusterSnapshotCopyStatus' :: Maybe Text
destinationRegion = Maybe Text
a} :: ClusterSnapshotCopyStatus)
clusterSnapshotCopyStatus_snapshotCopyGrantName :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
clusterSnapshotCopyStatus_snapshotCopyGrantName :: (Maybe Text -> f (Maybe Text))
-> ClusterSnapshotCopyStatus -> f ClusterSnapshotCopyStatus
clusterSnapshotCopyStatus_snapshotCopyGrantName = (ClusterSnapshotCopyStatus -> Maybe Text)
-> (ClusterSnapshotCopyStatus
-> Maybe Text -> ClusterSnapshotCopyStatus)
-> Lens
ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshotCopyStatus' {Maybe Text
snapshotCopyGrantName :: Maybe Text
$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
snapshotCopyGrantName} -> Maybe Text
snapshotCopyGrantName) (\s :: ClusterSnapshotCopyStatus
s@ClusterSnapshotCopyStatus' {} Maybe Text
a -> ClusterSnapshotCopyStatus
s {$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: Maybe Text
snapshotCopyGrantName = Maybe Text
a} :: ClusterSnapshotCopyStatus)
instance Core.FromXML ClusterSnapshotCopyStatus where
parseXML :: [Node] -> Either String ClusterSnapshotCopyStatus
parseXML [Node]
x =
Maybe Int
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus'
(Maybe Int
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> ClusterSnapshotCopyStatus)
-> Either String (Maybe Int)
-> Either
String
(Maybe Integer
-> Maybe Text -> Maybe Text -> ClusterSnapshotCopyStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ManualSnapshotRetentionPeriod")
Either
String
(Maybe Integer
-> Maybe Text -> Maybe Text -> ClusterSnapshotCopyStatus)
-> Either String (Maybe Integer)
-> Either
String (Maybe Text -> Maybe Text -> ClusterSnapshotCopyStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RetentionPeriod")
Either
String (Maybe Text -> Maybe Text -> ClusterSnapshotCopyStatus)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ClusterSnapshotCopyStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DestinationRegion")
Either String (Maybe Text -> ClusterSnapshotCopyStatus)
-> Either String (Maybe Text)
-> Either String ClusterSnapshotCopyStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SnapshotCopyGrantName")
instance Prelude.Hashable ClusterSnapshotCopyStatus
instance Prelude.NFData ClusterSnapshotCopyStatus