{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.CreateDBSecurityGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new DB security group. DB security groups control access to a
-- DB instance.
--
-- A DB security group controls access to EC2-Classic DB instances that are
-- not in a VPC.
module Amazonka.RDS.CreateDBSecurityGroup
  ( -- * Creating a Request
    CreateDBSecurityGroup (..),
    newCreateDBSecurityGroup,

    -- * Request Lenses
    createDBSecurityGroup_tags,
    createDBSecurityGroup_dbSecurityGroupName,
    createDBSecurityGroup_dbSecurityGroupDescription,

    -- * Destructuring the Response
    CreateDBSecurityGroupResponse (..),
    newCreateDBSecurityGroupResponse,

    -- * Response Lenses
    createDBSecurityGroupResponse_dbSecurityGroup,
    createDBSecurityGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newCreateDBSecurityGroup' smart constructor.
data CreateDBSecurityGroup = CreateDBSecurityGroup'
  { -- | Tags to assign to the DB security group.
    CreateDBSecurityGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the DB security group. This value is stored as a lowercase
    -- string.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens
    --
    -- -   Must not be \"Default\"
    --
    -- Example: @mysecuritygroup@
    CreateDBSecurityGroup -> Text
dbSecurityGroupName :: Prelude.Text,
    -- | The description for the DB security group.
    CreateDBSecurityGroup -> Text
dbSecurityGroupDescription :: Prelude.Text
  }
  deriving (CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool
(CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool)
-> (CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool)
-> Eq CreateDBSecurityGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool
$c/= :: CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool
== :: CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool
$c== :: CreateDBSecurityGroup -> CreateDBSecurityGroup -> Bool
Prelude.Eq, ReadPrec [CreateDBSecurityGroup]
ReadPrec CreateDBSecurityGroup
Int -> ReadS CreateDBSecurityGroup
ReadS [CreateDBSecurityGroup]
(Int -> ReadS CreateDBSecurityGroup)
-> ReadS [CreateDBSecurityGroup]
-> ReadPrec CreateDBSecurityGroup
-> ReadPrec [CreateDBSecurityGroup]
-> Read CreateDBSecurityGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBSecurityGroup]
$creadListPrec :: ReadPrec [CreateDBSecurityGroup]
readPrec :: ReadPrec CreateDBSecurityGroup
$creadPrec :: ReadPrec CreateDBSecurityGroup
readList :: ReadS [CreateDBSecurityGroup]
$creadList :: ReadS [CreateDBSecurityGroup]
readsPrec :: Int -> ReadS CreateDBSecurityGroup
$creadsPrec :: Int -> ReadS CreateDBSecurityGroup
Prelude.Read, Int -> CreateDBSecurityGroup -> ShowS
[CreateDBSecurityGroup] -> ShowS
CreateDBSecurityGroup -> String
(Int -> CreateDBSecurityGroup -> ShowS)
-> (CreateDBSecurityGroup -> String)
-> ([CreateDBSecurityGroup] -> ShowS)
-> Show CreateDBSecurityGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBSecurityGroup] -> ShowS
$cshowList :: [CreateDBSecurityGroup] -> ShowS
show :: CreateDBSecurityGroup -> String
$cshow :: CreateDBSecurityGroup -> String
showsPrec :: Int -> CreateDBSecurityGroup -> ShowS
$cshowsPrec :: Int -> CreateDBSecurityGroup -> ShowS
Prelude.Show, (forall x. CreateDBSecurityGroup -> Rep CreateDBSecurityGroup x)
-> (forall x. Rep CreateDBSecurityGroup x -> CreateDBSecurityGroup)
-> Generic CreateDBSecurityGroup
forall x. Rep CreateDBSecurityGroup x -> CreateDBSecurityGroup
forall x. CreateDBSecurityGroup -> Rep CreateDBSecurityGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBSecurityGroup x -> CreateDBSecurityGroup
$cfrom :: forall x. CreateDBSecurityGroup -> Rep CreateDBSecurityGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBSecurityGroup' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tags', 'createDBSecurityGroup_tags' - Tags to assign to the DB security group.
--
-- 'dbSecurityGroupName', 'createDBSecurityGroup_dbSecurityGroupName' - The name for the DB security group. This value is stored as a lowercase
-- string.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
--
-- -   Must not be \"Default\"
--
-- Example: @mysecuritygroup@
--
-- 'dbSecurityGroupDescription', 'createDBSecurityGroup_dbSecurityGroupDescription' - The description for the DB security group.
newCreateDBSecurityGroup ::
  -- | 'dbSecurityGroupName'
  Prelude.Text ->
  -- | 'dbSecurityGroupDescription'
  Prelude.Text ->
  CreateDBSecurityGroup
newCreateDBSecurityGroup :: Text -> Text -> CreateDBSecurityGroup
newCreateDBSecurityGroup
  Text
pDBSecurityGroupName_
  Text
pDBSecurityGroupDescription_ =
    CreateDBSecurityGroup' :: Maybe [Tag] -> Text -> Text -> CreateDBSecurityGroup
CreateDBSecurityGroup'
      { $sel:tags:CreateDBSecurityGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbSecurityGroupName:CreateDBSecurityGroup' :: Text
dbSecurityGroupName = Text
pDBSecurityGroupName_,
        $sel:dbSecurityGroupDescription:CreateDBSecurityGroup' :: Text
dbSecurityGroupDescription =
          Text
pDBSecurityGroupDescription_
      }

-- | Tags to assign to the DB security group.
createDBSecurityGroup_tags :: Lens.Lens' CreateDBSecurityGroup (Prelude.Maybe [Tag])
createDBSecurityGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBSecurityGroup -> f CreateDBSecurityGroup
createDBSecurityGroup_tags = (CreateDBSecurityGroup -> Maybe [Tag])
-> (CreateDBSecurityGroup -> Maybe [Tag] -> CreateDBSecurityGroup)
-> Lens
     CreateDBSecurityGroup
     CreateDBSecurityGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSecurityGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBSecurityGroup
s@CreateDBSecurityGroup' {} Maybe [Tag]
a -> CreateDBSecurityGroup
s {$sel:tags:CreateDBSecurityGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBSecurityGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBSecurityGroup -> f CreateDBSecurityGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBSecurityGroup
-> f CreateDBSecurityGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name for the DB security group. This value is stored as a lowercase
-- string.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
--
-- -   Must not be \"Default\"
--
-- Example: @mysecuritygroup@
createDBSecurityGroup_dbSecurityGroupName :: Lens.Lens' CreateDBSecurityGroup Prelude.Text
createDBSecurityGroup_dbSecurityGroupName :: (Text -> f Text)
-> CreateDBSecurityGroup -> f CreateDBSecurityGroup
createDBSecurityGroup_dbSecurityGroupName = (CreateDBSecurityGroup -> Text)
-> (CreateDBSecurityGroup -> Text -> CreateDBSecurityGroup)
-> Lens CreateDBSecurityGroup CreateDBSecurityGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSecurityGroup' {Text
dbSecurityGroupName :: Text
$sel:dbSecurityGroupName:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Text
dbSecurityGroupName} -> Text
dbSecurityGroupName) (\s :: CreateDBSecurityGroup
s@CreateDBSecurityGroup' {} Text
a -> CreateDBSecurityGroup
s {$sel:dbSecurityGroupName:CreateDBSecurityGroup' :: Text
dbSecurityGroupName = Text
a} :: CreateDBSecurityGroup)

-- | The description for the DB security group.
createDBSecurityGroup_dbSecurityGroupDescription :: Lens.Lens' CreateDBSecurityGroup Prelude.Text
createDBSecurityGroup_dbSecurityGroupDescription :: (Text -> f Text)
-> CreateDBSecurityGroup -> f CreateDBSecurityGroup
createDBSecurityGroup_dbSecurityGroupDescription = (CreateDBSecurityGroup -> Text)
-> (CreateDBSecurityGroup -> Text -> CreateDBSecurityGroup)
-> Lens CreateDBSecurityGroup CreateDBSecurityGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSecurityGroup' {Text
dbSecurityGroupDescription :: Text
$sel:dbSecurityGroupDescription:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Text
dbSecurityGroupDescription} -> Text
dbSecurityGroupDescription) (\s :: CreateDBSecurityGroup
s@CreateDBSecurityGroup' {} Text
a -> CreateDBSecurityGroup
s {$sel:dbSecurityGroupDescription:CreateDBSecurityGroup' :: Text
dbSecurityGroupDescription = Text
a} :: CreateDBSecurityGroup)

instance Core.AWSRequest CreateDBSecurityGroup where
  type
    AWSResponse CreateDBSecurityGroup =
      CreateDBSecurityGroupResponse
  request :: CreateDBSecurityGroup -> Request CreateDBSecurityGroup
request = Service -> CreateDBSecurityGroup -> Request CreateDBSecurityGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDBSecurityGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBSecurityGroup)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateDBSecurityGroup))
-> Logger
-> Service
-> Proxy CreateDBSecurityGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBSecurityGroup)))
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
"CreateDBSecurityGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBSecurityGroup -> Int -> CreateDBSecurityGroupResponse
CreateDBSecurityGroupResponse'
            (Maybe DBSecurityGroup -> Int -> CreateDBSecurityGroupResponse)
-> Either String (Maybe DBSecurityGroup)
-> Either String (Int -> CreateDBSecurityGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBSecurityGroup)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBSecurityGroup")
            Either String (Int -> CreateDBSecurityGroupResponse)
-> Either String Int -> Either String CreateDBSecurityGroupResponse
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 CreateDBSecurityGroup

instance Prelude.NFData CreateDBSecurityGroup

instance Core.ToHeaders CreateDBSecurityGroup where
  toHeaders :: CreateDBSecurityGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateDBSecurityGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateDBSecurityGroup where
  toPath :: CreateDBSecurityGroup -> ByteString
toPath = ByteString -> CreateDBSecurityGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateDBSecurityGroup where
  toQuery :: CreateDBSecurityGroup -> QueryString
toQuery CreateDBSecurityGroup' {Maybe [Tag]
Text
dbSecurityGroupDescription :: Text
dbSecurityGroupName :: Text
tags :: Maybe [Tag]
$sel:dbSecurityGroupDescription:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Text
$sel:dbSecurityGroupName:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Text
$sel:tags:CreateDBSecurityGroup' :: CreateDBSecurityGroup -> Maybe [Tag]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateDBSecurityGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"DBSecurityGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSecurityGroupName,
        ByteString
"DBSecurityGroupDescription"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSecurityGroupDescription
      ]

-- | /See:/ 'newCreateDBSecurityGroupResponse' smart constructor.
data CreateDBSecurityGroupResponse = CreateDBSecurityGroupResponse'
  { CreateDBSecurityGroupResponse -> Maybe DBSecurityGroup
dbSecurityGroup :: Prelude.Maybe DBSecurityGroup,
    -- | The response's http status code.
    CreateDBSecurityGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDBSecurityGroupResponse
-> CreateDBSecurityGroupResponse -> Bool
(CreateDBSecurityGroupResponse
 -> CreateDBSecurityGroupResponse -> Bool)
-> (CreateDBSecurityGroupResponse
    -> CreateDBSecurityGroupResponse -> Bool)
-> Eq CreateDBSecurityGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBSecurityGroupResponse
-> CreateDBSecurityGroupResponse -> Bool
$c/= :: CreateDBSecurityGroupResponse
-> CreateDBSecurityGroupResponse -> Bool
== :: CreateDBSecurityGroupResponse
-> CreateDBSecurityGroupResponse -> Bool
$c== :: CreateDBSecurityGroupResponse
-> CreateDBSecurityGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateDBSecurityGroupResponse]
ReadPrec CreateDBSecurityGroupResponse
Int -> ReadS CreateDBSecurityGroupResponse
ReadS [CreateDBSecurityGroupResponse]
(Int -> ReadS CreateDBSecurityGroupResponse)
-> ReadS [CreateDBSecurityGroupResponse]
-> ReadPrec CreateDBSecurityGroupResponse
-> ReadPrec [CreateDBSecurityGroupResponse]
-> Read CreateDBSecurityGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBSecurityGroupResponse]
$creadListPrec :: ReadPrec [CreateDBSecurityGroupResponse]
readPrec :: ReadPrec CreateDBSecurityGroupResponse
$creadPrec :: ReadPrec CreateDBSecurityGroupResponse
readList :: ReadS [CreateDBSecurityGroupResponse]
$creadList :: ReadS [CreateDBSecurityGroupResponse]
readsPrec :: Int -> ReadS CreateDBSecurityGroupResponse
$creadsPrec :: Int -> ReadS CreateDBSecurityGroupResponse
Prelude.Read, Int -> CreateDBSecurityGroupResponse -> ShowS
[CreateDBSecurityGroupResponse] -> ShowS
CreateDBSecurityGroupResponse -> String
(Int -> CreateDBSecurityGroupResponse -> ShowS)
-> (CreateDBSecurityGroupResponse -> String)
-> ([CreateDBSecurityGroupResponse] -> ShowS)
-> Show CreateDBSecurityGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBSecurityGroupResponse] -> ShowS
$cshowList :: [CreateDBSecurityGroupResponse] -> ShowS
show :: CreateDBSecurityGroupResponse -> String
$cshow :: CreateDBSecurityGroupResponse -> String
showsPrec :: Int -> CreateDBSecurityGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateDBSecurityGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateDBSecurityGroupResponse
 -> Rep CreateDBSecurityGroupResponse x)
-> (forall x.
    Rep CreateDBSecurityGroupResponse x
    -> CreateDBSecurityGroupResponse)
-> Generic CreateDBSecurityGroupResponse
forall x.
Rep CreateDBSecurityGroupResponse x
-> CreateDBSecurityGroupResponse
forall x.
CreateDBSecurityGroupResponse
-> Rep CreateDBSecurityGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDBSecurityGroupResponse x
-> CreateDBSecurityGroupResponse
$cfrom :: forall x.
CreateDBSecurityGroupResponse
-> Rep CreateDBSecurityGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBSecurityGroupResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dbSecurityGroup', 'createDBSecurityGroupResponse_dbSecurityGroup' - Undocumented member.
--
-- 'httpStatus', 'createDBSecurityGroupResponse_httpStatus' - The response's http status code.
newCreateDBSecurityGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBSecurityGroupResponse
newCreateDBSecurityGroupResponse :: Int -> CreateDBSecurityGroupResponse
newCreateDBSecurityGroupResponse Int
pHttpStatus_ =
  CreateDBSecurityGroupResponse' :: Maybe DBSecurityGroup -> Int -> CreateDBSecurityGroupResponse
CreateDBSecurityGroupResponse'
    { $sel:dbSecurityGroup:CreateDBSecurityGroupResponse' :: Maybe DBSecurityGroup
dbSecurityGroup =
        Maybe DBSecurityGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBSecurityGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBSecurityGroupResponse_dbSecurityGroup :: Lens.Lens' CreateDBSecurityGroupResponse (Prelude.Maybe DBSecurityGroup)
createDBSecurityGroupResponse_dbSecurityGroup :: (Maybe DBSecurityGroup -> f (Maybe DBSecurityGroup))
-> CreateDBSecurityGroupResponse -> f CreateDBSecurityGroupResponse
createDBSecurityGroupResponse_dbSecurityGroup = (CreateDBSecurityGroupResponse -> Maybe DBSecurityGroup)
-> (CreateDBSecurityGroupResponse
    -> Maybe DBSecurityGroup -> CreateDBSecurityGroupResponse)
-> Lens
     CreateDBSecurityGroupResponse
     CreateDBSecurityGroupResponse
     (Maybe DBSecurityGroup)
     (Maybe DBSecurityGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSecurityGroupResponse' {Maybe DBSecurityGroup
dbSecurityGroup :: Maybe DBSecurityGroup
$sel:dbSecurityGroup:CreateDBSecurityGroupResponse' :: CreateDBSecurityGroupResponse -> Maybe DBSecurityGroup
dbSecurityGroup} -> Maybe DBSecurityGroup
dbSecurityGroup) (\s :: CreateDBSecurityGroupResponse
s@CreateDBSecurityGroupResponse' {} Maybe DBSecurityGroup
a -> CreateDBSecurityGroupResponse
s {$sel:dbSecurityGroup:CreateDBSecurityGroupResponse' :: Maybe DBSecurityGroup
dbSecurityGroup = Maybe DBSecurityGroup
a} :: CreateDBSecurityGroupResponse)

-- | The response's http status code.
createDBSecurityGroupResponse_httpStatus :: Lens.Lens' CreateDBSecurityGroupResponse Prelude.Int
createDBSecurityGroupResponse_httpStatus :: (Int -> f Int)
-> CreateDBSecurityGroupResponse -> f CreateDBSecurityGroupResponse
createDBSecurityGroupResponse_httpStatus = (CreateDBSecurityGroupResponse -> Int)
-> (CreateDBSecurityGroupResponse
    -> Int -> CreateDBSecurityGroupResponse)
-> Lens
     CreateDBSecurityGroupResponse CreateDBSecurityGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSecurityGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDBSecurityGroupResponse' :: CreateDBSecurityGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDBSecurityGroupResponse
s@CreateDBSecurityGroupResponse' {} Int
a -> CreateDBSecurityGroupResponse
s {$sel:httpStatus:CreateDBSecurityGroupResponse' :: Int
httpStatus = Int
a} :: CreateDBSecurityGroupResponse)

instance Prelude.NFData CreateDBSecurityGroupResponse