{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Redshift.ModifyAquaConfiguration
(
ModifyAquaConfiguration (..),
newModifyAquaConfiguration,
modifyAquaConfiguration_aquaConfigurationStatus,
modifyAquaConfiguration_clusterIdentifier,
ModifyAquaConfigurationResponse (..),
newModifyAquaConfigurationResponse,
modifyAquaConfigurationResponse_aquaConfiguration,
modifyAquaConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ModifyAquaConfiguration = ModifyAquaConfiguration'
{
ModifyAquaConfiguration -> Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Prelude.Maybe AquaConfigurationStatus,
ModifyAquaConfiguration -> Text
clusterIdentifier :: Prelude.Text
}
deriving (ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool
(ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool)
-> (ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool)
-> Eq ModifyAquaConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool
$c/= :: ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool
== :: ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool
$c== :: ModifyAquaConfiguration -> ModifyAquaConfiguration -> Bool
Prelude.Eq, ReadPrec [ModifyAquaConfiguration]
ReadPrec ModifyAquaConfiguration
Int -> ReadS ModifyAquaConfiguration
ReadS [ModifyAquaConfiguration]
(Int -> ReadS ModifyAquaConfiguration)
-> ReadS [ModifyAquaConfiguration]
-> ReadPrec ModifyAquaConfiguration
-> ReadPrec [ModifyAquaConfiguration]
-> Read ModifyAquaConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyAquaConfiguration]
$creadListPrec :: ReadPrec [ModifyAquaConfiguration]
readPrec :: ReadPrec ModifyAquaConfiguration
$creadPrec :: ReadPrec ModifyAquaConfiguration
readList :: ReadS [ModifyAquaConfiguration]
$creadList :: ReadS [ModifyAquaConfiguration]
readsPrec :: Int -> ReadS ModifyAquaConfiguration
$creadsPrec :: Int -> ReadS ModifyAquaConfiguration
Prelude.Read, Int -> ModifyAquaConfiguration -> ShowS
[ModifyAquaConfiguration] -> ShowS
ModifyAquaConfiguration -> String
(Int -> ModifyAquaConfiguration -> ShowS)
-> (ModifyAquaConfiguration -> String)
-> ([ModifyAquaConfiguration] -> ShowS)
-> Show ModifyAquaConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyAquaConfiguration] -> ShowS
$cshowList :: [ModifyAquaConfiguration] -> ShowS
show :: ModifyAquaConfiguration -> String
$cshow :: ModifyAquaConfiguration -> String
showsPrec :: Int -> ModifyAquaConfiguration -> ShowS
$cshowsPrec :: Int -> ModifyAquaConfiguration -> ShowS
Prelude.Show, (forall x.
ModifyAquaConfiguration -> Rep ModifyAquaConfiguration x)
-> (forall x.
Rep ModifyAquaConfiguration x -> ModifyAquaConfiguration)
-> Generic ModifyAquaConfiguration
forall x. Rep ModifyAquaConfiguration x -> ModifyAquaConfiguration
forall x. ModifyAquaConfiguration -> Rep ModifyAquaConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyAquaConfiguration x -> ModifyAquaConfiguration
$cfrom :: forall x. ModifyAquaConfiguration -> Rep ModifyAquaConfiguration x
Prelude.Generic)
newModifyAquaConfiguration ::
Prelude.Text ->
ModifyAquaConfiguration
newModifyAquaConfiguration :: Text -> ModifyAquaConfiguration
newModifyAquaConfiguration Text
pClusterIdentifier_ =
ModifyAquaConfiguration' :: Maybe AquaConfigurationStatus -> Text -> ModifyAquaConfiguration
ModifyAquaConfiguration'
{ $sel:aquaConfigurationStatus:ModifyAquaConfiguration' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus =
Maybe AquaConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:clusterIdentifier:ModifyAquaConfiguration' :: Text
clusterIdentifier = Text
pClusterIdentifier_
}
modifyAquaConfiguration_aquaConfigurationStatus :: Lens.Lens' ModifyAquaConfiguration (Prelude.Maybe AquaConfigurationStatus)
modifyAquaConfiguration_aquaConfigurationStatus :: (Maybe AquaConfigurationStatus
-> f (Maybe AquaConfigurationStatus))
-> ModifyAquaConfiguration -> f ModifyAquaConfiguration
modifyAquaConfiguration_aquaConfigurationStatus = (ModifyAquaConfiguration -> Maybe AquaConfigurationStatus)
-> (ModifyAquaConfiguration
-> Maybe AquaConfigurationStatus -> ModifyAquaConfiguration)
-> Lens
ModifyAquaConfiguration
ModifyAquaConfiguration
(Maybe AquaConfigurationStatus)
(Maybe AquaConfigurationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyAquaConfiguration' {Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
$sel:aquaConfigurationStatus:ModifyAquaConfiguration' :: ModifyAquaConfiguration -> Maybe AquaConfigurationStatus
aquaConfigurationStatus} -> Maybe AquaConfigurationStatus
aquaConfigurationStatus) (\s :: ModifyAquaConfiguration
s@ModifyAquaConfiguration' {} Maybe AquaConfigurationStatus
a -> ModifyAquaConfiguration
s {$sel:aquaConfigurationStatus:ModifyAquaConfiguration' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
a} :: ModifyAquaConfiguration)
modifyAquaConfiguration_clusterIdentifier :: Lens.Lens' ModifyAquaConfiguration Prelude.Text
modifyAquaConfiguration_clusterIdentifier :: (Text -> f Text)
-> ModifyAquaConfiguration -> f ModifyAquaConfiguration
modifyAquaConfiguration_clusterIdentifier = (ModifyAquaConfiguration -> Text)
-> (ModifyAquaConfiguration -> Text -> ModifyAquaConfiguration)
-> Lens ModifyAquaConfiguration ModifyAquaConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyAquaConfiguration' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ModifyAquaConfiguration' :: ModifyAquaConfiguration -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ModifyAquaConfiguration
s@ModifyAquaConfiguration' {} Text
a -> ModifyAquaConfiguration
s {$sel:clusterIdentifier:ModifyAquaConfiguration' :: Text
clusterIdentifier = Text
a} :: ModifyAquaConfiguration)
instance Core.AWSRequest ModifyAquaConfiguration where
type
AWSResponse ModifyAquaConfiguration =
ModifyAquaConfigurationResponse
request :: ModifyAquaConfiguration -> Request ModifyAquaConfiguration
request = Service
-> ModifyAquaConfiguration -> Request ModifyAquaConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ModifyAquaConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyAquaConfiguration)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ModifyAquaConfiguration))
-> Logger
-> Service
-> Proxy ModifyAquaConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyAquaConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ModifyAquaConfigurationResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe AquaConfiguration -> Int -> ModifyAquaConfigurationResponse
ModifyAquaConfigurationResponse'
(Maybe AquaConfiguration -> Int -> ModifyAquaConfigurationResponse)
-> Either String (Maybe AquaConfiguration)
-> Either String (Int -> ModifyAquaConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe AquaConfiguration)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AquaConfiguration")
Either String (Int -> ModifyAquaConfigurationResponse)
-> Either String Int
-> Either String ModifyAquaConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ModifyAquaConfiguration
instance Prelude.NFData ModifyAquaConfiguration
instance Core.ToHeaders ModifyAquaConfiguration where
toHeaders :: ModifyAquaConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders -> ModifyAquaConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ModifyAquaConfiguration where
toPath :: ModifyAquaConfiguration -> ByteString
toPath = ByteString -> ModifyAquaConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ModifyAquaConfiguration where
toQuery :: ModifyAquaConfiguration -> QueryString
toQuery ModifyAquaConfiguration' {Maybe AquaConfigurationStatus
Text
clusterIdentifier :: Text
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
$sel:clusterIdentifier:ModifyAquaConfiguration' :: ModifyAquaConfiguration -> Text
$sel:aquaConfigurationStatus:ModifyAquaConfiguration' :: ModifyAquaConfiguration -> Maybe AquaConfigurationStatus
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyAquaConfiguration" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"AquaConfigurationStatus"
ByteString -> Maybe AquaConfigurationStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe AquaConfigurationStatus
aquaConfigurationStatus,
ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier
]
data ModifyAquaConfigurationResponse = ModifyAquaConfigurationResponse'
{
ModifyAquaConfigurationResponse -> Maybe AquaConfiguration
aquaConfiguration :: Prelude.Maybe AquaConfiguration,
ModifyAquaConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool
(ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool)
-> (ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool)
-> Eq ModifyAquaConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool
$c/= :: ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool
== :: ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool
$c== :: ModifyAquaConfigurationResponse
-> ModifyAquaConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [ModifyAquaConfigurationResponse]
ReadPrec ModifyAquaConfigurationResponse
Int -> ReadS ModifyAquaConfigurationResponse
ReadS [ModifyAquaConfigurationResponse]
(Int -> ReadS ModifyAquaConfigurationResponse)
-> ReadS [ModifyAquaConfigurationResponse]
-> ReadPrec ModifyAquaConfigurationResponse
-> ReadPrec [ModifyAquaConfigurationResponse]
-> Read ModifyAquaConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyAquaConfigurationResponse]
$creadListPrec :: ReadPrec [ModifyAquaConfigurationResponse]
readPrec :: ReadPrec ModifyAquaConfigurationResponse
$creadPrec :: ReadPrec ModifyAquaConfigurationResponse
readList :: ReadS [ModifyAquaConfigurationResponse]
$creadList :: ReadS [ModifyAquaConfigurationResponse]
readsPrec :: Int -> ReadS ModifyAquaConfigurationResponse
$creadsPrec :: Int -> ReadS ModifyAquaConfigurationResponse
Prelude.Read, Int -> ModifyAquaConfigurationResponse -> ShowS
[ModifyAquaConfigurationResponse] -> ShowS
ModifyAquaConfigurationResponse -> String
(Int -> ModifyAquaConfigurationResponse -> ShowS)
-> (ModifyAquaConfigurationResponse -> String)
-> ([ModifyAquaConfigurationResponse] -> ShowS)
-> Show ModifyAquaConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyAquaConfigurationResponse] -> ShowS
$cshowList :: [ModifyAquaConfigurationResponse] -> ShowS
show :: ModifyAquaConfigurationResponse -> String
$cshow :: ModifyAquaConfigurationResponse -> String
showsPrec :: Int -> ModifyAquaConfigurationResponse -> ShowS
$cshowsPrec :: Int -> ModifyAquaConfigurationResponse -> ShowS
Prelude.Show, (forall x.
ModifyAquaConfigurationResponse
-> Rep ModifyAquaConfigurationResponse x)
-> (forall x.
Rep ModifyAquaConfigurationResponse x
-> ModifyAquaConfigurationResponse)
-> Generic ModifyAquaConfigurationResponse
forall x.
Rep ModifyAquaConfigurationResponse x
-> ModifyAquaConfigurationResponse
forall x.
ModifyAquaConfigurationResponse
-> Rep ModifyAquaConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyAquaConfigurationResponse x
-> ModifyAquaConfigurationResponse
$cfrom :: forall x.
ModifyAquaConfigurationResponse
-> Rep ModifyAquaConfigurationResponse x
Prelude.Generic)
newModifyAquaConfigurationResponse ::
Prelude.Int ->
ModifyAquaConfigurationResponse
newModifyAquaConfigurationResponse :: Int -> ModifyAquaConfigurationResponse
newModifyAquaConfigurationResponse Int
pHttpStatus_ =
ModifyAquaConfigurationResponse' :: Maybe AquaConfiguration -> Int -> ModifyAquaConfigurationResponse
ModifyAquaConfigurationResponse'
{ $sel:aquaConfiguration:ModifyAquaConfigurationResponse' :: Maybe AquaConfiguration
aquaConfiguration =
Maybe AquaConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ModifyAquaConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
modifyAquaConfigurationResponse_aquaConfiguration :: Lens.Lens' ModifyAquaConfigurationResponse (Prelude.Maybe AquaConfiguration)
modifyAquaConfigurationResponse_aquaConfiguration :: (Maybe AquaConfiguration -> f (Maybe AquaConfiguration))
-> ModifyAquaConfigurationResponse
-> f ModifyAquaConfigurationResponse
modifyAquaConfigurationResponse_aquaConfiguration = (ModifyAquaConfigurationResponse -> Maybe AquaConfiguration)
-> (ModifyAquaConfigurationResponse
-> Maybe AquaConfiguration -> ModifyAquaConfigurationResponse)
-> Lens
ModifyAquaConfigurationResponse
ModifyAquaConfigurationResponse
(Maybe AquaConfiguration)
(Maybe AquaConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyAquaConfigurationResponse' {Maybe AquaConfiguration
aquaConfiguration :: Maybe AquaConfiguration
$sel:aquaConfiguration:ModifyAquaConfigurationResponse' :: ModifyAquaConfigurationResponse -> Maybe AquaConfiguration
aquaConfiguration} -> Maybe AquaConfiguration
aquaConfiguration) (\s :: ModifyAquaConfigurationResponse
s@ModifyAquaConfigurationResponse' {} Maybe AquaConfiguration
a -> ModifyAquaConfigurationResponse
s {$sel:aquaConfiguration:ModifyAquaConfigurationResponse' :: Maybe AquaConfiguration
aquaConfiguration = Maybe AquaConfiguration
a} :: ModifyAquaConfigurationResponse)
modifyAquaConfigurationResponse_httpStatus :: Lens.Lens' ModifyAquaConfigurationResponse Prelude.Int
modifyAquaConfigurationResponse_httpStatus :: (Int -> f Int)
-> ModifyAquaConfigurationResponse
-> f ModifyAquaConfigurationResponse
modifyAquaConfigurationResponse_httpStatus = (ModifyAquaConfigurationResponse -> Int)
-> (ModifyAquaConfigurationResponse
-> Int -> ModifyAquaConfigurationResponse)
-> Lens
ModifyAquaConfigurationResponse
ModifyAquaConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyAquaConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyAquaConfigurationResponse' :: ModifyAquaConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyAquaConfigurationResponse
s@ModifyAquaConfigurationResponse' {} Int
a -> ModifyAquaConfigurationResponse
s {$sel:httpStatus:ModifyAquaConfigurationResponse' :: Int
httpStatus = Int
a} :: ModifyAquaConfigurationResponse)
instance
Prelude.NFData
ModifyAquaConfigurationResponse