{-# 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.ModifyCacheSubnetGroup
-- 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)
--
-- Modifies an existing cache subnet group.
module Amazonka.ElastiCache.ModifyCacheSubnetGroup
  ( -- * Creating a Request
    ModifyCacheSubnetGroup (..),
    newModifyCacheSubnetGroup,

    -- * Request Lenses
    modifyCacheSubnetGroup_subnetIds,
    modifyCacheSubnetGroup_cacheSubnetGroupDescription,
    modifyCacheSubnetGroup_cacheSubnetGroupName,

    -- * Destructuring the Response
    ModifyCacheSubnetGroupResponse (..),
    newModifyCacheSubnetGroupResponse,

    -- * Response Lenses
    modifyCacheSubnetGroupResponse_cacheSubnetGroup,
    modifyCacheSubnetGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.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 of a @ModifyCacheSubnetGroup@ operation.
--
-- /See:/ 'newModifyCacheSubnetGroup' smart constructor.
data ModifyCacheSubnetGroup = ModifyCacheSubnetGroup'
  { -- | The EC2 subnet IDs for the cache subnet group.
    ModifyCacheSubnetGroup -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | A description of the cache subnet group.
    ModifyCacheSubnetGroup -> Maybe Text
cacheSubnetGroupDescription :: Prelude.Maybe Prelude.Text,
    -- | The 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@
    ModifyCacheSubnetGroup -> Text
cacheSubnetGroupName :: Prelude.Text
  }
  deriving (ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool
(ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool)
-> (ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool)
-> Eq ModifyCacheSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool
$c/= :: ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool
== :: ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool
$c== :: ModifyCacheSubnetGroup -> ModifyCacheSubnetGroup -> Bool
Prelude.Eq, ReadPrec [ModifyCacheSubnetGroup]
ReadPrec ModifyCacheSubnetGroup
Int -> ReadS ModifyCacheSubnetGroup
ReadS [ModifyCacheSubnetGroup]
(Int -> ReadS ModifyCacheSubnetGroup)
-> ReadS [ModifyCacheSubnetGroup]
-> ReadPrec ModifyCacheSubnetGroup
-> ReadPrec [ModifyCacheSubnetGroup]
-> Read ModifyCacheSubnetGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyCacheSubnetGroup]
$creadListPrec :: ReadPrec [ModifyCacheSubnetGroup]
readPrec :: ReadPrec ModifyCacheSubnetGroup
$creadPrec :: ReadPrec ModifyCacheSubnetGroup
readList :: ReadS [ModifyCacheSubnetGroup]
$creadList :: ReadS [ModifyCacheSubnetGroup]
readsPrec :: Int -> ReadS ModifyCacheSubnetGroup
$creadsPrec :: Int -> ReadS ModifyCacheSubnetGroup
Prelude.Read, Int -> ModifyCacheSubnetGroup -> ShowS
[ModifyCacheSubnetGroup] -> ShowS
ModifyCacheSubnetGroup -> String
(Int -> ModifyCacheSubnetGroup -> ShowS)
-> (ModifyCacheSubnetGroup -> String)
-> ([ModifyCacheSubnetGroup] -> ShowS)
-> Show ModifyCacheSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyCacheSubnetGroup] -> ShowS
$cshowList :: [ModifyCacheSubnetGroup] -> ShowS
show :: ModifyCacheSubnetGroup -> String
$cshow :: ModifyCacheSubnetGroup -> String
showsPrec :: Int -> ModifyCacheSubnetGroup -> ShowS
$cshowsPrec :: Int -> ModifyCacheSubnetGroup -> ShowS
Prelude.Show, (forall x. ModifyCacheSubnetGroup -> Rep ModifyCacheSubnetGroup x)
-> (forall x.
    Rep ModifyCacheSubnetGroup x -> ModifyCacheSubnetGroup)
-> Generic ModifyCacheSubnetGroup
forall x. Rep ModifyCacheSubnetGroup x -> ModifyCacheSubnetGroup
forall x. ModifyCacheSubnetGroup -> Rep ModifyCacheSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyCacheSubnetGroup x -> ModifyCacheSubnetGroup
$cfrom :: forall x. ModifyCacheSubnetGroup -> Rep ModifyCacheSubnetGroup x
Prelude.Generic)

-- |
-- Create a value of 'ModifyCacheSubnetGroup' 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:
--
-- 'subnetIds', 'modifyCacheSubnetGroup_subnetIds' - The EC2 subnet IDs for the cache subnet group.
--
-- 'cacheSubnetGroupDescription', 'modifyCacheSubnetGroup_cacheSubnetGroupDescription' - A description of the cache subnet group.
--
-- 'cacheSubnetGroupName', 'modifyCacheSubnetGroup_cacheSubnetGroupName' - The 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@
newModifyCacheSubnetGroup ::
  -- | 'cacheSubnetGroupName'
  Prelude.Text ->
  ModifyCacheSubnetGroup
newModifyCacheSubnetGroup :: Text -> ModifyCacheSubnetGroup
newModifyCacheSubnetGroup Text
pCacheSubnetGroupName_ =
  ModifyCacheSubnetGroup' :: Maybe [Text] -> Maybe Text -> Text -> ModifyCacheSubnetGroup
ModifyCacheSubnetGroup'
    { $sel:subnetIds:ModifyCacheSubnetGroup' :: Maybe [Text]
subnetIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupDescription:ModifyCacheSubnetGroup' :: Maybe Text
cacheSubnetGroupDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupName:ModifyCacheSubnetGroup' :: Text
cacheSubnetGroupName = Text
pCacheSubnetGroupName_
    }

-- | The EC2 subnet IDs for the cache subnet group.
modifyCacheSubnetGroup_subnetIds :: Lens.Lens' ModifyCacheSubnetGroup (Prelude.Maybe [Prelude.Text])
modifyCacheSubnetGroup_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCacheSubnetGroup -> f ModifyCacheSubnetGroup
modifyCacheSubnetGroup_subnetIds = (ModifyCacheSubnetGroup -> Maybe [Text])
-> (ModifyCacheSubnetGroup
    -> Maybe [Text] -> ModifyCacheSubnetGroup)
-> Lens
     ModifyCacheSubnetGroup
     ModifyCacheSubnetGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCacheSubnetGroup' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: ModifyCacheSubnetGroup
s@ModifyCacheSubnetGroup' {} Maybe [Text]
a -> ModifyCacheSubnetGroup
s {$sel:subnetIds:ModifyCacheSubnetGroup' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: ModifyCacheSubnetGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyCacheSubnetGroup -> f ModifyCacheSubnetGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCacheSubnetGroup
-> f ModifyCacheSubnetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A description of the cache subnet group.
modifyCacheSubnetGroup_cacheSubnetGroupDescription :: Lens.Lens' ModifyCacheSubnetGroup (Prelude.Maybe Prelude.Text)
modifyCacheSubnetGroup_cacheSubnetGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ModifyCacheSubnetGroup -> f ModifyCacheSubnetGroup
modifyCacheSubnetGroup_cacheSubnetGroupDescription = (ModifyCacheSubnetGroup -> Maybe Text)
-> (ModifyCacheSubnetGroup -> Maybe Text -> ModifyCacheSubnetGroup)
-> Lens
     ModifyCacheSubnetGroup
     ModifyCacheSubnetGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCacheSubnetGroup' {Maybe Text
cacheSubnetGroupDescription :: Maybe Text
$sel:cacheSubnetGroupDescription:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Maybe Text
cacheSubnetGroupDescription} -> Maybe Text
cacheSubnetGroupDescription) (\s :: ModifyCacheSubnetGroup
s@ModifyCacheSubnetGroup' {} Maybe Text
a -> ModifyCacheSubnetGroup
s {$sel:cacheSubnetGroupDescription:ModifyCacheSubnetGroup' :: Maybe Text
cacheSubnetGroupDescription = Maybe Text
a} :: ModifyCacheSubnetGroup)

-- | The 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@
modifyCacheSubnetGroup_cacheSubnetGroupName :: Lens.Lens' ModifyCacheSubnetGroup Prelude.Text
modifyCacheSubnetGroup_cacheSubnetGroupName :: (Text -> f Text)
-> ModifyCacheSubnetGroup -> f ModifyCacheSubnetGroup
modifyCacheSubnetGroup_cacheSubnetGroupName = (ModifyCacheSubnetGroup -> Text)
-> (ModifyCacheSubnetGroup -> Text -> ModifyCacheSubnetGroup)
-> Lens ModifyCacheSubnetGroup ModifyCacheSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCacheSubnetGroup' {Text
cacheSubnetGroupName :: Text
$sel:cacheSubnetGroupName:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Text
cacheSubnetGroupName} -> Text
cacheSubnetGroupName) (\s :: ModifyCacheSubnetGroup
s@ModifyCacheSubnetGroup' {} Text
a -> ModifyCacheSubnetGroup
s {$sel:cacheSubnetGroupName:ModifyCacheSubnetGroup' :: Text
cacheSubnetGroupName = Text
a} :: ModifyCacheSubnetGroup)

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

instance Prelude.NFData ModifyCacheSubnetGroup

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

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

instance Core.ToQuery ModifyCacheSubnetGroup where
  toQuery :: ModifyCacheSubnetGroup -> QueryString
toQuery ModifyCacheSubnetGroup' {Maybe [Text]
Maybe Text
Text
cacheSubnetGroupName :: Text
cacheSubnetGroupDescription :: Maybe Text
subnetIds :: Maybe [Text]
$sel:cacheSubnetGroupName:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Text
$sel:cacheSubnetGroupDescription:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Maybe Text
$sel:subnetIds:ModifyCacheSubnetGroup' :: ModifyCacheSubnetGroup -> Maybe [Text]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyCacheSubnetGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"SubnetIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SubnetIdentifier"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
subnetIds
            ),
        ByteString
"CacheSubnetGroupDescription"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheSubnetGroupDescription,
        ByteString
"CacheSubnetGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
cacheSubnetGroupName
      ]

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

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

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

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

instance
  Prelude.NFData
    ModifyCacheSubnetGroupResponse