{-# 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.DeferredMaintenanceWindow where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data DeferredMaintenanceWindow = DeferredMaintenanceWindow'
{
DeferredMaintenanceWindow -> Maybe ISO8601
deferMaintenanceEndTime :: Prelude.Maybe Core.ISO8601,
DeferredMaintenanceWindow -> Maybe ISO8601
deferMaintenanceStartTime :: Prelude.Maybe Core.ISO8601,
DeferredMaintenanceWindow -> Maybe Text
deferMaintenanceIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool
(DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool)
-> (DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool)
-> Eq DeferredMaintenanceWindow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool
$c/= :: DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool
== :: DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool
$c== :: DeferredMaintenanceWindow -> DeferredMaintenanceWindow -> Bool
Prelude.Eq, ReadPrec [DeferredMaintenanceWindow]
ReadPrec DeferredMaintenanceWindow
Int -> ReadS DeferredMaintenanceWindow
ReadS [DeferredMaintenanceWindow]
(Int -> ReadS DeferredMaintenanceWindow)
-> ReadS [DeferredMaintenanceWindow]
-> ReadPrec DeferredMaintenanceWindow
-> ReadPrec [DeferredMaintenanceWindow]
-> Read DeferredMaintenanceWindow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeferredMaintenanceWindow]
$creadListPrec :: ReadPrec [DeferredMaintenanceWindow]
readPrec :: ReadPrec DeferredMaintenanceWindow
$creadPrec :: ReadPrec DeferredMaintenanceWindow
readList :: ReadS [DeferredMaintenanceWindow]
$creadList :: ReadS [DeferredMaintenanceWindow]
readsPrec :: Int -> ReadS DeferredMaintenanceWindow
$creadsPrec :: Int -> ReadS DeferredMaintenanceWindow
Prelude.Read, Int -> DeferredMaintenanceWindow -> ShowS
[DeferredMaintenanceWindow] -> ShowS
DeferredMaintenanceWindow -> String
(Int -> DeferredMaintenanceWindow -> ShowS)
-> (DeferredMaintenanceWindow -> String)
-> ([DeferredMaintenanceWindow] -> ShowS)
-> Show DeferredMaintenanceWindow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeferredMaintenanceWindow] -> ShowS
$cshowList :: [DeferredMaintenanceWindow] -> ShowS
show :: DeferredMaintenanceWindow -> String
$cshow :: DeferredMaintenanceWindow -> String
showsPrec :: Int -> DeferredMaintenanceWindow -> ShowS
$cshowsPrec :: Int -> DeferredMaintenanceWindow -> ShowS
Prelude.Show, (forall x.
DeferredMaintenanceWindow -> Rep DeferredMaintenanceWindow x)
-> (forall x.
Rep DeferredMaintenanceWindow x -> DeferredMaintenanceWindow)
-> Generic DeferredMaintenanceWindow
forall x.
Rep DeferredMaintenanceWindow x -> DeferredMaintenanceWindow
forall x.
DeferredMaintenanceWindow -> Rep DeferredMaintenanceWindow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeferredMaintenanceWindow x -> DeferredMaintenanceWindow
$cfrom :: forall x.
DeferredMaintenanceWindow -> Rep DeferredMaintenanceWindow x
Prelude.Generic)
newDeferredMaintenanceWindow ::
DeferredMaintenanceWindow
newDeferredMaintenanceWindow :: DeferredMaintenanceWindow
newDeferredMaintenanceWindow =
DeferredMaintenanceWindow' :: Maybe ISO8601
-> Maybe ISO8601 -> Maybe Text -> DeferredMaintenanceWindow
DeferredMaintenanceWindow'
{ $sel:deferMaintenanceEndTime:DeferredMaintenanceWindow' :: Maybe ISO8601
deferMaintenanceEndTime =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:deferMaintenanceStartTime:DeferredMaintenanceWindow' :: Maybe ISO8601
deferMaintenanceStartTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:deferMaintenanceIdentifier:DeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
deferredMaintenanceWindow_deferMaintenanceEndTime :: Lens.Lens' DeferredMaintenanceWindow (Prelude.Maybe Prelude.UTCTime)
deferredMaintenanceWindow_deferMaintenanceEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeferredMaintenanceWindow -> f DeferredMaintenanceWindow
deferredMaintenanceWindow_deferMaintenanceEndTime = (DeferredMaintenanceWindow -> Maybe ISO8601)
-> (DeferredMaintenanceWindow
-> Maybe ISO8601 -> DeferredMaintenanceWindow)
-> Lens
DeferredMaintenanceWindow
DeferredMaintenanceWindow
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeferredMaintenanceWindow' {Maybe ISO8601
deferMaintenanceEndTime :: Maybe ISO8601
$sel:deferMaintenanceEndTime:DeferredMaintenanceWindow' :: DeferredMaintenanceWindow -> Maybe ISO8601
deferMaintenanceEndTime} -> Maybe ISO8601
deferMaintenanceEndTime) (\s :: DeferredMaintenanceWindow
s@DeferredMaintenanceWindow' {} Maybe ISO8601
a -> DeferredMaintenanceWindow
s {$sel:deferMaintenanceEndTime:DeferredMaintenanceWindow' :: Maybe ISO8601
deferMaintenanceEndTime = Maybe ISO8601
a} :: DeferredMaintenanceWindow) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> DeferredMaintenanceWindow -> f DeferredMaintenanceWindow)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeferredMaintenanceWindow
-> f DeferredMaintenanceWindow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
deferredMaintenanceWindow_deferMaintenanceStartTime :: Lens.Lens' DeferredMaintenanceWindow (Prelude.Maybe Prelude.UTCTime)
deferredMaintenanceWindow_deferMaintenanceStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeferredMaintenanceWindow -> f DeferredMaintenanceWindow
deferredMaintenanceWindow_deferMaintenanceStartTime = (DeferredMaintenanceWindow -> Maybe ISO8601)
-> (DeferredMaintenanceWindow
-> Maybe ISO8601 -> DeferredMaintenanceWindow)
-> Lens
DeferredMaintenanceWindow
DeferredMaintenanceWindow
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeferredMaintenanceWindow' {Maybe ISO8601
deferMaintenanceStartTime :: Maybe ISO8601
$sel:deferMaintenanceStartTime:DeferredMaintenanceWindow' :: DeferredMaintenanceWindow -> Maybe ISO8601
deferMaintenanceStartTime} -> Maybe ISO8601
deferMaintenanceStartTime) (\s :: DeferredMaintenanceWindow
s@DeferredMaintenanceWindow' {} Maybe ISO8601
a -> DeferredMaintenanceWindow
s {$sel:deferMaintenanceStartTime:DeferredMaintenanceWindow' :: Maybe ISO8601
deferMaintenanceStartTime = Maybe ISO8601
a} :: DeferredMaintenanceWindow) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> DeferredMaintenanceWindow -> f DeferredMaintenanceWindow)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeferredMaintenanceWindow
-> f DeferredMaintenanceWindow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
deferredMaintenanceWindow_deferMaintenanceIdentifier :: Lens.Lens' DeferredMaintenanceWindow (Prelude.Maybe Prelude.Text)
deferredMaintenanceWindow_deferMaintenanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> DeferredMaintenanceWindow -> f DeferredMaintenanceWindow
deferredMaintenanceWindow_deferMaintenanceIdentifier = (DeferredMaintenanceWindow -> Maybe Text)
-> (DeferredMaintenanceWindow
-> Maybe Text -> DeferredMaintenanceWindow)
-> Lens
DeferredMaintenanceWindow
DeferredMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeferredMaintenanceWindow' {Maybe Text
deferMaintenanceIdentifier :: Maybe Text
$sel:deferMaintenanceIdentifier:DeferredMaintenanceWindow' :: DeferredMaintenanceWindow -> Maybe Text
deferMaintenanceIdentifier} -> Maybe Text
deferMaintenanceIdentifier) (\s :: DeferredMaintenanceWindow
s@DeferredMaintenanceWindow' {} Maybe Text
a -> DeferredMaintenanceWindow
s {$sel:deferMaintenanceIdentifier:DeferredMaintenanceWindow' :: Maybe Text
deferMaintenanceIdentifier = Maybe Text
a} :: DeferredMaintenanceWindow)
instance Core.FromXML DeferredMaintenanceWindow where
parseXML :: [Node] -> Either String DeferredMaintenanceWindow
parseXML [Node]
x =
Maybe ISO8601
-> Maybe ISO8601 -> Maybe Text -> DeferredMaintenanceWindow
DeferredMaintenanceWindow'
(Maybe ISO8601
-> Maybe ISO8601 -> Maybe Text -> DeferredMaintenanceWindow)
-> Either String (Maybe ISO8601)
-> Either
String (Maybe ISO8601 -> Maybe Text -> DeferredMaintenanceWindow)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DeferMaintenanceEndTime")
Either
String (Maybe ISO8601 -> Maybe Text -> DeferredMaintenanceWindow)
-> Either String (Maybe ISO8601)
-> Either String (Maybe Text -> DeferredMaintenanceWindow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DeferMaintenanceStartTime")
Either String (Maybe Text -> DeferredMaintenanceWindow)
-> Either String (Maybe Text)
-> Either String DeferredMaintenanceWindow
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
"DeferMaintenanceIdentifier")
instance Prelude.Hashable DeferredMaintenanceWindow
instance Prelude.NFData DeferredMaintenanceWindow