{-# 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.DocumentDB.ResetDBClusterParameterGroup
(
ResetDBClusterParameterGroup (..),
newResetDBClusterParameterGroup,
resetDBClusterParameterGroup_resetAllParameters,
resetDBClusterParameterGroup_parameters,
resetDBClusterParameterGroup_dbClusterParameterGroupName,
DBClusterParameterGroupNameMessage (..),
newDBClusterParameterGroupNameMessage,
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ResetDBClusterParameterGroup = ResetDBClusterParameterGroup'
{
ResetDBClusterParameterGroup -> Maybe Bool
resetAllParameters :: Prelude.Maybe Prelude.Bool,
ResetDBClusterParameterGroup -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
ResetDBClusterParameterGroup -> Text
dbClusterParameterGroupName :: Prelude.Text
}
deriving (ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool
(ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool)
-> (ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool)
-> Eq ResetDBClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool
$c/= :: ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool
== :: ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool
$c== :: ResetDBClusterParameterGroup
-> ResetDBClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [ResetDBClusterParameterGroup]
ReadPrec ResetDBClusterParameterGroup
Int -> ReadS ResetDBClusterParameterGroup
ReadS [ResetDBClusterParameterGroup]
(Int -> ReadS ResetDBClusterParameterGroup)
-> ReadS [ResetDBClusterParameterGroup]
-> ReadPrec ResetDBClusterParameterGroup
-> ReadPrec [ResetDBClusterParameterGroup]
-> Read ResetDBClusterParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetDBClusterParameterGroup]
$creadListPrec :: ReadPrec [ResetDBClusterParameterGroup]
readPrec :: ReadPrec ResetDBClusterParameterGroup
$creadPrec :: ReadPrec ResetDBClusterParameterGroup
readList :: ReadS [ResetDBClusterParameterGroup]
$creadList :: ReadS [ResetDBClusterParameterGroup]
readsPrec :: Int -> ReadS ResetDBClusterParameterGroup
$creadsPrec :: Int -> ReadS ResetDBClusterParameterGroup
Prelude.Read, Int -> ResetDBClusterParameterGroup -> ShowS
[ResetDBClusterParameterGroup] -> ShowS
ResetDBClusterParameterGroup -> String
(Int -> ResetDBClusterParameterGroup -> ShowS)
-> (ResetDBClusterParameterGroup -> String)
-> ([ResetDBClusterParameterGroup] -> ShowS)
-> Show ResetDBClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetDBClusterParameterGroup] -> ShowS
$cshowList :: [ResetDBClusterParameterGroup] -> ShowS
show :: ResetDBClusterParameterGroup -> String
$cshow :: ResetDBClusterParameterGroup -> String
showsPrec :: Int -> ResetDBClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> ResetDBClusterParameterGroup -> ShowS
Prelude.Show, (forall x.
ResetDBClusterParameterGroup -> Rep ResetDBClusterParameterGroup x)
-> (forall x.
Rep ResetDBClusterParameterGroup x -> ResetDBClusterParameterGroup)
-> Generic ResetDBClusterParameterGroup
forall x.
Rep ResetDBClusterParameterGroup x -> ResetDBClusterParameterGroup
forall x.
ResetDBClusterParameterGroup -> Rep ResetDBClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResetDBClusterParameterGroup x -> ResetDBClusterParameterGroup
$cfrom :: forall x.
ResetDBClusterParameterGroup -> Rep ResetDBClusterParameterGroup x
Prelude.Generic)
newResetDBClusterParameterGroup ::
Prelude.Text ->
ResetDBClusterParameterGroup
newResetDBClusterParameterGroup :: Text -> ResetDBClusterParameterGroup
newResetDBClusterParameterGroup
Text
pDBClusterParameterGroupName_ =
ResetDBClusterParameterGroup' :: Maybe Bool
-> Maybe [Parameter] -> Text -> ResetDBClusterParameterGroup
ResetDBClusterParameterGroup'
{ $sel:resetAllParameters:ResetDBClusterParameterGroup' :: Maybe Bool
resetAllParameters =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:ResetDBClusterParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterParameterGroupName:ResetDBClusterParameterGroup' :: Text
dbClusterParameterGroupName =
Text
pDBClusterParameterGroupName_
}
resetDBClusterParameterGroup_resetAllParameters :: Lens.Lens' ResetDBClusterParameterGroup (Prelude.Maybe Prelude.Bool)
resetDBClusterParameterGroup_resetAllParameters :: (Maybe Bool -> f (Maybe Bool))
-> ResetDBClusterParameterGroup -> f ResetDBClusterParameterGroup
resetDBClusterParameterGroup_resetAllParameters = (ResetDBClusterParameterGroup -> Maybe Bool)
-> (ResetDBClusterParameterGroup
-> Maybe Bool -> ResetDBClusterParameterGroup)
-> Lens
ResetDBClusterParameterGroup
ResetDBClusterParameterGroup
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBClusterParameterGroup' {Maybe Bool
resetAllParameters :: Maybe Bool
$sel:resetAllParameters:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> Maybe Bool
resetAllParameters} -> Maybe Bool
resetAllParameters) (\s :: ResetDBClusterParameterGroup
s@ResetDBClusterParameterGroup' {} Maybe Bool
a -> ResetDBClusterParameterGroup
s {$sel:resetAllParameters:ResetDBClusterParameterGroup' :: Maybe Bool
resetAllParameters = Maybe Bool
a} :: ResetDBClusterParameterGroup)
resetDBClusterParameterGroup_parameters :: Lens.Lens' ResetDBClusterParameterGroup (Prelude.Maybe [Parameter])
resetDBClusterParameterGroup_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBClusterParameterGroup -> f ResetDBClusterParameterGroup
resetDBClusterParameterGroup_parameters = (ResetDBClusterParameterGroup -> Maybe [Parameter])
-> (ResetDBClusterParameterGroup
-> Maybe [Parameter] -> ResetDBClusterParameterGroup)
-> Lens
ResetDBClusterParameterGroup
ResetDBClusterParameterGroup
(Maybe [Parameter])
(Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBClusterParameterGroup' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: ResetDBClusterParameterGroup
s@ResetDBClusterParameterGroup' {} Maybe [Parameter]
a -> ResetDBClusterParameterGroup
s {$sel:parameters:ResetDBClusterParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: ResetDBClusterParameterGroup) ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBClusterParameterGroup -> f ResetDBClusterParameterGroup)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBClusterParameterGroup
-> f ResetDBClusterParameterGroup
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
resetDBClusterParameterGroup_dbClusterParameterGroupName :: Lens.Lens' ResetDBClusterParameterGroup Prelude.Text
resetDBClusterParameterGroup_dbClusterParameterGroupName :: (Text -> f Text)
-> ResetDBClusterParameterGroup -> f ResetDBClusterParameterGroup
resetDBClusterParameterGroup_dbClusterParameterGroupName = (ResetDBClusterParameterGroup -> Text)
-> (ResetDBClusterParameterGroup
-> Text -> ResetDBClusterParameterGroup)
-> Lens
ResetDBClusterParameterGroup ResetDBClusterParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBClusterParameterGroup' {Text
dbClusterParameterGroupName :: Text
$sel:dbClusterParameterGroupName:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> Text
dbClusterParameterGroupName} -> Text
dbClusterParameterGroupName) (\s :: ResetDBClusterParameterGroup
s@ResetDBClusterParameterGroup' {} Text
a -> ResetDBClusterParameterGroup
s {$sel:dbClusterParameterGroupName:ResetDBClusterParameterGroup' :: Text
dbClusterParameterGroupName = Text
a} :: ResetDBClusterParameterGroup)
instance Core.AWSRequest ResetDBClusterParameterGroup where
type
AWSResponse ResetDBClusterParameterGroup =
DBClusterParameterGroupNameMessage
request :: ResetDBClusterParameterGroup
-> Request ResetDBClusterParameterGroup
request = Service
-> ResetDBClusterParameterGroup
-> Request ResetDBClusterParameterGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ResetDBClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetDBClusterParameterGroup)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ResetDBClusterParameterGroup))
-> Logger
-> Service
-> Proxy ResetDBClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetDBClusterParameterGroup)))
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
"ResetDBClusterParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String DBClusterParameterGroupNameMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance
Prelude.Hashable
ResetDBClusterParameterGroup
instance Prelude.NFData ResetDBClusterParameterGroup
instance Core.ToHeaders ResetDBClusterParameterGroup where
toHeaders :: ResetDBClusterParameterGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> ResetDBClusterParameterGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ResetDBClusterParameterGroup where
toPath :: ResetDBClusterParameterGroup -> ByteString
toPath = ByteString -> ResetDBClusterParameterGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ResetDBClusterParameterGroup where
toQuery :: ResetDBClusterParameterGroup -> QueryString
toQuery ResetDBClusterParameterGroup' {Maybe Bool
Maybe [Parameter]
Text
dbClusterParameterGroupName :: Text
parameters :: Maybe [Parameter]
resetAllParameters :: Maybe Bool
$sel:dbClusterParameterGroupName:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> Text
$sel:parameters:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> Maybe [Parameter]
$sel:resetAllParameters:ResetDBClusterParameterGroup' :: ResetDBClusterParameterGroup -> 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
"ResetDBClusterParameterGroup" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: 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
"DBClusterParameterGroupName"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterParameterGroupName
]