{-# 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.ElastiCache.Types.ProcessedUpdateAction where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.UpdateActionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProcessedUpdateAction = ProcessedUpdateAction'
{
ProcessedUpdateAction -> Maybe Text
cacheClusterId :: Prelude.Maybe Prelude.Text,
ProcessedUpdateAction -> Maybe Text
serviceUpdateName :: Prelude.Maybe Prelude.Text,
ProcessedUpdateAction -> Maybe UpdateActionStatus
updateActionStatus :: Prelude.Maybe UpdateActionStatus,
ProcessedUpdateAction -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text
}
deriving (ProcessedUpdateAction -> ProcessedUpdateAction -> Bool
(ProcessedUpdateAction -> ProcessedUpdateAction -> Bool)
-> (ProcessedUpdateAction -> ProcessedUpdateAction -> Bool)
-> Eq ProcessedUpdateAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessedUpdateAction -> ProcessedUpdateAction -> Bool
$c/= :: ProcessedUpdateAction -> ProcessedUpdateAction -> Bool
== :: ProcessedUpdateAction -> ProcessedUpdateAction -> Bool
$c== :: ProcessedUpdateAction -> ProcessedUpdateAction -> Bool
Prelude.Eq, ReadPrec [ProcessedUpdateAction]
ReadPrec ProcessedUpdateAction
Int -> ReadS ProcessedUpdateAction
ReadS [ProcessedUpdateAction]
(Int -> ReadS ProcessedUpdateAction)
-> ReadS [ProcessedUpdateAction]
-> ReadPrec ProcessedUpdateAction
-> ReadPrec [ProcessedUpdateAction]
-> Read ProcessedUpdateAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessedUpdateAction]
$creadListPrec :: ReadPrec [ProcessedUpdateAction]
readPrec :: ReadPrec ProcessedUpdateAction
$creadPrec :: ReadPrec ProcessedUpdateAction
readList :: ReadS [ProcessedUpdateAction]
$creadList :: ReadS [ProcessedUpdateAction]
readsPrec :: Int -> ReadS ProcessedUpdateAction
$creadsPrec :: Int -> ReadS ProcessedUpdateAction
Prelude.Read, Int -> ProcessedUpdateAction -> ShowS
[ProcessedUpdateAction] -> ShowS
ProcessedUpdateAction -> String
(Int -> ProcessedUpdateAction -> ShowS)
-> (ProcessedUpdateAction -> String)
-> ([ProcessedUpdateAction] -> ShowS)
-> Show ProcessedUpdateAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessedUpdateAction] -> ShowS
$cshowList :: [ProcessedUpdateAction] -> ShowS
show :: ProcessedUpdateAction -> String
$cshow :: ProcessedUpdateAction -> String
showsPrec :: Int -> ProcessedUpdateAction -> ShowS
$cshowsPrec :: Int -> ProcessedUpdateAction -> ShowS
Prelude.Show, (forall x. ProcessedUpdateAction -> Rep ProcessedUpdateAction x)
-> (forall x. Rep ProcessedUpdateAction x -> ProcessedUpdateAction)
-> Generic ProcessedUpdateAction
forall x. Rep ProcessedUpdateAction x -> ProcessedUpdateAction
forall x. ProcessedUpdateAction -> Rep ProcessedUpdateAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessedUpdateAction x -> ProcessedUpdateAction
$cfrom :: forall x. ProcessedUpdateAction -> Rep ProcessedUpdateAction x
Prelude.Generic)
newProcessedUpdateAction ::
ProcessedUpdateAction
newProcessedUpdateAction :: ProcessedUpdateAction
newProcessedUpdateAction =
ProcessedUpdateAction' :: Maybe Text
-> Maybe Text
-> Maybe UpdateActionStatus
-> Maybe Text
-> ProcessedUpdateAction
ProcessedUpdateAction'
{ $sel:cacheClusterId:ProcessedUpdateAction' :: Maybe Text
cacheClusterId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceUpdateName:ProcessedUpdateAction' :: Maybe Text
serviceUpdateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updateActionStatus:ProcessedUpdateAction' :: Maybe UpdateActionStatus
updateActionStatus = Maybe UpdateActionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:replicationGroupId:ProcessedUpdateAction' :: Maybe Text
replicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
processedUpdateAction_cacheClusterId :: Lens.Lens' ProcessedUpdateAction (Prelude.Maybe Prelude.Text)
processedUpdateAction_cacheClusterId :: (Maybe Text -> f (Maybe Text))
-> ProcessedUpdateAction -> f ProcessedUpdateAction
processedUpdateAction_cacheClusterId = (ProcessedUpdateAction -> Maybe Text)
-> (ProcessedUpdateAction -> Maybe Text -> ProcessedUpdateAction)
-> Lens
ProcessedUpdateAction
ProcessedUpdateAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessedUpdateAction' {Maybe Text
cacheClusterId :: Maybe Text
$sel:cacheClusterId:ProcessedUpdateAction' :: ProcessedUpdateAction -> Maybe Text
cacheClusterId} -> Maybe Text
cacheClusterId) (\s :: ProcessedUpdateAction
s@ProcessedUpdateAction' {} Maybe Text
a -> ProcessedUpdateAction
s {$sel:cacheClusterId:ProcessedUpdateAction' :: Maybe Text
cacheClusterId = Maybe Text
a} :: ProcessedUpdateAction)
processedUpdateAction_serviceUpdateName :: Lens.Lens' ProcessedUpdateAction (Prelude.Maybe Prelude.Text)
processedUpdateAction_serviceUpdateName :: (Maybe Text -> f (Maybe Text))
-> ProcessedUpdateAction -> f ProcessedUpdateAction
processedUpdateAction_serviceUpdateName = (ProcessedUpdateAction -> Maybe Text)
-> (ProcessedUpdateAction -> Maybe Text -> ProcessedUpdateAction)
-> Lens
ProcessedUpdateAction
ProcessedUpdateAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessedUpdateAction' {Maybe Text
serviceUpdateName :: Maybe Text
$sel:serviceUpdateName:ProcessedUpdateAction' :: ProcessedUpdateAction -> Maybe Text
serviceUpdateName} -> Maybe Text
serviceUpdateName) (\s :: ProcessedUpdateAction
s@ProcessedUpdateAction' {} Maybe Text
a -> ProcessedUpdateAction
s {$sel:serviceUpdateName:ProcessedUpdateAction' :: Maybe Text
serviceUpdateName = Maybe Text
a} :: ProcessedUpdateAction)
processedUpdateAction_updateActionStatus :: Lens.Lens' ProcessedUpdateAction (Prelude.Maybe UpdateActionStatus)
processedUpdateAction_updateActionStatus :: (Maybe UpdateActionStatus -> f (Maybe UpdateActionStatus))
-> ProcessedUpdateAction -> f ProcessedUpdateAction
processedUpdateAction_updateActionStatus = (ProcessedUpdateAction -> Maybe UpdateActionStatus)
-> (ProcessedUpdateAction
-> Maybe UpdateActionStatus -> ProcessedUpdateAction)
-> Lens
ProcessedUpdateAction
ProcessedUpdateAction
(Maybe UpdateActionStatus)
(Maybe UpdateActionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessedUpdateAction' {Maybe UpdateActionStatus
updateActionStatus :: Maybe UpdateActionStatus
$sel:updateActionStatus:ProcessedUpdateAction' :: ProcessedUpdateAction -> Maybe UpdateActionStatus
updateActionStatus} -> Maybe UpdateActionStatus
updateActionStatus) (\s :: ProcessedUpdateAction
s@ProcessedUpdateAction' {} Maybe UpdateActionStatus
a -> ProcessedUpdateAction
s {$sel:updateActionStatus:ProcessedUpdateAction' :: Maybe UpdateActionStatus
updateActionStatus = Maybe UpdateActionStatus
a} :: ProcessedUpdateAction)
processedUpdateAction_replicationGroupId :: Lens.Lens' ProcessedUpdateAction (Prelude.Maybe Prelude.Text)
processedUpdateAction_replicationGroupId :: (Maybe Text -> f (Maybe Text))
-> ProcessedUpdateAction -> f ProcessedUpdateAction
processedUpdateAction_replicationGroupId = (ProcessedUpdateAction -> Maybe Text)
-> (ProcessedUpdateAction -> Maybe Text -> ProcessedUpdateAction)
-> Lens
ProcessedUpdateAction
ProcessedUpdateAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessedUpdateAction' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:ProcessedUpdateAction' :: ProcessedUpdateAction -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: ProcessedUpdateAction
s@ProcessedUpdateAction' {} Maybe Text
a -> ProcessedUpdateAction
s {$sel:replicationGroupId:ProcessedUpdateAction' :: Maybe Text
replicationGroupId = Maybe Text
a} :: ProcessedUpdateAction)
instance Core.FromXML ProcessedUpdateAction where
parseXML :: [Node] -> Either String ProcessedUpdateAction
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe UpdateActionStatus
-> Maybe Text
-> ProcessedUpdateAction
ProcessedUpdateAction'
(Maybe Text
-> Maybe Text
-> Maybe UpdateActionStatus
-> Maybe Text
-> ProcessedUpdateAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe UpdateActionStatus -> Maybe Text -> ProcessedUpdateAction)
forall (f :: * -> *) a b. Functor 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
"CacheClusterId")
Either
String
(Maybe Text
-> Maybe UpdateActionStatus -> Maybe Text -> ProcessedUpdateAction)
-> Either String (Maybe Text)
-> Either
String
(Maybe UpdateActionStatus -> Maybe Text -> ProcessedUpdateAction)
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
"ServiceUpdateName")
Either
String
(Maybe UpdateActionStatus -> Maybe Text -> ProcessedUpdateAction)
-> Either String (Maybe UpdateActionStatus)
-> Either String (Maybe Text -> ProcessedUpdateAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe UpdateActionStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UpdateActionStatus")
Either String (Maybe Text -> ProcessedUpdateAction)
-> Either String (Maybe Text)
-> Either String ProcessedUpdateAction
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
"ReplicationGroupId")
instance Prelude.Hashable ProcessedUpdateAction
instance Prelude.NFData ProcessedUpdateAction