{-# 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.Neptune.ResetDBParameterGroup
(
ResetDBParameterGroup (..),
newResetDBParameterGroup,
resetDBParameterGroup_resetAllParameters,
resetDBParameterGroup_parameters,
resetDBParameterGroup_dbParameterGroupName,
DBParameterGroupNameMessage (..),
newDBParameterGroupNameMessage,
dbParameterGroupNameMessage_dbParameterGroupName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Neptune.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ResetDBParameterGroup = ResetDBParameterGroup'
{
ResetDBParameterGroup -> Maybe Bool
resetAllParameters :: Prelude.Maybe Prelude.Bool,
ResetDBParameterGroup -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
ResetDBParameterGroup -> Text
dbParameterGroupName :: Prelude.Text
}
deriving (ResetDBParameterGroup -> ResetDBParameterGroup -> Bool
(ResetDBParameterGroup -> ResetDBParameterGroup -> Bool)
-> (ResetDBParameterGroup -> ResetDBParameterGroup -> Bool)
-> Eq ResetDBParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetDBParameterGroup -> ResetDBParameterGroup -> Bool
$c/= :: ResetDBParameterGroup -> ResetDBParameterGroup -> Bool
== :: ResetDBParameterGroup -> ResetDBParameterGroup -> Bool
$c== :: ResetDBParameterGroup -> ResetDBParameterGroup -> Bool
Prelude.Eq, ReadPrec [ResetDBParameterGroup]
ReadPrec ResetDBParameterGroup
Int -> ReadS ResetDBParameterGroup
ReadS [ResetDBParameterGroup]
(Int -> ReadS ResetDBParameterGroup)
-> ReadS [ResetDBParameterGroup]
-> ReadPrec ResetDBParameterGroup
-> ReadPrec [ResetDBParameterGroup]
-> Read ResetDBParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetDBParameterGroup]
$creadListPrec :: ReadPrec [ResetDBParameterGroup]
readPrec :: ReadPrec ResetDBParameterGroup
$creadPrec :: ReadPrec ResetDBParameterGroup
readList :: ReadS [ResetDBParameterGroup]
$creadList :: ReadS [ResetDBParameterGroup]
readsPrec :: Int -> ReadS ResetDBParameterGroup
$creadsPrec :: Int -> ReadS ResetDBParameterGroup
Prelude.Read, Int -> ResetDBParameterGroup -> ShowS
[ResetDBParameterGroup] -> ShowS
ResetDBParameterGroup -> String
(Int -> ResetDBParameterGroup -> ShowS)
-> (ResetDBParameterGroup -> String)
-> ([ResetDBParameterGroup] -> ShowS)
-> Show ResetDBParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetDBParameterGroup] -> ShowS
$cshowList :: [ResetDBParameterGroup] -> ShowS
show :: ResetDBParameterGroup -> String
$cshow :: ResetDBParameterGroup -> String
showsPrec :: Int -> ResetDBParameterGroup -> ShowS
$cshowsPrec :: Int -> ResetDBParameterGroup -> ShowS
Prelude.Show, (forall x. ResetDBParameterGroup -> Rep ResetDBParameterGroup x)
-> (forall x. Rep ResetDBParameterGroup x -> ResetDBParameterGroup)
-> Generic ResetDBParameterGroup
forall x. Rep ResetDBParameterGroup x -> ResetDBParameterGroup
forall x. ResetDBParameterGroup -> Rep ResetDBParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResetDBParameterGroup x -> ResetDBParameterGroup
$cfrom :: forall x. ResetDBParameterGroup -> Rep ResetDBParameterGroup x
Prelude.Generic)
newResetDBParameterGroup ::
Prelude.Text ->
ResetDBParameterGroup
newResetDBParameterGroup :: Text -> ResetDBParameterGroup
newResetDBParameterGroup Text
pDBParameterGroupName_ =
ResetDBParameterGroup' :: Maybe Bool -> Maybe [Parameter] -> Text -> ResetDBParameterGroup
ResetDBParameterGroup'
{ $sel:resetAllParameters:ResetDBParameterGroup' :: Maybe Bool
resetAllParameters =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:ResetDBParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
$sel:dbParameterGroupName:ResetDBParameterGroup' :: Text
dbParameterGroupName = Text
pDBParameterGroupName_
}
resetDBParameterGroup_resetAllParameters :: Lens.Lens' ResetDBParameterGroup (Prelude.Maybe Prelude.Bool)
resetDBParameterGroup_resetAllParameters :: (Maybe Bool -> f (Maybe Bool))
-> ResetDBParameterGroup -> f ResetDBParameterGroup
resetDBParameterGroup_resetAllParameters = (ResetDBParameterGroup -> Maybe Bool)
-> (ResetDBParameterGroup -> Maybe Bool -> ResetDBParameterGroup)
-> Lens
ResetDBParameterGroup
ResetDBParameterGroup
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBParameterGroup' {Maybe Bool
resetAllParameters :: Maybe Bool
$sel:resetAllParameters:ResetDBParameterGroup' :: ResetDBParameterGroup -> Maybe Bool
resetAllParameters} -> Maybe Bool
resetAllParameters) (\s :: ResetDBParameterGroup
s@ResetDBParameterGroup' {} Maybe Bool
a -> ResetDBParameterGroup
s {$sel:resetAllParameters:ResetDBParameterGroup' :: Maybe Bool
resetAllParameters = Maybe Bool
a} :: ResetDBParameterGroup)
resetDBParameterGroup_parameters :: Lens.Lens' ResetDBParameterGroup (Prelude.Maybe [Parameter])
resetDBParameterGroup_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBParameterGroup -> f ResetDBParameterGroup
resetDBParameterGroup_parameters = (ResetDBParameterGroup -> Maybe [Parameter])
-> (ResetDBParameterGroup
-> Maybe [Parameter] -> ResetDBParameterGroup)
-> Lens
ResetDBParameterGroup
ResetDBParameterGroup
(Maybe [Parameter])
(Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBParameterGroup' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:ResetDBParameterGroup' :: ResetDBParameterGroup -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: ResetDBParameterGroup
s@ResetDBParameterGroup' {} Maybe [Parameter]
a -> ResetDBParameterGroup
s {$sel:parameters:ResetDBParameterGroup' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: ResetDBParameterGroup) ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBParameterGroup -> f ResetDBParameterGroup)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ResetDBParameterGroup
-> f ResetDBParameterGroup
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
resetDBParameterGroup_dbParameterGroupName :: Lens.Lens' ResetDBParameterGroup Prelude.Text
resetDBParameterGroup_dbParameterGroupName :: (Text -> f Text)
-> ResetDBParameterGroup -> f ResetDBParameterGroup
resetDBParameterGroup_dbParameterGroupName = (ResetDBParameterGroup -> Text)
-> (ResetDBParameterGroup -> Text -> ResetDBParameterGroup)
-> Lens ResetDBParameterGroup ResetDBParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetDBParameterGroup' {Text
dbParameterGroupName :: Text
$sel:dbParameterGroupName:ResetDBParameterGroup' :: ResetDBParameterGroup -> Text
dbParameterGroupName} -> Text
dbParameterGroupName) (\s :: ResetDBParameterGroup
s@ResetDBParameterGroup' {} Text
a -> ResetDBParameterGroup
s {$sel:dbParameterGroupName:ResetDBParameterGroup' :: Text
dbParameterGroupName = Text
a} :: ResetDBParameterGroup)
instance Core.AWSRequest ResetDBParameterGroup where
type
AWSResponse ResetDBParameterGroup =
DBParameterGroupNameMessage
request :: ResetDBParameterGroup -> Request ResetDBParameterGroup
request = Service -> ResetDBParameterGroup -> Request ResetDBParameterGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ResetDBParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetDBParameterGroup)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ResetDBParameterGroup))
-> Logger
-> Service
-> Proxy ResetDBParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetDBParameterGroup)))
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
"ResetDBParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String DBParameterGroupNameMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable ResetDBParameterGroup
instance Prelude.NFData ResetDBParameterGroup
instance Core.ToHeaders ResetDBParameterGroup where
toHeaders :: ResetDBParameterGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> ResetDBParameterGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ResetDBParameterGroup where
toPath :: ResetDBParameterGroup -> ByteString
toPath = ByteString -> ResetDBParameterGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ResetDBParameterGroup where
toQuery :: ResetDBParameterGroup -> QueryString
toQuery ResetDBParameterGroup' {Maybe Bool
Maybe [Parameter]
Text
dbParameterGroupName :: Text
parameters :: Maybe [Parameter]
resetAllParameters :: Maybe Bool
$sel:dbParameterGroupName:ResetDBParameterGroup' :: ResetDBParameterGroup -> Text
$sel:parameters:ResetDBParameterGroup' :: ResetDBParameterGroup -> Maybe [Parameter]
$sel:resetAllParameters:ResetDBParameterGroup' :: ResetDBParameterGroup -> 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
"ResetDBParameterGroup" :: 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
"DBParameterGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbParameterGroupName
]