{-# 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.AquaConfiguration 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.AquaConfigurationStatus
import Amazonka.Redshift.Types.AquaStatus
data AquaConfiguration = AquaConfiguration'
{
AquaConfiguration -> Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Prelude.Maybe AquaConfigurationStatus,
AquaConfiguration -> Maybe AquaStatus
aquaStatus :: Prelude.Maybe AquaStatus
}
deriving (AquaConfiguration -> AquaConfiguration -> Bool
(AquaConfiguration -> AquaConfiguration -> Bool)
-> (AquaConfiguration -> AquaConfiguration -> Bool)
-> Eq AquaConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AquaConfiguration -> AquaConfiguration -> Bool
$c/= :: AquaConfiguration -> AquaConfiguration -> Bool
== :: AquaConfiguration -> AquaConfiguration -> Bool
$c== :: AquaConfiguration -> AquaConfiguration -> Bool
Prelude.Eq, ReadPrec [AquaConfiguration]
ReadPrec AquaConfiguration
Int -> ReadS AquaConfiguration
ReadS [AquaConfiguration]
(Int -> ReadS AquaConfiguration)
-> ReadS [AquaConfiguration]
-> ReadPrec AquaConfiguration
-> ReadPrec [AquaConfiguration]
-> Read AquaConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AquaConfiguration]
$creadListPrec :: ReadPrec [AquaConfiguration]
readPrec :: ReadPrec AquaConfiguration
$creadPrec :: ReadPrec AquaConfiguration
readList :: ReadS [AquaConfiguration]
$creadList :: ReadS [AquaConfiguration]
readsPrec :: Int -> ReadS AquaConfiguration
$creadsPrec :: Int -> ReadS AquaConfiguration
Prelude.Read, Int -> AquaConfiguration -> ShowS
[AquaConfiguration] -> ShowS
AquaConfiguration -> String
(Int -> AquaConfiguration -> ShowS)
-> (AquaConfiguration -> String)
-> ([AquaConfiguration] -> ShowS)
-> Show AquaConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AquaConfiguration] -> ShowS
$cshowList :: [AquaConfiguration] -> ShowS
show :: AquaConfiguration -> String
$cshow :: AquaConfiguration -> String
showsPrec :: Int -> AquaConfiguration -> ShowS
$cshowsPrec :: Int -> AquaConfiguration -> ShowS
Prelude.Show, (forall x. AquaConfiguration -> Rep AquaConfiguration x)
-> (forall x. Rep AquaConfiguration x -> AquaConfiguration)
-> Generic AquaConfiguration
forall x. Rep AquaConfiguration x -> AquaConfiguration
forall x. AquaConfiguration -> Rep AquaConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AquaConfiguration x -> AquaConfiguration
$cfrom :: forall x. AquaConfiguration -> Rep AquaConfiguration x
Prelude.Generic)
newAquaConfiguration ::
AquaConfiguration
newAquaConfiguration :: AquaConfiguration
newAquaConfiguration =
AquaConfiguration' :: Maybe AquaConfigurationStatus
-> Maybe AquaStatus -> AquaConfiguration
AquaConfiguration'
{ $sel:aquaConfigurationStatus:AquaConfiguration' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus =
Maybe AquaConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:aquaStatus:AquaConfiguration' :: Maybe AquaStatus
aquaStatus = Maybe AquaStatus
forall a. Maybe a
Prelude.Nothing
}
aquaConfiguration_aquaConfigurationStatus :: Lens.Lens' AquaConfiguration (Prelude.Maybe AquaConfigurationStatus)
aquaConfiguration_aquaConfigurationStatus :: (Maybe AquaConfigurationStatus
-> f (Maybe AquaConfigurationStatus))
-> AquaConfiguration -> f AquaConfiguration
aquaConfiguration_aquaConfigurationStatus = (AquaConfiguration -> Maybe AquaConfigurationStatus)
-> (AquaConfiguration
-> Maybe AquaConfigurationStatus -> AquaConfiguration)
-> Lens
AquaConfiguration
AquaConfiguration
(Maybe AquaConfigurationStatus)
(Maybe AquaConfigurationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AquaConfiguration' {Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
$sel:aquaConfigurationStatus:AquaConfiguration' :: AquaConfiguration -> Maybe AquaConfigurationStatus
aquaConfigurationStatus} -> Maybe AquaConfigurationStatus
aquaConfigurationStatus) (\s :: AquaConfiguration
s@AquaConfiguration' {} Maybe AquaConfigurationStatus
a -> AquaConfiguration
s {$sel:aquaConfigurationStatus:AquaConfiguration' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
a} :: AquaConfiguration)
aquaConfiguration_aquaStatus :: Lens.Lens' AquaConfiguration (Prelude.Maybe AquaStatus)
aquaConfiguration_aquaStatus :: (Maybe AquaStatus -> f (Maybe AquaStatus))
-> AquaConfiguration -> f AquaConfiguration
aquaConfiguration_aquaStatus = (AquaConfiguration -> Maybe AquaStatus)
-> (AquaConfiguration -> Maybe AquaStatus -> AquaConfiguration)
-> Lens
AquaConfiguration
AquaConfiguration
(Maybe AquaStatus)
(Maybe AquaStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AquaConfiguration' {Maybe AquaStatus
aquaStatus :: Maybe AquaStatus
$sel:aquaStatus:AquaConfiguration' :: AquaConfiguration -> Maybe AquaStatus
aquaStatus} -> Maybe AquaStatus
aquaStatus) (\s :: AquaConfiguration
s@AquaConfiguration' {} Maybe AquaStatus
a -> AquaConfiguration
s {$sel:aquaStatus:AquaConfiguration' :: Maybe AquaStatus
aquaStatus = Maybe AquaStatus
a} :: AquaConfiguration)
instance Core.FromXML AquaConfiguration where
parseXML :: [Node] -> Either String AquaConfiguration
parseXML [Node]
x =
Maybe AquaConfigurationStatus
-> Maybe AquaStatus -> AquaConfiguration
AquaConfiguration'
(Maybe AquaConfigurationStatus
-> Maybe AquaStatus -> AquaConfiguration)
-> Either String (Maybe AquaConfigurationStatus)
-> Either String (Maybe AquaStatus -> AquaConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe AquaConfigurationStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AquaConfigurationStatus")
Either String (Maybe AquaStatus -> AquaConfiguration)
-> Either String (Maybe AquaStatus)
-> Either String AquaConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AquaStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AquaStatus")
instance Prelude.Hashable AquaConfiguration
instance Prelude.NFData AquaConfiguration