{-# 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.ElastiCache.CreateCacheSubnetGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new cache subnet group.
--
-- Use this parameter only when you are creating a cluster in an Amazon
-- Virtual Private Cloud (Amazon VPC).
module Amazonka.ElastiCache.CreateCacheSubnetGroup
  ( -- * Creating a Request
    CreateCacheSubnetGroup (..),
    newCreateCacheSubnetGroup,

    -- * Request Lenses
    createCacheSubnetGroup_tags,
    createCacheSubnetGroup_cacheSubnetGroupName,
    createCacheSubnetGroup_cacheSubnetGroupDescription,
    createCacheSubnetGroup_subnetIds,

    -- * Destructuring the Response
    CreateCacheSubnetGroupResponse (..),
    newCreateCacheSubnetGroupResponse,

    -- * Response Lenses
    createCacheSubnetGroupResponse_cacheSubnetGroup,
    createCacheSubnetGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input of a @CreateCacheSubnetGroup@ operation.
--
-- /See:/ 'newCreateCacheSubnetGroup' smart constructor.
data CreateCacheSubnetGroup = CreateCacheSubnetGroup'
  { -- | A list of tags to be added to this resource. A tag is a key-value pair.
    -- A tag key must be accompanied by a tag value, although null is accepted.
    CreateCacheSubnetGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A name for the cache subnet group. This value is stored as a lowercase
    -- string.
    --
    -- Constraints: Must contain no more than 255 alphanumeric characters or
    -- hyphens.
    --
    -- Example: @mysubnetgroup@
    CreateCacheSubnetGroup -> Text
cacheSubnetGroupName :: Prelude.Text,
    -- | A description for the cache subnet group.
    CreateCacheSubnetGroup -> Text
cacheSubnetGroupDescription :: Prelude.Text,
    -- | A list of VPC subnet IDs for the cache subnet group.
    CreateCacheSubnetGroup -> [Text]
subnetIds :: [Prelude.Text]
  }
  deriving (CreateCacheSubnetGroup -> CreateCacheSubnetGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCacheSubnetGroup -> CreateCacheSubnetGroup -> Bool
$c/= :: CreateCacheSubnetGroup -> CreateCacheSubnetGroup -> Bool
== :: CreateCacheSubnetGroup -> CreateCacheSubnetGroup -> Bool
$c== :: CreateCacheSubnetGroup -> CreateCacheSubnetGroup -> Bool
Prelude.Eq, ReadPrec [CreateCacheSubnetGroup]
ReadPrec CreateCacheSubnetGroup
Int -> ReadS CreateCacheSubnetGroup
ReadS [CreateCacheSubnetGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCacheSubnetGroup]
$creadListPrec :: ReadPrec [CreateCacheSubnetGroup]
readPrec :: ReadPrec CreateCacheSubnetGroup
$creadPrec :: ReadPrec CreateCacheSubnetGroup
readList :: ReadS [CreateCacheSubnetGroup]
$creadList :: ReadS [CreateCacheSubnetGroup]
readsPrec :: Int -> ReadS CreateCacheSubnetGroup
$creadsPrec :: Int -> ReadS CreateCacheSubnetGroup
Prelude.Read, Int -> CreateCacheSubnetGroup -> ShowS
[CreateCacheSubnetGroup] -> ShowS
CreateCacheSubnetGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCacheSubnetGroup] -> ShowS
$cshowList :: [CreateCacheSubnetGroup] -> ShowS
show :: CreateCacheSubnetGroup -> String
$cshow :: CreateCacheSubnetGroup -> String
showsPrec :: Int -> CreateCacheSubnetGroup -> ShowS
$cshowsPrec :: Int -> CreateCacheSubnetGroup -> ShowS
Prelude.Show, forall x. Rep CreateCacheSubnetGroup x -> CreateCacheSubnetGroup
forall x. CreateCacheSubnetGroup -> Rep CreateCacheSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCacheSubnetGroup x -> CreateCacheSubnetGroup
$cfrom :: forall x. CreateCacheSubnetGroup -> Rep CreateCacheSubnetGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateCacheSubnetGroup' 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', 'createCacheSubnetGroup_tags' - A list of tags to be added to this resource. A tag is a key-value pair.
-- A tag key must be accompanied by a tag value, although null is accepted.
--
-- 'cacheSubnetGroupName', 'createCacheSubnetGroup_cacheSubnetGroupName' - A name for the cache subnet group. This value is stored as a lowercase
-- string.
--
-- Constraints: Must contain no more than 255 alphanumeric characters or
-- hyphens.
--
-- Example: @mysubnetgroup@
--
-- 'cacheSubnetGroupDescription', 'createCacheSubnetGroup_cacheSubnetGroupDescription' - A description for the cache subnet group.
--
-- 'subnetIds', 'createCacheSubnetGroup_subnetIds' - A list of VPC subnet IDs for the cache subnet group.
newCreateCacheSubnetGroup ::
  -- | 'cacheSubnetGroupName'
  Prelude.Text ->
  -- | 'cacheSubnetGroupDescription'
  Prelude.Text ->
  CreateCacheSubnetGroup
newCreateCacheSubnetGroup :: Text -> Text -> CreateCacheSubnetGroup
newCreateCacheSubnetGroup
  Text
pCacheSubnetGroupName_
  Text
pCacheSubnetGroupDescription_ =
    CreateCacheSubnetGroup'
      { $sel:tags:CreateCacheSubnetGroup' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: Text
cacheSubnetGroupName = Text
pCacheSubnetGroupName_,
        $sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: Text
cacheSubnetGroupDescription =
          Text
pCacheSubnetGroupDescription_,
        $sel:subnetIds:CreateCacheSubnetGroup' :: [Text]
subnetIds = forall a. Monoid a => a
Prelude.mempty
      }

-- | A list of tags to be added to this resource. A tag is a key-value pair.
-- A tag key must be accompanied by a tag value, although null is accepted.
createCacheSubnetGroup_tags :: Lens.Lens' CreateCacheSubnetGroup (Prelude.Maybe [Tag])
createCacheSubnetGroup_tags :: Lens' CreateCacheSubnetGroup (Maybe [Tag])
createCacheSubnetGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheSubnetGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCacheSubnetGroup
s@CreateCacheSubnetGroup' {} Maybe [Tag]
a -> CreateCacheSubnetGroup
s {$sel:tags:CreateCacheSubnetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCacheSubnetGroup) 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

-- | A name for the cache subnet group. This value is stored as a lowercase
-- string.
--
-- Constraints: Must contain no more than 255 alphanumeric characters or
-- hyphens.
--
-- Example: @mysubnetgroup@
createCacheSubnetGroup_cacheSubnetGroupName :: Lens.Lens' CreateCacheSubnetGroup Prelude.Text
createCacheSubnetGroup_cacheSubnetGroupName :: Lens' CreateCacheSubnetGroup Text
createCacheSubnetGroup_cacheSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheSubnetGroup' {Text
cacheSubnetGroupName :: Text
$sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
cacheSubnetGroupName} -> Text
cacheSubnetGroupName) (\s :: CreateCacheSubnetGroup
s@CreateCacheSubnetGroup' {} Text
a -> CreateCacheSubnetGroup
s {$sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: Text
cacheSubnetGroupName = Text
a} :: CreateCacheSubnetGroup)

-- | A description for the cache subnet group.
createCacheSubnetGroup_cacheSubnetGroupDescription :: Lens.Lens' CreateCacheSubnetGroup Prelude.Text
createCacheSubnetGroup_cacheSubnetGroupDescription :: Lens' CreateCacheSubnetGroup Text
createCacheSubnetGroup_cacheSubnetGroupDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheSubnetGroup' {Text
cacheSubnetGroupDescription :: Text
$sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
cacheSubnetGroupDescription} -> Text
cacheSubnetGroupDescription) (\s :: CreateCacheSubnetGroup
s@CreateCacheSubnetGroup' {} Text
a -> CreateCacheSubnetGroup
s {$sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: Text
cacheSubnetGroupDescription = Text
a} :: CreateCacheSubnetGroup)

-- | A list of VPC subnet IDs for the cache subnet group.
createCacheSubnetGroup_subnetIds :: Lens.Lens' CreateCacheSubnetGroup [Prelude.Text]
createCacheSubnetGroup_subnetIds :: Lens' CreateCacheSubnetGroup [Text]
createCacheSubnetGroup_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheSubnetGroup' {[Text]
subnetIds :: [Text]
$sel:subnetIds:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: CreateCacheSubnetGroup
s@CreateCacheSubnetGroup' {} [Text]
a -> CreateCacheSubnetGroup
s {$sel:subnetIds:CreateCacheSubnetGroup' :: [Text]
subnetIds = [Text]
a} :: CreateCacheSubnetGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreateCacheSubnetGroup where
  type
    AWSResponse CreateCacheSubnetGroup =
      CreateCacheSubnetGroupResponse
  request :: (Service -> Service)
-> CreateCacheSubnetGroup -> Request CreateCacheSubnetGroup
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 CreateCacheSubnetGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCacheSubnetGroup)))
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
"CreateCacheSubnetGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe CacheSubnetGroup -> Int -> CreateCacheSubnetGroupResponse
CreateCacheSubnetGroupResponse'
            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
"CacheSubnetGroup")
            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 CreateCacheSubnetGroup where
  hashWithSalt :: Int -> CreateCacheSubnetGroup -> Int
hashWithSalt Int
_salt CreateCacheSubnetGroup' {[Text]
Maybe [Tag]
Text
subnetIds :: [Text]
cacheSubnetGroupDescription :: Text
cacheSubnetGroupName :: Text
tags :: Maybe [Tag]
$sel:subnetIds:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> [Text]
$sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:tags:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> 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
cacheSubnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
cacheSubnetGroupDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
subnetIds

instance Prelude.NFData CreateCacheSubnetGroup where
  rnf :: CreateCacheSubnetGroup -> ()
rnf CreateCacheSubnetGroup' {[Text]
Maybe [Tag]
Text
subnetIds :: [Text]
cacheSubnetGroupDescription :: Text
cacheSubnetGroupName :: Text
tags :: Maybe [Tag]
$sel:subnetIds:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> [Text]
$sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:tags:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> 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
cacheSubnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
cacheSubnetGroupDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
subnetIds

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

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

instance Data.ToQuery CreateCacheSubnetGroup where
  toQuery :: CreateCacheSubnetGroup -> QueryString
toQuery CreateCacheSubnetGroup' {[Text]
Maybe [Tag]
Text
subnetIds :: [Text]
cacheSubnetGroupDescription :: Text
cacheSubnetGroupName :: Text
tags :: Maybe [Tag]
$sel:subnetIds:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> [Text]
$sel:cacheSubnetGroupDescription:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:cacheSubnetGroupName:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Text
$sel:tags:CreateCacheSubnetGroup' :: CreateCacheSubnetGroup -> Maybe [Tag]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateCacheSubnetGroup" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: 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
"CacheSubnetGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
cacheSubnetGroupName,
        ByteString
"CacheSubnetGroupDescription"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
cacheSubnetGroupDescription,
        ByteString
"SubnetIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SubnetIdentifier" [Text]
subnetIds
      ]

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

-- |
-- Create a value of 'CreateCacheSubnetGroupResponse' 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:
--
-- 'cacheSubnetGroup', 'createCacheSubnetGroupResponse_cacheSubnetGroup' - Undocumented member.
--
-- 'httpStatus', 'createCacheSubnetGroupResponse_httpStatus' - The response's http status code.
newCreateCacheSubnetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCacheSubnetGroupResponse
newCreateCacheSubnetGroupResponse :: Int -> CreateCacheSubnetGroupResponse
newCreateCacheSubnetGroupResponse Int
pHttpStatus_ =
  CreateCacheSubnetGroupResponse'
    { $sel:cacheSubnetGroup:CreateCacheSubnetGroupResponse' :: Maybe CacheSubnetGroup
cacheSubnetGroup =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCacheSubnetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createCacheSubnetGroupResponse_cacheSubnetGroup :: Lens.Lens' CreateCacheSubnetGroupResponse (Prelude.Maybe CacheSubnetGroup)
createCacheSubnetGroupResponse_cacheSubnetGroup :: Lens' CreateCacheSubnetGroupResponse (Maybe CacheSubnetGroup)
createCacheSubnetGroupResponse_cacheSubnetGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheSubnetGroupResponse' {Maybe CacheSubnetGroup
cacheSubnetGroup :: Maybe CacheSubnetGroup
$sel:cacheSubnetGroup:CreateCacheSubnetGroupResponse' :: CreateCacheSubnetGroupResponse -> Maybe CacheSubnetGroup
cacheSubnetGroup} -> Maybe CacheSubnetGroup
cacheSubnetGroup) (\s :: CreateCacheSubnetGroupResponse
s@CreateCacheSubnetGroupResponse' {} Maybe CacheSubnetGroup
a -> CreateCacheSubnetGroupResponse
s {$sel:cacheSubnetGroup:CreateCacheSubnetGroupResponse' :: Maybe CacheSubnetGroup
cacheSubnetGroup = Maybe CacheSubnetGroup
a} :: CreateCacheSubnetGroupResponse)

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

instance
  Prelude.NFData
    CreateCacheSubnetGroupResponse
  where
  rnf :: CreateCacheSubnetGroupResponse -> ()
rnf CreateCacheSubnetGroupResponse' {Int
Maybe CacheSubnetGroup
httpStatus :: Int
cacheSubnetGroup :: Maybe CacheSubnetGroup
$sel:httpStatus:CreateCacheSubnetGroupResponse' :: CreateCacheSubnetGroupResponse -> Int
$sel:cacheSubnetGroup:CreateCacheSubnetGroupResponse' :: CreateCacheSubnetGroupResponse -> Maybe CacheSubnetGroup
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CacheSubnetGroup
cacheSubnetGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus