{-# 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.RDS.Types.PendingMaintenanceAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PendingMaintenanceAction = PendingMaintenanceAction'
{
PendingMaintenanceAction -> Maybe ISO8601
autoAppliedAfterDate :: Prelude.Maybe Core.ISO8601,
PendingMaintenanceAction -> Maybe Text
action :: Prelude.Maybe Prelude.Text,
PendingMaintenanceAction -> Maybe Text
optInStatus :: Prelude.Maybe Prelude.Text,
PendingMaintenanceAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PendingMaintenanceAction -> Maybe ISO8601
forcedApplyDate :: Prelude.Maybe Core.ISO8601,
PendingMaintenanceAction -> Maybe ISO8601
currentApplyDate :: Prelude.Maybe Core.ISO8601
}
deriving (PendingMaintenanceAction -> PendingMaintenanceAction -> Bool
(PendingMaintenanceAction -> PendingMaintenanceAction -> Bool)
-> (PendingMaintenanceAction -> PendingMaintenanceAction -> Bool)
-> Eq PendingMaintenanceAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingMaintenanceAction -> PendingMaintenanceAction -> Bool
$c/= :: PendingMaintenanceAction -> PendingMaintenanceAction -> Bool
== :: PendingMaintenanceAction -> PendingMaintenanceAction -> Bool
$c== :: PendingMaintenanceAction -> PendingMaintenanceAction -> Bool
Prelude.Eq, ReadPrec [PendingMaintenanceAction]
ReadPrec PendingMaintenanceAction
Int -> ReadS PendingMaintenanceAction
ReadS [PendingMaintenanceAction]
(Int -> ReadS PendingMaintenanceAction)
-> ReadS [PendingMaintenanceAction]
-> ReadPrec PendingMaintenanceAction
-> ReadPrec [PendingMaintenanceAction]
-> Read PendingMaintenanceAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingMaintenanceAction]
$creadListPrec :: ReadPrec [PendingMaintenanceAction]
readPrec :: ReadPrec PendingMaintenanceAction
$creadPrec :: ReadPrec PendingMaintenanceAction
readList :: ReadS [PendingMaintenanceAction]
$creadList :: ReadS [PendingMaintenanceAction]
readsPrec :: Int -> ReadS PendingMaintenanceAction
$creadsPrec :: Int -> ReadS PendingMaintenanceAction
Prelude.Read, Int -> PendingMaintenanceAction -> ShowS
[PendingMaintenanceAction] -> ShowS
PendingMaintenanceAction -> String
(Int -> PendingMaintenanceAction -> ShowS)
-> (PendingMaintenanceAction -> String)
-> ([PendingMaintenanceAction] -> ShowS)
-> Show PendingMaintenanceAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingMaintenanceAction] -> ShowS
$cshowList :: [PendingMaintenanceAction] -> ShowS
show :: PendingMaintenanceAction -> String
$cshow :: PendingMaintenanceAction -> String
showsPrec :: Int -> PendingMaintenanceAction -> ShowS
$cshowsPrec :: Int -> PendingMaintenanceAction -> ShowS
Prelude.Show, (forall x.
PendingMaintenanceAction -> Rep PendingMaintenanceAction x)
-> (forall x.
Rep PendingMaintenanceAction x -> PendingMaintenanceAction)
-> Generic PendingMaintenanceAction
forall x.
Rep PendingMaintenanceAction x -> PendingMaintenanceAction
forall x.
PendingMaintenanceAction -> Rep PendingMaintenanceAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PendingMaintenanceAction x -> PendingMaintenanceAction
$cfrom :: forall x.
PendingMaintenanceAction -> Rep PendingMaintenanceAction x
Prelude.Generic)
newPendingMaintenanceAction ::
PendingMaintenanceAction
newPendingMaintenanceAction :: PendingMaintenanceAction
newPendingMaintenanceAction =
PendingMaintenanceAction' :: Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction
PendingMaintenanceAction'
{ $sel:autoAppliedAfterDate:PendingMaintenanceAction' :: Maybe ISO8601
autoAppliedAfterDate =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:action:PendingMaintenanceAction' :: Maybe Text
action = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optInStatus:PendingMaintenanceAction' :: Maybe Text
optInStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:PendingMaintenanceAction' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:forcedApplyDate:PendingMaintenanceAction' :: Maybe ISO8601
forcedApplyDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:currentApplyDate:PendingMaintenanceAction' :: Maybe ISO8601
currentApplyDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing
}
pendingMaintenanceAction_autoAppliedAfterDate :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.UTCTime)
pendingMaintenanceAction_autoAppliedAfterDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_autoAppliedAfterDate = (PendingMaintenanceAction -> Maybe ISO8601)
-> (PendingMaintenanceAction
-> Maybe ISO8601 -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe ISO8601
autoAppliedAfterDate :: Maybe ISO8601
$sel:autoAppliedAfterDate:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe ISO8601
autoAppliedAfterDate} -> Maybe ISO8601
autoAppliedAfterDate) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe ISO8601
a -> PendingMaintenanceAction
s {$sel:autoAppliedAfterDate:PendingMaintenanceAction' :: Maybe ISO8601
autoAppliedAfterDate = Maybe ISO8601
a} :: PendingMaintenanceAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> PendingMaintenanceAction -> f PendingMaintenanceAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction
-> f PendingMaintenanceAction
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
pendingMaintenanceAction_action :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.Text)
pendingMaintenanceAction_action :: (Maybe Text -> f (Maybe Text))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_action = (PendingMaintenanceAction -> Maybe Text)
-> (PendingMaintenanceAction
-> Maybe Text -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe Text
action :: Maybe Text
$sel:action:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe Text
action} -> Maybe Text
action) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe Text
a -> PendingMaintenanceAction
s {$sel:action:PendingMaintenanceAction' :: Maybe Text
action = Maybe Text
a} :: PendingMaintenanceAction)
pendingMaintenanceAction_optInStatus :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.Text)
pendingMaintenanceAction_optInStatus :: (Maybe Text -> f (Maybe Text))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_optInStatus = (PendingMaintenanceAction -> Maybe Text)
-> (PendingMaintenanceAction
-> Maybe Text -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe Text
optInStatus :: Maybe Text
$sel:optInStatus:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe Text
optInStatus} -> Maybe Text
optInStatus) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe Text
a -> PendingMaintenanceAction
s {$sel:optInStatus:PendingMaintenanceAction' :: Maybe Text
optInStatus = Maybe Text
a} :: PendingMaintenanceAction)
pendingMaintenanceAction_description :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.Text)
pendingMaintenanceAction_description :: (Maybe Text -> f (Maybe Text))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_description = (PendingMaintenanceAction -> Maybe Text)
-> (PendingMaintenanceAction
-> Maybe Text -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe Text
description :: Maybe Text
$sel:description:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe Text
description} -> Maybe Text
description) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe Text
a -> PendingMaintenanceAction
s {$sel:description:PendingMaintenanceAction' :: Maybe Text
description = Maybe Text
a} :: PendingMaintenanceAction)
pendingMaintenanceAction_forcedApplyDate :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.UTCTime)
pendingMaintenanceAction_forcedApplyDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_forcedApplyDate = (PendingMaintenanceAction -> Maybe ISO8601)
-> (PendingMaintenanceAction
-> Maybe ISO8601 -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe ISO8601
forcedApplyDate :: Maybe ISO8601
$sel:forcedApplyDate:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe ISO8601
forcedApplyDate} -> Maybe ISO8601
forcedApplyDate) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe ISO8601
a -> PendingMaintenanceAction
s {$sel:forcedApplyDate:PendingMaintenanceAction' :: Maybe ISO8601
forcedApplyDate = Maybe ISO8601
a} :: PendingMaintenanceAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> PendingMaintenanceAction -> f PendingMaintenanceAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction
-> f PendingMaintenanceAction
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
pendingMaintenanceAction_currentApplyDate :: Lens.Lens' PendingMaintenanceAction (Prelude.Maybe Prelude.UTCTime)
pendingMaintenanceAction_currentApplyDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction -> f PendingMaintenanceAction
pendingMaintenanceAction_currentApplyDate = (PendingMaintenanceAction -> Maybe ISO8601)
-> (PendingMaintenanceAction
-> Maybe ISO8601 -> PendingMaintenanceAction)
-> Lens
PendingMaintenanceAction
PendingMaintenanceAction
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingMaintenanceAction' {Maybe ISO8601
currentApplyDate :: Maybe ISO8601
$sel:currentApplyDate:PendingMaintenanceAction' :: PendingMaintenanceAction -> Maybe ISO8601
currentApplyDate} -> Maybe ISO8601
currentApplyDate) (\s :: PendingMaintenanceAction
s@PendingMaintenanceAction' {} Maybe ISO8601
a -> PendingMaintenanceAction
s {$sel:currentApplyDate:PendingMaintenanceAction' :: Maybe ISO8601
currentApplyDate = Maybe ISO8601
a} :: PendingMaintenanceAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> PendingMaintenanceAction -> f PendingMaintenanceAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PendingMaintenanceAction
-> f PendingMaintenanceAction
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
instance Core.FromXML PendingMaintenanceAction where
parseXML :: [Node] -> Either String PendingMaintenanceAction
parseXML [Node]
x =
Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction
PendingMaintenanceAction'
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction)
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
"AutoAppliedAfterDate")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction)
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
"Action")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> PendingMaintenanceAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601 -> Maybe ISO8601 -> PendingMaintenanceAction)
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
"OptInStatus")
Either
String
(Maybe Text
-> Maybe ISO8601 -> Maybe ISO8601 -> PendingMaintenanceAction)
-> Either String (Maybe Text)
-> Either
String (Maybe ISO8601 -> Maybe ISO8601 -> PendingMaintenanceAction)
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
"Description")
Either
String (Maybe ISO8601 -> Maybe ISO8601 -> PendingMaintenanceAction)
-> Either String (Maybe ISO8601)
-> Either String (Maybe ISO8601 -> PendingMaintenanceAction)
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
"ForcedApplyDate")
Either String (Maybe ISO8601 -> PendingMaintenanceAction)
-> Either String (Maybe ISO8601)
-> Either String PendingMaintenanceAction
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
"CurrentApplyDate")
instance Prelude.Hashable PendingMaintenanceAction
instance Prelude.NFData PendingMaintenanceAction