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