{-# 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.ClusterVersion where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data ClusterVersion = ClusterVersion'
{
ClusterVersion -> Maybe Text
clusterParameterGroupFamily :: Prelude.Maybe Prelude.Text,
ClusterVersion -> Maybe Text
clusterVersion :: Prelude.Maybe Prelude.Text,
ClusterVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ClusterVersion -> ClusterVersion -> Bool
(ClusterVersion -> ClusterVersion -> Bool)
-> (ClusterVersion -> ClusterVersion -> Bool) -> Eq ClusterVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterVersion -> ClusterVersion -> Bool
$c/= :: ClusterVersion -> ClusterVersion -> Bool
== :: ClusterVersion -> ClusterVersion -> Bool
$c== :: ClusterVersion -> ClusterVersion -> Bool
Prelude.Eq, ReadPrec [ClusterVersion]
ReadPrec ClusterVersion
Int -> ReadS ClusterVersion
ReadS [ClusterVersion]
(Int -> ReadS ClusterVersion)
-> ReadS [ClusterVersion]
-> ReadPrec ClusterVersion
-> ReadPrec [ClusterVersion]
-> Read ClusterVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterVersion]
$creadListPrec :: ReadPrec [ClusterVersion]
readPrec :: ReadPrec ClusterVersion
$creadPrec :: ReadPrec ClusterVersion
readList :: ReadS [ClusterVersion]
$creadList :: ReadS [ClusterVersion]
readsPrec :: Int -> ReadS ClusterVersion
$creadsPrec :: Int -> ReadS ClusterVersion
Prelude.Read, Int -> ClusterVersion -> ShowS
[ClusterVersion] -> ShowS
ClusterVersion -> String
(Int -> ClusterVersion -> ShowS)
-> (ClusterVersion -> String)
-> ([ClusterVersion] -> ShowS)
-> Show ClusterVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterVersion] -> ShowS
$cshowList :: [ClusterVersion] -> ShowS
show :: ClusterVersion -> String
$cshow :: ClusterVersion -> String
showsPrec :: Int -> ClusterVersion -> ShowS
$cshowsPrec :: Int -> ClusterVersion -> ShowS
Prelude.Show, (forall x. ClusterVersion -> Rep ClusterVersion x)
-> (forall x. Rep ClusterVersion x -> ClusterVersion)
-> Generic ClusterVersion
forall x. Rep ClusterVersion x -> ClusterVersion
forall x. ClusterVersion -> Rep ClusterVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterVersion x -> ClusterVersion
$cfrom :: forall x. ClusterVersion -> Rep ClusterVersion x
Prelude.Generic)
newClusterVersion ::
ClusterVersion
newClusterVersion :: ClusterVersion
newClusterVersion =
ClusterVersion' :: Maybe Text -> Maybe Text -> Maybe Text -> ClusterVersion
ClusterVersion'
{ $sel:clusterParameterGroupFamily:ClusterVersion' :: Maybe Text
clusterParameterGroupFamily =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterVersion:ClusterVersion' :: Maybe Text
clusterVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ClusterVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterVersion_clusterParameterGroupFamily :: Lens.Lens' ClusterVersion (Prelude.Maybe Prelude.Text)
clusterVersion_clusterParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> ClusterVersion -> f ClusterVersion
clusterVersion_clusterParameterGroupFamily = (ClusterVersion -> Maybe Text)
-> (ClusterVersion -> Maybe Text -> ClusterVersion)
-> Lens ClusterVersion ClusterVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterVersion' {Maybe Text
clusterParameterGroupFamily :: Maybe Text
$sel:clusterParameterGroupFamily:ClusterVersion' :: ClusterVersion -> Maybe Text
clusterParameterGroupFamily} -> Maybe Text
clusterParameterGroupFamily) (\s :: ClusterVersion
s@ClusterVersion' {} Maybe Text
a -> ClusterVersion
s {$sel:clusterParameterGroupFamily:ClusterVersion' :: Maybe Text
clusterParameterGroupFamily = Maybe Text
a} :: ClusterVersion)
clusterVersion_clusterVersion :: Lens.Lens' ClusterVersion (Prelude.Maybe Prelude.Text)
clusterVersion_clusterVersion :: (Maybe Text -> f (Maybe Text))
-> ClusterVersion -> f ClusterVersion
clusterVersion_clusterVersion = (ClusterVersion -> Maybe Text)
-> (ClusterVersion -> Maybe Text -> ClusterVersion)
-> Lens ClusterVersion ClusterVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterVersion' {Maybe Text
clusterVersion :: Maybe Text
$sel:clusterVersion:ClusterVersion' :: ClusterVersion -> Maybe Text
clusterVersion} -> Maybe Text
clusterVersion) (\s :: ClusterVersion
s@ClusterVersion' {} Maybe Text
a -> ClusterVersion
s {$sel:clusterVersion:ClusterVersion' :: Maybe Text
clusterVersion = Maybe Text
a} :: ClusterVersion)
clusterVersion_description :: Lens.Lens' ClusterVersion (Prelude.Maybe Prelude.Text)
clusterVersion_description :: (Maybe Text -> f (Maybe Text))
-> ClusterVersion -> f ClusterVersion
clusterVersion_description = (ClusterVersion -> Maybe Text)
-> (ClusterVersion -> Maybe Text -> ClusterVersion)
-> Lens ClusterVersion ClusterVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterVersion' {Maybe Text
description :: Maybe Text
$sel:description:ClusterVersion' :: ClusterVersion -> Maybe Text
description} -> Maybe Text
description) (\s :: ClusterVersion
s@ClusterVersion' {} Maybe Text
a -> ClusterVersion
s {$sel:description:ClusterVersion' :: Maybe Text
description = Maybe Text
a} :: ClusterVersion)
instance Core.FromXML ClusterVersion where
parseXML :: [Node] -> Either String ClusterVersion
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> ClusterVersion
ClusterVersion'
(Maybe Text -> Maybe Text -> Maybe Text -> ClusterVersion)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> ClusterVersion)
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
"ClusterParameterGroupFamily")
Either String (Maybe Text -> Maybe Text -> ClusterVersion)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ClusterVersion)
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
"ClusterVersion")
Either String (Maybe Text -> ClusterVersion)
-> Either String (Maybe Text) -> Either String ClusterVersion
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")
instance Prelude.Hashable ClusterVersion
instance Prelude.NFData ClusterVersion