{-# 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.ClusterParameterGroup 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.Tag
data ClusterParameterGroup = ClusterParameterGroup'
{
ClusterParameterGroup -> Maybe Text
parameterGroupFamily :: Prelude.Maybe Prelude.Text,
ClusterParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ClusterParameterGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
ClusterParameterGroup -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text
}
deriving (ClusterParameterGroup -> ClusterParameterGroup -> Bool
(ClusterParameterGroup -> ClusterParameterGroup -> Bool)
-> (ClusterParameterGroup -> ClusterParameterGroup -> Bool)
-> Eq ClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
$c/= :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
== :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
$c== :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [ClusterParameterGroup]
ReadPrec ClusterParameterGroup
Int -> ReadS ClusterParameterGroup
ReadS [ClusterParameterGroup]
(Int -> ReadS ClusterParameterGroup)
-> ReadS [ClusterParameterGroup]
-> ReadPrec ClusterParameterGroup
-> ReadPrec [ClusterParameterGroup]
-> Read ClusterParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterParameterGroup]
$creadListPrec :: ReadPrec [ClusterParameterGroup]
readPrec :: ReadPrec ClusterParameterGroup
$creadPrec :: ReadPrec ClusterParameterGroup
readList :: ReadS [ClusterParameterGroup]
$creadList :: ReadS [ClusterParameterGroup]
readsPrec :: Int -> ReadS ClusterParameterGroup
$creadsPrec :: Int -> ReadS ClusterParameterGroup
Prelude.Read, Int -> ClusterParameterGroup -> ShowS
[ClusterParameterGroup] -> ShowS
ClusterParameterGroup -> String
(Int -> ClusterParameterGroup -> ShowS)
-> (ClusterParameterGroup -> String)
-> ([ClusterParameterGroup] -> ShowS)
-> Show ClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterParameterGroup] -> ShowS
$cshowList :: [ClusterParameterGroup] -> ShowS
show :: ClusterParameterGroup -> String
$cshow :: ClusterParameterGroup -> String
showsPrec :: Int -> ClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> ClusterParameterGroup -> ShowS
Prelude.Show, (forall x. ClusterParameterGroup -> Rep ClusterParameterGroup x)
-> (forall x. Rep ClusterParameterGroup x -> ClusterParameterGroup)
-> Generic ClusterParameterGroup
forall x. Rep ClusterParameterGroup x -> ClusterParameterGroup
forall x. ClusterParameterGroup -> Rep ClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterParameterGroup x -> ClusterParameterGroup
$cfrom :: forall x. ClusterParameterGroup -> Rep ClusterParameterGroup x
Prelude.Generic)
newClusterParameterGroup ::
ClusterParameterGroup
newClusterParameterGroup :: ClusterParameterGroup
newClusterParameterGroup =
ClusterParameterGroup' :: Maybe Text
-> Maybe Text -> Maybe [Tag] -> Maybe Text -> ClusterParameterGroup
ClusterParameterGroup'
{ $sel:parameterGroupFamily:ClusterParameterGroup' :: Maybe Text
parameterGroupFamily =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ClusterParameterGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ClusterParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:parameterGroupName:ClusterParameterGroup' :: Maybe Text
parameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterParameterGroup_parameterGroupFamily :: Lens.Lens' ClusterParameterGroup (Prelude.Maybe Prelude.Text)
clusterParameterGroup_parameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> ClusterParameterGroup -> f ClusterParameterGroup
clusterParameterGroup_parameterGroupFamily = (ClusterParameterGroup -> Maybe Text)
-> (ClusterParameterGroup -> Maybe Text -> ClusterParameterGroup)
-> Lens
ClusterParameterGroup
ClusterParameterGroup
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroup' {Maybe Text
parameterGroupFamily :: Maybe Text
$sel:parameterGroupFamily:ClusterParameterGroup' :: ClusterParameterGroup -> Maybe Text
parameterGroupFamily} -> Maybe Text
parameterGroupFamily) (\s :: ClusterParameterGroup
s@ClusterParameterGroup' {} Maybe Text
a -> ClusterParameterGroup
s {$sel:parameterGroupFamily:ClusterParameterGroup' :: Maybe Text
parameterGroupFamily = Maybe Text
a} :: ClusterParameterGroup)
clusterParameterGroup_description :: Lens.Lens' ClusterParameterGroup (Prelude.Maybe Prelude.Text)
clusterParameterGroup_description :: (Maybe Text -> f (Maybe Text))
-> ClusterParameterGroup -> f ClusterParameterGroup
clusterParameterGroup_description = (ClusterParameterGroup -> Maybe Text)
-> (ClusterParameterGroup -> Maybe Text -> ClusterParameterGroup)
-> Lens
ClusterParameterGroup
ClusterParameterGroup
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroup' {Maybe Text
description :: Maybe Text
$sel:description:ClusterParameterGroup' :: ClusterParameterGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: ClusterParameterGroup
s@ClusterParameterGroup' {} Maybe Text
a -> ClusterParameterGroup
s {$sel:description:ClusterParameterGroup' :: Maybe Text
description = Maybe Text
a} :: ClusterParameterGroup)
clusterParameterGroup_tags :: Lens.Lens' ClusterParameterGroup (Prelude.Maybe [Tag])
clusterParameterGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ClusterParameterGroup -> f ClusterParameterGroup
clusterParameterGroup_tags = (ClusterParameterGroup -> Maybe [Tag])
-> (ClusterParameterGroup -> Maybe [Tag] -> ClusterParameterGroup)
-> Lens
ClusterParameterGroup
ClusterParameterGroup
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ClusterParameterGroup' :: ClusterParameterGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ClusterParameterGroup
s@ClusterParameterGroup' {} Maybe [Tag]
a -> ClusterParameterGroup
s {$sel:tags:ClusterParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ClusterParameterGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
-> ClusterParameterGroup -> f ClusterParameterGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ClusterParameterGroup
-> f ClusterParameterGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
clusterParameterGroup_parameterGroupName :: Lens.Lens' ClusterParameterGroup (Prelude.Maybe Prelude.Text)
clusterParameterGroup_parameterGroupName :: (Maybe Text -> f (Maybe Text))
-> ClusterParameterGroup -> f ClusterParameterGroup
clusterParameterGroup_parameterGroupName = (ClusterParameterGroup -> Maybe Text)
-> (ClusterParameterGroup -> Maybe Text -> ClusterParameterGroup)
-> Lens
ClusterParameterGroup
ClusterParameterGroup
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterParameterGroup' {Maybe Text
parameterGroupName :: Maybe Text
$sel:parameterGroupName:ClusterParameterGroup' :: ClusterParameterGroup -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: ClusterParameterGroup
s@ClusterParameterGroup' {} Maybe Text
a -> ClusterParameterGroup
s {$sel:parameterGroupName:ClusterParameterGroup' :: Maybe Text
parameterGroupName = Maybe Text
a} :: ClusterParameterGroup)
instance Core.FromXML ClusterParameterGroup where
parseXML :: [Node] -> Either String ClusterParameterGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe [Tag] -> Maybe Text -> ClusterParameterGroup
ClusterParameterGroup'
(Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> ClusterParameterGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe [Tag] -> Maybe Text -> ClusterParameterGroup)
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
"ParameterGroupFamily")
Either
String
(Maybe Text -> Maybe [Tag] -> Maybe Text -> ClusterParameterGroup)
-> Either String (Maybe Text)
-> Either
String (Maybe [Tag] -> Maybe Text -> ClusterParameterGroup)
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 [Tag] -> Maybe Text -> ClusterParameterGroup)
-> Either String (Maybe [Tag])
-> Either String (Maybe Text -> ClusterParameterGroup)
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
"Tags" 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 [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Tag")
)
Either String (Maybe Text -> ClusterParameterGroup)
-> Either String (Maybe Text)
-> Either String ClusterParameterGroup
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 ClusterParameterGroup
instance Prelude.NFData ClusterParameterGroup