{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data ClusterSnapshotCopyStatus = ClusterSnapshotCopyStatus'
{
ClusterSnapshotCopyStatus -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
ClusterSnapshotCopyStatus -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
ClusterSnapshotCopyStatus -> Maybe Integer
retentionPeriod :: Prelude.Maybe Prelude.Integer,
ClusterSnapshotCopyStatus -> Maybe Text
snapshotCopyGrantName :: Prelude.Maybe Prelude.Text
}
deriving (ClusterSnapshotCopyStatus -> ClusterSnapshotCopyStatus -> Bool
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]
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
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.
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'
{ $sel:destinationRegion:ClusterSnapshotCopyStatus' :: Maybe Text
destinationRegion =
forall a. Maybe a
Prelude.Nothing,
$sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Int
manualSnapshotRetentionPeriod = forall a. Maybe a
Prelude.Nothing,
$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: Maybe Integer
retentionPeriod = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: Maybe Text
snapshotCopyGrantName = forall a. Maybe a
Prelude.Nothing
}
clusterSnapshotCopyStatus_destinationRegion :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
clusterSnapshotCopyStatus_destinationRegion :: Lens' ClusterSnapshotCopyStatus (Maybe Text)
clusterSnapshotCopyStatus_destinationRegion = 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_manualSnapshotRetentionPeriod :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Int)
clusterSnapshotCopyStatus_manualSnapshotRetentionPeriod :: Lens' ClusterSnapshotCopyStatus (Maybe Int)
clusterSnapshotCopyStatus_manualSnapshotRetentionPeriod = 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 :: Lens' ClusterSnapshotCopyStatus (Maybe Integer)
clusterSnapshotCopyStatus_retentionPeriod = 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_snapshotCopyGrantName :: Lens.Lens' ClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
clusterSnapshotCopyStatus_snapshotCopyGrantName :: Lens' ClusterSnapshotCopyStatus (Maybe Text)
clusterSnapshotCopyStatus_snapshotCopyGrantName = 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 Data.FromXML ClusterSnapshotCopyStatus where
parseXML :: [Node] -> Either String ClusterSnapshotCopyStatus
parseXML [Node]
x =
Maybe Text
-> Maybe Int
-> Maybe Integer
-> Maybe Text
-> ClusterSnapshotCopyStatus
ClusterSnapshotCopyStatus'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DestinationRegion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ManualSnapshotRetentionPeriod")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"RetentionPeriod")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SnapshotCopyGrantName")
instance Prelude.Hashable ClusterSnapshotCopyStatus where
hashWithSalt :: Int -> ClusterSnapshotCopyStatus -> Int
hashWithSalt Int
_salt ClusterSnapshotCopyStatus' {Maybe Int
Maybe Integer
Maybe Text
snapshotCopyGrantName :: Maybe Text
retentionPeriod :: Maybe Integer
manualSnapshotRetentionPeriod :: Maybe Int
destinationRegion :: Maybe Text
$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Integer
$sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Int
$sel:destinationRegion:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationRegion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
manualSnapshotRetentionPeriod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
retentionPeriod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotCopyGrantName
instance Prelude.NFData ClusterSnapshotCopyStatus where
rnf :: ClusterSnapshotCopyStatus -> ()
rnf ClusterSnapshotCopyStatus' {Maybe Int
Maybe Integer
Maybe Text
snapshotCopyGrantName :: Maybe Text
retentionPeriod :: Maybe Integer
manualSnapshotRetentionPeriod :: Maybe Int
destinationRegion :: Maybe Text
$sel:snapshotCopyGrantName:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
$sel:retentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Integer
$sel:manualSnapshotRetentionPeriod:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Int
$sel:destinationRegion:ClusterSnapshotCopyStatus' :: ClusterSnapshotCopyStatus -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationRegion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
manualSnapshotRetentionPeriod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
retentionPeriod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotCopyGrantName