{-# 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.SecurityHub.Types.AwsRedshiftClusterClusterSnapshotCopyStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsRedshiftClusterClusterSnapshotCopyStatus = AwsRedshiftClusterClusterSnapshotCopyStatus'
{
AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
retentionPeriod :: Prelude.Maybe Prelude.Int,
AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
snapshotCopyGrantName :: Prelude.Maybe Prelude.Text
}
deriving (AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool
(AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool)
-> Eq AwsRedshiftClusterClusterSnapshotCopyStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool
$c/= :: AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool
== :: AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool
$c== :: AwsRedshiftClusterClusterSnapshotCopyStatus
-> AwsRedshiftClusterClusterSnapshotCopyStatus -> Bool
Prelude.Eq, ReadPrec [AwsRedshiftClusterClusterSnapshotCopyStatus]
ReadPrec AwsRedshiftClusterClusterSnapshotCopyStatus
Int -> ReadS AwsRedshiftClusterClusterSnapshotCopyStatus
ReadS [AwsRedshiftClusterClusterSnapshotCopyStatus]
(Int -> ReadS AwsRedshiftClusterClusterSnapshotCopyStatus)
-> ReadS [AwsRedshiftClusterClusterSnapshotCopyStatus]
-> ReadPrec AwsRedshiftClusterClusterSnapshotCopyStatus
-> ReadPrec [AwsRedshiftClusterClusterSnapshotCopyStatus]
-> Read AwsRedshiftClusterClusterSnapshotCopyStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRedshiftClusterClusterSnapshotCopyStatus]
$creadListPrec :: ReadPrec [AwsRedshiftClusterClusterSnapshotCopyStatus]
readPrec :: ReadPrec AwsRedshiftClusterClusterSnapshotCopyStatus
$creadPrec :: ReadPrec AwsRedshiftClusterClusterSnapshotCopyStatus
readList :: ReadS [AwsRedshiftClusterClusterSnapshotCopyStatus]
$creadList :: ReadS [AwsRedshiftClusterClusterSnapshotCopyStatus]
readsPrec :: Int -> ReadS AwsRedshiftClusterClusterSnapshotCopyStatus
$creadsPrec :: Int -> ReadS AwsRedshiftClusterClusterSnapshotCopyStatus
Prelude.Read, Int -> AwsRedshiftClusterClusterSnapshotCopyStatus -> ShowS
[AwsRedshiftClusterClusterSnapshotCopyStatus] -> ShowS
AwsRedshiftClusterClusterSnapshotCopyStatus -> String
(Int -> AwsRedshiftClusterClusterSnapshotCopyStatus -> ShowS)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus -> String)
-> ([AwsRedshiftClusterClusterSnapshotCopyStatus] -> ShowS)
-> Show AwsRedshiftClusterClusterSnapshotCopyStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRedshiftClusterClusterSnapshotCopyStatus] -> ShowS
$cshowList :: [AwsRedshiftClusterClusterSnapshotCopyStatus] -> ShowS
show :: AwsRedshiftClusterClusterSnapshotCopyStatus -> String
$cshow :: AwsRedshiftClusterClusterSnapshotCopyStatus -> String
showsPrec :: Int -> AwsRedshiftClusterClusterSnapshotCopyStatus -> ShowS
$cshowsPrec :: Int -> AwsRedshiftClusterClusterSnapshotCopyStatus -> ShowS
Prelude.Show, (forall x.
AwsRedshiftClusterClusterSnapshotCopyStatus
-> Rep AwsRedshiftClusterClusterSnapshotCopyStatus x)
-> (forall x.
Rep AwsRedshiftClusterClusterSnapshotCopyStatus x
-> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Generic AwsRedshiftClusterClusterSnapshotCopyStatus
forall x.
Rep AwsRedshiftClusterClusterSnapshotCopyStatus x
-> AwsRedshiftClusterClusterSnapshotCopyStatus
forall x.
AwsRedshiftClusterClusterSnapshotCopyStatus
-> Rep AwsRedshiftClusterClusterSnapshotCopyStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRedshiftClusterClusterSnapshotCopyStatus x
-> AwsRedshiftClusterClusterSnapshotCopyStatus
$cfrom :: forall x.
AwsRedshiftClusterClusterSnapshotCopyStatus
-> Rep AwsRedshiftClusterClusterSnapshotCopyStatus x
Prelude.Generic)
newAwsRedshiftClusterClusterSnapshotCopyStatus ::
AwsRedshiftClusterClusterSnapshotCopyStatus
newAwsRedshiftClusterClusterSnapshotCopyStatus :: AwsRedshiftClusterClusterSnapshotCopyStatus
newAwsRedshiftClusterClusterSnapshotCopyStatus =
AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus'
{ $sel:manualSnapshotRetentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Int
manualSnapshotRetentionPeriod =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:retentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Int
retentionPeriod =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:destinationRegion:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Text
destinationRegion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snapshotCopyGrantName:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Text
snapshotCopyGrantName =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsRedshiftClusterClusterSnapshotCopyStatus_manualSnapshotRetentionPeriod :: Lens.Lens' AwsRedshiftClusterClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Int)
awsRedshiftClusterClusterSnapshotCopyStatus_manualSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> AwsRedshiftClusterClusterSnapshotCopyStatus
-> f AwsRedshiftClusterClusterSnapshotCopyStatus
awsRedshiftClusterClusterSnapshotCopyStatus_manualSnapshotRetentionPeriod = (AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus
-> Maybe Int -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Lens
AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterClusterSnapshotCopyStatus' {Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
$sel:manualSnapshotRetentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
manualSnapshotRetentionPeriod} -> Maybe Int
manualSnapshotRetentionPeriod) (\s :: AwsRedshiftClusterClusterSnapshotCopyStatus
s@AwsRedshiftClusterClusterSnapshotCopyStatus' {} Maybe Int
a -> AwsRedshiftClusterClusterSnapshotCopyStatus
s {$sel:manualSnapshotRetentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
a} :: AwsRedshiftClusterClusterSnapshotCopyStatus)
awsRedshiftClusterClusterSnapshotCopyStatus_retentionPeriod :: Lens.Lens' AwsRedshiftClusterClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Int)
awsRedshiftClusterClusterSnapshotCopyStatus_retentionPeriod :: (Maybe Int -> f (Maybe Int))
-> AwsRedshiftClusterClusterSnapshotCopyStatus
-> f AwsRedshiftClusterClusterSnapshotCopyStatus
awsRedshiftClusterClusterSnapshotCopyStatus_retentionPeriod = (AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus
-> Maybe Int -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Lens
AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterClusterSnapshotCopyStatus' {Maybe Int
retentionPeriod :: Maybe Int
$sel:retentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
retentionPeriod} -> Maybe Int
retentionPeriod) (\s :: AwsRedshiftClusterClusterSnapshotCopyStatus
s@AwsRedshiftClusterClusterSnapshotCopyStatus' {} Maybe Int
a -> AwsRedshiftClusterClusterSnapshotCopyStatus
s {$sel:retentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Int
retentionPeriod = Maybe Int
a} :: AwsRedshiftClusterClusterSnapshotCopyStatus)
awsRedshiftClusterClusterSnapshotCopyStatus_destinationRegion :: Lens.Lens' AwsRedshiftClusterClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
awsRedshiftClusterClusterSnapshotCopyStatus_destinationRegion :: (Maybe Text -> f (Maybe Text))
-> AwsRedshiftClusterClusterSnapshotCopyStatus
-> f AwsRedshiftClusterClusterSnapshotCopyStatus
awsRedshiftClusterClusterSnapshotCopyStatus_destinationRegion = (AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus
-> Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Lens
AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterClusterSnapshotCopyStatus' {Maybe Text
destinationRegion :: Maybe Text
$sel:destinationRegion:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
destinationRegion} -> Maybe Text
destinationRegion) (\s :: AwsRedshiftClusterClusterSnapshotCopyStatus
s@AwsRedshiftClusterClusterSnapshotCopyStatus' {} Maybe Text
a -> AwsRedshiftClusterClusterSnapshotCopyStatus
s {$sel:destinationRegion:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Text
destinationRegion = Maybe Text
a} :: AwsRedshiftClusterClusterSnapshotCopyStatus)
awsRedshiftClusterClusterSnapshotCopyStatus_snapshotCopyGrantName :: Lens.Lens' AwsRedshiftClusterClusterSnapshotCopyStatus (Prelude.Maybe Prelude.Text)
awsRedshiftClusterClusterSnapshotCopyStatus_snapshotCopyGrantName :: (Maybe Text -> f (Maybe Text))
-> AwsRedshiftClusterClusterSnapshotCopyStatus
-> f AwsRedshiftClusterClusterSnapshotCopyStatus
awsRedshiftClusterClusterSnapshotCopyStatus_snapshotCopyGrantName = (AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text)
-> (AwsRedshiftClusterClusterSnapshotCopyStatus
-> Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Lens
AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterClusterSnapshotCopyStatus' {Maybe Text
snapshotCopyGrantName :: Maybe Text
$sel:snapshotCopyGrantName:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
snapshotCopyGrantName} -> Maybe Text
snapshotCopyGrantName) (\s :: AwsRedshiftClusterClusterSnapshotCopyStatus
s@AwsRedshiftClusterClusterSnapshotCopyStatus' {} Maybe Text
a -> AwsRedshiftClusterClusterSnapshotCopyStatus
s {$sel:snapshotCopyGrantName:AwsRedshiftClusterClusterSnapshotCopyStatus' :: Maybe Text
snapshotCopyGrantName = Maybe Text
a} :: AwsRedshiftClusterClusterSnapshotCopyStatus)
instance
Core.FromJSON
AwsRedshiftClusterClusterSnapshotCopyStatus
where
parseJSON :: Value -> Parser AwsRedshiftClusterClusterSnapshotCopyStatus
parseJSON =
String
-> (Object -> Parser AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Value
-> Parser AwsRedshiftClusterClusterSnapshotCopyStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsRedshiftClusterClusterSnapshotCopyStatus"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterClusterSnapshotCopyStatus
AwsRedshiftClusterClusterSnapshotCopyStatus'
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterClusterSnapshotCopyStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManualSnapshotRetentionPeriod")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetentionPeriod")
Parser
(Maybe Text
-> Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
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
"DestinationRegion")
Parser (Maybe Text -> AwsRedshiftClusterClusterSnapshotCopyStatus)
-> Parser (Maybe Text)
-> Parser AwsRedshiftClusterClusterSnapshotCopyStatus
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
"SnapshotCopyGrantName")
)
instance
Prelude.Hashable
AwsRedshiftClusterClusterSnapshotCopyStatus
instance
Prelude.NFData
AwsRedshiftClusterClusterSnapshotCopyStatus
instance
Core.ToJSON
AwsRedshiftClusterClusterSnapshotCopyStatus
where
toJSON :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Value
toJSON
AwsRedshiftClusterClusterSnapshotCopyStatus' {Maybe Int
Maybe Text
snapshotCopyGrantName :: Maybe Text
destinationRegion :: Maybe Text
retentionPeriod :: Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
$sel:snapshotCopyGrantName:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
$sel:destinationRegion:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Text
$sel:retentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
$sel:manualSnapshotRetentionPeriod:AwsRedshiftClusterClusterSnapshotCopyStatus' :: AwsRedshiftClusterClusterSnapshotCopyStatus -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ManualSnapshotRetentionPeriod" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
manualSnapshotRetentionPeriod,
(Text
"RetentionPeriod" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
retentionPeriod,
(Text
"DestinationRegion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationRegion,
(Text
"SnapshotCopyGrantName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snapshotCopyGrantName
]
)