{-# 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.AwsRedshiftClusterDeferredMaintenanceWindow where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsRedshiftClusterDeferredMaintenanceWindow = AwsRedshiftClusterDeferredMaintenanceWindow'
{
AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceEndTime :: Prelude.Maybe Prelude.Text,
AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceStartTime :: Prelude.Maybe Prelude.Text,
AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool
(AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool)
-> (AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool)
-> Eq AwsRedshiftClusterDeferredMaintenanceWindow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool
$c/= :: AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool
== :: AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool
$c== :: AwsRedshiftClusterDeferredMaintenanceWindow
-> AwsRedshiftClusterDeferredMaintenanceWindow -> Bool
Prelude.Eq, ReadPrec [AwsRedshiftClusterDeferredMaintenanceWindow]
ReadPrec AwsRedshiftClusterDeferredMaintenanceWindow
Int -> ReadS AwsRedshiftClusterDeferredMaintenanceWindow
ReadS [AwsRedshiftClusterDeferredMaintenanceWindow]
(Int -> ReadS AwsRedshiftClusterDeferredMaintenanceWindow)
-> ReadS [AwsRedshiftClusterDeferredMaintenanceWindow]
-> ReadPrec AwsRedshiftClusterDeferredMaintenanceWindow
-> ReadPrec [AwsRedshiftClusterDeferredMaintenanceWindow]
-> Read AwsRedshiftClusterDeferredMaintenanceWindow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRedshiftClusterDeferredMaintenanceWindow]
$creadListPrec :: ReadPrec [AwsRedshiftClusterDeferredMaintenanceWindow]
readPrec :: ReadPrec AwsRedshiftClusterDeferredMaintenanceWindow
$creadPrec :: ReadPrec AwsRedshiftClusterDeferredMaintenanceWindow
readList :: ReadS [AwsRedshiftClusterDeferredMaintenanceWindow]
$creadList :: ReadS [AwsRedshiftClusterDeferredMaintenanceWindow]
readsPrec :: Int -> ReadS AwsRedshiftClusterDeferredMaintenanceWindow
$creadsPrec :: Int -> ReadS AwsRedshiftClusterDeferredMaintenanceWindow
Prelude.Read, Int -> AwsRedshiftClusterDeferredMaintenanceWindow -> ShowS
[AwsRedshiftClusterDeferredMaintenanceWindow] -> ShowS
AwsRedshiftClusterDeferredMaintenanceWindow -> String
(Int -> AwsRedshiftClusterDeferredMaintenanceWindow -> ShowS)
-> (AwsRedshiftClusterDeferredMaintenanceWindow -> String)
-> ([AwsRedshiftClusterDeferredMaintenanceWindow] -> ShowS)
-> Show AwsRedshiftClusterDeferredMaintenanceWindow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRedshiftClusterDeferredMaintenanceWindow] -> ShowS
$cshowList :: [AwsRedshiftClusterDeferredMaintenanceWindow] -> ShowS
show :: AwsRedshiftClusterDeferredMaintenanceWindow -> String
$cshow :: AwsRedshiftClusterDeferredMaintenanceWindow -> String
showsPrec :: Int -> AwsRedshiftClusterDeferredMaintenanceWindow -> ShowS
$cshowsPrec :: Int -> AwsRedshiftClusterDeferredMaintenanceWindow -> ShowS
Prelude.Show, (forall x.
AwsRedshiftClusterDeferredMaintenanceWindow
-> Rep AwsRedshiftClusterDeferredMaintenanceWindow x)
-> (forall x.
Rep AwsRedshiftClusterDeferredMaintenanceWindow x
-> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Generic AwsRedshiftClusterDeferredMaintenanceWindow
forall x.
Rep AwsRedshiftClusterDeferredMaintenanceWindow x
-> AwsRedshiftClusterDeferredMaintenanceWindow
forall x.
AwsRedshiftClusterDeferredMaintenanceWindow
-> Rep AwsRedshiftClusterDeferredMaintenanceWindow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRedshiftClusterDeferredMaintenanceWindow x
-> AwsRedshiftClusterDeferredMaintenanceWindow
$cfrom :: forall x.
AwsRedshiftClusterDeferredMaintenanceWindow
-> Rep AwsRedshiftClusterDeferredMaintenanceWindow x
Prelude.Generic)
newAwsRedshiftClusterDeferredMaintenanceWindow ::
AwsRedshiftClusterDeferredMaintenanceWindow
newAwsRedshiftClusterDeferredMaintenanceWindow :: AwsRedshiftClusterDeferredMaintenanceWindow
newAwsRedshiftClusterDeferredMaintenanceWindow =
AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterDeferredMaintenanceWindow
AwsRedshiftClusterDeferredMaintenanceWindow'
{ $sel:deferMaintenanceEndTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceEndTime =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deferMaintenanceStartTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceStartTime =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deferMaintenanceIdentifier:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceIdentifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceEndTime :: Lens.Lens' AwsRedshiftClusterDeferredMaintenanceWindow (Prelude.Maybe Prelude.Text)
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceEndTime :: (Maybe Text -> f (Maybe Text))
-> AwsRedshiftClusterDeferredMaintenanceWindow
-> f AwsRedshiftClusterDeferredMaintenanceWindow
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceEndTime = (AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text)
-> (AwsRedshiftClusterDeferredMaintenanceWindow
-> Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Lens
AwsRedshiftClusterDeferredMaintenanceWindow
AwsRedshiftClusterDeferredMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterDeferredMaintenanceWindow' {Maybe Text
deferMaintenanceEndTime :: Maybe Text
$sel:deferMaintenanceEndTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceEndTime} -> Maybe Text
deferMaintenanceEndTime) (\s :: AwsRedshiftClusterDeferredMaintenanceWindow
s@AwsRedshiftClusterDeferredMaintenanceWindow' {} Maybe Text
a -> AwsRedshiftClusterDeferredMaintenanceWindow
s {$sel:deferMaintenanceEndTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceEndTime = Maybe Text
a} :: AwsRedshiftClusterDeferredMaintenanceWindow)
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceStartTime :: Lens.Lens' AwsRedshiftClusterDeferredMaintenanceWindow (Prelude.Maybe Prelude.Text)
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceStartTime :: (Maybe Text -> f (Maybe Text))
-> AwsRedshiftClusterDeferredMaintenanceWindow
-> f AwsRedshiftClusterDeferredMaintenanceWindow
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceStartTime = (AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text)
-> (AwsRedshiftClusterDeferredMaintenanceWindow
-> Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Lens
AwsRedshiftClusterDeferredMaintenanceWindow
AwsRedshiftClusterDeferredMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterDeferredMaintenanceWindow' {Maybe Text
deferMaintenanceStartTime :: Maybe Text
$sel:deferMaintenanceStartTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceStartTime} -> Maybe Text
deferMaintenanceStartTime) (\s :: AwsRedshiftClusterDeferredMaintenanceWindow
s@AwsRedshiftClusterDeferredMaintenanceWindow' {} Maybe Text
a -> AwsRedshiftClusterDeferredMaintenanceWindow
s {$sel:deferMaintenanceStartTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceStartTime = Maybe Text
a} :: AwsRedshiftClusterDeferredMaintenanceWindow)
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceIdentifier :: Lens.Lens' AwsRedshiftClusterDeferredMaintenanceWindow (Prelude.Maybe Prelude.Text)
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> AwsRedshiftClusterDeferredMaintenanceWindow
-> f AwsRedshiftClusterDeferredMaintenanceWindow
awsRedshiftClusterDeferredMaintenanceWindow_deferMaintenanceIdentifier = (AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text)
-> (AwsRedshiftClusterDeferredMaintenanceWindow
-> Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Lens
AwsRedshiftClusterDeferredMaintenanceWindow
AwsRedshiftClusterDeferredMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRedshiftClusterDeferredMaintenanceWindow' {Maybe Text
deferMaintenanceIdentifier :: Maybe Text
$sel:deferMaintenanceIdentifier:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
deferMaintenanceIdentifier} -> Maybe Text
deferMaintenanceIdentifier) (\s :: AwsRedshiftClusterDeferredMaintenanceWindow
s@AwsRedshiftClusterDeferredMaintenanceWindow' {} Maybe Text
a -> AwsRedshiftClusterDeferredMaintenanceWindow
s {$sel:deferMaintenanceIdentifier:AwsRedshiftClusterDeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceIdentifier = Maybe Text
a} :: AwsRedshiftClusterDeferredMaintenanceWindow)
instance
Core.FromJSON
AwsRedshiftClusterDeferredMaintenanceWindow
where
parseJSON :: Value -> Parser AwsRedshiftClusterDeferredMaintenanceWindow
parseJSON =
String
-> (Object -> Parser AwsRedshiftClusterDeferredMaintenanceWindow)
-> Value
-> Parser AwsRedshiftClusterDeferredMaintenanceWindow
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsRedshiftClusterDeferredMaintenanceWindow"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterDeferredMaintenanceWindow
AwsRedshiftClusterDeferredMaintenanceWindow'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
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
"DeferMaintenanceEndTime")
Parser
(Maybe Text
-> Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
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
"DeferMaintenanceStartTime")
Parser (Maybe Text -> AwsRedshiftClusterDeferredMaintenanceWindow)
-> Parser (Maybe Text)
-> Parser AwsRedshiftClusterDeferredMaintenanceWindow
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
"DeferMaintenanceIdentifier")
)
instance
Prelude.Hashable
AwsRedshiftClusterDeferredMaintenanceWindow
instance
Prelude.NFData
AwsRedshiftClusterDeferredMaintenanceWindow
instance
Core.ToJSON
AwsRedshiftClusterDeferredMaintenanceWindow
where
toJSON :: AwsRedshiftClusterDeferredMaintenanceWindow -> Value
toJSON
AwsRedshiftClusterDeferredMaintenanceWindow' {Maybe Text
deferMaintenanceIdentifier :: Maybe Text
deferMaintenanceStartTime :: Maybe Text
deferMaintenanceEndTime :: Maybe Text
$sel:deferMaintenanceIdentifier:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
$sel:deferMaintenanceStartTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
$sel:deferMaintenanceEndTime:AwsRedshiftClusterDeferredMaintenanceWindow' :: AwsRedshiftClusterDeferredMaintenanceWindow -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DeferMaintenanceEndTime" 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
deferMaintenanceEndTime,
(Text
"DeferMaintenanceStartTime" 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
deferMaintenanceStartTime,
(Text
"DeferMaintenanceIdentifier" 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
deferMaintenanceIdentifier
]
)