{-# 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.DocumentDB.CreateDBSubnetGroup
-- 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 subnet group. subnet groups must contain at least one
-- subnet in at least two Availability Zones in the Region.
module Amazonka.DocumentDB.CreateDBSubnetGroup
  ( -- * Creating a Request
    CreateDBSubnetGroup (..),
    newCreateDBSubnetGroup,

    -- * Request Lenses
    createDBSubnetGroup_tags,
    createDBSubnetGroup_dbSubnetGroupName,
    createDBSubnetGroup_dbSubnetGroupDescription,
    createDBSubnetGroup_subnetIds,

    -- * Destructuring the Response
    CreateDBSubnetGroupResponse (..),
    newCreateDBSubnetGroupResponse,

    -- * Response Lenses
    createDBSubnetGroupResponse_dbSubnetGroup,
    createDBSubnetGroupResponse_httpStatus,
  )
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

-- | Represents the input to CreateDBSubnetGroup.
--
-- /See:/ 'newCreateDBSubnetGroup' smart constructor.
data CreateDBSubnetGroup = CreateDBSubnetGroup'
  { -- | The tags to be assigned to the subnet group.
    CreateDBSubnetGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the subnet group. This value is stored as a lowercase
    -- string.
    --
    -- Constraints: Must contain no more than 255 letters, numbers, periods,
    -- underscores, spaces, or hyphens. Must not be default.
    --
    -- Example: @mySubnetgroup@
    CreateDBSubnetGroup -> Text
dbSubnetGroupName :: Prelude.Text,
    -- | The description for the subnet group.
    CreateDBSubnetGroup -> Text
dbSubnetGroupDescription :: Prelude.Text,
    -- | The Amazon EC2 subnet IDs for the subnet group.
    CreateDBSubnetGroup -> [Text]
subnetIds :: [Prelude.Text]
  }
  deriving (CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool
(CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool)
-> (CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool)
-> Eq CreateDBSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool
$c/= :: CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool
== :: CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool
$c== :: CreateDBSubnetGroup -> CreateDBSubnetGroup -> Bool
Prelude.Eq, ReadPrec [CreateDBSubnetGroup]
ReadPrec CreateDBSubnetGroup
Int -> ReadS CreateDBSubnetGroup
ReadS [CreateDBSubnetGroup]
(Int -> ReadS CreateDBSubnetGroup)
-> ReadS [CreateDBSubnetGroup]
-> ReadPrec CreateDBSubnetGroup
-> ReadPrec [CreateDBSubnetGroup]
-> Read CreateDBSubnetGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBSubnetGroup]
$creadListPrec :: ReadPrec [CreateDBSubnetGroup]
readPrec :: ReadPrec CreateDBSubnetGroup
$creadPrec :: ReadPrec CreateDBSubnetGroup
readList :: ReadS [CreateDBSubnetGroup]
$creadList :: ReadS [CreateDBSubnetGroup]
readsPrec :: Int -> ReadS CreateDBSubnetGroup
$creadsPrec :: Int -> ReadS CreateDBSubnetGroup
Prelude.Read, Int -> CreateDBSubnetGroup -> ShowS
[CreateDBSubnetGroup] -> ShowS
CreateDBSubnetGroup -> String
(Int -> CreateDBSubnetGroup -> ShowS)
-> (CreateDBSubnetGroup -> String)
-> ([CreateDBSubnetGroup] -> ShowS)
-> Show CreateDBSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBSubnetGroup] -> ShowS
$cshowList :: [CreateDBSubnetGroup] -> ShowS
show :: CreateDBSubnetGroup -> String
$cshow :: CreateDBSubnetGroup -> String
showsPrec :: Int -> CreateDBSubnetGroup -> ShowS
$cshowsPrec :: Int -> CreateDBSubnetGroup -> ShowS
Prelude.Show, (forall x. CreateDBSubnetGroup -> Rep CreateDBSubnetGroup x)
-> (forall x. Rep CreateDBSubnetGroup x -> CreateDBSubnetGroup)
-> Generic CreateDBSubnetGroup
forall x. Rep CreateDBSubnetGroup x -> CreateDBSubnetGroup
forall x. CreateDBSubnetGroup -> Rep CreateDBSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBSubnetGroup x -> CreateDBSubnetGroup
$cfrom :: forall x. CreateDBSubnetGroup -> Rep CreateDBSubnetGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBSubnetGroup' 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', 'createDBSubnetGroup_tags' - The tags to be assigned to the subnet group.
--
-- 'dbSubnetGroupName', 'createDBSubnetGroup_dbSubnetGroupName' - The name for the subnet group. This value is stored as a lowercase
-- string.
--
-- Constraints: Must contain no more than 255 letters, numbers, periods,
-- underscores, spaces, or hyphens. Must not be default.
--
-- Example: @mySubnetgroup@
--
-- 'dbSubnetGroupDescription', 'createDBSubnetGroup_dbSubnetGroupDescription' - The description for the subnet group.
--
-- 'subnetIds', 'createDBSubnetGroup_subnetIds' - The Amazon EC2 subnet IDs for the subnet group.
newCreateDBSubnetGroup ::
  -- | 'dbSubnetGroupName'
  Prelude.Text ->
  -- | 'dbSubnetGroupDescription'
  Prelude.Text ->
  CreateDBSubnetGroup
newCreateDBSubnetGroup :: Text -> Text -> CreateDBSubnetGroup
newCreateDBSubnetGroup
  Text
pDBSubnetGroupName_
  Text
pDBSubnetGroupDescription_ =
    CreateDBSubnetGroup' :: Maybe [Tag] -> Text -> Text -> [Text] -> CreateDBSubnetGroup
CreateDBSubnetGroup'
      { $sel:tags:CreateDBSubnetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbSubnetGroupName:CreateDBSubnetGroup' :: Text
dbSubnetGroupName = Text
pDBSubnetGroupName_,
        $sel:dbSubnetGroupDescription:CreateDBSubnetGroup' :: Text
dbSubnetGroupDescription =
          Text
pDBSubnetGroupDescription_,
        $sel:subnetIds:CreateDBSubnetGroup' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The tags to be assigned to the subnet group.
createDBSubnetGroup_tags :: Lens.Lens' CreateDBSubnetGroup (Prelude.Maybe [Tag])
createDBSubnetGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBSubnetGroup -> f CreateDBSubnetGroup
createDBSubnetGroup_tags = (CreateDBSubnetGroup -> Maybe [Tag])
-> (CreateDBSubnetGroup -> Maybe [Tag] -> CreateDBSubnetGroup)
-> Lens
     CreateDBSubnetGroup CreateDBSubnetGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSubnetGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBSubnetGroup
s@CreateDBSubnetGroup' {} Maybe [Tag]
a -> CreateDBSubnetGroup
s {$sel:tags:CreateDBSubnetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBSubnetGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBSubnetGroup -> f CreateDBSubnetGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBSubnetGroup
-> f CreateDBSubnetGroup
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 subnet group. This value is stored as a lowercase
-- string.
--
-- Constraints: Must contain no more than 255 letters, numbers, periods,
-- underscores, spaces, or hyphens. Must not be default.
--
-- Example: @mySubnetgroup@
createDBSubnetGroup_dbSubnetGroupName :: Lens.Lens' CreateDBSubnetGroup Prelude.Text
createDBSubnetGroup_dbSubnetGroupName :: (Text -> f Text) -> CreateDBSubnetGroup -> f CreateDBSubnetGroup
createDBSubnetGroup_dbSubnetGroupName = (CreateDBSubnetGroup -> Text)
-> (CreateDBSubnetGroup -> Text -> CreateDBSubnetGroup)
-> Lens CreateDBSubnetGroup CreateDBSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSubnetGroup' {Text
dbSubnetGroupName :: Text
$sel:dbSubnetGroupName:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> Text
dbSubnetGroupName} -> Text
dbSubnetGroupName) (\s :: CreateDBSubnetGroup
s@CreateDBSubnetGroup' {} Text
a -> CreateDBSubnetGroup
s {$sel:dbSubnetGroupName:CreateDBSubnetGroup' :: Text
dbSubnetGroupName = Text
a} :: CreateDBSubnetGroup)

-- | The description for the subnet group.
createDBSubnetGroup_dbSubnetGroupDescription :: Lens.Lens' CreateDBSubnetGroup Prelude.Text
createDBSubnetGroup_dbSubnetGroupDescription :: (Text -> f Text) -> CreateDBSubnetGroup -> f CreateDBSubnetGroup
createDBSubnetGroup_dbSubnetGroupDescription = (CreateDBSubnetGroup -> Text)
-> (CreateDBSubnetGroup -> Text -> CreateDBSubnetGroup)
-> Lens CreateDBSubnetGroup CreateDBSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSubnetGroup' {Text
dbSubnetGroupDescription :: Text
$sel:dbSubnetGroupDescription:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> Text
dbSubnetGroupDescription} -> Text
dbSubnetGroupDescription) (\s :: CreateDBSubnetGroup
s@CreateDBSubnetGroup' {} Text
a -> CreateDBSubnetGroup
s {$sel:dbSubnetGroupDescription:CreateDBSubnetGroup' :: Text
dbSubnetGroupDescription = Text
a} :: CreateDBSubnetGroup)

-- | The Amazon EC2 subnet IDs for the subnet group.
createDBSubnetGroup_subnetIds :: Lens.Lens' CreateDBSubnetGroup [Prelude.Text]
createDBSubnetGroup_subnetIds :: ([Text] -> f [Text])
-> CreateDBSubnetGroup -> f CreateDBSubnetGroup
createDBSubnetGroup_subnetIds = (CreateDBSubnetGroup -> [Text])
-> (CreateDBSubnetGroup -> [Text] -> CreateDBSubnetGroup)
-> Lens CreateDBSubnetGroup CreateDBSubnetGroup [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSubnetGroup' {[Text]
subnetIds :: [Text]
$sel:subnetIds:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: CreateDBSubnetGroup
s@CreateDBSubnetGroup' {} [Text]
a -> CreateDBSubnetGroup
s {$sel:subnetIds:CreateDBSubnetGroup' :: [Text]
subnetIds = [Text]
a} :: CreateDBSubnetGroup) (([Text] -> f [Text])
 -> CreateDBSubnetGroup -> f CreateDBSubnetGroup)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateDBSubnetGroup
-> f CreateDBSubnetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreateDBSubnetGroup

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

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

instance Core.ToQuery CreateDBSubnetGroup where
  toQuery :: CreateDBSubnetGroup -> QueryString
toQuery CreateDBSubnetGroup' {[Text]
Maybe [Tag]
Text
subnetIds :: [Text]
dbSubnetGroupDescription :: Text
dbSubnetGroupName :: Text
tags :: Maybe [Tag]
$sel:subnetIds:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> [Text]
$sel:dbSubnetGroupDescription:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> Text
$sel:dbSubnetGroupName:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> Text
$sel:tags:CreateDBSubnetGroup' :: CreateDBSubnetGroup -> 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
"CreateDBSubnetGroup" :: 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
"DBSubnetGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSubnetGroupName,
        ByteString
"DBSubnetGroupDescription"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSubnetGroupDescription,
        ByteString
"SubnetIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SubnetIdentifier" [Text]
subnetIds
      ]

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

-- |
-- Create a value of 'CreateDBSubnetGroupResponse' 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:
--
-- 'dbSubnetGroup', 'createDBSubnetGroupResponse_dbSubnetGroup' - Undocumented member.
--
-- 'httpStatus', 'createDBSubnetGroupResponse_httpStatus' - The response's http status code.
newCreateDBSubnetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBSubnetGroupResponse
newCreateDBSubnetGroupResponse :: Int -> CreateDBSubnetGroupResponse
newCreateDBSubnetGroupResponse Int
pHttpStatus_ =
  CreateDBSubnetGroupResponse' :: Maybe DBSubnetGroup -> Int -> CreateDBSubnetGroupResponse
CreateDBSubnetGroupResponse'
    { $sel:dbSubnetGroup:CreateDBSubnetGroupResponse' :: Maybe DBSubnetGroup
dbSubnetGroup =
        Maybe DBSubnetGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBSubnetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBSubnetGroupResponse_dbSubnetGroup :: Lens.Lens' CreateDBSubnetGroupResponse (Prelude.Maybe DBSubnetGroup)
createDBSubnetGroupResponse_dbSubnetGroup :: (Maybe DBSubnetGroup -> f (Maybe DBSubnetGroup))
-> CreateDBSubnetGroupResponse -> f CreateDBSubnetGroupResponse
createDBSubnetGroupResponse_dbSubnetGroup = (CreateDBSubnetGroupResponse -> Maybe DBSubnetGroup)
-> (CreateDBSubnetGroupResponse
    -> Maybe DBSubnetGroup -> CreateDBSubnetGroupResponse)
-> Lens
     CreateDBSubnetGroupResponse
     CreateDBSubnetGroupResponse
     (Maybe DBSubnetGroup)
     (Maybe DBSubnetGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBSubnetGroupResponse' {Maybe DBSubnetGroup
dbSubnetGroup :: Maybe DBSubnetGroup
$sel:dbSubnetGroup:CreateDBSubnetGroupResponse' :: CreateDBSubnetGroupResponse -> Maybe DBSubnetGroup
dbSubnetGroup} -> Maybe DBSubnetGroup
dbSubnetGroup) (\s :: CreateDBSubnetGroupResponse
s@CreateDBSubnetGroupResponse' {} Maybe DBSubnetGroup
a -> CreateDBSubnetGroupResponse
s {$sel:dbSubnetGroup:CreateDBSubnetGroupResponse' :: Maybe DBSubnetGroup
dbSubnetGroup = Maybe DBSubnetGroup
a} :: CreateDBSubnetGroupResponse)

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

instance Prelude.NFData CreateDBSubnetGroupResponse