{-# 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.ClusterParameterGroupStatus 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.ClusterParameterStatus
data ClusterParameterGroupStatus = ClusterParameterGroupStatus'
{
ClusterParameterGroupStatus -> Maybe [ClusterParameterStatus]
clusterParameterStatusList :: Prelude.Maybe [ClusterParameterStatus],
ClusterParameterGroupStatus -> Maybe Text
parameterApplyStatus :: Prelude.Maybe Prelude.Text,
ClusterParameterGroupStatus -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text
}
deriving (ClusterParameterGroupStatus -> ClusterParameterGroupStatus -> Bool
(ClusterParameterGroupStatus
-> ClusterParameterGroupStatus -> Bool)
-> (ClusterParameterGroupStatus
-> ClusterParameterGroupStatus -> Bool)
-> Eq ClusterParameterGroupStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterParameterGroupStatus -> ClusterParameterGroupStatus -> Bool
$c/= :: ClusterParameterGroupStatus -> ClusterParameterGroupStatus -> Bool
== :: ClusterParameterGroupStatus -> ClusterParameterGroupStatus -> Bool
$c== :: ClusterParameterGroupStatus -> ClusterParameterGroupStatus -> Bool
Prelude.Eq, ReadPrec [ClusterParameterGroupStatus]
ReadPrec ClusterParameterGroupStatus
Int -> ReadS ClusterParameterGroupStatus
ReadS [ClusterParameterGroupStatus]
(Int -> ReadS ClusterParameterGroupStatus)
-> ReadS [ClusterParameterGroupStatus]
-> ReadPrec ClusterParameterGroupStatus
-> ReadPrec [ClusterParameterGroupStatus]
-> Read ClusterParameterGroupStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterParameterGroupStatus]
$creadListPrec :: ReadPrec [ClusterParameterGroupStatus]
readPrec :: ReadPrec ClusterParameterGroupStatus
$creadPrec :: ReadPrec ClusterParameterGroupStatus
readList :: ReadS [ClusterParameterGroupStatus]
$creadList :: ReadS [ClusterParameterGroupStatus]
readsPrec :: Int -> ReadS ClusterParameterGroupStatus
$creadsPrec :: Int -> ReadS ClusterParameterGroupStatus
Prelude.Read, Int -> ClusterParameterGroupStatus -> ShowS
[ClusterParameterGroupStatus] -> ShowS
ClusterParameterGroupStatus -> String
(Int -> ClusterParameterGroupStatus -> ShowS)
-> (ClusterParameterGroupStatus -> String)
-> ([ClusterParameterGroupStatus] -> ShowS)
-> Show ClusterParameterGroupStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterParameterGroupStatus] -> ShowS
$cshowList :: [ClusterParameterGroupStatus] -> ShowS
show :: ClusterParameterGroupStatus -> String
$cshow :: ClusterParameterGroupStatus -> String
showsPrec :: Int -> ClusterParameterGroupStatus -> ShowS
$cshowsPrec :: Int -> ClusterParameterGroupStatus -> ShowS
Prelude.Show, (forall x.
ClusterParameterGroupStatus -> Rep ClusterParameterGroupStatus x)
-> (forall x.
Rep ClusterParameterGroupStatus x -> ClusterParameterGroupStatus)
-> Generic ClusterParameterGroupStatus
forall x.
Rep ClusterParameterGroupStatus x -> ClusterParameterGroupStatus
forall x.
ClusterParameterGroupStatus -> Rep ClusterParameterGroupStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClusterParameterGroupStatus x -> ClusterParameterGroupStatus
$cfrom :: forall x.
ClusterParameterGroupStatus -> Rep ClusterParameterGroupStatus x
Prelude.Generic)
newClusterParameterGroupStatus ::
ClusterParameterGroupStatus
newClusterParameterGroupStatus :: ClusterParameterGroupStatus
newClusterParameterGroupStatus =
ClusterParameterGroupStatus' :: Maybe [ClusterParameterStatus]
-> Maybe Text -> Maybe Text -> ClusterParameterGroupStatus
ClusterParameterGroupStatus'
{ $sel:clusterParameterStatusList:ClusterParameterGroupStatus' :: Maybe [ClusterParameterStatus]
clusterParameterStatusList =
Maybe [ClusterParameterStatus]
forall a. Maybe a
Prelude.Nothing,
$sel:parameterApplyStatus:ClusterParameterGroupStatus' :: Maybe Text
parameterApplyStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameterGroupName:ClusterParameterGroupStatus' :: Maybe Text
parameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterParameterGroupStatus_clusterParameterStatusList :: Lens.Lens' ClusterParameterGroupStatus (Prelude.Maybe [ClusterParameterStatus])
clusterParameterGroupStatus_clusterParameterStatusList :: (Maybe [ClusterParameterStatus]
-> f (Maybe [ClusterParameterStatus]))
-> ClusterParameterGroupStatus -> f ClusterParameterGroupStatus
clusterParameterGroupStatus_clusterParameterStatusList = (ClusterParameterGroupStatus -> Maybe [ClusterParameterStatus])
-> (ClusterParameterGroupStatus
-> Maybe [ClusterParameterStatus] -> ClusterParameterGroupStatus)
-> Lens
ClusterParameterGroupStatus
ClusterParameterGroupStatus
(Maybe [ClusterParameterStatus])
(Maybe [ClusterParameterStatus])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroupStatus' {Maybe [ClusterParameterStatus]
clusterParameterStatusList :: Maybe [ClusterParameterStatus]
$sel:clusterParameterStatusList:ClusterParameterGroupStatus' :: ClusterParameterGroupStatus -> Maybe [ClusterParameterStatus]
clusterParameterStatusList} -> Maybe [ClusterParameterStatus]
clusterParameterStatusList) (\s :: ClusterParameterGroupStatus
s@ClusterParameterGroupStatus' {} Maybe [ClusterParameterStatus]
a -> ClusterParameterGroupStatus
s {$sel:clusterParameterStatusList:ClusterParameterGroupStatus' :: Maybe [ClusterParameterStatus]
clusterParameterStatusList = Maybe [ClusterParameterStatus]
a} :: ClusterParameterGroupStatus) ((Maybe [ClusterParameterStatus]
-> f (Maybe [ClusterParameterStatus]))
-> ClusterParameterGroupStatus -> f ClusterParameterGroupStatus)
-> ((Maybe [ClusterParameterStatus]
-> f (Maybe [ClusterParameterStatus]))
-> Maybe [ClusterParameterStatus]
-> f (Maybe [ClusterParameterStatus]))
-> (Maybe [ClusterParameterStatus]
-> f (Maybe [ClusterParameterStatus]))
-> ClusterParameterGroupStatus
-> f ClusterParameterGroupStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ClusterParameterStatus]
[ClusterParameterStatus]
[ClusterParameterStatus]
[ClusterParameterStatus]
-> Iso
(Maybe [ClusterParameterStatus])
(Maybe [ClusterParameterStatus])
(Maybe [ClusterParameterStatus])
(Maybe [ClusterParameterStatus])
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
[ClusterParameterStatus]
[ClusterParameterStatus]
[ClusterParameterStatus]
[ClusterParameterStatus]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
clusterParameterGroupStatus_parameterApplyStatus :: Lens.Lens' ClusterParameterGroupStatus (Prelude.Maybe Prelude.Text)
clusterParameterGroupStatus_parameterApplyStatus :: (Maybe Text -> f (Maybe Text))
-> ClusterParameterGroupStatus -> f ClusterParameterGroupStatus
clusterParameterGroupStatus_parameterApplyStatus = (ClusterParameterGroupStatus -> Maybe Text)
-> (ClusterParameterGroupStatus
-> Maybe Text -> ClusterParameterGroupStatus)
-> Lens
ClusterParameterGroupStatus
ClusterParameterGroupStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroupStatus' {Maybe Text
parameterApplyStatus :: Maybe Text
$sel:parameterApplyStatus:ClusterParameterGroupStatus' :: ClusterParameterGroupStatus -> Maybe Text
parameterApplyStatus} -> Maybe Text
parameterApplyStatus) (\s :: ClusterParameterGroupStatus
s@ClusterParameterGroupStatus' {} Maybe Text
a -> ClusterParameterGroupStatus
s {$sel:parameterApplyStatus:ClusterParameterGroupStatus' :: Maybe Text
parameterApplyStatus = Maybe Text
a} :: ClusterParameterGroupStatus)
clusterParameterGroupStatus_parameterGroupName :: Lens.Lens' ClusterParameterGroupStatus (Prelude.Maybe Prelude.Text)
clusterParameterGroupStatus_parameterGroupName :: (Maybe Text -> f (Maybe Text))
-> ClusterParameterGroupStatus -> f ClusterParameterGroupStatus
clusterParameterGroupStatus_parameterGroupName = (ClusterParameterGroupStatus -> Maybe Text)
-> (ClusterParameterGroupStatus
-> Maybe Text -> ClusterParameterGroupStatus)
-> Lens
ClusterParameterGroupStatus
ClusterParameterGroupStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroupStatus' {Maybe Text
parameterGroupName :: Maybe Text
$sel:parameterGroupName:ClusterParameterGroupStatus' :: ClusterParameterGroupStatus -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: ClusterParameterGroupStatus
s@ClusterParameterGroupStatus' {} Maybe Text
a -> ClusterParameterGroupStatus
s {$sel:parameterGroupName:ClusterParameterGroupStatus' :: Maybe Text
parameterGroupName = Maybe Text
a} :: ClusterParameterGroupStatus)
instance Core.FromXML ClusterParameterGroupStatus where
parseXML :: [Node] -> Either String ClusterParameterGroupStatus
parseXML [Node]
x =
Maybe [ClusterParameterStatus]
-> Maybe Text -> Maybe Text -> ClusterParameterGroupStatus
ClusterParameterGroupStatus'
(Maybe [ClusterParameterStatus]
-> Maybe Text -> Maybe Text -> ClusterParameterGroupStatus)
-> Either String (Maybe [ClusterParameterStatus])
-> Either
String (Maybe Text -> Maybe Text -> ClusterParameterGroupStatus)
forall (f :: * -> *) a b. Functor 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
"ClusterParameterStatusList"
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 [ClusterParameterStatus]))
-> Either String (Maybe [ClusterParameterStatus])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ClusterParameterStatus])
-> [Node] -> Either String (Maybe [ClusterParameterStatus])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ClusterParameterStatus]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String (Maybe Text -> Maybe Text -> ClusterParameterGroupStatus)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ClusterParameterGroupStatus)
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
"ParameterApplyStatus")
Either String (Maybe Text -> ClusterParameterGroupStatus)
-> Either String (Maybe Text)
-> Either String ClusterParameterGroupStatus
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
"ParameterGroupName")
instance Prelude.Hashable ClusterParameterGroupStatus
instance Prelude.NFData ClusterParameterGroupStatus