{-# 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.ScheduledAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
import Amazonka.Redshift.Types.ScheduledActionState
import Amazonka.Redshift.Types.ScheduledActionType
data ScheduledAction = ScheduledAction'
{
ScheduledAction -> Maybe ScheduledActionState
state :: Prelude.Maybe ScheduledActionState,
ScheduledAction -> Maybe ScheduledActionType
targetAction :: Prelude.Maybe ScheduledActionType,
ScheduledAction -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
ScheduledAction -> Maybe Text
schedule :: Prelude.Maybe Prelude.Text,
ScheduledAction -> Maybe Text
scheduledActionName :: Prelude.Maybe Prelude.Text,
ScheduledAction -> Maybe Text
scheduledActionDescription :: Prelude.Maybe Prelude.Text,
ScheduledAction -> Maybe [ISO8601]
nextInvocations :: Prelude.Maybe [Core.ISO8601],
ScheduledAction -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
ScheduledAction -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text
}
deriving (ScheduledAction -> ScheduledAction -> Bool
(ScheduledAction -> ScheduledAction -> Bool)
-> (ScheduledAction -> ScheduledAction -> Bool)
-> Eq ScheduledAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledAction -> ScheduledAction -> Bool
$c/= :: ScheduledAction -> ScheduledAction -> Bool
== :: ScheduledAction -> ScheduledAction -> Bool
$c== :: ScheduledAction -> ScheduledAction -> Bool
Prelude.Eq, ReadPrec [ScheduledAction]
ReadPrec ScheduledAction
Int -> ReadS ScheduledAction
ReadS [ScheduledAction]
(Int -> ReadS ScheduledAction)
-> ReadS [ScheduledAction]
-> ReadPrec ScheduledAction
-> ReadPrec [ScheduledAction]
-> Read ScheduledAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledAction]
$creadListPrec :: ReadPrec [ScheduledAction]
readPrec :: ReadPrec ScheduledAction
$creadPrec :: ReadPrec ScheduledAction
readList :: ReadS [ScheduledAction]
$creadList :: ReadS [ScheduledAction]
readsPrec :: Int -> ReadS ScheduledAction
$creadsPrec :: Int -> ReadS ScheduledAction
Prelude.Read, Int -> ScheduledAction -> ShowS
[ScheduledAction] -> ShowS
ScheduledAction -> String
(Int -> ScheduledAction -> ShowS)
-> (ScheduledAction -> String)
-> ([ScheduledAction] -> ShowS)
-> Show ScheduledAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledAction] -> ShowS
$cshowList :: [ScheduledAction] -> ShowS
show :: ScheduledAction -> String
$cshow :: ScheduledAction -> String
showsPrec :: Int -> ScheduledAction -> ShowS
$cshowsPrec :: Int -> ScheduledAction -> ShowS
Prelude.Show, (forall x. ScheduledAction -> Rep ScheduledAction x)
-> (forall x. Rep ScheduledAction x -> ScheduledAction)
-> Generic ScheduledAction
forall x. Rep ScheduledAction x -> ScheduledAction
forall x. ScheduledAction -> Rep ScheduledAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScheduledAction x -> ScheduledAction
$cfrom :: forall x. ScheduledAction -> Rep ScheduledAction x
Prelude.Generic)
newScheduledAction ::
ScheduledAction
newScheduledAction :: ScheduledAction
newScheduledAction =
ScheduledAction' :: Maybe ScheduledActionState
-> Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction
ScheduledAction'
{ $sel:state:ScheduledAction' :: Maybe ScheduledActionState
state = Maybe ScheduledActionState
forall a. Maybe a
Prelude.Nothing,
$sel:targetAction:ScheduledAction' :: Maybe ScheduledActionType
targetAction = Maybe ScheduledActionType
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ScheduledAction' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:ScheduledAction' :: Maybe Text
schedule = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledActionName:ScheduledAction' :: Maybe Text
scheduledActionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledActionDescription:ScheduledAction' :: Maybe Text
scheduledActionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextInvocations:ScheduledAction' :: Maybe [ISO8601]
nextInvocations = Maybe [ISO8601]
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:ScheduledAction' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:iamRole:ScheduledAction' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
scheduledAction_state :: Lens.Lens' ScheduledAction (Prelude.Maybe ScheduledActionState)
scheduledAction_state :: (Maybe ScheduledActionState -> f (Maybe ScheduledActionState))
-> ScheduledAction -> f ScheduledAction
scheduledAction_state = (ScheduledAction -> Maybe ScheduledActionState)
-> (ScheduledAction
-> Maybe ScheduledActionState -> ScheduledAction)
-> Lens
ScheduledAction
ScheduledAction
(Maybe ScheduledActionState)
(Maybe ScheduledActionState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe ScheduledActionState
state :: Maybe ScheduledActionState
$sel:state:ScheduledAction' :: ScheduledAction -> Maybe ScheduledActionState
state} -> Maybe ScheduledActionState
state) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe ScheduledActionState
a -> ScheduledAction
s {$sel:state:ScheduledAction' :: Maybe ScheduledActionState
state = Maybe ScheduledActionState
a} :: ScheduledAction)
scheduledAction_targetAction :: Lens.Lens' ScheduledAction (Prelude.Maybe ScheduledActionType)
scheduledAction_targetAction :: (Maybe ScheduledActionType -> f (Maybe ScheduledActionType))
-> ScheduledAction -> f ScheduledAction
scheduledAction_targetAction = (ScheduledAction -> Maybe ScheduledActionType)
-> (ScheduledAction
-> Maybe ScheduledActionType -> ScheduledAction)
-> Lens
ScheduledAction
ScheduledAction
(Maybe ScheduledActionType)
(Maybe ScheduledActionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe ScheduledActionType
targetAction :: Maybe ScheduledActionType
$sel:targetAction:ScheduledAction' :: ScheduledAction -> Maybe ScheduledActionType
targetAction} -> Maybe ScheduledActionType
targetAction) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe ScheduledActionType
a -> ScheduledAction
s {$sel:targetAction:ScheduledAction' :: Maybe ScheduledActionType
targetAction = Maybe ScheduledActionType
a} :: ScheduledAction)
scheduledAction_startTime :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.UTCTime)
scheduledAction_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAction -> f ScheduledAction
scheduledAction_startTime = (ScheduledAction -> Maybe ISO8601)
-> (ScheduledAction -> Maybe ISO8601 -> ScheduledAction)
-> Lens
ScheduledAction ScheduledAction (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:ScheduledAction' :: ScheduledAction -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe ISO8601
a -> ScheduledAction
s {$sel:startTime:ScheduledAction' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: ScheduledAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ScheduledAction -> f ScheduledAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAction
-> f ScheduledAction
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
scheduledAction_schedule :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.Text)
scheduledAction_schedule :: (Maybe Text -> f (Maybe Text))
-> ScheduledAction -> f ScheduledAction
scheduledAction_schedule = (ScheduledAction -> Maybe Text)
-> (ScheduledAction -> Maybe Text -> ScheduledAction)
-> Lens ScheduledAction ScheduledAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe Text
schedule :: Maybe Text
$sel:schedule:ScheduledAction' :: ScheduledAction -> Maybe Text
schedule} -> Maybe Text
schedule) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe Text
a -> ScheduledAction
s {$sel:schedule:ScheduledAction' :: Maybe Text
schedule = Maybe Text
a} :: ScheduledAction)
scheduledAction_scheduledActionName :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.Text)
scheduledAction_scheduledActionName :: (Maybe Text -> f (Maybe Text))
-> ScheduledAction -> f ScheduledAction
scheduledAction_scheduledActionName = (ScheduledAction -> Maybe Text)
-> (ScheduledAction -> Maybe Text -> ScheduledAction)
-> Lens ScheduledAction ScheduledAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe Text
scheduledActionName :: Maybe Text
$sel:scheduledActionName:ScheduledAction' :: ScheduledAction -> Maybe Text
scheduledActionName} -> Maybe Text
scheduledActionName) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe Text
a -> ScheduledAction
s {$sel:scheduledActionName:ScheduledAction' :: Maybe Text
scheduledActionName = Maybe Text
a} :: ScheduledAction)
scheduledAction_scheduledActionDescription :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.Text)
scheduledAction_scheduledActionDescription :: (Maybe Text -> f (Maybe Text))
-> ScheduledAction -> f ScheduledAction
scheduledAction_scheduledActionDescription = (ScheduledAction -> Maybe Text)
-> (ScheduledAction -> Maybe Text -> ScheduledAction)
-> Lens ScheduledAction ScheduledAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe Text
scheduledActionDescription :: Maybe Text
$sel:scheduledActionDescription:ScheduledAction' :: ScheduledAction -> Maybe Text
scheduledActionDescription} -> Maybe Text
scheduledActionDescription) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe Text
a -> ScheduledAction
s {$sel:scheduledActionDescription:ScheduledAction' :: Maybe Text
scheduledActionDescription = Maybe Text
a} :: ScheduledAction)
scheduledAction_nextInvocations :: Lens.Lens' ScheduledAction (Prelude.Maybe [Prelude.UTCTime])
scheduledAction_nextInvocations :: (Maybe [UTCTime] -> f (Maybe [UTCTime]))
-> ScheduledAction -> f ScheduledAction
scheduledAction_nextInvocations = (ScheduledAction -> Maybe [ISO8601])
-> (ScheduledAction -> Maybe [ISO8601] -> ScheduledAction)
-> Lens
ScheduledAction ScheduledAction (Maybe [ISO8601]) (Maybe [ISO8601])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe [ISO8601]
nextInvocations :: Maybe [ISO8601]
$sel:nextInvocations:ScheduledAction' :: ScheduledAction -> Maybe [ISO8601]
nextInvocations} -> Maybe [ISO8601]
nextInvocations) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe [ISO8601]
a -> ScheduledAction
s {$sel:nextInvocations:ScheduledAction' :: Maybe [ISO8601]
nextInvocations = Maybe [ISO8601]
a} :: ScheduledAction) ((Maybe [ISO8601] -> f (Maybe [ISO8601]))
-> ScheduledAction -> f ScheduledAction)
-> ((Maybe [UTCTime] -> f (Maybe [UTCTime]))
-> Maybe [ISO8601] -> f (Maybe [ISO8601]))
-> (Maybe [UTCTime] -> f (Maybe [UTCTime]))
-> ScheduledAction
-> f ScheduledAction
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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
scheduledAction_endTime :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.UTCTime)
scheduledAction_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAction -> f ScheduledAction
scheduledAction_endTime = (ScheduledAction -> Maybe ISO8601)
-> (ScheduledAction -> Maybe ISO8601 -> ScheduledAction)
-> Lens
ScheduledAction ScheduledAction (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:ScheduledAction' :: ScheduledAction -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe ISO8601
a -> ScheduledAction
s {$sel:endTime:ScheduledAction' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: ScheduledAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ScheduledAction -> f ScheduledAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAction
-> f ScheduledAction
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
scheduledAction_iamRole :: Lens.Lens' ScheduledAction (Prelude.Maybe Prelude.Text)
scheduledAction_iamRole :: (Maybe Text -> f (Maybe Text))
-> ScheduledAction -> f ScheduledAction
scheduledAction_iamRole = (ScheduledAction -> Maybe Text)
-> (ScheduledAction -> Maybe Text -> ScheduledAction)
-> Lens ScheduledAction ScheduledAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAction' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:ScheduledAction' :: ScheduledAction -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: ScheduledAction
s@ScheduledAction' {} Maybe Text
a -> ScheduledAction
s {$sel:iamRole:ScheduledAction' :: Maybe Text
iamRole = Maybe Text
a} :: ScheduledAction)
instance Core.FromXML ScheduledAction where
parseXML :: [Node] -> Either String ScheduledAction
parseXML [Node]
x =
Maybe ScheduledActionState
-> Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction
ScheduledAction'
(Maybe ScheduledActionState
-> Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe ScheduledActionState)
-> Either
String
(Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ScheduledActionState)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"State")
Either
String
(Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe ScheduledActionType)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ScheduledActionType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TargetAction")
Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
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
"StartTime")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
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
"Schedule")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
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
"ScheduledActionName")
Either
String
(Maybe Text
-> Maybe [ISO8601]
-> Maybe ISO8601
-> Maybe Text
-> ScheduledAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe [ISO8601] -> Maybe ISO8601 -> Maybe Text -> ScheduledAction)
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
"ScheduledActionDescription")
Either
String
(Maybe [ISO8601] -> Maybe ISO8601 -> Maybe Text -> ScheduledAction)
-> Either String (Maybe [ISO8601])
-> Either String (Maybe ISO8601 -> Maybe Text -> ScheduledAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextInvocations" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [ISO8601]))
-> Either String (Maybe [ISO8601])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ISO8601])
-> [Node] -> Either String (Maybe [ISO8601])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ISO8601]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ScheduledActionTime")
)
Either String (Maybe ISO8601 -> Maybe Text -> ScheduledAction)
-> Either String (Maybe ISO8601)
-> Either String (Maybe Text -> ScheduledAction)
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
"EndTime")
Either String (Maybe Text -> ScheduledAction)
-> Either String (Maybe Text) -> Either String ScheduledAction
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
"IamRole")
instance Prelude.Hashable ScheduledAction
instance Prelude.NFData ScheduledAction