{-# 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.CreateDBParameterGroup
(
CreateDBParameterGroup (..),
newCreateDBParameterGroup,
createDBParameterGroup_tags,
createDBParameterGroup_dbParameterGroupName,
createDBParameterGroup_dbParameterGroupFamily,
createDBParameterGroup_description,
CreateDBParameterGroupResponse (..),
newCreateDBParameterGroupResponse,
createDBParameterGroupResponse_dbParameterGroup,
createDBParameterGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Neptune.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateDBParameterGroup = CreateDBParameterGroup'
{
CreateDBParameterGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDBParameterGroup -> Text
dbParameterGroupName :: Prelude.Text,
CreateDBParameterGroup -> Text
dbParameterGroupFamily :: Prelude.Text,
CreateDBParameterGroup -> Text
description :: Prelude.Text
}
deriving (CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
$c/= :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
== :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
$c== :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
Prelude.Eq, ReadPrec [CreateDBParameterGroup]
ReadPrec CreateDBParameterGroup
Int -> ReadS CreateDBParameterGroup
ReadS [CreateDBParameterGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBParameterGroup]
$creadListPrec :: ReadPrec [CreateDBParameterGroup]
readPrec :: ReadPrec CreateDBParameterGroup
$creadPrec :: ReadPrec CreateDBParameterGroup
readList :: ReadS [CreateDBParameterGroup]
$creadList :: ReadS [CreateDBParameterGroup]
readsPrec :: Int -> ReadS CreateDBParameterGroup
$creadsPrec :: Int -> ReadS CreateDBParameterGroup
Prelude.Read, Int -> CreateDBParameterGroup -> ShowS
[CreateDBParameterGroup] -> ShowS
CreateDBParameterGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBParameterGroup] -> ShowS
$cshowList :: [CreateDBParameterGroup] -> ShowS
show :: CreateDBParameterGroup -> String
$cshow :: CreateDBParameterGroup -> String
showsPrec :: Int -> CreateDBParameterGroup -> ShowS
$cshowsPrec :: Int -> CreateDBParameterGroup -> ShowS
Prelude.Show, forall x. Rep CreateDBParameterGroup x -> CreateDBParameterGroup
forall x. CreateDBParameterGroup -> Rep CreateDBParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBParameterGroup x -> CreateDBParameterGroup
$cfrom :: forall x. CreateDBParameterGroup -> Rep CreateDBParameterGroup x
Prelude.Generic)
newCreateDBParameterGroup ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateDBParameterGroup
newCreateDBParameterGroup :: Text -> Text -> Text -> CreateDBParameterGroup
newCreateDBParameterGroup
Text
pDBParameterGroupName_
Text
pDBParameterGroupFamily_
Text
pDescription_ =
CreateDBParameterGroup'
{ $sel:tags:CreateDBParameterGroup' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:dbParameterGroupName:CreateDBParameterGroup' :: Text
dbParameterGroupName = Text
pDBParameterGroupName_,
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: Text
dbParameterGroupFamily = Text
pDBParameterGroupFamily_,
$sel:description:CreateDBParameterGroup' :: Text
description = Text
pDescription_
}
createDBParameterGroup_tags :: Lens.Lens' CreateDBParameterGroup (Prelude.Maybe [Tag])
createDBParameterGroup_tags :: Lens' CreateDBParameterGroup (Maybe [Tag])
createDBParameterGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Maybe [Tag]
a -> CreateDBParameterGroup
s {$sel:tags:CreateDBParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBParameterGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDBParameterGroup_dbParameterGroupName :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_dbParameterGroupName :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_dbParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
dbParameterGroupName :: Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
dbParameterGroupName} -> Text
dbParameterGroupName) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:dbParameterGroupName:CreateDBParameterGroup' :: Text
dbParameterGroupName = Text
a} :: CreateDBParameterGroup)
createDBParameterGroup_dbParameterGroupFamily :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_dbParameterGroupFamily :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_dbParameterGroupFamily = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
dbParameterGroupFamily :: Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
dbParameterGroupFamily} -> Text
dbParameterGroupFamily) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: Text
dbParameterGroupFamily = Text
a} :: CreateDBParameterGroup)
createDBParameterGroup_description :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_description :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
description :: Text
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
description} -> Text
description) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:description:CreateDBParameterGroup' :: Text
description = Text
a} :: CreateDBParameterGroup)
instance Core.AWSRequest CreateDBParameterGroup where
type
AWSResponse CreateDBParameterGroup =
CreateDBParameterGroupResponse
request :: (Service -> Service)
-> CreateDBParameterGroup -> Request CreateDBParameterGroup
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateDBParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDBParameterGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"CreateDBParameterGroupResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBParameterGroup -> Int -> CreateDBParameterGroupResponse
CreateDBParameterGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBParameterGroup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateDBParameterGroup where
hashWithSalt :: Int -> CreateDBParameterGroup -> Int
hashWithSalt Int
_salt CreateDBParameterGroup' {Maybe [Tag]
Text
description :: Text
dbParameterGroupFamily :: Text
dbParameterGroupName :: Text
tags :: Maybe [Tag]
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbParameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbParameterGroupFamily
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description
instance Prelude.NFData CreateDBParameterGroup where
rnf :: CreateDBParameterGroup -> ()
rnf CreateDBParameterGroup' {Maybe [Tag]
Text
description :: Text
dbParameterGroupFamily :: Text
dbParameterGroupName :: Text
tags :: Maybe [Tag]
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbParameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbParameterGroupFamily
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description
instance Data.ToHeaders CreateDBParameterGroup where
toHeaders :: CreateDBParameterGroup -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateDBParameterGroup where
toPath :: CreateDBParameterGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateDBParameterGroup where
toQuery :: CreateDBParameterGroup -> QueryString
toQuery CreateDBParameterGroup' {Maybe [Tag]
Text
description :: Text
dbParameterGroupFamily :: Text
dbParameterGroupName :: Text
tags :: Maybe [Tag]
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateDBParameterGroup" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"Tags"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
(forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
ByteString
"DBParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbParameterGroupName,
ByteString
"DBParameterGroupFamily"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbParameterGroupFamily,
ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
description
]
data CreateDBParameterGroupResponse = CreateDBParameterGroupResponse'
{ CreateDBParameterGroupResponse -> Maybe DBParameterGroup
dbParameterGroup :: Prelude.Maybe DBParameterGroup,
CreateDBParameterGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDBParameterGroupResponse
-> CreateDBParameterGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBParameterGroupResponse
-> CreateDBParameterGroupResponse -> Bool
$c/= :: CreateDBParameterGroupResponse
-> CreateDBParameterGroupResponse -> Bool
== :: CreateDBParameterGroupResponse
-> CreateDBParameterGroupResponse -> Bool
$c== :: CreateDBParameterGroupResponse
-> CreateDBParameterGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateDBParameterGroupResponse]
ReadPrec CreateDBParameterGroupResponse
Int -> ReadS CreateDBParameterGroupResponse
ReadS [CreateDBParameterGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBParameterGroupResponse]
$creadListPrec :: ReadPrec [CreateDBParameterGroupResponse]
readPrec :: ReadPrec CreateDBParameterGroupResponse
$creadPrec :: ReadPrec CreateDBParameterGroupResponse
readList :: ReadS [CreateDBParameterGroupResponse]
$creadList :: ReadS [CreateDBParameterGroupResponse]
readsPrec :: Int -> ReadS CreateDBParameterGroupResponse
$creadsPrec :: Int -> ReadS CreateDBParameterGroupResponse
Prelude.Read, Int -> CreateDBParameterGroupResponse -> ShowS
[CreateDBParameterGroupResponse] -> ShowS
CreateDBParameterGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBParameterGroupResponse] -> ShowS
$cshowList :: [CreateDBParameterGroupResponse] -> ShowS
show :: CreateDBParameterGroupResponse -> String
$cshow :: CreateDBParameterGroupResponse -> String
showsPrec :: Int -> CreateDBParameterGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateDBParameterGroupResponse -> ShowS
Prelude.Show, forall x.
Rep CreateDBParameterGroupResponse x
-> CreateDBParameterGroupResponse
forall x.
CreateDBParameterGroupResponse
-> Rep CreateDBParameterGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDBParameterGroupResponse x
-> CreateDBParameterGroupResponse
$cfrom :: forall x.
CreateDBParameterGroupResponse
-> Rep CreateDBParameterGroupResponse x
Prelude.Generic)
newCreateDBParameterGroupResponse ::
Prelude.Int ->
CreateDBParameterGroupResponse
newCreateDBParameterGroupResponse :: Int -> CreateDBParameterGroupResponse
newCreateDBParameterGroupResponse Int
pHttpStatus_ =
CreateDBParameterGroupResponse'
{ $sel:dbParameterGroup:CreateDBParameterGroupResponse' :: Maybe DBParameterGroup
dbParameterGroup =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDBParameterGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDBParameterGroupResponse_dbParameterGroup :: Lens.Lens' CreateDBParameterGroupResponse (Prelude.Maybe DBParameterGroup)
createDBParameterGroupResponse_dbParameterGroup :: Lens' CreateDBParameterGroupResponse (Maybe DBParameterGroup)
createDBParameterGroupResponse_dbParameterGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroupResponse' {Maybe DBParameterGroup
dbParameterGroup :: Maybe DBParameterGroup
$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Maybe DBParameterGroup
dbParameterGroup} -> Maybe DBParameterGroup
dbParameterGroup) (\s :: CreateDBParameterGroupResponse
s@CreateDBParameterGroupResponse' {} Maybe DBParameterGroup
a -> CreateDBParameterGroupResponse
s {$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: Maybe DBParameterGroup
dbParameterGroup = Maybe DBParameterGroup
a} :: CreateDBParameterGroupResponse)
createDBParameterGroupResponse_httpStatus :: Lens.Lens' CreateDBParameterGroupResponse Prelude.Int
createDBParameterGroupResponse_httpStatus :: Lens' CreateDBParameterGroupResponse Int
createDBParameterGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDBParameterGroupResponse
s@CreateDBParameterGroupResponse' {} Int
a -> CreateDBParameterGroupResponse
s {$sel:httpStatus:CreateDBParameterGroupResponse' :: Int
httpStatus = Int
a} :: CreateDBParameterGroupResponse)
instance
Prelude.NFData
CreateDBParameterGroupResponse
where
rnf :: CreateDBParameterGroupResponse -> ()
rnf CreateDBParameterGroupResponse' {Int
Maybe DBParameterGroup
httpStatus :: Int
dbParameterGroup :: Maybe DBParameterGroup
$sel:httpStatus:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Int
$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Maybe DBParameterGroup
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DBParameterGroup
dbParameterGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus