{-# 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.ResetClusterParameterGroup
(
ResetClusterParameterGroup (..),
newResetClusterParameterGroup,
resetClusterParameterGroup_resetAllParameters,
resetClusterParameterGroup_parameters,
resetClusterParameterGroup_parameterGroupName,
ClusterParameterGroupNameMessage (..),
newClusterParameterGroupNameMessage,
clusterParameterGroupNameMessage_parameterGroupStatus,
clusterParameterGroupNameMessage_parameterGroupName,
)
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 ResetClusterParameterGroup = ResetClusterParameterGroup'
{
ResetClusterParameterGroup -> Maybe Bool
resetAllParameters :: Prelude.Maybe Prelude.Bool,
ResetClusterParameterGroup -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
ResetClusterParameterGroup -> Text
parameterGroupName :: Prelude.Text
}
deriving (ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool
(ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool)
-> (ResetClusterParameterGroup
-> ResetClusterParameterGroup -> Bool)
-> Eq ResetClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool
$c/= :: ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool
== :: ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool
$c== :: ResetClusterParameterGroup -> ResetClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [ResetClusterParameterGroup]
ReadPrec ResetClusterParameterGroup
Int -> ReadS ResetClusterParameterGroup
ReadS [ResetClusterParameterGroup]
(Int -> ReadS ResetClusterParameterGroup)
-> ReadS [ResetClusterParameterGroup]
-> ReadPrec ResetClusterParameterGroup
-> ReadPrec [ResetClusterParameterGroup]
-> Read ResetClusterParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetClusterParameterGroup]
$creadListPrec :: ReadPrec [ResetClusterParameterGroup]
readPrec :: ReadPrec ResetClusterParameterGroup
$creadPrec :: ReadPrec ResetClusterParameterGroup
readList :: ReadS [ResetClusterParameterGroup]
$creadList :: ReadS [ResetClusterParameterGroup]
readsPrec :: Int -> ReadS ResetClusterParameterGroup
$creadsPrec :: Int -> ReadS ResetClusterParameterGroup
Prelude.Read, Int -> ResetClusterParameterGroup -> ShowS
[ResetClusterParameterGroup] -> ShowS
ResetClusterParameterGroup -> String
(Int -> ResetClusterParameterGroup -> ShowS)
-> (ResetClusterParameterGroup -> String)
-> ([ResetClusterParameterGroup] -> ShowS)
-> Show ResetClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetClusterParameterGroup] -> ShowS
$cshowList :: [ResetClusterParameterGroup] -> ShowS
show :: ResetClusterParameterGroup -> String
$cshow :: ResetClusterParameterGroup -> String
showsPrec :: Int -> ResetClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> ResetClusterParameterGroup -> ShowS
Prelude.Show, (forall x.
ResetClusterParameterGroup -> Rep ResetClusterParameterGroup x)
-> (forall x.
Rep ResetClusterParameterGroup x -> ResetClusterParameterGroup)
-> Generic ResetClusterParameterGroup
forall x.
Rep ResetClusterParameterGroup x -> ResetClusterParameterGroup
forall x.
ResetClusterParameterGroup -> Rep ResetClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResetClusterParameterGroup x -> ResetClusterParameterGroup
$cfrom :: forall x.
ResetClusterParameterGroup -> Rep ResetClusterParameterGroup x
Prelude.Generic)
newResetClusterParameterGroup ::
Prelude.Text ->
ResetClusterParameterGroup
newResetClusterParameterGroup :: Text -> ResetClusterParameterGroup
newResetClusterParameterGroup Text
pParameterGroupName_ =
ResetClusterParameterGroup' :: Maybe Bool
-> Maybe [Parameter] -> Text -> ResetClusterParameterGroup
ResetClusterParameterGroup'
{ $sel:resetAllParameters:ResetClusterParameterGroup' :: Maybe Bool
resetAllParameters =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:ResetClusterParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
$sel:parameterGroupName:ResetClusterParameterGroup' :: Text
parameterGroupName = Text
pParameterGroupName_
}
resetClusterParameterGroup_resetAllParameters :: Lens.Lens' ResetClusterParameterGroup (Prelude.Maybe Prelude.Bool)
resetClusterParameterGroup_resetAllParameters :: (Maybe Bool -> f (Maybe Bool))
-> ResetClusterParameterGroup -> f ResetClusterParameterGroup
resetClusterParameterGroup_resetAllParameters = (ResetClusterParameterGroup -> Maybe Bool)
-> (ResetClusterParameterGroup
-> Maybe Bool -> ResetClusterParameterGroup)
-> Lens
ResetClusterParameterGroup
ResetClusterParameterGroup
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetClusterParameterGroup' {Maybe Bool
resetAllParameters :: Maybe Bool
$sel:resetAllParameters:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Maybe Bool
resetAllParameters} -> Maybe Bool
resetAllParameters) (\s :: ResetClusterParameterGroup
s@ResetClusterParameterGroup' {} Maybe Bool
a -> ResetClusterParameterGroup
s {$sel:resetAllParameters:ResetClusterParameterGroup' :: Maybe Bool
resetAllParameters = Maybe Bool
a} :: ResetClusterParameterGroup)
resetClusterParameterGroup_parameters :: Lens.Lens' ResetClusterParameterGroup (Prelude.Maybe [Parameter])
resetClusterParameterGroup_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetClusterParameterGroup -> f ResetClusterParameterGroup
resetClusterParameterGroup_parameters = (ResetClusterParameterGroup -> Maybe [Parameter])
-> (ResetClusterParameterGroup
-> Maybe [Parameter] -> ResetClusterParameterGroup)
-> Lens
ResetClusterParameterGroup
ResetClusterParameterGroup
(Maybe [Parameter])
(Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetClusterParameterGroup' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: ResetClusterParameterGroup
s@ResetClusterParameterGroup' {} Maybe [Parameter]
a -> ResetClusterParameterGroup
s {$sel:parameters:ResetClusterParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: ResetClusterParameterGroup) ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetClusterParameterGroup -> f ResetClusterParameterGroup)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetClusterParameterGroup
-> f ResetClusterParameterGroup
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
resetClusterParameterGroup_parameterGroupName :: Lens.Lens' ResetClusterParameterGroup Prelude.Text
resetClusterParameterGroup_parameterGroupName :: (Text -> f Text)
-> ResetClusterParameterGroup -> f ResetClusterParameterGroup
resetClusterParameterGroup_parameterGroupName = (ResetClusterParameterGroup -> Text)
-> (ResetClusterParameterGroup
-> Text -> ResetClusterParameterGroup)
-> Lens
ResetClusterParameterGroup ResetClusterParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetClusterParameterGroup' {Text
parameterGroupName :: Text
$sel:parameterGroupName:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Text
parameterGroupName} -> Text
parameterGroupName) (\s :: ResetClusterParameterGroup
s@ResetClusterParameterGroup' {} Text
a -> ResetClusterParameterGroup
s {$sel:parameterGroupName:ResetClusterParameterGroup' :: Text
parameterGroupName = Text
a} :: ResetClusterParameterGroup)
instance Core.AWSRequest ResetClusterParameterGroup where
type
AWSResponse ResetClusterParameterGroup =
ClusterParameterGroupNameMessage
request :: ResetClusterParameterGroup -> Request ResetClusterParameterGroup
request = Service
-> ResetClusterParameterGroup -> Request ResetClusterParameterGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ResetClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetClusterParameterGroup)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ResetClusterParameterGroup))
-> Logger
-> Service
-> Proxy ResetClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetClusterParameterGroup)))
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
"ResetClusterParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String ClusterParameterGroupNameMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable ResetClusterParameterGroup
instance Prelude.NFData ResetClusterParameterGroup
instance Core.ToHeaders ResetClusterParameterGroup where
toHeaders :: ResetClusterParameterGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> ResetClusterParameterGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ResetClusterParameterGroup where
toPath :: ResetClusterParameterGroup -> ByteString
toPath = ByteString -> ResetClusterParameterGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ResetClusterParameterGroup where
toQuery :: ResetClusterParameterGroup -> QueryString
toQuery ResetClusterParameterGroup' {Maybe Bool
Maybe [Parameter]
Text
parameterGroupName :: Text
parameters :: Maybe [Parameter]
resetAllParameters :: Maybe Bool
$sel:parameterGroupName:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Text
$sel:parameters:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Maybe [Parameter]
$sel:resetAllParameters:ResetClusterParameterGroup' :: ResetClusterParameterGroup -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ResetClusterParameterGroup" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"ResetAllParameters" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
resetAllParameters,
ByteString
"Parameters"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Parameter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Parameter"
([Parameter] -> QueryString)
-> Maybe [Parameter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters
),
ByteString
"ParameterGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
parameterGroupName
]